npm notice run @mosaic/business@0.1.0 test
npm notice run node --test tests/
✔ the role file loads and resolves through loadBusiness (8.757295ms)
✔ the shipped file is exactly the approved list (1.17548ms)
✔ the assistant's authority is message.send within role and nothing else (2.293263ms)
✔ a business grant through limits does not widen the role (2.390957ms)
✔ a launch block whose by is the assistant is refused (2.081935ms)
✔ the instance takes no credential references and no tracker (3.446612ms)
✔ the contract passes work to the chief of staff and directs no one (0.339161ms)
✔ config directory and file path follow MOSAIC_CONFIG (2.282523ms)
✔ the fixture business validates and comes back frozen (6.702787ms)
✔ two instances may share a definition (2.461208ms)
✔ top-level refusals (6.70917ms)
✔ arbiters and projects (8.534383ms)
✔ role instances (4.605411ms)
✔ Vikunja bots (6.355468ms)
✔ a role without Vikunja takes no tracker block (2.239476ms)
✔ credential references match the definition's services (2.514846ms)
✔ launch (8.006632ms)
✔ loadBusiness: file checks (2.248071ms)
✔ loadBusiness: not a regular file (42.616881ms)
✔ loading writes nothing (1.39767ms)
✔ names that are Object.prototype properties don't count as declared (2.81657ms)
✔ the shipped example refuses as written and validates once filled in (0.631327ms)
✔ the role file loads and resolves through loadBusiness (8.439724ms)
✔ the shipped file is exactly the approved list (0.827515ms)
✔ the resolved record matches the approved list, so a widened file fails (2.684616ms)
✔ the chief of staff holds role.launch and message.send; every other action is gated (1.981672ms)
✔ the pm does not hold role.launch (2.1383ms)
✔ a business grant of a gated action through limits does not widen the role (2.654861ms)
✔ a limit that drops role.launch leaves the chief of staff with no launch block (2.213253ms)
✔ a launch block whose by is the pm instance is refused (1.827647ms)
✔ the contract names no duty to talk to the human and the pm contract no launch (0.379178ms)
✔ the instance takes no credential references and no tracker (2.101069ms)
✔ usage errors exit 4 (299.552943ms)
✔ validate: a good business exits 0 and prints instance digests (68.003738ms)
✔ validate: project files (327.672493ms)
✔ validate: missing files and a broken system config (254.070024ms)
✔ validate: credential reference problems exit 2 and name each one (71.290439ms)
✔ validate: a token file inside the repository is refused (68.143184ms)
✔ validate: role definitions come from MOSAIC_ROLES_DIR (202.173732ms)
✔ resolve: prints one instance's record (267.89148ms)
✔ resolve: refusals (400.549345ms)
✔ parse: exactly one of file or env, plus the service's date (4.093698ms)
✔ check: a good file has no problems (1.300717ms)
✔ check never opens the file: a write-only token passes (0.554356ms)
✔ check: file problems (1.392279ms)
✔ check: token files can't live in the repository or dataRoot, even through a linked directory (1.351493ms)
✔ check: dates and environment references (0.614926ms)
✔ path and load (3.205446ms)
✔ refusals (1.894874ms)
✔ systemVars flattens the validated config (3.049647ms)
✔ precedence: system, business, project, project role, agent (6.841932ms)
✔ limits narrow the definition and never widen it (3.008136ms)
✔ role.launch stays within-role only for the instance the launch block names (7.418399ms)
✔ limits.authority without role.launch leaves the launcher with no launch block (2.962364ms)
✔ limits.authority narrows cross-role actions too (4.208876ms)
✔ classify (1.824688ms)
✔ the record carries what the broker and launcher need (1.64436ms)
✔ digest: key order doesn't matter, any value change does (5.962938ms)
✔ refusals (2.345609ms)
✔ the four shipped version 2 roles load (4.1598ms)
✔ shipped role scopes match addendum B section 2 and the SR runbook (1.276827ms)
✔ shipped authority follows the note's table (0.788543ms)
✔ every role file in roles/ loads through the validator, and a v2 contract exists (0.865688ms)
✔ version 1 files keep loading with no authority (1.107582ms)
✔ the conductor policy isn't a role (0.242917ms)
✔ a missing role file is exit 4, a symbolic link too (0.556779ms)
✔ version 2 refusals (1.957412ms)
✔ authority: closed vocabulary, no gated-only action, no overlap (3.549793ms)
✔ credentials: Gitea scopes (1.62296ms)
✔ credentials: Vikunja scopes are a group-to-verbs map from the grantable list (1.671689ms)
✔ credentials: services (0.821372ms)
✔ contract: a non-empty regular Markdown file beside the role file (1.541676ms)
✔ every key names known layers and a merge rule (1.188872ms)
✔ unknown keys and wrong layers refuse (0.928826ms)
✔ types (2.445085ms)
✔ merge: defaults, then the most specific layer wins (0.422748ms)
✔ merge: limits only narrow, and provenance lists each source (0.582765ms)
✔ merge doesn't change its inputs (0.228965ms)
ℹ tests 78
ℹ suites 0
ℹ pass 78
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2059.880607
