command: ["timeout", "-k", "10", "1800", "node", "--test", "/home/jwoltje/.t3/worktrees/mosaic-stack/magica-row329/packages/bus/tests/chief-of-staff.test.mjs"]
TMPDIR: /mnt/storage/scratch/tmp/70lNbE
begin: {"utc": "2026-10-24T21:31:13.594+00:00", "load1": "2.97"}
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 (32.021419ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (29.430214ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (22.167041ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (20.510415ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (23.797427ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (24.437699ms)
✔ REQ-COS-1: the chief of staff cannot end its own run; its end of the assistant stops the assistant's thread run (25.396808ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (21.135644ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (27.488015ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (29.388334ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (31.937354ms)
✔ REQ-COS-1: organization.revision answers the revision alone to the chief of staff and spends nothing (25.437066ms)
✔ REQ-COS-1, REQ-LIMIT-1: organization.revision is refused for every caller whose role file lacks organization.change (28.407913ms)
✔ 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 (92.275578ms)
✔ REQ-COS-1: the chief of staff reads the revision, changes the file with it, and reads again after a stale one is refused (74.273995ms)
✔ Q169: the chief of staff's change of the assistant is validated, written and logged; a stale or protection-stripping one is refused (77.219759ms)
✔ row 65, Q169: the chief's change of the assistant's route runs the routing checks, and a valid one saves as the chief (55.095178ms)
✔ 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 (78.434398ms)
✔ row 194 T10: the chief's reason end of a kept instance refuses instance-kept, holds the claim and spends nothing (20.449537ms)
✔ row 194 T10 (Q2): a role.revoke citing a decision the human resolved still ends a kept run (21.621577ms)
✔ 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 (21.57776ms)
✔ row 194 T13: organization.set and limits.set refuse the launch, retired, keep and noHire keys before the writer (25.01784ms)
✔ row 194 T18 (D2.4): from a chief session veto.set and instances.set refuse, and nothing reaches the writer (25.455708ms)
✔ row 194 T8: the chief hires with a reason and no decision, the writer gets the reason as context, and the log names it (21.549484ms)
✔ row 194 T11: on a bus with two businesses, the chief of one hires and fires only in its own (18.659657ms)
✔ row 194 T8: hire and fire need a reason of 1 to 500 characters and refuse a decision key (29.724146ms)
✔ row 194 T8 (sage-1471): only the chief hires or fires; every other role refuses role-not-chief, even one granted the actions (28.129345ms)
✔ row 194 T8 (sage-1471): a chief whose authority lacks role.hire or role.fire refuses decision-required before the writer (45.085341ms)
✔ 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 (24.800287ms)
✔ 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 (726.025645ms)
✔ row 194 T8b: a hire without the role files configured refuses not-configured (21.67094ms)
✔ row 194 T9: a fire revokes the claim, cancels open requests, asks the launcher to kill the runs, then delists and logs (26.357778ms)
✔ 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 (27.528345ms)
✔ row 194 T9: fire refusals come before step A and leave the claim, the requests and the file alone (24.445362ms)
✔ row 194 T9c: a writer failure at B leaves the instance firing, and the repeat delists and logs once (27.637943ms)
✔ row 194 T9c: a failure at C leaves the fire unlogged and the instance firing, and the repeat logs it (27.876778ms)
✔ 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 (24.108346ms)
✔ row 194 T10: a hire or fire of a kept name refuses instance-kept before the writer (21.547644ms)
✔ row 194 T10: a fire the writer's check refuses from the file stops nothing and leaves the instance launchable (22.276176ms)
✔ row 194 T18: hire and fire take only their own keys, and a refused call writes nothing (29.326917ms)
✔ 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 (81.364182ms)
✔ row 194 W-N1: the launcher's take of a launch or regenerate of a firing instance closes it as instance-firing (33.602482ms)
ℹ tests 42
ℹ suites 0
ℹ pass 42
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2242.04646
