Repository navigation
pnpm demo creates its demo staff, so every persona opens 我的合同 out of the box - #171
Merged
Merged
Conversation
…counts The platform's `demoStaff` (@objectstack 18.2.0, objectstack#25777) creates the accounts an application declares on a local development boot, after the dev admin and before the seed runs. Ruling D on #28: the platform creates the demo accounts, the app only declares them. - objectstack.config.ts declares eleven demo accounts, gated on CLM_DEMO_SEED like the dataset: the three business requesters and two legal counsel by the same constants the fixture deals rows by, and one account for each of the other six positions. No password (the platform refuses one), no sys_user row in any fixture. - scripts/demo.mjs drops the closing operator note and the roster read behind it: no account is left for the operator to create. - README replaces the hand-made-accounts section with the declared staff, their sign-in addresses and the shared dev seed password. Setting a requester's manager stays a manual step: a demoStaff entry cannot carry one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
Contributor
Author
席位核对 — ACCEPT · head
|
| check | reading |
|---|---|
| shape | draft → main, Fixes #28; mergeable clean |
| CI on the head | both Validate check-runs success on b14b3cc = PR head.sha |
| scope | 3 files: objectstack.config.ts (demoStaff, gated on CLM_DEMO_SEED like data), scripts/demo.mjs (operator note and roster read removed, −386), README.md (declared staff in place of the hand-made-accounts section). Within the claim's surface. Nothing governed; lint 0 warnings |
| the ruling | 6396320437 letter D — delivered on 18.2.0's demoStaff (objectstack#25777). Each of the 11 accounts was measured on a fresh pnpm demo and pnpm demo:zh with no manual step: requesters see 43 / 43 / 34 contracts, counsel 34 / 34 reviews, and finance, records, the head of legal and the admin each land on their workbench. Seed references that went unresolved before (404 ERROR lines) now resolve: 0 ERROR. A second run is idempotent: 12 accounts, 8 positions, and hand-set managers are kept |
| §10 「用户不可种子」 | holds: no sys_user row in data; os build drops the key; pnpm dev stays empty |
| names | requesters and counsel come from the same keys.ts constants the fixture deals rows by, so they cannot drift. No password is committed (the platform refuses the key) |
| residual | demoStaff cannot carry a line manager (measured: manager_id NULL ×11), so README keeps Set Manager for that one step. Filed upstream by the seat |
Landing: under the maintainer's merge authorization (project thread: 「你可以自己审核的就自己合并」).
Generated by Claude Code
zhuangjianguo
marked this pull request as ready for review
October 27, 2026 10:27
zhuangjianguo
pushed a commit
that referenced
this pull request
Oct 27, 2026
…e platform (#28, PR #171) Ruling 6396320437 (D). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
This was referenced Oct 27, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #28
Ruling-ref: 6396320437 (letter D: the platform creates the demo accounts, hotclm declares them). Platform side: objectstack-ai/objectstack#25777, shipped in 18.2.0 as
f00e8d5.What changed
objectstack.config.tsdeclaresdemoStaff, eleven accounts, gated onCLM_DEMO_SEEDlikedata(sopnpm devstays empty of people too):Business Requester 1/2/3(requester1..3@example.com), no position, because every member holdsclm_requester(isDefault). The names come fromCONTRACT_OWNERS, the constant the fixture dealsowner_idby.Legal Counsel 1/2(counsel1/2@example.com), positionclm_legal_counsel. The names come fromLEGAL_OWNERS.Head of Legal,Finance Controller,Executive,General Manager,Records Manager,CLM Administrator.admin123, orOS_SEED_ADMIN_PASSWORD).sys_userrow goes into any fixture, andos builddrops the key from the artifact. §10 「用户不可种子」 still holds.scripts/demo.mjsdrops the closing operator note and what fed it: the roster read, the port and banner timing, and the persona name mirrors. The two-boot priming step for the dev admin stays as it was.demoStaffentry cannot carry a manager.Measurements (18.2.0, port 3149, fresh DB, Chromium zh-CN, each reading signed in as the persona)
Before:
origin/main2cbcb8b,pnpm demo.legal_owneris NULL on all 120 contracts.ERROR [SeedLoader] Deferred reference UNRESOLVED: 120owner_id, 68legal_owner, 199clm_obligation.ownerand 17decided_by. On top of those come 20WARN [Seeder] ✗lines and the summaryWARN … 404 dropped record(s) and 404 error(s).After: this branch,
pnpm demoandpnpm demo:zh, each on its own fresh DB, with no manual step.sys_user_positionrows, all in the org.owner_id: 43 / 43 / 34legal_owner: 34 / 34, with 52 NULL by designclm_obligation.owner: 50 / 53 / 40 / 29 / 27, with 1 NULL by designdecided_by: 10 / 7, with 8 openadmin123and gets no change-password prompt:pnpm demo:zhgave the same counts: requester 1 43 / 23, counsel 1 34, finance 60, records 6.pnpm demoand a secondpnpm demo:zhon the same DB still showed 12 accounts and 8 positions, with no duplicates and no WARN or ERROR beyond the plugin-superseded line. Managers set before the re-run were kept.Plugin supersededandInline seed exceeded 8000ms budget. Both builds print the same 6 author-time compile warnings and the samehierarchy-securitycapability line. NoPROVISIONALline appeared.pnpm dev, fresh DB. One account (Dev Admin), and no demoStaff line.[auth] demoStaff: … created … (admin123)line logs atinfo, which the defaultos devoutput does not show. The console therefore names neither the accounts nor their password, and README says so.The manager cannot be declared.
DemoStaffSchematakes exactlyname,email,position?andpermissionSets?(strict). Afterpnpm demo,manager_idis NULL on all 11 accounts. README's Set Manager step still works on the demo staff:POST /api/v1/auth/admin/set-user-manageranswered 200 ×3, and the managers survived the second run. That step is the one manual step left in README.Gates (head
b14b3cc; each exit code captured before any pipe)pnpm installexited 0.pnpm validateexited 0:✓ Validation passed.pnpm lintexited 0:6 suggestion(s), 0 warnings, the same as main's config measured on this tree.pnpm typecheckexited 0.pnpm lint:i18n-gateexited 0:COVERAGE : 0 missing keys across 2 locale(s).CLM_DEMO_SEED=1 pnpm validateexited 0.Reverse check: changing one position to
'clm_nope'madeCLM_DEMO_SEED=1 pnpm validateexit 1 with✗ Demo account 'Head of Legal' (stack.demoStaff[5]) is assigned position 'clm_nope', which this stack does not declare. Plainpnpm validatestill exited 0, which shows the gate works. The change was restored from HEAD andgit diff HEADcame back empty.Acceptance notes
mainthe dev admin already opens 我的合同, because [Decision]DESIGN.md§04 makesclm_requesterevery employee's default, but a set that grantsclm_requester.accesscannot bind toeveryone#11 Q1'sisDefaultlanded, and it holds all 120 contracts through the seed-settle claim. The rest of the card still held: no persona account existed and 404 references stayed unresolved.demoStaffarmed, the platform defers the seed tokernel:bootstrapped, after the dev admin exists.scripts/demo.mjs's priming boot may therefore be redundant. This was not measured and is left as it is.clm_review.reviewercould move off the dev admin. It still names the dev admin. Demo staff now exist while the seed runs, so a fixture change could deal reviews to the counsel. That is out of this surface, and so are the stale "operator creates" comments insrc/data/keys.ts. The seed cards that follow this one (pnpm demostops being re-runnable once the daily jobs have run: the seed re-asserts statuses the state machines refuse to go back to #41, Decision: DESIGN.md §10 asks for 300 seeded contract versions, but §03 makesfilerequired and a seed cannot mint one #19) can carry both.objectstack-ai/objectstack#22558, which is now closed. The 18.2 author-time warning says an unset manager opens the request on the organization's administrators.🤖 Generated with Claude Code
https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn