Skip to content

Record fork lane acquisition independently of filesystem time - #4996

Merged
max-sixty merged 3 commits into
mainfrom
codex/ui-hill-climb-campaign
Nov 1, 2026
Merged

max-sixty merged 3 commits into
mainfrom
codex/ui-hill-climb-campaign

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

A fork follower could claim a message that arrived before it took over the lane. The cutoff came from inode ctime, which can trail the event clock on Linux; CI exposed this in test_a_lane_counts_from_when_it_took_the_name while landing #4991.

Record the admission cutoff explicitly after taking the lane. A fork-specific transition lock makes lease replacement and cutoff publication atomic to readers, so a message cannot first wake the session and then become held. The lock is separate from the delivery lock that some readers already hold. The kernel lease remains the sole proof that the follower is live; generic wait leases keep their current format.

Validation: 22 focused cases passed, including all 15 fork tests, real browser admission blocked during publication, pre-cutoff delivery, Codex delivery under its existing session lock, and session retirement. The stale-filesystem-time control fails at the original assertion. Independent review, Ruff check/format, diff checks and full pnpm run check passed; the committed protocol baseline includes the new record. The clock failure mechanism is reproduced on main; the original CI runner’s timestamp values were not captured.

This was written by Codex on behalf of max-sixty

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Cutoff publication can take a message back from the session. The writer lock serializes takers, but readers can still observe the gap between sampling the cutoff and publishing it; acquisition needs to be consistent with admission and delivery readers too.

Comment thread src/leaf/forks.py Resolved
@max-sixty
max-sixty merged commit 780e324 into main Nov 1, 2026
5 checks passed
@max-sixty
max-sixty deleted the codex/ui-hill-climb-campaign branch November 1, 2026 21:12
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.

2 participants