command: ["node", "--test", "/home/jwoltje/.t3/worktrees/mosaic-stack/magica-row329/packages/bus/tests/chief-of-staff.test.mjs"]
TMPDIR: /mnt/storage/scratch/tmp/oEntjx
launch nice: 19
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (38.080512ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (36.692059ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (29.636755ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (28.889768ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (24.899245ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (27.863549ms)
✔ REQ-COS-1: the chief of staff cannot end its own run; its end of the assistant stops the assistant's thread run (37.146698ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (36.106056ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (38.181414ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (65.180504ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (62.933955ms)
✔ REQ-COS-1: organization.revision answers the revision alone to the chief of staff and spends nothing (45.920422ms)
✔ REQ-COS-1, REQ-LIMIT-1: organization.revision is refused for every caller whose role file lacks organization.change (43.86965ms)
✔ REQ-ROLE-3, REQ-LIMIT-1: a chief-of-staff change is validated, written and logged like a human's; an invalid one is refused (118.766757ms)
✔ REQ-COS-1: the chief of staff reads the revision, changes the file with it, and reads again after a stale one is refused (92.218132ms)
✔ Q169: the chief of staff's change of the assistant is validated, written and logged; a stale or protection-stripping one is refused (90.613694ms)
✔ row 65, Q169: the chief's change of the assistant's route runs the routing checks, and a valid one saves as the chief (62.299216ms)
✔ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (77.112545ms)
✔ row 194 T10: the chief's reason end of a kept instance refuses instance-kept, holds the claim and spends nothing (23.62617ms)
✔ row 194 T10 (Q2): a role.revoke citing a decision the human resolved still ends a kept run (24.400839ms)
✔ row 194 T10 (B7): the chief's organization.set of a kept instance's model refuses before the writer; the human's limits.set does not (24.867445ms)
✔ row 194 T13: organization.set and limits.set refuse the launch, retired, keep and noHire keys before the writer (28.164387ms)
✔ row 194 T18 (D2.4): from a chief session veto.set and instances.set refuse, and nothing reaches the writer (28.202648ms)
✔ row 194 T8: the chief hires with a reason and no decision, the writer gets the reason as context, and the log names it (24.35139ms)
✔ row 194 T11: on a bus with two businesses, the chief of one hires and fires only in its own (21.513334ms)
✔ row 194 T8: hire and fire need a reason of 1 to 500 characters and refuse a decision key (33.968103ms)
✔ row 194 T8 (sage-1471): only the chief hires or fires; every other role refuses role-not-chief, even one granted the actions (30.960882ms)
✔ row 194 T8 (sage-1471): a chief whose authority lacks role.hire or role.fire refuses decision-required before the writer (50.013594ms)
✔ row 194 T8a: a re-hire of a fired name goes to the writer like a hire, and the writer's refusals pass through by name (29.650277ms)
✔ row 194 T8b: a definition is hireable only when every action is on HIRE_ALLOWED, it is version 2, the chief lists it and noHire doesn't (899.737224ms)
✔ row 194 T8b: a hire without the role files configured refuses not-configured (22.718322ms)
✔ row 194 T9: a fire revokes the claim, cancels open requests, asks the launcher to kill the runs, then delists and logs (29.485778ms)
✔ row 194 T9a (bus): a fire end's done writes lifecycle.end.killed and lifecycle.end.alive with run and pid, and an unknown stop's reason; a terminate's done or a bad stop refuses (32.00785ms)
✔ row 194 T9: fire refusals come before step A and leave the claim, the requests and the file alone (29.839679ms)
✔ row 194 T9c: a writer failure at B leaves the instance firing, and the repeat delists and logs once (30.109172ms)
✔ row 194 T9c: a failure at C leaves the fire unlogged and the instance firing, and the repeat logs it (31.6214ms)
✔ row 194 W-N1: a fire.done before a later fire.stopped of the same instance leaves it firing; another instance's done does not end it (25.721903ms)
✔ row 194 T10: a hire or fire of a kept name refuses instance-kept before the writer (21.85392ms)
✔ row 194 T10: a fire the writer's check refuses from the file stops nothing and leaves the instance launchable (22.21371ms)
✔ row 194 T18: hire and fire take only their own keys, and a refused call writes nothing (30.277446ms)
✔ row 194 T8, T9, T18: through the runtime the chief hires and fires with the real writer, the receipt carries the reason, and a refusal leaves the file alone (71.642071ms)
✔ row 194 W-N1: the launcher's take of a launch or regenerate of a firing instance closes it as instance-firing (25.505361ms)
ℹ tests 42
ℹ suites 0
ℹ pass 42
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2698.094981
