Blind judges preferred the rewrite, so we rewrote 751 posts.
What the judges said and what the sweep did
Opus preferred the rewrite in 12 of 20 and Sonnet in 14 of 20. The sweep rewrote 751 posts, and the pass-2 sweep applied 106 posts to the blog repo.
rewrite.py now refuses duplicate sentences and escaped titles, and the one-voice check skips the Related list. Alongside the rewrites we merged 17 duplicate posts with redirects and fixed 22 corpus defects. The tests behind the guards were test_blog_rewrite_dupes_titles, rewrite and rewrite_facts, 70 passing, and the split gate was green.
The part that wasn’t about posts
The session manifests are rewritten by the hook, the close command, the attach command, two sweeps and an identity refresh. The ticket for it was about making those rewrites go through one locked, atomic helper.
That helper is manifest_io.mutate. We migrated session_hook, session.py close, session_attach, both sweeps and refresh_session_identity onto it. The race test fails before the migration and passes after it.
What the review flagged in the helper
The helper was reviewed by Codex at high effort. The review ran 338.2 seconds and came back with this as its first item:
High: lib/manifest_io.py:133-146: lock-open failures silently revert to unlocked read/modify/write.
If the lock file could not be opened, the code carried on with an unlocked read, modify and write, silently.
The review produced five findings in total. The commit records “Codex review 5 findings applied”.
Where it ended up
The ticket landed with the split gate green: beelink 15366 and local 1508. It began at 2:18 AM and took 33 minutes, and the review was logged at 2:32 AM, inside that window.
The race test fails before and passes after. The review’s first item was a different question: what mutate does when it can’t open its lock. At lines 133 to 146 of lib/manifest_io.py, the answer was that it quietly went back to the unlocked write.
AI Skills
Use this lesson with the AI assistant you already use
A ticket moved six manifest writers onto one locked, atomic helper called manifest_io.mutate, and its race test failed before the migration and passed after. A Codex review of the helper still put a High finding first: it silently fell back to an unlocked write when the lock file could not be opened.
Paste the prompt, share only the context needed to answer it, and treat the result as a draft for your review. Do not include confidential information or let an AI assistant make changes without your approval.
Optional: for a visual report and saved memory, run /dxdev first.
Don’t have it? Get it at dxdev.com/skills/dxdev. The prompt works without it.
dxdev LESSON · paste into your AI coding agent
LESSON: A Locking Helper Must Fail Loudly When It Cannot Lock, Because A Passing Race Test Only Covers The Happy Path
SOURCE: dxdev.com/blog/blind-judges-justified-751-rewrites
WHAT HAPPENED: The session manifests were rewritten by the hook, the close command, the attach command, two sweeps and an identity refresh. The ticket moved all of them onto manifest_io.mutate, and the race test confirmed the change. The ticket landed with the split gate green, beelink 15366 and local 1508, after starting at 2:18 AM and taking 33 minutes. A Codex review at high effort ran 338.2 seconds inside that window and returned five findings. Its first finding pointed at lines 133 to 146 of lib/manifest_io.py. If the lock file could not be opened, the code carried on with an unlocked read, modify and write, and said nothing. All five findings were applied.
THE RULE: When a helper exists to guarantee exclusive access, treat its failure to acquire the guarantee as an error to raise or report, never as a cue to continue unguarded. A test that proves the helper works when locking succeeds says nothing about what it does when locking fails.
CHECK MY CODE, then report PASS or FAIL with file:line for each:
1. Every branch where the lock cannot be opened or acquired raises or reports an error instead of continuing with an unlocked read, modify and write.
2. A test forces the lock open to fail and asserts that the mutate call errors out and leaves the manifest unchanged.
3. The race test is paired with a separate failure path test, so a green race test is not the only evidence that the helper is safe.
THEN PRINT: a table (check, PASS/FAIL, evidence, fix) + a verdict (applies / partially / OUT_OF_SCOPE / no) + the single most important next action.