Repository navigation
E9-1 route 2 S2b-3c (lane MB): POST /v1/reduction-sessions, implemented, and refresh refusing a route-2 session - #2175
Merged
Conversation
… reserve and max_failure_keys; pending tests (E9-1 S2a, DEC-2119 items 4 and 11) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…failure_keys with the oldest key dropped first (E9-1 S2a, DEC-2119 items 4 and 11) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…a tie Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
Stop dropping failure keys when a removal removes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…9-1 S2b-1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
… and DEC-2319 (Proposed) (E9-1 S2b-2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…-2, DEC-2319 item 2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…e, and bound a failure's cost (review of #2128, B1 and B2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…cost no scan of the keys (review of #2131, B2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…2324 (E9-1 S2b-2b) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…2324) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…wrong secret (review of #2135, B1 and B2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…n-open-store-impl
…5, DEC-2319 item 2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…item 2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…s and pending tests (E9-1 S2b-3b) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…emented (E9-1 S2b-3b) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
… S2b-3c) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…session reduction_only (E9-1 S2b-3c) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…: stubs, pending tests, DEC-2324 item 4 (review of #2153) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
…it: one ES256 and one Ed25519 check on every call (DEC-2324 item 4) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iKGDLLDHxGNmpHbTwqW8K
Main took RB-19 for the connect teardown (#2289), so the route 2 failed-assertion runbook this branch adds is renumbered RB-20. Claude-Session: https://claude.ai/code/session_01XaatUQzQSGvN12QXK3pnJh
…poisoned lock (review of #2166) The review found the T0+339 assertion vacuous: settle answers false there whether or not the failure lapsed. Two devices now pin the window to the second, one reaching its limit at 338 s only if a failure at 39 s still counts, the other reaching it afresh at 339 s only if it lapsed then. Sixteen threads taking one challenge must find exactly one Some, and a panic inside issue that poisons the store's locks must leave take and settle working. Sessions::standing's doc names Standings as the standing's one owner, which the session store alone writes. Claude-Session: https://claude.ai/code/session_01XaatUQzQSGvN12QXK3pnJh
9 of 10 tasks
…cookie; reserve DEC-2127 (review of #2174) The review's majors: a verified assertion past a device's and past an address's failure limit still answers 201 and raises nothing, and a challenge refused once is refused again with a correct assertion. Its minors: no reply of the assertion route sets or clears the device cookie, an expired challenge is the one 401, the alert's line is a function of nothing a request carried (alert_line, a stub), and the shared cookie-less device budget is DEC-2127. Reads takes a standing lookup in place of Standings, so the session store stays the standing's one owner, and a test pins that the judge asks it once per request, of the decoy for an unknown passkey. Claude-Session: https://claude.ai/code/session_01XaatUQzQSGvN12QXK3pnJh
…ute-impl Implements what #2174's review added: alert_line writes the code and RB-20's path and nothing else, alerted writes it, and the route answers the judge's standing lookup from Sessions::standing, so Sessions no longer lends out its Standings. The three new HTTP tests lose their ignore. Claude-Session: https://claude.ai/code/session_01XaatUQzQSGvN12QXK3pnJh
8 of 9 tasks
A handler that settled every presentation as a failure would only move the alert, so no answer showed it; nine failures and an opening must raise nothing, and the next failure, the tenth, must raise it. Claude-Session: https://claude.ai/code/session_01XaatUQzQSGvN12QXK3pnJh
kunwarshivam
changed the base branch from
claude/mb-reduction-open-route
to
main
October 25, 2026 22:24
kunwarshivam
marked this pull request as ready for review
October 25, 2026 22:24
…(B10, review of #2175) The 15-minute test checked the Set-Cookie with contains, so an extra attribute such as Domain passed. It now checks the one Set-Cookie's name, then Path, Max-Age, Secure, HttpOnly and SameSite in that order, and nothing else. Claude-Session: https://claude.ai/code/session_01XaatUQzQSGvN12QXK3pnJh
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.
Story
E9-1, route 2, slice S2b-3c: the implementation half of DEC-77. Spec: workspace API spec §4.10 route 2 items 1 and 3 to 5. Decisions: DEC-2117, DEC-2119, DEC-2127, DEC-2319 item 2, DEC-2324.
Stacked on #2174 (its tests), with main merged in (merge commits only).
reduction::openruns these steps, in this order, for every request:Request::parse: exactly five string members. The base64url ones are unpadded and at most 8,192 characters.takethe challenge before anything is judged.opening::judgewith the deployment's RP and the artifact store's keys;Sessions::standing(member), so the session store stays the standing's one owner and lends out noStandings.settlewith the gate: an opening counts no failure. The failure that first reaches a limit callsalerted(), which writesalert_line()to stderr,operator_alert reduction_failures_over_limit docs/runbooks/RB-20-reduction-failures.md, and counts it inalerts_raised().open_reduction_onlyreplaces a presented session, and the answer is 201 withno-storeand the session cookie forREDUCTION_ONLY_LIFETIME_S. Every other outcome is the one 401 withno-store. No reply sets or clears the device cookie.Refresh:
POST /v1/sessions/refreshchecksopened_by_passkeybefore any token is read or any refresh runs. It answers 403reduction_only(Refused::ReductionOnly), keeps the session, and sets or clears nothing.Non-Rust changes: only two, besides the tests' 10 deleted
#[ignore = "pending E9-1"]lines:docs/runbooks/RB-20-reduction-failures.md, the runbook the alert ships with. It was renumbered from RB-19, since main gave RB-19 to the connect teardown (E10-13 slice 6 F3 adapter B (lane X): wire the connect finish's vault fingerprints as the connection manager (DEC-2348) #2289). It quotes the exact alert line and cites DEC-2127.docs/design/infrastructure.md: §8.2'sreduction_failures_over_limitrow names RB-20 (it said "None yet: owed with E9-1's route 2"), and §8.4's runbook table lists it.Spec clause → test
The tests are #2174's: 10 in
reduction_sessions_http.rs(its table, plusan_opening_counts_no_failure), now served.Dependencies
None.
Journal events added
None.
Not done
S2b-4:
agent_idsandconnection_ids,/me/session, the reach tests, and the spec's served status.Decisions needed
None.
Safety checklist (safety-critical changes)
unwrap,expect, or panics on trading pathsx-plannedor(planned: ...)marker added to a value the code already serves, or a reviewer signed it off (DEC-683)Checks
cargo xtask ci fastparts are green locally.cargo xtask ci mutantson the diff vs main: 33 mutants, 25 caught, 8 unviable, 0 missed.Max-Age1800, an opening settled as a failure, the presented session not replaced,no-storedropped,alertednot counting,alert_linecarrying a field, the judge's standing asked of a fixed member, and an opening's settle skipped.Review record
Pair #2174 (S2b-3c tests, 722f88d) + #2175 (S2b-3c impl, fb22cb5), E9-1 route 2 (reduction-only sessions, AGENTS.md rule 13). Builder: lane L1 builder 2. Independent review on a different model: PASS for both and for the pair; no blockers, no majors.
mandate-api-serverhttp.rsandreduction.rs; docs RB-20 runbook plus infrastructure §8.2/§8.4 rows; tests changed only by 10 deleted#[ignore = "pending E9-1"]lines (DEC-77).-D warningsclean;mandate-api-servernextest 547/547;ci pendingall 21 remaining fail at a stub; spec-guard no protected paths.Set-Cookie) survived acontainscheck; fixed before landing at the coordinator's hold (below).alert_line()exactly; a reduction-only session's refresh answers 403reduction_onlybefore the token is read and ends nothing.srcdiff is byte-identical to 5642daa's. The 15-minute test now asserts exactly oneSet-Cookie, its nameCOOKIE_NAMEwith a non-empty value, and the attribute list equal to["Path=/", "Max-Age=900", "Secure", "HttpOnly", "SameSite=Strict"]in order. Delta review PASS for both heads: B10 (; Domain=x), droppedHttpOnly,SameSite=Lax, droppedSecure, reordered attributes, and a secondSet-Cookieeach now fail; nextest 547/547; mutants 0 missed.cirun 40242143866 (pull_request) is green on fb22cb5.Coordinator-approved-head: fb22cb5
https://claude.ai/code/session_01XaatUQzQSGvN12QXK3pnJh
Generated by Claude Code