Repository navigation
feat(demo): pnpm demo:staff adds a Finance Controller and an Accounts Receivable user - #2823
Merged
objectstack-fleet[bot] merged 2 commits intoNov 27, 2026
Merged
Conversation
… Receivable user (#2821) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAk8tegvAi1ECkgCFfc
…#2821) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAk8tegvAi1ECkgCFfc
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Author
|
repo:hotcrm#1 · huangyiirene · session_01J8VVAk8tegvAi1ECkgCFfc ACCEPT · 2026-11-27T03:10ZHead-sha: 维护者速读
席位核对
|
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.
Requested by Irene · project thread
Fixes #2821
Clause-②: no
Metadata-protocol: none
Metadata-impact: reviewer — no registered metadata changes.
src/sales/sharing/demo-staffing.tsis the dev-only tablepnpm demo:staffreads; the artifact never imports it (test/demo-staffing.test.tspins that no staffing email reaches the manifest). No permission set, position or sharing rule is touched.维护者速读
What changes
src/sales/sharing/demo-staffing.ts):finance.controller@objectos.ai(Farah Lindqvist, positioncrm_finance_controller→ setfinance_controller) andar.accountant@objectos.ai(Arjun Mehta, positioncrm_ar_accountant→ setar_accountant), passworddemo1234like the others. The five existing rows are byte-for-byte unchanged.TERRITORY_OWNERandCASE_DESKname neither key, and the run's ownership census shows 0 for both on every routed object.mustReadfield on a row: the objects that persona must read at least one row of.scripts/demo-staff.tsstep 5 signs in as each persona and fails the run when one answers empty or denied. Both finance rows listcrm_invoiceandcrm_payment.finance.controllerran into the neighbouring column at width 16).docs/MAINTENANCE.md§4.1 lists the two users and what they show. It is the only doc that lists the demo users: README / README.zh-CN say "the demo team" with no names or counts, so they and their bold figures are unchanged, and nocontent/docsorsrc/**/docspage lists the users.docs/MAINTENANCE.mdhas no zh twin.Tests
test/demo-staffing.test.tsgets a new block, the finance personas read the Order to Cash surfaces. It runs after the script has staffed the shipped app (@objectstack/verify):mustRead;crm_invoice/crm_paymentids as the dev admin (and the admin's set must be non-empty);invoiced_amount/received_amount/receivable_balanceon every account it reads (against a dev-admin reading that must be non-empty).Ablation: I set the controller's position to
crm_project_memberon disk and ran the block. 4 of its 5 tests went red (the ownership-route test, which does not read the position, stayed green), including "reads accounts without invoiced_amount / received_amount / receivable_balance: expected +0 to be 9". I then restored the file.Acceptance notes
controlled_by_parenton its every-record contract read (its set grantsviewAllRecords: falseon the two objects). It sees all 6 invoices and 5 payments.pnpm dev, fresh.objectstack/data) and ranpnpm demo:staff: exit 0. Output excerpt:pnpm demo:staff, fresh database
Signed in as each over REST (
POST /api/v1/auth/sign-in/email200),crm_accountquery returnsinvoiced_amount/received_amount/receivable_balance(Initech Solutions: 60000 / 39000 / 21000).Verification
Files to read first, by risk:
test/demo-staffing.test.ts: the new finance block and the reworded bench failure text.scripts/demo-staff.ts: themustReadloop inverify().src/sales/sharing/demo-staffing.ts: the two rows and the header paragraph.Two-minute check:
pnpm exec vitest run test/demo-staffing.test.ts. Expect 38 passed, including the five tests under "the finance personas read the Order to Cash surfaces (hotcrm#2821)".Local gate readings
On
ae99ba7a:pnpm validateexit 0 (Validation passed),pnpm typecheckexit 0,pnpm lintexit 0,pnpm hygieneexit 0,pnpm testexit 0: Test Files 340 passed (340), Tests 6518 passed, 58 skipped (6576). The final head adds only the census column width inscripts/demo-staff.ts. On that head I re-ran validate, typecheck, lint, hygiene andtest/demo-staffing.test.ts, which runs the script; see the report for those readings.🤖 Generated with Claude Code
https://claude.ai/code/session_01J8VVAk8tegvAi1ECkgCFfc