fix(http-bridge): preserve goal-restart recovery across reconnects - #1680
Open
leventov wants to merge 13 commits into
Open
fix(http-bridge): preserve goal-restart recovery across reconnects#1680leventov wants to merge 13 commits into
leventov wants to merge 13 commits into
Conversation
Permit an explicit, account-neutral Codex goal restart to retire an unchanged legacy owner only while its persisted account status is unavailable. Preserve fail-closed routing for all other continuity evidence and guard retirement with one compare-and-set tombstone.
leventov
force-pushed
the
fix/recover-restarted-conversation-http-bridge
branch
from
August 10, 2026 12:18
2412c6d to
2558b8c
Compare
15 tasks
Collaborator
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Summary
This PR is the HTTP-bridge follow-up to #1679. It carries the verified,
request-scoped goal-restart capability from direct WebSocket routing through
bridge lookup, durable ownership, replacement, pre-dispatch reconnect, and
detached-generation retirement.
It is intentionally stacked on #1679. Until #1679 lands, GitHub's diff against
mainalso displays the parent commits; the object-level review range is:Do not merge this PR before #1679.
No public wire format, setting, schema, or default timeout changes.
Linked issue: none exists for this incident-derived defect; regression coverage
exercises the externally failing
/backend-api/codex/responsespath.Behavior and safety
selection instead of silently reusing or forwarding a bridge owned by the
unavailable account.
persisting it on a bridge for later ordinary requests.
tool state, and every request that does not satisfy fix(proxy): recover goal restarts from unavailable owners #1679's proof gate.
fence prior durable ownership during canonical takeover.
detached lane after queue publication clears the mutable reservation marker.
them in session-cap accounting, drain status, and shutdown cleanup.
replacement generation's canonical key.
terminal recovery, drained reservation cleanup, and account invalidation.
re-raise it without dropping detached lifecycle tracking early.
release cannot close the replacement generation lease.
prewarm, submit, send-failure, and post-handoff cleanup paths.
failed before
response.create; account-neutral typed recovery remainsowner-bound.
OpenSpec
openspec/changes/archive/2026-08-10-recover-restarted-conversation-affinity/.openspec/specs/sticky-session-operations/.predecessor admission, detached-generation capacity, and shutdown ownership
as externally testable requirements.
Origin and concurrent work
Landed lineage:
b1d27bc6) introduced bounded stale hard-owner cleanup; this stackretains its fail-closed default and consumes only fix(proxy): recover goal restarts from unavailable owners #1679's proof-gated restart
capability.
201281b5) established the account-neutral fresh-resend classifierreused by fix(proxy): recover goal restarts from unavailable owners #1679 and this bridge follow-up.
68397054) enforced ownership ofprevious_response_id; this PR doesnot make typed continuations account-neutral.
f2f8f916) and fix(proxy): recover dead durable bridge anchors fast #1625 (85f1ee4b) established HTTP bridge recovery anddead-owner handling that this PR extends at replacement/reconnect boundaries.
Concurrent work reviewed for overlap:
lifecycle, and bridge regression files. The second branch to land must retain
both operation ownership and this request-scoped restart authority.
request_submit.pyand HTTP bridge tests; circuit strikes must remain based onrequest events, not lifecycle cleanup alone.
fencing must compose with canonical replacement takeover here.
neither grants goal-restart authority to an ordinary bridge request.
Review
Persistent review
019feb89-9ebd-7960-8b26-32311834e948found two concrete P1lifecycle defects in the equivalent combined tree:
after queue publication cleared its reservation marker;
Both are addressed by
e77afa9b, with production comments, focusedregressions, and normative OpenSpec scenarios.
Persistent exact-range review
019febb3-6aee-7e21-b66c-7449828f2a1fthenidentified six concrete follow-up gaps: detached turn-state publication, two
unit tests crossing real durable boundaries, direct-close registry cleanup,
pre-submit reservation retirement, and account-level closure of detached
generations. All six are addressed by
0ff5443awith focused isolatedregressions, production comments, and synchronized OpenSpec requirements.
Persistent exact-range re-review
019febf0-f6cb-7071-9808-b62ee07540ecfound oneadditional P1: caller cancellation could remove detached lifecycle ownership
before direct close finished. That finding is fixed by
9881614e. The samecommit also fixes the recurring cloud
bridge_instance_mismatchrace seen onboth #1677 and #1680 by fencing each same-replica replacement generation with
a new durable owner epoch and adding deterministic routed synchronization.
A fresh non-ephemeral re-review is running against the corrected exact object
range
cd554303..9881614e.Reviewer conversation:
019fec0f-3308-7d41-b642-43d02e41ffc0Validation
Current-head local validation:
Fresh cloud CI and the exact-range persistent re-review are in progress at
9881614e.Screenshots / output
No dashboard-visible change.
Simplicity
Checklist
included.
CHANGELOG.mdwas not edited.