Candidate on 96656dd21: broker split refuses invalid-recommendation after the
option checks, raise_decision text asks for one key and names the yes default,
bus README codes table, broker and tools tests. Mutants m1 (old shared line)
and m2 (order swapped) killed; full gate passed 15:42:03-15:47:36Z.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
190 lines
16 KiB
Plaintext
190 lines
16 KiB
Plaintext
✔ agents: a held role with nothing on the bus is idle; a role session gets the claim rows unchanged (140.856318ms)
|
||
✔ agents: working counts what the holder received and has not read; routed alone is not working (203.570611ms)
|
||
✔ agents: input needed is the role's open decisions routed to the human, gated first, then oldest (331.69133ms)
|
||
✔ agents: working wins over waiting, and Input needed still shows (179.215766ms)
|
||
✔ agents: a new holder doesn't inherit what the last one left unread; decisions stay with the role (213.88274ms)
|
||
✔ agents: state reads only its own business, even for a run name both use (207.528107ms)
|
||
✔ agents: a message the holder released unread is stranded; the next holder gets nothing and cannot read it (200.371906ms)
|
||
✔ agents: a message the holder read is not stranded; one the current holder has not read is not listed (208.665231ms)
|
||
✔ agents: stranded is oldest first and capped at 50 for a role (842.50536ms)
|
||
✔ agents: stranded is per role and per business (318.073004ms)
|
||
✔ agents: a message routed to a held role and not yet received is not stranded (182.852258ms)
|
||
✔ launch identity is stamped, payload identity is refused and stale holder cannot send (168.850722ms)
|
||
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (264.85232ms)
|
||
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (275.501349ms)
|
||
✔ launch events require a human CLI capability; generic emit cannot forge authority events (181.331445ms)
|
||
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (202.685004ms)
|
||
✖ a recommendation that is not exactly one option key refuses invalid-recommendation after the options (162.502099ms)
|
||
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (174.430318ms)
|
||
✔ task action subjects and linked decision trail are complete and ordered (192.857878ms)
|
||
✔ launch binding is durable and reconnecting requires the identical trusted record (108.687322ms)
|
||
✔ business isolation includes inherited object names and cross-business message references (207.545896ms)
|
||
✔ authority never transfers between action, run, target, unresolved or replaced role holder (270.890975ms)
|
||
✔ task projection uses schema current view, skipping earlier and equal-start polls (165.026288ms)
|
||
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (194.215091ms)
|
||
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (141.971464ms)
|
||
✔ both arbiters require human resolution when their cross-role route is themselves (284.559354ms)
|
||
✔ the shipped coder role raises task.reassign as gated to the human; task.scope.change stays cross-role (146.443823ms)
|
||
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (1.523741ms)
|
||
✔ credentials gives human and reader sessions service, account, role, date and state, and nothing else (101.286921ms)
|
||
✔ credentials refuses a role session and any argument (178.289934ms)
|
||
✔ credentials reads the status on each request, and a broker without one lists none (222.506301ms)
|
||
✔ the broker process answers credentials without a token, path or variable in its output, log or store (181.413706ms)
|
||
✔ only validated broker references load; returned data and exceptions cannot expose a known token (2.768968ms)
|
||
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (2.237973ms)
|
||
✔ expiry refuses use and env references never become client data (0.783788ms)
|
||
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.881636ms)
|
||
✔ opaque tokens shorter than 16 characters refuse before use (0.372231ms)
|
||
✔ roles lists open decisions routed to a role, and never the human inbox (216.8743ms)
|
||
✔ recent lists closed decisions of every route, newest close first, with how each closed (278.010895ms)
|
||
✔ recent gives the closing event as closed when the decision was seen first (295.872886ms)
|
||
✔ recent stops at RECENT rows (826.795948ms)
|
||
✔ every row is what trail already gives the same session for that id (259.418164ms)
|
||
✔ a role session can't list decisions, so it can't read another role's open decisions (416.180395ms)
|
||
✔ decisions is a read: one business, strict arguments, nothing written (338.372171ms)
|
||
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (118.520977ms)
|
||
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (146.700351ms)
|
||
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (153.62759ms)
|
||
✔ endLaunch leaves a claim another run took alone (171.525883ms)
|
||
✔ refuse records action.refused against the caller with the code only (139.128627ms)
|
||
✔ launches off refuses role.launch with launch-revoked until launches on (194.336812ms)
|
||
✔ broker process: launch ops authorize role.launch, record refusals and end runs (305.126598ms)
|
||
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (2.431896ms)
|
||
✔ process reader gets own kernel identity without exposing environment values (0.460249ms)
|
||
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (0.613963ms)
|
||
✔ real pid 1 remains inspectable when its environment is protected (0.290343ms)
|
||
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (176.038646ms)
|
||
✔ missing and foreign-business citations refuse and roll back message and grant (192.174791ms)
|
||
✔ cross-role sends still need a matching resolved decision and consume it once (234.824372ms)
|
||
✔ messages pages all human messages newest first without writes; read state is history (2557.505845ms)
|
||
✔ messages refuses role callers, invalid paging and cursors outside this human feed (250.457385ms)
|
||
✔ views messages passes only its paging arguments through (0.263157ms)
|
||
✔ messages isolates businesses even with a valid foreign cursor (214.734323ms)
|
||
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (184.988147ms)
|
||
✔ startup token refusal returns safe code without value or partial listening broker (38.663136ms)
|
||
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (176.776411ms)
|
||
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (170.016749ms)
|
||
✔ trusted host registers later launches; socket clients never have a registration verb (201.784119ms)
|
||
✔ runtime excludes declared project roots even when host supplies no repoRoots (34.833285ms)
|
||
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (167.824578ms)
|
||
✔ a reply is listed for human and reader sessions, and its delivery rows are unchanged (216.657117ms)
|
||
✔ the reply still reaches the human message.receive (mosaic talk) after the Console showed it (203.850343ms)
|
||
✔ a message with no reply gives an empty list (159.981236ms)
|
||
✔ replies come oldest first and stop at REPLIES (798.257085ms)
|
||
✔ an id that names no message in the business refuses message-not-found, and the refusal is recorded (287.501463ms)
|
||
✔ strict arguments; a role session gets human-required (359.470363ms)
|
||
✔ views passes replies through as one call with the id (0.200179ms)
|
||
✔ requirements returns the committed list to a holding role session, and no one else (203.902192ms)
|
||
✔ the PM's prd.approve with no task, when no id fits, reaches the human's Inbox (150.549786ms)
|
||
✔ the PM's non-blocking role.revoke with no task reaches the human's Inbox (181.958175ms)
|
||
✔ a push is recorded as the action.allowed for git.push.working on the task, and only the host records one (243.841543ms)
|
||
✔ review.request names the latest pushed commit and sends the reviewer a REVIEW-REQUEST (245.715193ms)
|
||
✔ review.request says which run holds the reviewer role, or null, and a null request waits for a claim (292.455613ms)
|
||
✔ review.request refuses a commit that isn't the latest push, a non-reviewer and a role without the action (402.549784ms)
|
||
✔ reviewFetch answers only the addressed reviewer, for the request it cites (244.27661ms)
|
||
✔ review.verdict answers one request once, to the role that asked (307.183026ms)
|
||
✔ task.close on a pushed task needs an approve verdict for the latest push (349.844233ms)
|
||
✔ a refusal the host decided is filed on the task it names, and only a task ref counts (273.808099ms)
|
||
✔ v3b prototype refusals, views and append-only mutations (1066.684093ms)
|
||
✔ gated approval authorizes once, survives store reopen, and fresh approval works (254.361108ms)
|
||
✔ another run cannot consume an approval; a failed check leaves it usable (230.933219ms)
|
||
✔ two scheduled callers have exactly one grant and one consumed refusal (167.949695ms)
|
||
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (332.543043ms)
|
||
✔ class drift gated to cross-role refuses before consumption (271.834425ms)
|
||
✔ class drift cross-role to gated refuses before consumption (225.860457ms)
|
||
✔ class drift gated to within-role refuses before consumption (228.259565ms)
|
||
✔ class drift cross-role to within-role refuses before consumption (236.272792ms)
|
||
✔ class drift within-role to gated refuses before consumption (213.492218ms)
|
||
✔ class drift within-role to cross-role refuses before consumption (201.839842ms)
|
||
✔ message.send consumes approval and prevents a later send or authorize (201.228852ms)
|
||
✔ role.revoke consumes approval and prevents a later revoke or authorize (243.878958ms)
|
||
✔ a business that never switched launches reads allowed with no time and no event (137.392382ms)
|
||
✔ launches revoked and then restored read allowed, with the restore time and event id (157.708325ms)
|
||
✔ a task closed on the tracker leaves the open list, and total counts the open ones (160.782488ms)
|
||
✔ a tombstone is not open (134.555581ms)
|
||
✔ the open list stops at the cap and says so; total still counts every open task (162.595434ms)
|
||
✔ a role and a reader session read state; arguments, and an unbound cap, refuse (136.729943ms)
|
||
✔ a human session reads the same state, with the same cap (178.100017ms)
|
||
✔ reading state writes nothing: every table keeps its row count (167.612993ms)
|
||
✔ creates private WAL store and excludes a second writer until explicit close (136.01881ms)
|
||
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (183.54741ms)
|
||
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (187.082763ms)
|
||
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (179.578029ms)
|
||
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (111.039025ms)
|
||
✔ async transactions refuse before invoking their function (100.753345ms)
|
||
✔ the session default fits under the reply cap and pages to the end with next (290.322317ms)
|
||
✔ the short form: no description, assignees by role, every listed key (275.705199ms)
|
||
✔ each filter, alone and together, and total counts every match (320.078822ms)
|
||
✔ task_ref reads one task in full, as the whole board has it (279.096983ms)
|
||
✔ no arguments is the read the Console and mosaic make, unchanged (239.729116ms)
|
||
✔ an unknown argument or a bad value refuses invalid-request (963.161829ms)
|
||
✔ tasks rows carry priority and requirement for every session that reads tasks (313.315454ms)
|
||
✔ the read model rebuilds from the ledger: a reopened bus and each trail give the same values (377.910263ms)
|
||
✔ an empty business and one with snapshots but no task.created read cleanly (105.242059ms)
|
||
✔ recordTask keeps sync reads and a role write apart (186.108681ms)
|
||
✔ read_at must be one canonical UTC format, so the projection compares strings safely (105.702745ms)
|
||
✔ a bad entry refuses the whole record (145.107382ms)
|
||
✔ taskView reads the projection for one business (140.568084ms)
|
||
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (233.443547ms)
|
||
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (411.404595ms)
|
||
✔ without an adapter the server refuses every task verb (203.837814ms)
|
||
✔ the runtime refuses an invalid adapter and closes a valid one (233.439743ms)
|
||
✔ the process loads the S3 adapter from plain-data trackers (234.170812ms)
|
||
✔ the tester binds only when the business sets bus.tester to exactly true (814.587095ms)
|
||
✔ a business may not name a role tester, so the tester address is never a role (223.783868ms)
|
||
✔ every verb outside the tester list refuses tester-refused and is recorded against the tester (548.762079ms)
|
||
✔ a tester message is from tester, starts [mos test], and writes no human.input or authority (215.165848ms)
|
||
✔ a role answers a tester only in reply to a tester message, and the answer never reaches the human (300.58202ms)
|
||
✔ the tester reads the human views a reader reads (117.81977ms)
|
||
✔ tester proof binds its own CLI, start time and nonce, refuses a managed run and allows an agent (1.065952ms)
|
||
✔ neither CLI's nonce proves the other: each proof is bound to its own CLI and nonce variable (0.333804ms)
|
||
✔ testerNonce reads only the tester's variable and gives null on any read error (0.188373ms)
|
||
✔ an envelope carries exactly one of cap, human and tester; no tester authenticator refuses (48.036946ms)
|
||
✔ tester-cli.mjs binds through the runtime when the switch is on, and refuses off or under a run marker (705.779859ms)
|
||
✔ socket capability stamps launch identity; shared views use wire, no SQL client (200.067063ms)
|
||
✔ two wire claims serialize; a lost reply never automatically retries (166.807538ms)
|
||
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (109.532454ms)
|
||
✔ client preserves UTF-8 when a response divides a multibyte character (12.083554ms)
|
||
✔ committed mutation followed by dropped reply reports unknown and is never retried (136.24551ms)
|
||
ℹ tests 148
|
||
ℹ suites 0
|
||
ℹ pass 147
|
||
ℹ fail 1
|
||
ℹ cancelled 0
|
||
ℹ skipped 0
|
||
ℹ todo 0
|
||
ℹ duration_ms 4049.944668
|
||
|
||
✖ failing tests:
|
||
|
||
test at tests/broker.test.mjs:158:1
|
||
✖ a recommendation that is not exactly one option key refuses invalid-recommendation after the options (162.502099ms)
|
||
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /invalid-recommendation/. Input:
|
||
|
||
'Error: invalid-options'
|
||
|
||
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/tests/broker.test.mjs:168:12)
|
||
at Test.runInAsyncScope (node:async_hooks:226:14)
|
||
at Test.run (node:internal/test_runner/test:1402:25)
|
||
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
|
||
at Test.postRun (node:internal/test_runner/test:1542:19)
|
||
at Test.run (node:internal/test_runner/test:1467:12)
|
||
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
|
||
generatedMessage: true,
|
||
code: 'ERR_ASSERTION',
|
||
actual: Error: invalid-options
|
||
at fail (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/src/broker.mjs:76:9)
|
||
at #dispatch (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/src/broker.mjs:785:11)
|
||
at file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/src/broker.mjs:675:38
|
||
at Store.transaction (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/src/store.mjs:156:22)
|
||
at Broker.request (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/src/broker.mjs:669:26)
|
||
at call (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/tests/broker.test.mjs:45:45)
|
||
at raise (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/tests/broker.test.mjs:47:3)
|
||
at file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/tests/broker.test.mjs:168:25
|
||
at getActual (node:assert:580:5)
|
||
at strict.throws (node:assert:728:24),
|
||
expected: /invalid-recommendation/,
|
||
operator: 'throws',
|
||
diff: 'simple'
|
||
}
|