Skip to content

draft: The Race Inside .report_run_id (TOCTOU in hosted reporting) - #47

Closed
abrichr wants to merge 1 commit into
mainfrom
auto-draft/2026-07-20-the-race-inside-report-run-id-hunting-a-toctou-bug-in-hosted
Closed

draft: The Race Inside .report_run_id (TOCTOU in hosted reporting)#47
abrichr wants to merge 1 commit into
mainfrom
auto-draft/2026-07-20-the-race-inside-report-run-id-hunting-a-toctou-bug-in-hosted

Conversation

@abrichr

@abrichr abrichr commented Aug 27, 2026

Copy link
Copy Markdown
Member

Auto-drafted by the daily pipeline on 2026-07-20 and stranded: the run authored the post and pushed the branch, but could not open this PR (ADMIN_TOKEN lacked pull_requests: write). Fixed in #45; opening the backlog by hand.

Merging does not publish this post. The front matter is draft: true and deploy.yml builds with hugo --minify, without --buildDrafts. The file lands on main unpublished. Flip draft: false in a later PR to publish.

The daily scan is paused while any auto-draft/* PR is open, by design, so drafts cannot pile up. Merging or closing all three resumes it. See NEEDS_YOU B10.

abrichr added a commit that referenced this pull request Aug 27, 2026
Auto-drafted 2026-07-28, stranded until the guard fix in #45. Passes lint_post_substance.py --strict; #46 and #47 do not and are declined. Lands as draft: true, so nothing publishes. Advances the scan watermark to 2026-07-28T02:24:34Z.
@abrichr

abrichr commented Aug 27, 2026

Copy link
Copy Markdown
Member Author

Closing this one, not deleting the branch.

lint_post_substance.py --strict puts it below the floor:

FAIL: thin: 712 words (floor 850)

The core observation is genuinely sharp, and sharper than the draft lets on: O_CREAT | O_EXCL publishes the directory entry before the content, so a racing reader sees a file that exists and is empty, and has to tell "the winner hasn't written yet" apart from "malformed". Fail-closed on that ambiguity and you break a legitimate caller.

That's a lesson about exclusive-create semantics that applies to anyone using a filesystem as a lock, and it would clear the bar written that way. Written as "#163 fixed what #160 shipped", it doesn't.

The branch stays on origin and this closed PR keeps it reachable, so nothing is lost. The source PRs and the angle are recorded in docs/POST_BACKLOG.md.

A closed PR is also the resting state the guard from #45 was built to tolerate, so this branch no longer blocks the daily scan.

@abrichr abrichr closed this Aug 27, 2026
abrichr added a commit that referenced this pull request Aug 27, 2026
The three stranded auto-draft branches each carried near-miss candidates their
scan had found. #48 merged, so its 2026-07-28 entries are on main. #46 and #47
were closed, so theirs never landed.

Record them here, minus openadapt-flow #153, which main's 2026-07-19 section
already lists. Also record the two declined drafts with the idea in each that
would clear the substance bar, and the branch and closed PR where the prose
still lives.

Co-Authored-By: Claude Opus 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.

1 participant