Skip to content

fix(auth)!: a boot outside development mode retires what the development seed issued - #36699

Merged
os-zhuang merged 13 commits into
mainfrom
claude/project-thread-grxa1f
Nov 23, 2026
Merged

os-zhuang merged 13 commits into
mainfrom
claude/project-thread-grxa1f

Conversation

@os-warren

@os-warren os-warren commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Warren · project thread

Fixes #35184

Supersedes #36311: this branch carries that PR's commits (head c1e7347cc1, merged onto current main) and adds one hardening commit. The card thread can push only its own branch, so the takeover lands here.

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill states what a boot outside development mode does to a seeded account's credentials. skills/** names the development seed only as os dev --seed-admin (skills/objectstack-platform/references/operations.md); checked at origin/main.

维护者速读

  • 用户能看到什么变化:不在开发模式的服务器每次启动、开始接请求之前,会结束开发种子建的管理员和演示账号在开发期拿到的会话、API key 和令牌,包括这些账号以别人身份开的会话;只针对仍是种子密码的这些账号,运维改过密码的账号和管理员自建的账号不受影响,开发模式下什么都不变。
  • 为什么做:开发种子凭据加固的第三项(fix(auth)!: a server outside development mode refuses a development seed credential #34717 裁决里留作跟进的那一项):离开开发模式后,开发种子签发的东西不再继续起作用。
  • 出错会怎样:拿开发库直接上生产的部署,这些账号的旧会话和 key 会失效,需要运维改密后重新登录、重新发 key;结束不干净时服务器拒绝启动并说明是哪些账号。
  • 要你做什么:收窄类改动,L1/L2 之后由你合并。

What changes

The rule (ruling item 3 on #34717, the card's text): when a deployment leaves development mode, nothing the development seed issued keeps acting for an account that carries the development seed stamp. Development mode is NODE_ENV=development (isDevelopmentMode, the predicate the #34717 refusals use). No switch.

From #36311 (unchanged, see that PR for the full account):

  • dev-seed-credential-retirement.ts (new), retireDevSeedCredentials: outside development mode, one indexed read for stamped accounts, the in-force filter (isDevSeedCredentialInForce), then per account the revocation os user set-password uses (revokeSessionsAndApiKeys: sessions tombstoned, keys revoked, authorized apps, device sign-ins, linked sign-in accounts, registered OAuth apps, SCIM credentials), outstanding reset tokens (endOutstandingResetTokens), and sessions in a host secondaryStorage (read back).
  • Wiring: one kernel:ready hook in auth-plugin.ts, independent of registerRoutes; it settles before kernel:listening opens the socket.
  • Fail closed: anything that does not land fails the boot with one sentence naming the accounts and the remedy.
  • Docs (content/docs/deployment/self-hosting.mdx), changeset (patch, !, BREAKING section, ADR-0087 not-required), census shard regenerated.

New in this PR:

  • The sessions a seed account opened acting as another account are retired too (retireSessionsOpenedAs), tombstoned exactly as the account's own (same reason, counted in sessions, same fail-closed rule). A further security item is with the owner seat.
  • forced-reset-revocation.ts: isLiveSession is exported for reuse (no behaviour change).
  • Docs and changeset name the new item; the self-hosting sentence about os user set-password now says what that command ends (the account's own sessions, keys and grants) instead of "the same credentials".
  • Census shard regenerated on current main (node scripts/tenant-audit-census.mjs --write).

Read first (by risk):

  1. packages/plugins/plugin-auth/src/dev-seed-credential-retirement.ts: retireDevSeedCredentials and retireSessionsOpenedAs.
  2. packages/plugins/plugin-auth/src/auth-plugin.ts, the kernel:ready hook: it runs on every boot outside development.
  3. packages/plugins/plugin-auth/src/dev-seed-credential-retirement.test.ts, cases 1–3.

Two-minute check: pnpm --filter @objectstack/plugin-auth exec vitest run src/dev-seed-credential-retirement.test.ts shows 6 cases green.

Why

#35184 (p1): credentials the development seed issued kept acting after the deployment left development mode.

Verification

Branch claude/project-thread-grxa1f, head fb3c2cc478, on origin/main 115d38788e.

  • Red first. The new assertion was added to case 1 before the fix and run at the merged head (035b1fdfe): case 1 red, 5 others green. After the fix: 6/6 green. Removing the new call is that same red.
  • Suites (under scripts/pm/os-verify-lock.sh): dev-seed-credential-retirement, dev-seed-credential-production, dev-seed-credential (3 files, 26 passed) on the port before the fix; then dev-seed-credential-retirement, api-key-restore-guard, forced-reset-revoke-reason-vocabulary, scim-deactivation-reconcile-user, session-tombstone, admin-impersonate-endpoint (6 files, 128 passed) after it. pnpm --filter @objectstack/plugin-auth build && … typecheck: exit 0, check:test-typecheck OK.
  • Derived gates: node scripts/pm/dispatch-gates.mjs --commands derived 110, all run: 104 exit 0; check-empty-changeset exit 1 by design (the DELIBERATE CORRECTION below); check-tenant-audit-census and its self-test exit 1 on the first pass (shard drift from the new write site), regenerated, both re-run exit 0; NOT MEASURED (exit 3, prerequisite): check-plugin-teardown-shape --self-test (needs an unshallow clone), check:skill-examples, check:dual-build-cjs-loads (need packages built). CI carries those three.
  • Overlap: see Acceptance notes.
  • Dogfood battery: not run locally for this round; CI's Dogfood Regression Gate reads it. fix(auth)!: a boot outside development mode retires what the development seed issued #36311's battery (484 files passed, 0 failed) was on the code before the new commit.

Acceptance notes

DELIBERATE CORRECTION

This PR rewrites two lines in a pending release note it did not add: .changeset/dev-seed-credential-production-refusal.md, in the note's last paragraph. That paragraph's label and its last sentence named the boot-time retirement as a follow-up. This PR ships it, so left unchanged the note would publish two false lines. check-empty-changeset stays red by design; the dispatching seat confirms by its own record.

  1. The paragraph's bold label
    • Before: "Not ended at boot:"
    • After: "Ended by os user set-password, and at boot:"
  2. The paragraph's last sentence

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (No spec change.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint is read from CI's Lint job, not run locally.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: n/a.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQwxbX8ecPYZVemPRBFSrY

…e development mode

Claude-Session: https://claude.ai/code/session_01FEkQ5kt9AD1TPLy7Y9oa9D
Co-authored-by: Claude <noreply@anthropic.com>
…ment instead of naming it a follow-up

Claude-Session: https://claude.ai/code/session_01FEkQ5kt9AD1TPLy7Y9oa9D
Co-authored-by: Claude <noreply@anthropic.com>
…sued credentials end

Claude-Session: https://claude.ai/code/session_01FEkQ5kt9AD1TPLy7Y9oa9D
Co-authored-by: Claude <noreply@anthropic.com>
…tire-at-boot @ c1e7347) onto main

Takes the dev-seed boot-time retirement over on this thread's branch.
Conflicts: one import line in auth-plugin.ts (both kept); the tenant-audit
census shard regenerated with scripts/tenant-audit-census.mjs --write.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbX8ecPYZVemPRBFSrY
…ount opened as another account

A session the development seed's account opened acting as another account
reads as that account and acts for the seed account; the revocation keyed on
the account's own sessions did not reach it. The boot outside development mode
now tombstones those too (same reason, same fail-closed rule). Pinned in the
first retirement case: red before, green after.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbX8ecPYZVemPRBFSrY
@github-actions github-actions Bot added size/l 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 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/plugin-auth, touching 29 documentable anchor(s).

46 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 85dde2da8c38f018d97a43ae5da6ab55308a8aa9.

⛔ 12 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 1 cross-cutting symbol(s) contributed no route anchor: userId (5 routes)
  • 6 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 68 of 251 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 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; 124 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 — 21 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 85dde2da8c38f018d97a43ae5da6ab55308a8aa9 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 6798c505a6b81cbafc7d43b98fedba141d59680b — the merge of head fb3c2cc478f49ad9d6fa6322f411dcefe4ee56c8 into base 85dde2da8c38f018d97a43ae5da6ab55308a8aa9, 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 6798c505a6b81cbafc7d43b98fedba141d59680b && git checkout 6798c505a6b81cbafc7d43b98fedba141d59680b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 85dde2da8c38f018d97a43ae5da6ab55308a8aa9 fb3c2cc478f49ad9d6fa6322f411dcefe4ee56c8 && git checkout -B drift-repro 85dde2da8c38f018d97a43ae5da6ab55308a8aa9 && git merge --no-ff fb3c2cc478f49ad9d6fa6322f411dcefe4ee56c8

node scripts/docs-audit/affected-docs.mjs --json 85dde2da8c38f018d97a43ae5da6ab55308a8aa9

⚠️ 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 85dde2da8c38f018d97a43ae5da6ab55308a8aa9 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

Copy link
Copy Markdown
Collaborator Author

Two red checks at fb3c2cc478, neither a code failure:


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: fb3c2cc478f49ad9d6fa6322f411dcefe4ee56c8
Local-runs: none
Scope: packages/plugins/plugin-auth/src/dev-seed-credential-retirement.ts, packages/plugins/plugin-auth/src/auth-plugin.ts, packages/plugins/plugin-auth/src/forced-reset-revocation.ts, packages/plugins/plugin-auth/src/dev-seed-credential-retirement.test.ts, docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-auth.md, .changeset/35184-dev-seed-retire-at-boot.md, .changeset/dev-seed-credential-production-refusal.md, content/docs/deployment/self-hosting.mdx + cited, read only: packages/plugins/plugin-auth/src/dev-seed-credential.ts, operator-password-reset.ts, credential-change-ends-reset-tokens.ts, password-reset-ends-added-access.ts, admin-user-endpoints.ts, auth-manager-auth-instance.ts, auth-manager.ts, session-tombstone.ts, index.ts, package.json (same package), packages/platform-objects/src/identity/sys-user.object.ts, sys-session.object.ts, sys-api-key.object.ts, packages/core/src/kernel.ts, packages/objectql/src/engine.ts, packages/cli/src/commands/user/set-password.ts, packages/cli/src/utils/schema-migration-plugins.ts, scripts/pm/clause2-line.mjs, .claude/skills/pm-dispatch/references/execution-duties.md, contract-review.md, landing-operations.md
Security-touching: yes
Rule-change-verified: none

Head note. This record is for fb3c2cc478. Merge base: 115d38788e. Eight files, 840 insertions, 18 deletions. Everything below is read from the diff, the tree and the check runs. Nothing was run.

① Derived judgments

A boot outside development mode retires them: yes. AuthPlugin.start() registers one kernel:ready hook that calls retireDevSeedCredentials. The function returns at once when NODE_ENV is development. Otherwise it reads the stamped accounts, keeps those whose seed credential is still in force (isDevSeedCredentialInForce), and for each runs the revocation the operator's reset runs (revokeSessionsAndApiKeys), ends the outstanding password-reset tokens, and ends the sessions a host secondaryStorage holds. The retirement also covers every session the seed account holds or opened, under the same fail-closed rule.

A boot in development mode leaves them alone: yes. The first line of the function. Pinned (case 2).

Accounts without the stamp are unaffected: yes. The only account list is the read on the stamp column. No other account id enters the loop. Pinned with an administrator-created control account in cases 1, 4 and 6.

An operator-set credential is untouched: yes. An account whose password changed since the seed fails the in-force check and is skipped, with everything it was issued later. Pinned (case 3) for the operator's reset and for an administrator's password write.

A retired credential answers as a revoked one: yes. Sessions are tombstoned in place in the shape the existing revocation writes. Keys get revoked: true. Case 1 reads the session through /get-session and the key through the key-admission seam (API_KEY_REVOKED).

Before the first request: yes. kernel.ts awaits kernel:ready and only then triggers kernel:listening. A handler that throws fails the boot. Case 5 pins the failed boot.

The remedy command does not trip the retirement. The hook is registered in start(). The CLI composes a stack's AuthPlugin for its declarations only (start() suppressed), so os user set-password does not run it.

No more than the card: yes, with one remark. The card says "sessions, API keys and tokens". The code also unlinks linked sign-in accounts, disables the OAuth applications the account registered and revokes the SCIM credentials it minted. That is the shared revocation os user set-password already performs, reused whole. The changeset and the docs list each item. I accept it as the card's rule ("nothing the development seed issued keeps acting"), see N4.

Clause-② line: no (narrowing) is true. The question is whether the card widens the accepted set or enlarges the public surface (execution-duties.md line 76). It does neither. isLiveSession gains export inside its module, but src/index.ts does not re-export forced-reset-revocation.ts or the new module, and package.json exports does not address them. So no public export is added. A card that narrows the accepted set is Clause-②: no (line 108). The PR body and the changeset carry the same line.

Metadata-protocol line: none is true. No key, accepted value or metadata type moves.

DELIBERATE CORRECTION of .changeset/dev-seed-credential-production-refusal.md. One physical line changed, in two places. The frontmatter and every other line are unchanged.

Place 1, the bold label.
OLD: "Not ended at boot:"
NEW: "Ended by os user set-password, and at boot:"
Correct. With this PR the boot ends them, so the old label would publish a false statement.

Place 2, the last sentence.
OLD: "Ending them at boot is follow-up #35184."
NEW: "In the same release, a boot outside development mode also retires them: see the note "a boot outside development mode retires what the development seed issued" (#36699)."
Correct. The quoted title is the title of the new changeset, character for character. #36699 is this PR. The sentence between the two places is unchanged and still true.

Not consumed: the file is on origin/main with the OLD text. No CHANGELOG.md and no release page on origin/main carries its text. The version PR #35129 (changeset-release/main) is open and unmerged. So the pending changeset is the right place to correct. "In the same release" holds as long as this PR lands before #35129 is cut (N6). This correction is intended and correct. check-empty-changeset is red on it by design. This same-head record at the contract-review tier is the confirmation landing-operations.md asks for.

② Semver level

  • The new changeset grades @objectstack/plugin-auth patch. It is the only package whose published source moves. No major.
  • patch is right. Metadata-protocol: none takes patch, breaking or not.
  • The title's ! is right for a narrowing. The changeset carries the BREAKING banner, FROM and TO, a one-line fix, and one ADR-0087 marker (not-required (no-migration-prescription)).
  • The corrected changeset keeps its levels.

③ Boundary flags

  • The narrowing face. Previously accepted, now refused: on a server outside development mode, a session, an API key, an authorized app, a device sign-in, a reset link or a linked sign-in of a seeded account still on its seed password. A second face: a boot that used to succeed now fails when the retirement cannot complete. The changeset states both. FROM: such a credential "kept working ... until an operator ran os user set-password". TO: the boot retires them; a session's next request is unauthenticated, a key is refused 403 API_KEY_REVOKED; "When the retirement cannot complete, the boot fails with an error naming the accounts". The fix is one line: set each seeded account's password with os user set-password <email> before serving.
  • Fail closed: yes, by reading. A failed in-force read, an incomplete revocation, a failed read or write in the added session arm, a failed reset-token end and a failed or unverifiable secondaryStorage end each add a reason. Any reason throws after the loop with the accounts and the remedy. A failed read of the stamped list and a failed auth-context read throw their own error, so the boot still fails, without the remedy sentence (N3). Two declared exceptions read as "no stamped account": an engine with no read surface, and a user table that was never created. Both match the existing refusals in dev-seed-credential.ts.
  • Idempotent: yes. A retired account cannot open a session before the next boot. Case 4 pins equal tombstones over two boots and zero counts on a third pass.
  • Pins fail without the fix: consistent by reading. Case 1 without the hook: the seed sessions resolve and the keys are admitted, so the RETIRED comparison is red. Case 1 without the hardening call: the added assertion is red (the PR body reports that red at 035b1fdfe). Case 4: the direct call would count ended rows, red. Case 5: the boot would succeed, red. Case 6: the two seed sessions would resolve, red. Cases 2 and 3 are controls and stay green, as they should. The composition is real: ObjectKernel, ObjectQL on a SQLite file, AuthPlugin, SecurityPlugin, two boots over one file.
  • No test weakened. The test file is new. No existing test changes.
  • Boot cost. A database with no stamped account pays one read on sys_user.dev_seed_credential, which is indexed (sys-user.object.ts line 1696). A stamped account no longer in force pays its in-force reads at every boot, for as long as it carries the stamp. An account still in force pays the full revocation reads, sequentially, before the socket opens. One of those reads filters sys_session on a column with no index (N1).
  • SQL pushdown. The stamped ids are read and then checked one by one. The in-force check compares a digest computed in the application, so it cannot be pushed down, and the list is the seed's few accounts. No finding.
  • Author. PR user.login is os-warren, not the fleet bot. Read before landing.
  • A security item is with the owner seat. It does not change this verdict.

④ Design judgment

The change does what card #35184 asks. One function, one hook, the operator's own revocation reused, and the same development-mode predicate the refusals use. Retiring only accounts whose seed credential is still in force is the right reading of "an operator-set credential is untouched": retiring on the bare stamp would end operator-era credentials at every restart. Failing the boot is the right failure for a rule that says nothing keeps acting.

No must-fix, no should-fix.

Notes:

  • N1. One read in the retirement filters sys_session on a column with no index and filters live rows in the application. Only an account still in force pays it, once per boot. Small today. An index, or a live-row predicate in the query, would be a follow-up, not this PR.
  • N2. Fail-closed is pinned through one arm (a refused key write). The other arms (the in-force read, the added session arm, the secondaryStorage read-back) are fail-closed by reading and have no pin.
  • N3. A failed read of the stamped list, or of better-auth's context, fails the boot with the raw error. It names no account and no remedy. The sentence in the changeset ("an error naming the accounts") holds for the per-account failures only.
  • N4. While an account stays on its seed password, every boot retires again. A key or an OAuth application that a platform administrator restored is retired again at the next boot. The changeset says "only a platform administrator restores such a key" and does not say that. One clause in the changeset or the docs would make it complete. Prose face.
  • N5. Linked sign-in accounts are deleted, though the header notes that a sign-in link "only opens a session, which session.create.before refuses". The same holds for a linked account. The end state equals the operator's reset, so I accept it. It is worth one line in the module header.
  • N6. The corrected sentence says "In the same release". That needs this PR to land before version PR chore: version packages #35129 is cut. The PR body already lists the file overlap with chore: version packages #35129. If chore: version packages #35129 lands first, the corrected file is gone and the correction is moot.
  • N7. CI at this head: Check Changeset is red by design. PR-body guards is also red, and not by design: it says Leaving development mode retires what the development seed issued (follow-up to #34717) #35184 is claimed by fix(auth)!: a boot outside development mode retires what the development seed issued #36311. fix(auth)!: a boot outside development mode retires what the development seed issued #36311 is now closed, so a re-run should clear it. The seat reads it green before landing.
  • N8. The title's ! owes the dogfood battery. The PR body says it was not run locally on the new commit. CI's Dogfood Regression Gate is green at this head.
  • N9. The PR body declares the test file at about 11.4 s, over the 10 s file line, and gives its reason. This is the seat's L1 line.
  • N10. The retirement's rowsOf reads an array or { value }. The shared revocation's also reads { records }. The engine returns arrays, so nothing breaks today. One shared helper would stop the two drifting.

Implemented-by: claude/project-thread-grxa1f
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

维护者速读

开发环境会自动建一个带默认密码的管理员(「种子账号」)。以前把同一个数据库拿去以生产模式启动时,这个账号在开发时留下的登录会话、API 密钥等还能继续用,要等运维手动改密码才失效。现在生产模式启动时会自动作废这些凭据;作废不了就拒绝启动并说明原因和办法。运维改过密码的账号不受影响。
属于「收紧」:以前能用的这类凭据现在会被拒绝,所以按规则要 os-zhuang 在 GitHub 上批准后才能合并。
合同级复核通过,CI 除设计内的一项外全绿。另有一个安全相关事项在负责席位手里。
要你做的:无(等 os-zhuang 批准)。

席位核对 — ACCEPT (L1) · repo:objectstack#1 · head fb3c2cc4 · 2026-11-23T13:32Z

  • Shape: Fixes #35184; supersedes fix(auth)!: a boot outside development mode retires what the development seed issued #36311 (closed, its commits carried from c1e7347cc1). plugin-auth: dev-seed-credential-retirement.ts (new) and its real-engine test, auth-plugin.ts (one kernel:ready hook), forced-reset-revocation.ts, the regenerated census shard, self-hosting.mdx, a new changeset, and the DELIBERATE CORRECTION of .changeset/dev-seed-credential-production-refusal.md. Clause-②: no (narrowing). Metadata-protocol: none. Title carries !.
  • Contract review: CONTRACT_REVIEW_TIER PASS at this head (7102584858). No must-fix, no should-fix. It confirms the deliberate correction, quoting the old and new text: the label "Not ended at boot" becomes "Ended by os user set-password, and at boot", and the follow-up sentence now points at this PR; the file is not yet consumed by a release (version PR chore: version packages #35129 is open). Red Check Changeset is that correction, by design.
  • Read: a boot outside development mode retires every credential the seed issued to a stamped account still on its seed password, using the operator reset's own revocation, before the first request; failure fails the boot with the accounts and the remedy. Development mode, unstamped accounts and operator-set credentials are untouched. Idempotent across boots (pinned). A security item is with the owner seat.
  • Evidence (thread): 6 real-engine cases (ObjectKernel, ObjectQL on SQLite, two boots on one file), red without the fix; neighbouring suites 128 passed; plugin-auth typecheck 0; 110 derived gates, 104 exit 0 (empty-changeset red by design; 3 NOT MEASURED, covered by CI). The test file runs about 11.4 s, over the 10 s line, declared in the body.
  • Gates: on fb3c2cc4: 0 failures other than Check Changeset (by design) and superseded runs of the PR-body guard, whose latest run is green. Dogfood Regression Gate green (the ! battery). K = 5 behind main (< 15).
  • Landing: narrowing, so it lands like Tier H: handed to os-zhuang for the GitHub Approve. It should land before version PR chore: version packages #35129 is cut, so the corrected changeset ships in the same release. On merge, Leaving development mode retires what the development seed issued (follow-up to #34717) #35184 closes and the seat clears its label.

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Narrowing hand-off · 2026-11-23T13:32Z: Clause-②: no (narrowing) lands like Tier H (ruling 2026-11-19 on #35321). Record half: the same-head CONTRACT_REVIEW_TIER PASS 7102584858 at fb3c2cc4, no must-fix and no should-fix. Seat ACCEPT above. Human half: os-zhuang's GitHub Approve is requested. This should land before version PR #35129 is cut.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 23, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 23, 2026 13:34
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 338ef35 Nov 23, 2026
63 of 70 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-grxa1f branch November 23, 2026 13:58
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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/l 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.

Leaving development mode retires what the development seed issued (follow-up to #34717)

3 participants