You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
With rate limiting armed or on the REST door, a signed-in request still reads the session twice: give the request one shared session read (follow-up to #35457) #35606
area:uxdomain:serverDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpriority:p1High: required for production / M2
Filing gate: ① a measured defect, the half of #35457 its PR cannot reach inside its file surface. PR #35598 ("Part of #35457") makes the dispatcher's auth gate and the declared-endpoint fallback reuse the identity step's session read. Two more reads per request remain. Suggested grade: p1, because it is the rest of #35457, which objectstack-ai/cloud#4563 (p1, hosted page load 9–10 s) names as its blocker. ⛔ Not a claim; triage sets lane and grade.
Measured (real kernel, sqlite-wasm, real AuthPlugin, Bearer session, warm; origin/main 97f342037d; the os-dev report on #35457, comment 7016195995)
Inbound rate limiter. With server.security.rateLimit armed, every request (dispatcher and REST) calls getSession once more. The caller is packages/runtime/src/security/resolve-session-principal.ts:64, reached from dispatcher-plugin.ts:911 (the card's "near 217" is readGatedSessionUser, a different caller). The limiter runs in the transport's middleware seam. The Hono adapter runs the whole IHttp middleware chain to completion, and only then calls the route, with a separate request object and no shared async scope. So packages/runtime cannot hand the limiter's read to the route without a cross-request cache, which is ruled out.
REST door with an ADR-0069 gate active.GET /api/v1/data/<object> issues 2 getSession calls: the identity read, plus core decideAuthGate under authGate: 'reread-when-active' (packages/core/src/security/request-execution-context.ts:226, used by packages/rest/src/rest-server.ts:3484). That is 2 sys_session token lookups per REST request.
On remote Turso every read is a round trip, so each extra read adds one per request on hosted.
Done when
One request reads the session and its user once on every door (dispatcher, REST, declared endpoints), with the rate limiter armed and with a session gate active. A real-kernel test pins the count for each door and posture. Nothing is cached across requests, and revocation, expiry, held-session (403) and anonymous (401) behave as today.
Direction (the dev's recommendation, to be designed on this card)
A core-owned per-request session-read memo, in the shape of the existing request-grants memo: the transport opens it per request, and core readSession, decideAuthGate and the runtime limiter consult it. One carrier fixes all three doors. The narrower alternative, one async scope across the Hono middleware seam and the route, fixes only the limiter-to-dispatcher pair and leaves REST at 2. Surface: packages/core/src/security/**, the Hono server plugin's middleware seam, packages/runtime/src/security/resolve-session-principal.ts, packages/rest/src/rest-server.ts (consumer only).
Dedupe: issue search rate limit getSession, reread-when-active, session read once request scope, limiter session read → only #35457.
Grading note for triage · 2026-11-19T17:15Z
Correcting the filing's p1 suggestion. Cloud answered on #35457 (comment 7016425225): hosted does not arm the inbound rate limiter on either plane, because it declares no budget. So the limiter read in this card never runs on hosted, and PR #35598 alone takes hosted's dispatcher session read from 2 to 1 (cloud#4563 re-measures once a pin carries it). That leaves the REST door's second read, decideAuthGate under reread-when-active, which runs only when an ADR-0069 session gate is active. This card is a framework improvement, not cloud's blocker. Grade it on that basis.
Triage: lands in domain:server · pm:queue; rationale: area:ux · Bug · Impeded (with rate limiting armed or on the REST door, a signed-in request still reads the session twice) · end users, every request · measured → p1: it is the half of #35457 (p1) that PR #35598 cannot reach, and objectstack-ai/cloud#4563 (p1) waits on that family; a blocker takes the grade of what it holds.
Claim: area ux-3 of repo:objectstack#5, p1 (triage 7017357468; picked by card-pick.mjs --order area:ux; seat 5: "once triage grades #35606 p1, take it in your free slot"). The maintainer, verbatim, 2026-11-19T14:38Z: 「当前任务处理完,后续只处理 p1」 · 2026-11-19T23:11Z
Session: session_01Utp6CZiaBg6rk7dpy1s9Me
Account: os-bill
Branch: claude/issue-35606-request-session-read-memo
Worktree: objectstack-issue-35606 (os-dev worktree in the ux-3 container)
Domain: domain:server
Seat: repo:objectstack#5
Area: ux-3
File surface: a per-request session-read carrier in packages/core/src/security/ (beside request-grants-memo.ts), its consult points in core readSession / decideAuthGate (request-execution-context.ts), the Hono adapter's per-request scope in packages/plugins/plugin-hono-server/src/adapter.ts (and hono-plugin.ts only if the scope must open there), the runtime limiter packages/runtime/src/security/resolve-session-principal.ts and its caller in dispatcher-plugin.ts, packages/rest/src/rest-server.ts only if the REST door must pass the carrier, real-kernel pins per door and posture, changeset. ⛔ No packages/spec/**, no plugin-auth, no change to who is admitted or refused. Stop on breach and report.
Container & model: L, mode:subagent, model: default — no path-derived mandate (core security request path), effort: xhigh
Clause-②: no
Accept set: unchanged. Which requests are admitted or refused, and with which status, does not move; only how many times one request reads the session and the user.
Metadata-protocol: none
Responsibility: platform — core request execution context, the Hono transport seam and the runtime limiter (objectstack); any deployment with an inbound rate-limit budget or an ADR-0069 session gate on the REST door.
Thread-read: 7017357468
Premise: holds as filed — measured at 97f342037d by the #35457 dev on a real kernel (limiter armed: +1 getSession per request; REST door with a gate active: 2); the dev re-measures at origin/main after PR #35598 before code.
Serial constraints cleared: no other area holds these files; overlap-check runs on the branch before every push.
Pre-claim lane: server / core security request path (area:ux, ux-3 row; follow-up of #35457, nested under it).
Pre-claim deps: none open (#35598 merged).
Prior rulings read: check-prior-rulings.mjs --card 35606 --terms session,rate,limit,reread,memo,gate --paths at origin/main: no ruling on the card's thread; ADR-0069 D3–D5 (MFA, session controls, network gating) and ADR-0138 D7 (abuse limits, ADR-0121 D6 unchanged) bound it: every check and every limit still runs once per request on the shared read.
{
"issue": 35606,
"status": "done",
"branch": "claude/issue-35606-request-session-read-memo",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35703",
"head": "655c4e2399",
"session": "session_01Utp6CZiaBg6rk7dpy1s9Me",
"premise_still_valid": true,
"summary": "One core-owned per-request session-read carrier (packages/core/src/security/request-session-read.ts, AsyncLocalStorage, shape of request-grants-memo.ts) that the runtime inbound limiter, core readSession and decideAuthGate (reread-when-active) read through; a stored read is served only for the same auth API object and identical headers, while no engine write has landed or is in flight since the read opened (write epoch + the grants memo's write observer), and while the session is unexpired; a throwing read is never stored, values are cloned, scopes close when the request settles. The Hono adapter runs its middleware chain in a scope and hands it to an IHttpServer-registered route only when every handler between seam and route is a whole-server middleware; routes behind a path-scoped middleware (plugin-auth's door under the auth base path, where the org IP list is judged on the read) or a yielding route, and all raw-app routes, read for themselves; every request starts outside any scope; seam and route share one header reading (host backfilled). Re-measured at origin/main 03865ae995 first: premise holds ((a) 2, (b) REST 2, (c) REST 3); after: 1/1/1 on every door and posture.",
"before_after": {
"method": "real kernel (ObjectQL + sqlite-wasm + Hono + AuthPlugin + SecurityPlugin + REST + dispatcher), warm Bearer request, counts getSession / sys_session-by-token / sys_user-by-id",
"a_limiter_dispatcher_GET_/api/v1/packages": "2/2/2 -> 1/1/1",
"a_limiter_REST_GET_/api/v1/data/pin_note": "2/2/2 -> 1/1/1",
"b_gate_REST": "2/2/2 -> 1/1/1",
"b_gate_dispatcher": "1/1/1 -> 1/1/1 (already one after #35598)",
"c_both_dispatcher": "2/2/2 -> 1/1/1",
"c_both_REST": "3/3/3 -> 1/1/1",
"d_default_dispatcher_REST_authmount": "1/1/1 -> 1/1/1 (both measured: BASE leg and HEAD, scratch file, not committed)",
"control_limiter_auth_mount_GET_/api/v1/auth/client-address": "2 -> 2 (reads for itself behind the auth door)"
},
"tests": "At 655c4e2399, all under os-verify-lock (VERDICT command-exit 0): runtime pin src/http-dispatcher.session-read-once.pin.test.ts 'Tests 26 passed (26)'; plugin-hono-server src/session-read-scope.pin.test.ts 5/5; core src/security/request-session-read.test.ts 15/15. Full suites: core vitest --project local 'Test Files 154 passed (154) / Tests 3670 passed (3670)'; plugin-hono-server vitest run 'Test Files 43 passed (43) / Tests 581 passed (581)'; runtime vitest --project local 'Test Files 631 passed (631) / Tests 11649 passed | 25 skipped (11674)'; typecheck core 0, plugin-hono-server 0, runtime 0 ('check:test-typecheck: OK'). Reverse verification at BASE 03865ae995 (core/hono/runtime sources reverted, final pin file kept, core+hono rebuilt, ablation-dist-preflight marker absent): 'Tests 10 failed | 16 passed (26)', every star red: 9x 'expected { getSession: 2, sys_session: 2 } to deeply equal { getSession: 1, sys_session: 1 }', 1x getSession 3 ((c) REST); all controls without a one-read clause green at BASE; restored (git status --porcelain empty, rebuilt, preflight marker back). Ablation A1 (scripts/ablation-replace.mjs, seamReadsReachRoute answers true, anchor 1->0, blob 0da067a3ecff->29dc9cac98bb): hono pins 'Tests 2 failed | 3 passed (5)' (path-scoped door, yielding route); restored blob == HEAD, git diff HEAD empty. Ablation A2 (adapter + carrier from 9244357e1a, the earlier request-wide scope; hono rebuilt, preflight confirmed): auth-mount control 'AssertionError: expected 1 to be 2'; restored, hashes == HEAD, rebuilt, preflight marker present. REST suite (packages/rest vitest --project local, 421 files / 8625 passed / 351 skipped) ran green at 9244357e1a (earlier design), not re-run at final head: REST package untouched and its readers' behaviour under a non-Hono or fresh-scope route is identical between the two designs.",
"gates": "Local derived set: node scripts/pm/dispatch-gates.mjs --commands at 655c4e2399 = 76 commands; all 76 exit 0 (captured before any pipe, per-command logs); run split across a container restart at the same head (70 + 6). --ran with recorded exit codes: 'Run reconciliation — 76 derived, 76 run, 0 NOT-MEASURED, 0 UNRUN' ('a DERIVED zero'). check:nul-bytes OK. check-platform-checklist not owed (no export renamed or removed). CI check-runs on 655c4e2399 at report time: success — Auto Label, Dogfood Regression Gate, Plan Test Core shards, Plan Test UI shards, filter, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Flag docs affected by code changes, Check PR Size, Check Changeset, PR-body guards, Governed Surface Queue Guard; 10 skipped; in_progress — Test Core 1-10/10, Build Core, Build UI Deps, Live E2E UI, Lint · docs & code guards, Lint · ESLint, Lint · repo & tooling gates, Lint · scoped (query-options erasure, slot lookup & corpus), Lint · CI, release & engine gates, Type Check (workspace, source gates, consumer gates, debt ledger). Not waited on (os-dev).",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: no); CI 'Dogfood Regression Gate' success on 655c4e2399",
"governed": "node scripts/pm/check-governed-merges.mjs --branch HEAD: '0 of 12 path(s) hit the register ... NOT governed', +1383 / -137, under the 3000-line human-merge threshold",
"overlap_check": "node scripts/pm/overlap-check.mjs --branch=claude/issue-35606-request-session-read-memo before each push: 'VERDICT clean exit 0' (last: 655c4e2399 vs origin/main c03a8a3428, 0 PR heads)",
"files_changed": ".changeset/35606-request-session-read-once.md; packages/core/src/security/{index.ts, request-execution-context.ts, request-grants-memo.ts, request-session-read.ts (new), request-session-read.test.ts (new), resolve-authz-context.ts}; packages/plugins/plugin-hono-server/src/{adapter.ts, session-read-scope.pin.test.ts (new)}; packages/runtime/src/{dispatcher-plugin.ts, http-dispatcher.session-read-once.pin.test.ts, security/resolve-session-principal.ts} — 12 files, +1383 / -137",
"line_budget": "n/a — no skills/** in the diff",
"mcp_calls": "0",
"api_writes": "2 relay dispatches (POST /repos/objectstack-ai/objectstack/dispatches): pr_create -> POST /pulls + POST /issues/35703/assignees (read back identical, 11055 bytes, assignee os-bill); os-dev-report comment on #35606 via post-stamped.mjs. git push is not a REST write.",
"deviations": [
"Draft PR not on first push: WIP commits were pushed from 83c808378f on; the PR opened at 655c4e2399 after verification (two container restarts in between).",
"PR body (written once, not PATCHed) cites the BASE reverse run of an earlier pin revision (11 red / 14 green of 25) and says (d) was not re-measured at BASE; the final re-measure is above: 10 red / 16 green of 26 at BASE, and (d) at BASE 1/1/1.",
"Edits beside the claim's literal list, all in packages/core/src/security/: request-grants-memo.ts gains exported engineWriteMark / engineWritesQuietSince / EngineWriteMark (reuse of the grants memo's write observer, never registering it); resolve-authz-context.ts exports readWriteEpoch from its module. New public exports from @objectstack/core: openRequestSessionRead, withRequestSessionRead, withoutRequestSessionRead, readRequestSession, RequestSessionRead, RequestSessionReadHandle.",
"Earlier in the run one verbose core vitest and one direct tsc ran outside os-verify-lock.",
"The REST full suite was not re-run at the final head (see tests)."
],
"open_questions": [
{
"question": "Should the transport hand the limiter's read across a whole-server middleware (use('*')) registered after the seam, or only across handlers the transport itself owns?",
"options": [
"A (shipped): admit whole-server middleware, refuse any path-scoped middleware or yielding route — keeps one read on hosts with the OS_ROOT_DOMAIN unknown-hostname guard (a '*' middleware the CLI registers after the seam); a future '*' middleware that changed a session read's ambient state would defeat it (none does today; stated in the docblock).",
"B: admit only transport-owned handlers — sound against any foreign middleware, but every OS_ROOT_DOMAIN host falls back to two reads with the limiter armed; small change (one predicate plus a marker on the transport's own handlers)."
],
"recommendation": "A, because the only ambient session-read state in the tree is the path-scoped auth door, which A refuses and pins, and B gives up the fix on the platform-host deployments where the remote round trip matters most."
}
],
"security_findings": "withheld",
"out_of_scope_findings": []
}
Claim amendment · area ux-3 · 2026-11-20T00:55Z
File surface (added to claim 7024841348; L1-a R2 on PR #35703, comment 7026892789): packages/core/src/security/request-grants-memo.ts (exports EngineWriteMark, engineWriteMark, engineWritesQuietSince, reusing the grants memo's write observer without registering a new one), packages/core/src/security/resolve-authz-context.ts (exports readWriteEpoch), packages/core/src/security/index.ts (re-exports the request session-read carrier: four functions, two types, from @objectstack/core). All additive, inside core/security, no packages/spec face. Changeset stays patch (additive surface, as ruling 7023403692).
Close-out 2026-11-20T02:05Z: PR #35703 MERGED as 7c122ff47e; Fixes closed this card. A signed-in request now reads its session once on the dispatcher and REST doors with the inbound rate limiter armed, an ADR-0069 gate active, or both (measured on a real kernel: 2 or 3 reads → 1). Every check still runs per request, and the plugin-auth door under the auth base path keeps its own read. Seat ruling 7026922808: design A (reuse across whole-server middleware), with the README note that such middleware must not change session-read state. Reviews: L1-a ACCEPT 7026892789; claim amendment on this card. pm:dispatched off.
area:uxdomain:serverDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpriority:p1High: required for production / M2
Activity
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me
Grading note for triage · 2026-11-19T17:15Z
Correcting the filing's p1 suggestion. Cloud answered on #35457 (comment 7016425225): hosted does not arm the inbound rate limiter on either plane, because it declares no budget. So the limiter read in this card never runs on hosted, and PR #35598 alone takes hosted's dispatcher session read from 2 to 1 (cloud#4563 re-measures once a pin carries it). That leaves the REST door's second read,
decideAuthGateunderreread-when-active, which runs only when an ADR-0069 session gate is active. This card is a framework improvement, not cloud's blocker. Grade it on that basis.objectstack-fleet commentedon Nov 19, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server·pm:queue; rationale: area:ux · Bug · Impeded (with rate limiting armed or on the REST door, a signed-in request still reads the session twice) · end users, every request · measured → p1: it is the half of #35457 (p1) that PR #35598 cannot reach, and objectstack-ai/cloud#4563 (p1) waits on that family; a blocker takes the grade of what it holds.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me
Claim: area ux-3 of repo:objectstack#5, p1 (triage 7017357468; picked by
card-pick.mjs --order area:ux; seat 5: "once triage grades #35606 p1, take it in your free slot"). The maintainer, verbatim, 2026-11-19T14:38Z: 「当前任务处理完,后续只处理 p1」 · 2026-11-19T23:11ZSession:
session_01Utp6CZiaBg6rk7dpy1s9MeAccount:
os-billBranch:
claude/issue-35606-request-session-read-memoWorktree:
objectstack-issue-35606(os-dev worktree in the ux-3 container)Domain:
domain:serverSeat:
repo:objectstack#5Area: ux-3
File surface: a per-request session-read carrier in
packages/core/src/security/(besiderequest-grants-memo.ts), its consult points in corereadSession/decideAuthGate(request-execution-context.ts), the Hono adapter's per-request scope inpackages/plugins/plugin-hono-server/src/adapter.ts(andhono-plugin.tsonly if the scope must open there), the runtime limiterpackages/runtime/src/security/resolve-session-principal.tsand its caller indispatcher-plugin.ts,packages/rest/src/rest-server.tsonly if the REST door must pass the carrier, real-kernel pins per door and posture, changeset. ⛔ Nopackages/spec/**, no plugin-auth, no change to who is admitted or refused. Stop on breach and report.Container & model:
L,mode:subagent,model: default — no path-derived mandate (core security request path),effort: xhighClause-②: no
Accept set: unchanged. Which requests are admitted or refused, and with which status, does not move; only how many times one request reads the session and the user.
Metadata-protocol: none
Responsibility: platform — core request execution context, the Hono transport seam and the runtime limiter (objectstack); any deployment with an inbound rate-limit budget or an ADR-0069 session gate on the REST door.
Thread-read: 7017357468
Premise: holds as filed — measured at
97f342037dby the #35457 dev on a real kernel (limiter armed: +1getSessionper request; REST door with a gate active: 2); the dev re-measures at origin/main after PR #35598 before code.Serial constraints cleared: no other area holds these files; overlap-check runs on the branch before every push.
Pre-claim lane: server / core security request path (area:ux, ux-3 row; follow-up of #35457, nested under it).
Pre-claim deps: none open (#35598 merged).
Prior rulings read:
check-prior-rulings.mjs --card 35606 --terms session,rate,limit,reread,memo,gate --pathsat origin/main: no ruling on the card's thread; ADR-0069 D3–D5 (MFA, session controls, network gating) and ADR-0138 D7 (abuse limits, ADR-0121 D6 unchanged) bound it: every check and every limit still runs once per request on the shared read.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me
os-dev-report
{ "issue": 35606, "status": "done", "branch": "claude/issue-35606-request-session-read-memo", "pr": "https://github.com/objectstack-ai/objectstack/pull/35703", "head": "655c4e2399", "session": "session_01Utp6CZiaBg6rk7dpy1s9Me", "premise_still_valid": true, "summary": "One core-owned per-request session-read carrier (packages/core/src/security/request-session-read.ts, AsyncLocalStorage, shape of request-grants-memo.ts) that the runtime inbound limiter, core readSession and decideAuthGate (reread-when-active) read through; a stored read is served only for the same auth API object and identical headers, while no engine write has landed or is in flight since the read opened (write epoch + the grants memo's write observer), and while the session is unexpired; a throwing read is never stored, values are cloned, scopes close when the request settles. The Hono adapter runs its middleware chain in a scope and hands it to an IHttpServer-registered route only when every handler between seam and route is a whole-server middleware; routes behind a path-scoped middleware (plugin-auth's door under the auth base path, where the org IP list is judged on the read) or a yielding route, and all raw-app routes, read for themselves; every request starts outside any scope; seam and route share one header reading (host backfilled). Re-measured at origin/main 03865ae995 first: premise holds ((a) 2, (b) REST 2, (c) REST 3); after: 1/1/1 on every door and posture.", "before_after": { "method": "real kernel (ObjectQL + sqlite-wasm + Hono + AuthPlugin + SecurityPlugin + REST + dispatcher), warm Bearer request, counts getSession / sys_session-by-token / sys_user-by-id", "a_limiter_dispatcher_GET_/api/v1/packages": "2/2/2 -> 1/1/1", "a_limiter_REST_GET_/api/v1/data/pin_note": "2/2/2 -> 1/1/1", "b_gate_REST": "2/2/2 -> 1/1/1", "b_gate_dispatcher": "1/1/1 -> 1/1/1 (already one after #35598)", "c_both_dispatcher": "2/2/2 -> 1/1/1", "c_both_REST": "3/3/3 -> 1/1/1", "d_default_dispatcher_REST_authmount": "1/1/1 -> 1/1/1 (both measured: BASE leg and HEAD, scratch file, not committed)", "control_limiter_auth_mount_GET_/api/v1/auth/client-address": "2 -> 2 (reads for itself behind the auth door)" }, "tests": "At 655c4e2399, all under os-verify-lock (VERDICT command-exit 0): runtime pin src/http-dispatcher.session-read-once.pin.test.ts 'Tests 26 passed (26)'; plugin-hono-server src/session-read-scope.pin.test.ts 5/5; core src/security/request-session-read.test.ts 15/15. Full suites: core vitest --project local 'Test Files 154 passed (154) / Tests 3670 passed (3670)'; plugin-hono-server vitest run 'Test Files 43 passed (43) / Tests 581 passed (581)'; runtime vitest --project local 'Test Files 631 passed (631) / Tests 11649 passed | 25 skipped (11674)'; typecheck core 0, plugin-hono-server 0, runtime 0 ('check:test-typecheck: OK'). Reverse verification at BASE 03865ae995 (core/hono/runtime sources reverted, final pin file kept, core+hono rebuilt, ablation-dist-preflight marker absent): 'Tests 10 failed | 16 passed (26)', every star red: 9x 'expected { getSession: 2, sys_session: 2 } to deeply equal { getSession: 1, sys_session: 1 }', 1x getSession 3 ((c) REST); all controls without a one-read clause green at BASE; restored (git status --porcelain empty, rebuilt, preflight marker back). Ablation A1 (scripts/ablation-replace.mjs, seamReadsReachRoute answers true, anchor 1->0, blob 0da067a3ecff->29dc9cac98bb): hono pins 'Tests 2 failed | 3 passed (5)' (path-scoped door, yielding route); restored blob == HEAD, git diff HEAD empty. Ablation A2 (adapter + carrier from 9244357e1a, the earlier request-wide scope; hono rebuilt, preflight confirmed): auth-mount control 'AssertionError: expected 1 to be 2'; restored, hashes == HEAD, rebuilt, preflight marker present. REST suite (packages/rest vitest --project local, 421 files / 8625 passed / 351 skipped) ran green at 9244357e1a (earlier design), not re-run at final head: REST package untouched and its readers' behaviour under a non-Hono or fresh-scope route is identical between the two designs.", "gates": "Local derived set: node scripts/pm/dispatch-gates.mjs --commands at 655c4e2399 = 76 commands; all 76 exit 0 (captured before any pipe, per-command logs); run split across a container restart at the same head (70 + 6). --ran with recorded exit codes: 'Run reconciliation — 76 derived, 76 run, 0 NOT-MEASURED, 0 UNRUN' ('a DERIVED zero'). check:nul-bytes OK. check-platform-checklist not owed (no export renamed or removed). CI check-runs on 655c4e2399 at report time: success — Auto Label, Dogfood Regression Gate, Plan Test Core shards, Plan Test UI shards, filter, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Flag docs affected by code changes, Check PR Size, Check Changeset, PR-body guards, Governed Surface Queue Guard; 10 skipped; in_progress — Test Core 1-10/10, Build Core, Build UI Deps, Live E2E UI, Lint · docs & code guards, Lint · ESLint, Lint · repo & tooling gates, Lint · scoped (query-options erasure, slot lookup & corpus), Lint · CI, release & engine gates, Type Check (workspace, source gates, consumer gates, debt ledger). Not waited on (os-dev).", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: no); CI 'Dogfood Regression Gate' success on 655c4e2399", "governed": "node scripts/pm/check-governed-merges.mjs --branch HEAD: '0 of 12 path(s) hit the register ... NOT governed', +1383 / -137, under the 3000-line human-merge threshold", "overlap_check": "node scripts/pm/overlap-check.mjs --branch=claude/issue-35606-request-session-read-memo before each push: 'VERDICT clean exit 0' (last: 655c4e2399 vs origin/main c03a8a3428, 0 PR heads)", "files_changed": ".changeset/35606-request-session-read-once.md; packages/core/src/security/{index.ts, request-execution-context.ts, request-grants-memo.ts, request-session-read.ts (new), request-session-read.test.ts (new), resolve-authz-context.ts}; packages/plugins/plugin-hono-server/src/{adapter.ts, session-read-scope.pin.test.ts (new)}; packages/runtime/src/{dispatcher-plugin.ts, http-dispatcher.session-read-once.pin.test.ts, security/resolve-session-principal.ts} — 12 files, +1383 / -137", "line_budget": "n/a — no skills/** in the diff", "mcp_calls": "0", "api_writes": "2 relay dispatches (POST /repos/objectstack-ai/objectstack/dispatches): pr_create -> POST /pulls + POST /issues/35703/assignees (read back identical, 11055 bytes, assignee os-bill); os-dev-report comment on #35606 via post-stamped.mjs. git push is not a REST write.", "deviations": [ "Draft PR not on first push: WIP commits were pushed from 83c808378f on; the PR opened at 655c4e2399 after verification (two container restarts in between).", "PR body (written once, not PATCHed) cites the BASE reverse run of an earlier pin revision (11 red / 14 green of 25) and says (d) was not re-measured at BASE; the final re-measure is above: 10 red / 16 green of 26 at BASE, and (d) at BASE 1/1/1.", "Edits beside the claim's literal list, all in packages/core/src/security/: request-grants-memo.ts gains exported engineWriteMark / engineWritesQuietSince / EngineWriteMark (reuse of the grants memo's write observer, never registering it); resolve-authz-context.ts exports readWriteEpoch from its module. New public exports from @objectstack/core: openRequestSessionRead, withRequestSessionRead, withoutRequestSessionRead, readRequestSession, RequestSessionRead, RequestSessionReadHandle.", "Earlier in the run one verbose core vitest and one direct tsc ran outside os-verify-lock.", "The REST full suite was not re-run at the final head (see tests)." ], "open_questions": [ { "question": "Should the transport hand the limiter's read across a whole-server middleware (use('*')) registered after the seam, or only across handlers the transport itself owns?", "options": [ "A (shipped): admit whole-server middleware, refuse any path-scoped middleware or yielding route — keeps one read on hosts with the OS_ROOT_DOMAIN unknown-hostname guard (a '*' middleware the CLI registers after the seam); a future '*' middleware that changed a session read's ambient state would defeat it (none does today; stated in the docblock).", "B: admit only transport-owned handlers — sound against any foreign middleware, but every OS_ROOT_DOMAIN host falls back to two reads with the limiter armed; small change (one predicate plus a marker on the transport's own handlers)." ], "recommendation": "A, because the only ambient session-read state in the tree is the path-scoped auth door, which A refuses and pins, and B gives up the fix on the platform-host deployments where the remote round trip matters most." } ], "security_findings": "withheld", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me
Claim amendment · area ux-3 · 2026-11-20T00:55Z
File surface (added to claim 7024841348; L1-a R2 on PR #35703, comment 7026892789):
packages/core/src/security/request-grants-memo.ts(exportsEngineWriteMark,engineWriteMark,engineWritesQuietSince, reusing the grants memo's write observer without registering a new one),packages/core/src/security/resolve-authz-context.ts(exportsreadWriteEpoch),packages/core/src/security/index.ts(re-exports the request session-read carrier: four functions, two types, from@objectstack/core). All additive, inside core/security, nopackages/specface. Changeset stayspatch(additive surface, as ruling 7023403692).objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me
Close-out 2026-11-20T02:05Z: PR #35703 MERGED as
7c122ff47e;Fixesclosed this card. A signed-in request now reads its session once on the dispatcher and REST doors with the inbound rate limiter armed, an ADR-0069 gate active, or both (measured on a real kernel: 2 or 3 reads → 1). Every check still runs per request, and the plugin-auth door under the auth base path keeps its own read. Seat ruling 7026922808: design A (reuse across whole-server middleware), with the README note that such middleware must not change session-read state. Reviews: L1-a ACCEPT 7026892789; claim amendment on this card.pm:dispatchedoff.