Skip to content

fix(plugin-auth): the dev admin seed stops storing the host's time zone and currency - #39302

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-39043-dev-seeds-retired
Dec 3, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-39043-dev-seeds-retired

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Refs #39043 (half A: dev seeds)

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用开发模式起一个新库时,组织的时区和货币不再按跑服务的机器自动写入;首次设置清单会像正式环境一样,按浏览器建议时区和货币,管理员点保存才生效。
  • 为什么做:替首次设置清单解决“上海浏览器却显示已设置的 UTC”的问题,原因是开发模式的自动写入;按你已选的“两处都删”删掉这两处写入。
  • 出错会怎样:只影响开发模式的新库;保存一次基本信息前,时间按 UTC、无币种金额不带符号,和正式环境保存前一样;可直接撤回。
  • 要你做什么:无。

What changes

Implements ruling record 7359875657 (the time zone and currency question) on the plugin-auth side.

  • packages/plugins/plugin-auth/src/auth-plugin.ts: the development admin seed no longer calls seedDevWorkspaceTimezone (deleted) or seedDevWorkspaceCurrency. A short comment at the old call site records that the seed writes no localization setting and cites the ruling record.
  • packages/plugins/plugin-auth/src/organization-default-currency.ts: hostLocaleFromEnv and seedDevWorkspaceCurrency are deleted, and the header's dev-seed bullet now says the seed writes no currency. The creation-time path (seedCreatedOrganizationCurrency, withOrganizationDefaultCurrency, creatorLocaleForNewOrganization, seedOrganizationCurrency) is not touched. None of the removed symbols was exported from the package entry.
  • dev-admin-seed-workspace-timezone.test.ts is deleted, and the hostLocaleFromEnv cases are removed from organization-default-currency.test.ts.
  • organization-created-default-currency.test.ts (outside the dispatched file list, see Acceptance notes): its "the dev seed, from the host locale" block pinned the retired seed (a zh_CN host stores CNY) and went red. Cases 7 to 9 are replaced by one case 7 that pins the ruled behaviour: on a dev boot with LANG=zh_CN.UTF-8, the seeded admin exists and the Default Organization's currency reads { value: null, source: 'default' }, with no localization.currency write.
  • The two edited currency suites gain the module-top import '@objectstack/core/egress' that check:test-source-alias requires for an edited test file whose source reaches that dynamic import.
  • docs/qa/platform-checklist/areas/platform-core.json, item platform-core.settings-hub-roundtrip: steps[1] (the "UTC in these containers" step), steps[2], steps[5] and acceptance[0].clause no longer say a dev-seeded boot starts with a tenant zone. The item moves to revision 10 and gets a history row. No clause is loosened.
  • A @objectstack/plugin-auth patch changeset.

Tests

The ruling's named premise, measured on a real composition (ObjectKernel, ObjectQL on in-memory SQLite, AuthPlugin, SecurityPlugin, SettingsServicePlugin, NODE_ENV=development, TZ=Asia/Shanghai, LANG=en_US.UTF-8). The probe reused the deleted suite's harness as a scratch copy and was not committed:

  • this branch: timezone={"value":"UTC","source":"default"}, currency={"value":null,"source":"default"}, no localization row in sys_setting, and no localization write through the settings door. 1 passed.
  • control, the same probe against the c7478b37 source: timezone={"value":"Asia/Shanghai","source":"tenant"} and currency={"value":"USD","source":"tenant"}. 1 failed.
plugin-auth suite, typecheck and the ablation of the rewritten pin
  • pnpm --filter @objectstack/plugin-auth build && … typecheck && … exec vitest run --maxWorkers=2 at 093d5b4: typecheck green (check:test-typecheck: OK). Vitest gave Test Files 1 failed | 296 passed (297). The one failure was case 7 of organization-created-default-currency.test.ts, fixed in 5ca0e22.
  • at c183c16: vitest run src/organization-created-default-currency.test.ts src/organization-default-currency.test.ts gives Test Files 2 passed (2), Tests 21 passed (21), and check:test-typecheck: OK.
  • ablation: with the c7478b37 versions of auth-plugin.ts and organization-default-currency.ts restored to the tree only, the same file gives Tests 1 failed | 9 passed (10) on case 7 (expected … to match object { value: null, source: 'default' }). Both files were then restored from HEAD and git status was clean.
Local gate families (dispatch-gates --commands, 83 derived)
  • dispatch-gates --ran: 83 derived, 83 run, 0 unrun.
  • At 5ca0e22, 79 exited 0 on the first pass. pnpm check:query-options-erasure hit a local 200 s timeout once, then exited 0 on a rerun (ratchet holds … none new).
  • pnpm check:test-source-alias exited 1 at 5ca0e22 on the two edited currency suites (the egress import above). At c183c16 it exits 0 (check-test-source-alias OK).
  • NOT MEASURED, left to CI: pnpm check:dual-build-cjs-loads exited 3 (Run pnpm build first … nothing was measured; only the plugin-auth closure is built here). node scripts/check-plugin-teardown-shape.mjs --self-test exited 3 because its pinned fixture commit cannot be reached from this shallow clone.

Acceptance notes

  • The dispatched file list did not name organization-created-default-currency.test.ts. The ruling says the seeds' pins go with them, and this file held the currency seed's composed pins. Its dev-seed block is therefore rewritten here rather than left red.
  • Some prose outside this PR's file list still describes the removed seed. It is left for the seat:
    • packages/services/service-settings/src/manifests/localization.manifest.ts: a comment says "the dev seed does the same from the host's POSIX locale".
    • packages/plugins/plugin-auth/src/demo-staff-provisioning.test.ts: its header names the deleted suite as its composition precedent.
    • examples/app-showcase/.env: its comment contrasts the pinned currency with one "derived from this host's locale". The OS_LOCALIZATION_CURRENCY=USD pin is still needed and still works.
  • Nothing else depends on the seeded rows. The upgrade-harness dogfood test reads timezone source: 'tenant' from a checked-in 18.x fixture database, not from a fresh boot. The showcase pins its home currency in the environment.
  • The console's reading of a stored row does not change. Half B (the organization-name line) is a separate PR.

Verification

Read first: auth-plugin.ts at the old call site in maybeSeedDevAdmin (the only behaviour change), then case 7 of organization-created-default-currency.test.ts.

Two-minute check: pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2 src/organization-created-default-currency.test.ts should report 10 passed.


Generated by Claude Code

…ne and currency

The development admin seed wrote localization.timezone from the host's
zone and localization.currency from the host's POSIX locale as tenant
rows, so the first-run checklist read the host's values as set and
offered nothing from the browser. Both seeds, their pins and the QA
checklist step that named the seeded row are removed (ruling record
7359875657). The creation-time currency path is unchanged.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbFgiyGToVRBFwedwF
…no currency

The composed currency suite pinned the retired dev-seed half (a zh_CN
host stores CNY). It now pins the ruled behaviour: the seeded admin's
workspace keeps no currency whatever the host locale.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbFgiyGToVRBFwedwF
…o edited currency suites

check:test-source-alias judges edited test files: both reach the dynamic
import of @objectstack/core/egress through the source under test.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbFgiyGToVRBFwedwF
@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 Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

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

  • content/docs/deployment/cli.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/deployment/self-hosting.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/deployment/tenancy-modes.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/kernel/services-checklist.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/permissions/authentication.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/permissions/record-view-auditing.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/permissions/sso.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/plugins/index.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/plugins/packages.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/upgrading.mdx (via AuthPlugin (symbol, a top-level class))

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

  • content/docs/releases/v17/17-3.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/releases/v17/17-5.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/releases/v17/17-6.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/releases/v17/17-7.mdx (via /api/settings/localization (route, a path literal in a comment in AuthPlugin))
  • content/docs/releases/v18/18-0.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/releases/v18/18-1.mdx (via AuthPlugin (symbol, a top-level class))
  • content/docs/releases/v18/18-2.mdx (via AuthPlugin (symbol, a top-level class))

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 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 71 of 256 client-bound route-ledger rows — the other 185 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 185: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 125 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 — 26 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 f80864150e572949519a6e861322181f5f36ee48 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json f80864150e572949519a6e861322181f5f36ee48

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

…t; stale seed prose reworded

Case 7 now asserts the seeded admin's workspace resolves timezone from
the default with no localization write, so a returning zone seed goes
red. Three comments that still described the removed seed are reworded
(service-settings localization manifest, demo-staff suite header,
showcase .env reason line; the USD pin stays).

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbFgiyGToVRBFwedwF
…mo-staff suite

Its header edit put it under check:test-source-alias, which requires the
module-top import for an edited test file reaching that dynamic import.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CbFgiyGToVRBFwedwF

席位核对

ACCEPT at 2026-12-03T10:51Z · head 0dbb73543d84b11ce70ae638dfce3397060abbc4 · L1 by zone ux-1203 (isolated reviewer, default tier, effort high, at c183c16: ACCEPT with two nits + three stale-prose follow-ups, all folded in; delta c183c16→0dbb7354 self-read, 4 files +21/-13) · card #39043 claim 7373015897, amendments (Clause-② on half B; surface widened to the stale-prose files), report 7374647343 · Ruling-ref 7359875657 (A) · the landing rides this stroke.

  • Form: Refs #39043 (half A: dev seeds) (half B is PR fix(console): a line under the organization name while it is the platform name (#39043, half B) #39301; the seat closes the card by hand once both merge), Clause-②: no, Metadata-protocol: none; seedDevWorkspaceTimezone + its call, seedDevWorkspaceCurrency + hostLocaleFromEnv removed (never exported); their pins gone; QA item platform-core.settings-hub-roundtrip to rev 10, no acceptance clause loosened; one @objectstack/plugin-auth patch changeset. Not governed (check-governed-merges --pr 39302), 615 lines.
  • Premise measured (dev, real dev composition, TZ=Asia/Shanghai, LANG=en_US.UTF-8): after the change timezone = UTC source default, currency = null source default, zero localization rows; the base reads Asia/Shanghai and USD at tenant scope.
  • Ruling terms read: creation-time currency path untouched (cases 1–6 and 10–12 still pin creator-currency writes); nothing under ui/ changes, so the console's reading of stored rows is untouched.
  • Delta: case 7 now pins both seeds gone (currency and zone resolve from default, zero localization writes); stale comments fixed in localization.manifest.ts, demo-staff-provisioning.test.ts, organization-created-default-currency.test.ts, examples/app-showcase/.env (the USD pin stays); demo-staff-provisioning.test.ts gained the module-top egress import check:test-source-alias requires of an edited suite.
  • Gates: every check-run at head success (40) or skipped (18). The earlier red on ff867cf (Test-source alias gate) is fixed on this head.
  • Accepted deviations: surface widened to organization-created-default-currency.test.ts (the seed pins went with the seeds, as ruled) and the three comment-only files (claim amendment).
  • Out of scope: none left.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 3, 2026 10:52
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 3, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CbFgiyGToVRBFwedwF

Re-queue · 2026-12-03T11:42Z · head 0dbb73543d84b11ce70ae638dfce3397060abbc4 unchanged, ACCEPT 7375881415 stands. The merge-group run 47090366074 dropped the PR on Type Check · consumer gates (job 144197391940): its Build workspace packages step started 10:52:27Z and never concluded, and the job ended at 11:41:27Z on the timeout with every later step unrun and its log blob gone (404). No type error was reported. The same gate passed on this head in the PR run. This is a runner stall, not this diff, so the PR is re-queued once.

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/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.

2 participants