Skip to content

fix(syw): exclude writer-unreadable openai.com cross-posts (#245) - #249

Merged
schmug merged 1 commit into
mainfrom
fix/syw-exclude-openai-crossposts
Sep 27, 2026
Merged

schmug merged 1 commit into
mainfrom
fix/syw-exclude-openai-crossposts

Conversation

@schmug

@schmug schmug commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Closes #245. Implements option 1 (exclude at gather) with the two refinements from the decision comment.

Change

  • syw_gather.WRITER_UNREADABLE_HOSTS = frozenset({"openai.com", "www.openai.com"}), with a comment explaining why: WebFetch, the writers' only read path, gets 403 host-wide there, and urllib's occasional 200 doesn't help. The comment says to revisit if a WebFetch probe of an openai.com/index/... post ever succeeds.
  • parse_openai_alignment drops any merged item (index or RSS) whose urlsplit(url).hostname is in that set. The host must match exactly; a substring never matches, so alignment.openai.com is kept. Each drop writes a dropped.jsonl row via append_dropped (stage: gather, adapter: openai-alignment, url, reason: "host not readable by writers (#245)"). append_dropped already swallows OSError, so logging can't fail the adapter. The "Lead parsers — pure" section header and the docstring note this one side effect.
  • normalize_url and the seen.json keys are unchanged. build_plan is untouched and stays pure. render.py, orchestrate.py and tests/data/ are unmodified.
  • Docs: spec §2.1 OpenAI row has an Amended (Keep unfetchable openai.com cross-posts out of Show Your Work's pool #245) note, and Keep unfetchable openai.com cross-posts out of Show Your Work's pool #245 is added to the status line's list of amendments. SKILL.md Layout has one line on the exclusion.

Tests

New test test_openai_alignment_drops_writer_unreadable_openai_com_cross_posts checks four things: no returned URL has host openai.com/www.openai.com, /index/an-alien-mind is gone, /metagaming is kept, and 7 dropped.jsonl rows were written (stage, adapter and #245 reason).

It was red before the fix, failing for the right reason:

>       assert not {u for u in urls if urlsplit(u).hostname in {"openai.com", "www.openai.com"}}
E       AssertionError: assert not {'https://openai.com/index/advancing-independent-research-ai-alignment', 'https://openai.com/index/an-alien-mind', ...}
1 failed, 48 deselected in 0.16s

Counts updated to exactly what the fix implies. The fixture index holds 7 openai.com cross-posts, and nothing else moved:

  • test_openai_alignment_unions_rss_with_the_index: 27 → 20. The cross-post assertion is removed, and the Metagaming assertion is kept.
  • test_openai_alignment_keeps_an_rss_only_post: 28 → 21
  • test_gather_marks_new_items_and_records_first_observation: lead 148 → 141 (the comment's "149 parsed" becomes 142)
  • test_the_gather_cli_refuses_until_seeded: GATHER ok lead=148 → 141
  • test_seed_marks_everything_seen: SEED ok marked=148 → 141

Gates

$ python3 -m pytest -q
1761 passed in 37.32s        # baseline on main 73d9403: 1760; +1 new test
$ ruff check .
All checks passed!
$ ruff format --check .
55 files already formatted

Not verified here

I did not run gather or seed against the live ~/.config/show-your-work. The show is live, and this change touches no seeded state: the excluded URLs stay in seen.json/observed.json as they are. The next show-your-work-weekly run (Sat 10:00) is the first live exercise.

🤖 Generated with Claude Code

The OpenAI alignment index cross-posts to openai.com/index/..., where
WebFetch (the writers' only read path) gets 403 host-wide. A planned
cross-post was a refused brief, or a whole-run FAILED when it won the
feature slot. parse_openai_alignment now drops items whose exact parsed
hostname is in WRITER_UNREADABLE_HOSTS and logs each to dropped.jsonl.
alignment.openai.com items are unaffected; URL identity is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep unfetchable openai.com cross-posts out of Show Your Work's pool

1 participant