Repository navigation
Seven smaller things a real user hits — item 5: a pnpm demo re-run prints the first-run operator note, false by then - #106
Merged
Conversation
The closing note told the operator to create the five persona accounts and run `pnpm demo` again, then printed the same first-run text on that second run, when the accounts existed and the seed had handed the rows over. The priming boot now reads, as the dev admin, which of the five named accounts exist and which requesters have a manager, and the note is built from that: the first-run text unchanged while none exists (or the read fails, which it says), the steps still undone naming their accounts once some do, and a short all-done note otherwise. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
Contributor
Author
席位核对 — ACCEPT · head
|
| check | reading |
|---|---|
| shape | draft → main, line 1 Part of #99 (items 4 and 5), no closing keyword next to any open issue; assignee zhuangjianguo |
| CI on the head | both Validate check-runs success on d7806a9 = PR head.sha |
| scope | 1 file, scripts/demo.mjs (+192/−9); contract-intake.flow.ts and src/translations/*/flows.ts untouched (the pending 18.1 upgrade rewrites those); nothing governed |
| the fix | the priming boot reads sys_user for the five named accounts (and requesters' manager_id) as the dev admin and prints only what is still undone; an unreadable roster falls back to the full first-run note and says why |
| measured (dev) | 5 real runs: empty DB → first-run note (identical to main by diff); accounts, no managers → one step naming the three requesters; managers set → "nothing left to do"; owner_id 43/44/34, 0 ERROR [SeedLoader] |
| deviation, seat correction | the branch commit's trailer was made model-free against the session's required attribution; the squash commit carries the required trailer |
| item 4 | no code; needs_decision goes to the maintainer separately |
Landing: under the maintainer's merge authorization (project thread: 「pr 你审核之后可以帮我合并」).
Generated by Claude Code
This was referenced Oct 25, 2026
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.
Part of #99 (items 4 and 5)
This PR changes code for item 5 only. Item 4 (an abandoned intake wizard leaves an orphan draft) was re-measured and reproduces on
449667e, but no flow change in this app prevents it. The fix needs either a platform capability or a product decision, so it goes back to the card asneeds_decisionwith no code here. Items 2, 3, 4 and 7 remain open on #99.Clause-②: no
Metadata-protocol: none
Item 5 —
pnpm demore-run printed the first-run operator notescripts/demo.mjsprinted the same closing note on every run. Its step 1 ends "run this again", so the operator is told to make exactly the second run on which that note is false.What changed (one file,
scripts/demo.mjs):signInalso returns the session token the sign-in answers.readRoster(port, token): while the priming server (demo off) is still up, it readsGET /api/v1/data/sys_user?fields=id,name,manager_id&filter={"name":{"$in":[the five persona names]}}as the dev admin. It returns the persona names that have no account, plus the existing requesters with nomanager_id. A failed read returns{ unknown: reason }.REQUESTER_ACCOUNTS/COUNSEL_ACCOUNTSmirrorCONTRACT_OWNERS/LEGAL_OWNERSinsrc/data/keys.ts. This is the same mirrorDEMO_USERalready keeps, for the same reason: this file runs before anything compiles. If they drift, only the note's wording goes wrong; the seed never reads this list.operatorSetupNote(roster):FIRST_RUN_NOTE);ERROR [SeedLoader]explanation only while an account is missing;primeAdminAccountreturns{ primingMs, roster }, andannounceOperatorSetuptakes the roster.Measured. Every run is
pnpm demo -- --port 3991in this worktree, with the terminal captured to a file. The accounts were created as the README says: five named accounts,clm_requesterset rows for the three requesters,clm_legal_counselpositions for the two counsel.449667e{"inserted":820,…,"errored":404}, 404ERROR [SeedLoader]lines449667eowner_id43 / 44 / 34 across the three requesters (the 44 includes the item-4 probe draft), 0 rows on the dev admin, noERROR [SeedLoader]line, so steps 1 and 3 were falsed7806a9Business Requester 1,Business Requester 2andBusiness Requester 3a manager …d7806a9POST /api/v1/auth/admin/set-user-manager→ 200 ×3owner_id43 / 44 / 34,legal_owner34 / 34 / 53 null (README: 34 / 34), 0ERROR [SeedLoader]linesd7806a9diff) to run 1'sThe partial state (some accounts missing) was rendered offline from the same function. Every line fits the note's 76-column rule, and no account name breaks across lines.
Item 4 — why there is no flow change
Re-measured on
449667ein Chromium at 1440×900, signed in asBusiness Requester 1. The launch dialog was given Mutual Non-Disclosure Agreement and a picked counterparty. Then Confirm → "Contract details" (title, governing law, confidentiality term) → Submit → "First version" (the type carries no template) → Submit → the dialog shows "Upload the first version" → the dialog's Close.POST /api/v1/automation/contract_intake/trigger → 200 paused screen_core;…/resume → 200 paused screen_document;…/resume → 200 paused screen_upload (kind object-form). Closing the dialog sent no request: no cancel, no resume.NDA-2026-0021(the same number as the Full browser test on 17.7.0main: drive the whole contract lifecycle as every audience, in en and zh-CN, and report what a real user hits #87 run),status: draft,owner_id= the requester,version_count: 0, zeroclm_contract_versionrows. The run is listedpausedatscreen_uploadwith no end.DELETE /api/v1/data/clm_contract/…→403 PERMISSION_DENIED(DESIGN.md §04 grants the requester RCU). No action cancels a draft.Why a reorder does not fix it. The draft is created at
create_contractbecause the next interactive step,screen_upload, is an object form onclm_contract_version. That form saves the version itself, and its requiredcontractfield must point at an existing contract. A file can only come from that form. In the 17.7.0 console's flat-screen renderer (RecordDetailViewchunk, the screen-field switch), the only widget types are lookup (withreference), select, boolean, textarea/markdown, number/currency/email/date and text, with no file input. DESIGN.md §06 F1 orders it "上传首版或标记「按模板」→ 建合同(draft)与版本 v1". The flow cannot follow that order until a flat screen can take the file. Movingscreen_scheduleahead of the writes would remove the orphan only on the template path, and the reported case is the no-template path. Collecting the file in the launch dialog instead would reshape the app around a platform gap, which the lane ruling 「平台的问题就等平台」 rules out. The options go to the card in the report.For the 18.1 re-application: this PR moves, adds or removes no node, edge or value slot in
src/flows/contract-intake.flow.ts, and the file is untouched.src/translations/*/flows.tsis untouched too.Gates — on
d7806a9Run under the shared verify lock, each with its exit code captured to its own file before any pipe (
VERDICT … held the lock 12s · waited 0s):Acceptance notes
Plugins: 41 loadedin all five. There was noSystem started with degraded capabilitiesand nono such table. The six scheduled flows areNOT bound — disabled by deployment policy, as onmain.pnpm demoprints its "now create the three requesters" instruction ~290 lines and 120 ERROR lines before the ready banner, so nobody reads it #49 placement logic is unchanged.contract-intake.flow.tsheader says a flat screen has "NO record picker", which was measured on 17.3.0. The 17.7.0 renderer has alookupwidget whenreferenceis set. The file-input half of the same sentence still holds.Generated by Claude Code