Skip to content

fix(plugin-auth): an auth request is judged and executed as one account - #31469

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/sec-auth-one-actor-per-request
Nov 8, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/sec-auth-one-actor-per-request

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Clause-②: yes — this PR publishes one new error code, CREDENTIALS_NAME_DIFFERENT_ACCOUNTS, in the @objectstack/spec error-code ledger.
Metadata-protocol: none

维护者速读

  • 改了什么:一个认证请求若同时带着会话 cookie 和 bearer token,且两者指向两个不同的已登录账号,就在所有门禁和端点运行之前以 401 CREDENTIALS_NAME_DIFFERENT_ACCOUNTS 拒绝,两个账号都不写任何东西;改密码成功后的后续写入(改密时间戳、强制改密标记、密码历史)只落在端点实际改动的那个账号上;管理员撤销会话在仅用 bearer 登录时也认得出调用者。
  • 为什么改:一个认证请求必须作为同一个账号被判断、被执行。
  • 风险与回滚:只拒绝同时带着两个不同账号凭据的请求;单凭据、同账号的两个凭据、指向已失效会话的凭据都不受影响。Console 现有的会话读取自愈(只带 cookie 重试并丢弃 token)已实测能处理这个新拒绝,前端无改动。spec 错误码账本新增一个码,因此 Clause-② 为 yes。回滚即 revert 本 PR。
  • 先看:packages/plugins/plugin-auth/src/one-account-per-request.ts(规则与判定);auth-manager-before-hook.ts 中新步骤的位置(所有门禁之前);auth-manager-after-hook.ts 的 /change-password 一段。
  • 两分钟验证:pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2 src/one-account-per-request.test.ts,预期 17 个用例全部通过。
  • 需要你做的:无,席位落地。

What changes

An auth request is judged and executed as one account.

  • A request whose session cookie and bearer token name two different signed-in accounts is refused before anything runs, with 401 CREDENTIALS_NAME_DIFFERENT_ACCOUNTS, and nothing is read or written for either account. The step runs first in the global better-auth before-hook (ahead of every ObjectStack gate and of the endpoint, over HTTP and for the in-process session read), and as a middleware on the identity mount ahead of its raw ObjectStack routes, which answer it with the same code in the ADR-0112 envelope.
  • Unaffected: one credential alone; two credentials naming the same account (two sessions of one user included); a credential that names no signed-in account. Two identical tokens cost no lookup.
  • Fail-closed: a session read that cannot answer refuses as an outage, 503 SERVICE_UNAVAILABLE.
  • A successful /change-password stamps password_changed_at, clears a forced change and appends the history entry on the account the endpoint acted on (ctx.context.session.user, the reading the change-email notice already takes), and only when the password checks before it ran for that same account; otherwise none of them lands and the operator is told.
  • /admin/revoke-user-session resolves a caller signed in by bearer alone, so a token that identifies no session is refused (404 RESOURCE_NOT_FOUND) on that lane as on the cookie lane.
  • CREDENTIALS_NAME_DIFFERENT_ACCOUNTS is registered in the @objectstack/spec error-code ledger under @objectstack/plugin-auth (no existing 401 code means "credentials name different accounts"); the three generated reference pages that list the ledger are regenerated.

Tests

  • one-account-per-request.test.ts (new, 17 cases, real ObjectQL over better-sqlite3 and the installed better-auth, two real accounts): the refusal on the session read (HTTP and in process), a data door's session leg, /change-password, /revoke-session, /update-user and the admin paths (/admin/set-role, /admin/revoke-user-session, the administrator on either credential), each asserting code and status and that nothing was written; same account on both credentials, cookie alone, bearer alone, a bearer or a cookie naming no signed-in account; the identity mount's raw admin route and its catch-all; the judgment's token reading and the 503 on a read that throws; an API key beside a session cookie is not refused by this rule; a request carrying both credentials whose judgment cannot be reached at the identity mount is answered 503 and goes no further.
  • forced-password-change-new-password.test.ts: one new top-level describe (5 cases) — after-effects land on the account the change acted on, on the bearer lane, and on no other account.
  • admin-revoke-user-session-match-guard.test.ts: one new top-level describe (3 cases) — the bearer lane is judged as the cookie lane.
  • change-email-delete-user-wiring.test.ts: the two-account case now asserts the refusal, no mail and no address moved.

Acceptance notes

  • A data door that reads such a request in process sees a refused session read and resolves no account, so it answers with its own anonymous refusal; the coded 401 reaches the wire on the auth routes and the identity mount, not on the data routes. A door that re-reads an active authentication gate treats any failed session read as a store outage and answers 503 there. Carrying the code through those doors is a change in packages/core / packages/runtime, outside this PR.
  • A credential that names no signed-in account leaves the request as it was (measured); this rule does not change it.
  • An API key is not a session credential for this rule: a key beside a session cookie is not refused by it, and each door keeps its existing one-principal rule for keys.
  • The Console needs no change: measured against the shipped createAuthClient.getSession, a coded 401 on the bearer-carrying read is followed by the cookie-only read, whose session and token are adopted.

Verification

On head 7f088a82dc (origin/main merged in) unless stated. Round 2 (52faff29f) adds the API-key pin and the identity mount's 503 pin: pnpm --filter @objectstack/plugin-auth test Test Files 241 passed (241), Tests 4292 passed, 10 skipped; typecheck exit 0; each new pin ablated red, then restored.

plugin-auth suite and typecheck
  • pnpm --filter @objectstack/plugin-auth typecheck: exit 0 (src, examples, check:test-typecheck).
  • pnpm --filter @objectstack/plugin-auth test: Test Files 241 passed (241), Tests 4290 passed, 10 skipped (4300).
Ablation (each leg reverted on disk, red, restored to HEAD with an empty diff)
  • Before-hook step removed: 7 of the two-account pins red (session read, data door, /change-password, /revoke-session, /update-user, admin paths, change-email), 28 green.
  • Identity mount refusal removed: 1 red (the raw admin route), 14 green.
  • After-effects account rule removed: 1 red (checks run for another account), 12 green.
  • Bearer-lane caller resolution removed: 1 red (zero-match token on the bearer lane), 17 green.
Derived gate families
  • dispatch-gates --commands at 7f088a82dc: 120 families; 120 run, reconciled with --ran (120 derived, 120 run, 0 unrun).
  • 118 exit 0 on the first pass; check:skill-examples refused for an unbuilt @objectstack/client-react and exited 0 once that closure was built; check:dual-build-cjs-loads NOT MEASURED (it needs the whole workspace built), left to CI.
  • pnpm --filter @objectstack/spec check:generated: one stale artifact (the reference docs) regenerated with gen:docs.

@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/plugin-auth, @objectstack/spec, touching 37 documentable anchor(s).

13 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via ERROR_CODE_LEDGER (symbol, a top-level const object), SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/api/error-catalog.mdx (via ERROR_CODE_LEDGER (symbol, a top-level const object), SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/api/error-handling-server.mdx (via ERROR_CODE_LEDGER (symbol, a top-level const object))
  • content/docs/api/index.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/automation/webhooks.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/deployment/self-hosting.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/kernel/contracts/data-engine.mdx (via ERROR_CODE_LEDGER (symbol, a top-level const object))
  • content/docs/permissions/authentication.mdx (via internalAdapter (symbol, a field of interface SessionReadContext), SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/permissions/authorization.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/permissions/sharing-rules.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/permissions/system-context.mdx (via resolveActor (literal, a string literal in assertAdminRevokeUserSessionIdentifiesRecord))
  • content/docs/protocol/kernel/error-handling.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/ui/print-pages.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))

⛔ 7 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via must_change_password (literal, a string literal in globalAfterHook))
  • content/docs/releases/v17/17-0.mdx (via ERROR_CODE_LEDGER (symbol, a top-level const object), internalAdapter (symbol, a field of interface SessionReadContext), SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/releases/v17/17-1.mdx (via ERROR_CODE_LEDGER (symbol, a top-level const object))
  • content/docs/releases/v17/17-3.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/releases/v17/17-4.mdx (via ERROR_CODE_LEDGER (symbol, a top-level const object), SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/releases/v17/17-7.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))
  • content/docs/releases/v18/18-2.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in ONE_ACCOUNT_READ_FAULT_CODE; a string literal in refuseRequestNamingDifferentAccounts))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 anchor(s) matched too much of the corpus to be a work list: sys_user (literal, 49 pages)
  • 6 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 64 of 227 client-bound route-ledger rows — the other 163 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 163: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 104 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 176 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 5ee59f5ef449de22926af221d8fc9b7baf78a2d0 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 22a462256f80fedbb9d6c97bd43a15acc5fb2b6b — the merge of head 69cda6363dea793f63bfd21ec3324489bd13c5e4 into base 5ee59f5ef449de22926af221d8fc9b7baf78a2d0, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 22a462256f80fedbb9d6c97bd43a15acc5fb2b6b && git checkout 22a462256f80fedbb9d6c97bd43a15acc5fb2b6b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5ee59f5ef449de22926af221d8fc9b7baf78a2d0 69cda6363dea793f63bfd21ec3324489bd13c5e4 && git checkout -B drift-repro 5ee59f5ef449de22926af221d8fc9b7baf78a2d0 && git merge --no-ff 69cda6363dea793f63bfd21ec3324489bd13c5e4

node scripts/docs-audit/affected-docs.mjs --json 5ee59f5ef449de22926af221d8fc9b7baf78a2d0

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 5ee59f5ef449de22926af221d8fc9b7baf78a2d0 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…account rule, and the identity mount fails closed

Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f
Co-authored-by: Claude <noreply@anthropic.com>
…ctor-per-request

Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#1 · sunhaolin · session_017xRBcT1w3zpekijraHJE4f

席位核对

ACCEPT at Head-sha: 69cda6363dea793f63bfd21ec3324489bd13c5e4 (2026-11-08T16:40Z).

  • Shape: a no-card order from the security#1 seat, in three rounds.
    • Round 2 added the API-key pin and the identity mount's fail-closed step.
    • Round 3 merged origin/main to clear a conflict.
    • 16 files, +1112 / −24; the PR's own file list is unchanged by the merge.
    • Not governed (check-governed-merges.mjs --pr 31469).
    • Clause-②: yes: the PR publishes one new ledger code, CREDENTIALS_NAME_DIFFERENT_ACCOUNTS. Metadata-protocol: none.
  • Ruling: the maintainer, 2026-11-08, this seat's session, 「都同意」 to options C+E. Both kinds of credential naming two different signed-in accounts are refused at the request seam with a coded 401, and the password after-effects land on the account the endpoint acted on.
  • Premise measured:
    • A cookie and a bearer naming two accounts are refused on the auth routes and the identity mount, and nothing is written.
    • One credential, two credentials naming one account, an API key beside a cookie, and a credential naming no signed-in account are each unaffected.
    • A read fault fails closed with 503.
    • Ablations ran in 4 legs plus the 2 round-2 pins. Each turned red, then was restored.
  • Gates:
    • All 65 check-runs on this head are success or skipped, Check Documentation Links included. It had been red twice because its tool download failed; the merge commit's fresh run cleared it.
    • Locally the derived union was 120 of 120 in round 1, and the changeset and ledger gates passed in round 2.
  • Review: the isolated contract-tier reviewer returned PASS-WITH-OBJECTIONS with none blocking. Its two should-fix items were the PR-body wording and the API-key exclusion; both are resolved, the first by the seat and the second in round 2. It judged that the PR lands on the seat's review, because the contract decision is the maintainer's ruling.
  • Accepted deviations:
    • auth-plugin.ts changed for the identity-mount seam.
    • Three generated reference pages were regenerated, not hand-edited.
    • Data doors answer their own anonymous refusal rather than the coded 401. That is fail-closed either way; a low-priority follow-up is noted.
  • Landing: the seat lands it through the merge queue (pr_ready + automerge_enable).

Implemented-by: os-dev (security#1 order, session_017xRBcT1w3zpekijraHJE4f) · Reviewed-by: isolated contract-tier reviewer.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 8, 2026 16:41
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 8, 2026 16:41
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit 133f75a Nov 8, 2026
66 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/sec-auth-one-actor-per-request branch November 8, 2026 17:05
rajeev-kumar-se pushed a commit to rajeev-kumar-se/objectstack that referenced this pull request Nov 10, 2026
…the inherited admin cookie (objectstack-ai#31871)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi96VGP7vMPA9C54zyjz2LMch)_

Fixes objectstack-ai#31827

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:夜间 live 层的成员夹具改为只用成员自己的凭据发 API 请求(成员自己的会话 cookie 加它的
Bearer),成员登录也从空状态开始;`read-only-member-record.spec.ts` 只换成调用新助手,断言一条未动。
- 为什么改:在 `@playwright/test` 里,不指定 `storageState` 新建的请求上下文会继承配置里的管理员
cookie,于是成员请求同时带着管理员 cookie 和成员 Bearer。objectstack-ai#31469 起服务端拒绝这种「两个账号」的请求,数据路由回
401,夜间层因此变红。席位裁定:改夹具,不改产品。
- 风险与回滚:只动 `ui/e2e/live/` 下两个测试文件,不发布任何包,不动 `packages/`。回滚即 revert。
- 先看:`ui/e2e/live/member.ts` 的 `memberRequestContext` 和模块注释里的 ⛔ 段。
- 两分钟验证:起后端后跑 `OS_TEST_TIERS=nightly pnpm --filter
@objectstack/example-showcase exec vitest run
test/console-live-specs.live.test.ts`,预期 `28 passed`。
- 需要你做的:无,席位落地。

## What changes

- `ui/e2e/live/member.ts` gains `memberRequestContext(member)`: a
request context carrying the member's own session cookie and its Bearer,
with its `storageState` named so the config's administrator cookie is
not inherited.
- The member's sign-in context starts from an empty `storageState` (`{
cookies: [], origins: [] }`) instead of the inherited administrator
cookie, so the sign-in request names the member only.
- `read-only-member-record.spec.ts` builds its premise context with the
helper. That is its only change: the `playwright` fixture it no longer
uses leaves the destructuring, and no assertion moves.
- The module comment states the trap: inside `@playwright/test`,
`playwright.request.newContext()` and the imported
`request.newContext()` both start with the config's `use.storageState`.

No test was skipped, renamed or loosened. No change under `packages/`.

## Why

The nightly live tier went red at `6be71abc` on
`read-only-member-record.spec.ts:48`, premise step: the member's `GET
/api/v1/data/showcase_inquiry/<id>` answered 401 where 200 was expected.

Step 0 (seat ruling 6735238125):

- **Bisect.** Each commit measured on a fresh backend booted by
`ui/e2e/live/ci/start-backend.sh`, with the spec's request shape:

  | Commit | Result |
  |:--|:--|
  | `44a030bf` (last green nightly) | green, read 200 / write 403 |
  | `133f75aec0~1` | green, 200 / 403 |
  | `133f75aec0` objectstack-ai#31469 | **red**, 401 / 401 |
  | `ed4b83226b` objectstack-ai#31443 | red |
  | `59630d9357` objectstack-ai#31622 | red |
  | `8c9260f79c` objectstack-ai#31657 | red |
  | `f127b04e07` objectstack-ai#31686 | red |
  | `6be71abc` (red nightly) | red |

- **Cause.** The member's context was `playwright.request.newContext({
extraHTTPHeaders: { Authorization: 'Bearer <member>' } })`. Inside
`@playwright/test` that context inherits the config's
`use.storageState`, which is the global setup's administrator cookie.
Measured: the context's cookie equals the administrator's. So each
premise request carried two accounts' credentials. Before objectstack-ai#31469 the
bearer won. Since objectstack-ai#31469 the session read refuses such a request with
`CREDENTIALS_NAME_DIFFERENT_ACCOUNTS`, and the data route answers its
own anonymous 401. objectstack-ai#31469's acceptance notes describe exactly that
data-route answer, so the product behaves as ruled and the fixture
relied on what objectstack-ai#31469 ruled out.

## Sweep (owed by the ruling)

Every live spec and helper under `ui/e2e/live/` that builds a request
context or sends a credential:

| Site | Accounts it sends | Action |
|:--|:--|:--|
| `read-only-member-record.spec.ts` premise context | admin cookie
(inherited) + member Bearer | **moved onto `memberRequestContext`** |
| `member.ts` sign-in context (`request.newContext()`) | admin cookie
(inherited) on the member's sign-in | **moved onto an empty
`storageState`** |
| `read-only-member-record.spec.ts` member browser context | member
`storageState` named explicitly | one account, unchanged |
| `global-setup.ts` sign-in context | none (global setup runs before any
`use` state exists) | one account, unchanged |
| `inline-edit-polish-2572.spec.ts` `request` + Bearer | admin cookie +
admin token from the same `state.json` | one account, unchanged |
| `studio-customize-journey.spec.ts` `request` override | `storageState`
passed by name (admin), no other credential | one account, unchanged |
| `studio-object-designer.spec.ts` in-page `fetch` | admin page's own
cookie + its own localStorage token | one account, unchanged |
| every other spec's `request.get/post/…` (cascading-options,
grid-file-upload, list-row-action-cel, master-detail,
record-form-direct-url, record-history-display) | admin `request`
fixture alone | one account, unchanged |

Measured for the two inherited sites: the imported
`request.newContext()` and `playwright.request.newContext()` each start
with 1 cookie under this config; with `storageState: { cookies: [],
origins: [] }` they start with 0.

## Verification

All heavy runs went through `scripts/pm/os-verify-lock.sh`. Head
`86082eb9b5`, backend closure and `pnpm console:build` rebuilt at the
head first.

- **Nightly live file, head:** `OS_TEST_TIERS=nightly pnpm exec vitest
run test/console-live-specs.live.test.ts` in `examples/app-showcase`:
Playwright `28 passed (1.3m)`, vitest `Test Files 1 passed (1)`, `Tests
1 passed (1)`.
- **Ablation:** `scripts/ablation-replace.mjs` deletes the helper's
`storageState` line in `member.ts` (anchor 1 → 0, blob `d4e1a39d33f5` →
`dc6c2ff0d686`), so the inherited administrator cookie is back. The same
run: `✘ read-only-member-record.spec.ts:48`, `Expected: 200`, `Received:
401`, `Test Files 1 failed (1)`. Restored: blob equals HEAD's
(`d4e1a39d33f5`), `git diff HEAD` empty, `git status --porcelain` empty.
- **Before the fix, on main `3487ccc1`:** the same nightly run was red,
1 of 28, the same 401.
- **Dispatch gates:** see the os-dev-report on objectstack-ai#31827 for each command's
exit code and the `--ran` reconciliation; `pnpm lint` and `eslint` over
the two touched files are reported there too.

No changeset: the diff publishes nothing (`ui/e2e/live/` only), so this
PR carries `skip-changeset`.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No `packages/spec` change.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset. (Publishes
nothing; `skip-changeset`.)
- [x] 6. `packages/spec` touched: n/a.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English. (The 维护者速读 section is
the seat's required Chinese summary.)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ADHkmPpwZNVKwJLQGotdJy

---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmPpwZNVKwJLQGotdJy)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants