Repository navigation
fix(syw): exclude writer-unreadable openai.com cross-posts (#245) - #249
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 anopenai.com/index/...post ever succeeds.parse_openai_alignmentdrops any merged item (index or RSS) whoseurlsplit(url).hostnameis in that set. The host must match exactly; a substring never matches, soalignment.openai.comis kept. Each drop writes adropped.jsonlrow viaappend_dropped(stage: gather,adapter: openai-alignment,url,reason: "host not readable by writers (#245)").append_droppedalready swallowsOSError, so logging can't fail the adapter. The "Lead parsers — pure" section header and the docstring note this one side effect.normalize_urland theseen.jsonkeys are unchanged.build_planis untouched and stays pure.render.py,orchestrate.pyandtests/data/are unmodified.SKILL.mdLayout has one line on the exclusion.Tests
New test
test_openai_alignment_drops_writer_unreadable_openai_com_cross_postschecks four things: no returned URL has hostopenai.com/www.openai.com,/index/an-alien-mindis gone,/metagamingis kept, and 7dropped.jsonlrows were written (stage, adapter and #245 reason).It was red before the fix, failing for the right reason:
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 → 21test_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→141test_seed_marks_everything_seen:SEED ok marked=148→141Gates
Not verified here
I did not run
gatherorseedagainst the live~/.config/show-your-work. The show is live, and this change touches no seeded state: the excluded URLs stay inseen.json/observed.jsonas they are. The nextshow-your-work-weeklyrun (Sat 10:00) is the first live exercise.🤖 Generated with Claude Code