fix(proxy): reconcile durable full resend owner - #1599
Open
Soju06 wants to merge 2 commits into
Open
Conversation
…nt main Maintainer takeover follow-up on top of @mhooooo's original commit: - Reconcile with the post-#1394 streaming flow: keep the recovery-attempt journal state alongside the sealed full-resend proof, and keep the unit test's account-neutral classifier assertion conditional (main now computes neutrality eagerly for the recovery journal on the preserved path). - Update the stale anchor-injection comment: with the sealed proof, durable anchor injection can now also run for a full resend that failed proof verification, not only for non-full-resend payloads. - Add bridge-level failover coverage (codex P1 on #1484): complete a turn on account A through the real create/response-create gate, pause A, and assert the verified session-header full resend fails over to account B with the complete history and no previous_response_id. - Satisfy the current openspec validator by moving the MUST clause onto the first body line of the modified requirement. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
7 tasks
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.
The fresh durable full-resend path can still fail before upstream dispatch when a broad legacy session-header sticky row points at a different account than the durable bridge owner: codex-lb returns
continuity_owner_conflictas a retryable 503, the client repeats the identical request, and neither persisted owner ever changes — a deterministic retry loop even though the request already carries fingerprint-verified complete context.This change represents complete durable full-resend eligibility as a sealed, immutable, request-local proof (
_VerifiedDurableFullResend) created only by the count/fingerprint/retained-output or response-bound pending-tool-call verifier. For that proved fresh reattach only, the broad session-header alias is dropped from account selection and the upstream handshake, while the durable canonical key and durable owner account remain required. The broad sticky row is left intact for sibling traffic; specific turn-state/previous-response/file owner conflicts remain fail-closed. Seeopenspec/changes/reconcile-durable-full-resend-owner/for the full design.Supersedes #1484 — original implementation by @mhooooo, taken over per the 07-30 maintainer notice. The author's commit is preserved with original authorship; takeover fixes sit on top.
What survived vs. what changed in the takeover
Survived unchanged (author's commit, rebased onto current main):
_VerifiedDurableFullResendproof, including the round-4 restack requirement (responses_input_suffix_matches_pending_tool_callssettlement path) — the author had already addressed it before going silent.fresh_reattach_broad_session_owner_ignored), affinity-header stripping on session creation, the anchor-injection fallback for proof-failed full resends, the openspec change, and the author's unit + integration tests (including the real, unstubbedtest_backend_responses_verified_full_resend_ignores_stale_broad_owner_on_durable_account).Dropped:
Takeover fixes on top (reconciliation with #1486/#1394/#1558/#1527/#1531/#1532 and the codex P1):
classify_durable_full_resendstructure and the post-fix(http-bridge): stabilize silent and clean-close recovery #1394 recovery-attempt journal flow; the unit test's account-neutral classifier assertion is now conditional because main computes neutrality eagerly for the recovery journal on the preserved path. None of the reconciliation was subsumed by fix(http-bridge): stabilize silent and clean-close recovery #1394 — main still leaves the broad session alias in selection for a proved full resend, so the conflict loop remained live._get_or_create_http_bridge_session/_submit_http_bridge_request): added bridge-level coveragetest_backend_responses_verified_full_resend_fails_over_to_new_account_after_owner_loss— a real turn completes on account A through the actual create/response-create gate, A is paused, and the verified session-header full resend fails over to account B with the complete history and noprevious_response_id.Gates
architecture-check: pass (no ratchet changes)test-unit: 5283 passed, 3 skippedtest-integration-bridge(test_http_responses_bridge.py+test_proxy_websocket_responses.py): 220 passedruff check/ruff format --check: cleanopenspec validate reconcile-durable-full-resend-owner: valid🤖 Generated with Claude Code