Repository navigation
docs(spec): demo-staff and dev-login prose state the measured seed behaviour and point at demoStaff - #26500
Conversation
…haviour and point at demoStaff Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzed5ZRLMtNcevsCJit
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzed5ZRLMtNcevsCJit
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 146 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin ce105fd04bf3e5bcf24d4c05d558d0633c4e7aef && git checkout ce105fd04bf3e5bcf24d4c05d558d0633c4e7aef
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 45de8c6cbac1318e9aa2b1bc25013aa908d2d0c8 4b28e26533f934179cc4e09dffb256b680ec6aa6 && git checkout -B drift-repro 45de8c6cbac1318e9aa2b1bc25013aa908d2d0c8 && git merge --no-ff 4b28e26533f934179cc4e09dffb256b680ec6aa6
node scripts/docs-audit/affected-docs.mjs --json 45de8c6cbac1318e9aa2b1bc25013aa908d2d0c8 |
Contract reviewServed-tier: ① Derived judgmentsEvery hunk in the two Each new sentence judged against the cited code:
Card acceptance, read on the head tree: ② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
席位核对 · ACCEPT ·
|
Requested by Yibo Wang · project thread
Fixes #26424
Clause-②: no
Metadata-protocol: none
维护者速读
demoStaff的 TSDoc 不再说种子写入的sys_user行会被拒(ADR-0092);devLogins的三条拒收提示、文件头 TSDoc 和email描述不再教作者在data里种账号,改为指向demoStaff。packages/spec/src/system/dev-login.zod.ts(guidance 三条 + email 描述)、packages/spec/src/system/demo-staff.zod.ts(L14-20)、content/docs/references/system/dev-login.mdx(重生成)。git grep -n 'in \data`' -- packages/spec/src/system/dev-login.zod.ts应无输出;git grep -n 'refused (ADR-0092)' -- packages/spec/src/system/demo-staff.zod.ts` 应无输出。What changes
packages/spec/src/system/demo-staff.zod.ts: the TSDoc sentence that said asys_userrow written throughdata"is refused (ADR-0092)" now states the measured behaviour. Every seed write runs under the system execution context, which ADR-0092's identity-write guard stands aside for, so the row lands. It lands as a directory row with no account and cannot sign in.packages/spec/src/system/dev-login.zod.ts: the threeguidanceprescriptions (permissions,capabilities,seed) stop telling the author to seed the account indata. They tell the author to declare the person indemoStaff, so thatos devcreates the account.datafixtures" as the way to have the account) and theemailfield's.describe()("an account this application seeds") now point atdemoStafftoo. These were added because theguidancestrings do not reach the generated reference. Only field.describe()text renders there, so without theemailchange the regenerateddev-login.mdxwould not have moved.content/docs/references/system/dev-login.mdx: regenerated (gen:docs). Itsemailrow now namesdemoStaff..changeset/26424-demo-staff-dev-login-seed-prose.md:patchfor@objectstack/spec, with both declaration lines.No schema, key or behaviour change.
Why
The two files pointed in opposite directions, and both were wrong about what happens.
packages/runtime/src/app-plugin.tswrites every seed insert withSEED_WRITE_EXECUTION_CONTEXT(isSystem: true).packages/plugins/plugin-auth/src/identity-write-guard.tsbypassesisSystemwrites.packages/runtime/src/app-plugin.seed.test.tspins asys_userseed row being inserted.packages/plugins/plugin-auth/src/dev-admin-seed-gate.tsrecords the consequence end to end: 13sys_userrows, zerosys_accountrows, and sign-in answering 401. An author who follows the olddevLoginstext gets a person who cannot sign in.demoStaffexists for this case.Tests
pnpm --filter @objectstack/spec testat4b28e265, underos-verify-lock:VERDICT command-exit 0, Test Files 728 passed (728), Tests 22040 passed, 1 todo.pnpm --filter @objectstack/spec buildat4b28e265:VERDICT command-exit 0.Acceptance notes
git grep -n 'refused (ADR-0092)' -- packages/spec/src/system/demo-staff.zod.tsgives 0 lines.git grep -n 'in \data`' -- packages/spec/src/system/dev-login.zod.tsgives 0 lines. Control leg:git grep -c 'through `data`'on the same file gives 2, so the grep reads the file.git grep -c demoStaffondev-login.zod.ts` gives 5..describe()text that reachesdev-login.mdx. They arestrictObjectguidanceentries, which are shown in an unknown-key refusal and not in the generated reference. The text that reached the reference was theemaildescription, which is why it joined the surface.skills/objectstack-platform/SKILL.md:446still says the row "is refused (ADR-0092)". That sentence belongs to PR skills(objectstack-platform): teachdemoStaffand when to pick it overdevLogins#26420's patch round and is left untouched here.Verification
Refusal prescription as an author sees it (built dist)
DevLoginSchema.safeParse({ email: 'a@b.co', seed: true })now answers:Generated artifacts
pnpm --filter @objectstack/spec check:generatedfirst reported 1 of 14 stale (content/docs/references/**). Aftergen:docs: "All 14 generated artifacts are up to date".Derived gates at 4b28e26 (node scripts/pm/dispatch-gates.mjs --commands, then --ran)
dispatch-gates --ran: 98 derived, 91 run, 7 NOT MEASURED, 0 unrun. All 91 that ran exited 0, includingcheck:docs,check:generated,check:doc-authoring,check:nul-bytes,check:api-surface,check:authorable-surface,check:issue-citationsandcheck-changeset-no-major.The 7 that exited 3 (PREREQUISITE NOT MET) need a full workspace build or a fixture commit that this shallow clone lacks. CI runs them:
node scripts/check-plugin-teardown-shape.mjs --self-test(pinned fixture commit not in the shallow clone)pnpm --filter @objectstack/lint run check:doc-formula-expressions(@objectstack/formulanot built)pnpm --filter @objectstack/lint run check:doc-security-posture(@objectstack/lintnot built)pnpm --filter @objectstack/spec run check:skill-examplespnpm check:docs-transcript-driftpnpm check:dual-build-cjs-loadspnpm check:lean-entry-closureHuman Minimum
packages/specholds no runtime logic.pnpm lintpasses. (pnpm lintis left to CI.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzed5ZRLMtNcevsCJit