Repository navigation
Answer a browser retry through the append door alone - #2458
Merged
Merged
Conversation
The event endpoint read an attempted retry twice before admission: once in `_accepted_retry`, which also merged the stored comment anchor into the retry so a server-enriched anchor would not read as a conflict, and again inside `append_admitted`, whose append then scanned a third time. Nothing enriches a browser anchor since the MCP Apps transport went (#1465), so the merge was dead. `append_admitted` now returns the record and whether it appended it. The endpoint stamps the author once, before validation, gates the nudge and the thread-title request on that flag, and answers `AttemptConflict` with the same 409. The append itself no longer looks for the attempt, since the door read it under the same lease. Attempt identity is derived from the declarations it mirrors (the append envelope, `$events.ownership.derived`, author and publication) rather than a literal set, and events.md and the registry no longer say `browser_discard` shapes it. `post_reply`'s looser CLI retry rule is named in its docstring and in events.md. Also drops the stale claim that `contract_writer` turns a refusal into a CLI exit, and reads the claim's id and turn fields directly in presence, since `readable_claim` always supplies them. No behavior a user sees changes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 12, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 12, 2026
`readable_claim`, which every claim reader goes through, always supplies `id`, `turn`, `turn_opened` and `turn_closed`. #2458 dropped presence's `.get` on them; `codex.py`, `delivery.py`, presence's wait mark, `session.py`'s wake check and `tasks.py` still used `.get` as if a claim might lack them. They now read the fields directly. No behavior changes; `test_tasks.py` and `test_interact_session.py` pass. (This branch also fixed the gallery isolation test's `LIVE_ROOT` import, which #2469 fixed on main meanwhile; the merge takes main's version.) > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
Code-quality survey item F17. The event endpoint read a browser retry's attempt in
_accepted_retrybefore admission, merging the stored comment anchor into the retry first, andappend_admittedread it again under the same lease, and the append a third time. The anchor merge answered an enrichment only the MCP Apps transport made, removed in #1465.append_admittednow returns(record, appended), so the endpoint gates the nudge and the thread-title request on whether this request appended, and answersAttemptConflictwith the same 409. The endpoint stamps the author once, before validation, andbrowser_command_errorno longer restates the rule. Attempt identity is derived from the append envelope,$events.ownership.derived, author and publication; events.md and the registry description stop sayingbrowser_discardshapes it, and both namepost_reply's looser CLI retry rule.Also: the stale
append_admitteddocstring aboutcontract_writerexiting (gone since #2328), and presence reads the claim's id and turn fields directly, sincereadable_claimalways supplies them.No user-visible behavior changes.