Files
jason.woltjeandClaude Opus 5.5 ebbbf62dac docs: Dewey row 133 round 1 packet (#1627, decision closes and messaging lists)
Validator refuses a messaging-limited arbiter; decision.raise refuses a route
that can't message the raiser (decision-route-refused). Candidate on e6e5b41bf,
manifest sha256 edb43aed. Targeted gate green, 5/5 mutants killed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 12:33:27 -05:00

7.0 KiB

Row 133 (#1627) round 1: decision closes and messaging lists

Builder: Dewey. Reviewer: Filbert. Landing gate: Sage. Brief: docs/plans/2026-10-14_prd-1.2-build.md, section "Decision closes and messaging lists" (commit 07c12b51b, blob 333adea8). Ruling: Sage's comment 28580 on #1627. Finding: Filbert's 28548 on #1614. Requirement: REQ-ASSIST-2.

Base: see base.txt. The candidate is build.patch on that base; candidate-manifest.sha256 lists every changed path with its sha256.

What ships

  1. The validator refuses a messaging-limited arbiter.

    • Where: packages/business/src/business.mjs, in the arbiter loop. Definitions are already resolved by checkRoles.
    • What: an arbiter whose role definition declares messaging lists is refused. The message names the kind, the instance and the definition: arbiters.delivery names aide, whose role definition assistant declares messaging lists.
    • What passes: pm and cto declare no lists, so the shipped example and Jason's arrangement pass.
  2. decision.raise checks that the route may message the raiser.

    • #checkMessaging(business, from, to, refused) now takes a sender as well as a target. Each is 'human', 'tester' or a role instance; the rules are unchanged.
    • refused, when given, replaces both refusal codes.
    • A new #sender(s) gives message.send, review.request and review.verdict the same sender as before. Their behaviour is unchanged, and row 120's messaging.test.mjs passes unedited.
    • decision.raise calls #checkMessaging(s.business, route, s.role, 'decision-route-refused') once the route is computed.
      • The check comes before the supersede withdrawal and the decision insert.
      • A refusal therefore logs action.refused (the request transaction rolls back and #refused records the code) and stores no decision, decision event or withdrawal.
      • A within-role raise is exempt.
      • A cross-role raise whose arbiter is the raiser has the human as its route, and the check uses that route.
  3. The close insert stays as it is. A comment at the insert says why: decision.raise refused any route that can't message the raiser, definitions change only with a pinned copy, and arbiters change only through the validator.

  4. Bus README: one paragraph after the routing rules gives the new code and the validator rule.

Correction to row 120's packet

agents/researcher/work/queue-120/build.md, Round 2 section, says the assistant "can't be the raiser". That is wrong. The packet is not edited; this is the correction, in Filbert's words from 28548:

The assistant can raise decisions, but with crossRole [] they close only by the human or within its own role, so the DECISION close message reaches it only from the human. Gate that insert if a role with messaging lists gets crossRole actions or is named an arbiter.

This row gates the raise and refuses a limited arbiter, which covers both conditions in the last sentence.

Observation, not fixed

  • The case: the human can withdraw any open decision, including one routed to an arbiter. That close message comes from human, while the raise check tested the arbiter as the sender.
  • Effect: a raiser whose receiveFrom lists the arbiter but not human would get a DECISION message from the human.
  • Why it isn't reachable now: no shipped role can get there. The assistant, the only limited role, has crossRole [] and lists human.
  • What I did: the close comment names the case. Gating it would mean either checking the human→raiser direction at raise for every cross-role decision, or checking the withdrawal itself. That is a policy choice, so it is left as a follow-up; see below.

Follow-ups

  • The human's withdrawal of an arbiter-routed decision gets a messaging check only if a role that refuses messages from the human ever becomes the raiser of such a decision (Sage, sage-0341). The brief leaves close inserts unchecked, and nothing shipped reaches the case.

Tests

  • packages/bus/tests/decision-route.test.mjs (new, 5 tests):
    • A cross-role raise is refused when the raiser doesn't hear from the arbiter: coder to the delivery arbiter, warden to the technical one. The refusal is logged with the code, and the decision, decision-event, message and allowed-event counts are unchanged.
    • A gated raise is refused for a raiser that doesn't hear from the human. Both deploy and an action outside the raiser's authority are covered, with the same assertions.
    • Routes the raiser hears from are allowed, checked from the route to the raiser.
      • scribe sends only to pm, so a reversed check would refuse three of its raises.
      • warden may send to the human and both arbiters, so a reversed check would pass its refused raises.
      • The pm close of an allowed raise stores the DECISION message to the coder.
    • A refused supersede withdraws nothing.
    • The assistant's within-role raise (message.send, routed to itself) and gated raise (task.create, routed to the human) still work, and the human's resolve stores the DECISION message to the assistant.
  • packages/business/tests/assistant.test.mjs, 2 new tests:
    • For each kind, the validator refuses the assistant as arbiter, and refuses an instance aide backed by the assistant definition. Each message names the kind, instance and definition.
    • An arbiter without lists is accepted beside the limited assistant: the fixture's pm/cto, and chief for delivery.
  • packages/business/tests/business.test.mjs: the shipped-example test now also asserts its arbiters. The example includes the limited assistant as an instance, and it still validates.

Targeted gate

Decision 136. Sage runs the full gate at the landing target. gate.sh runs node --test tests/*.test.mjs in business, bus, tasks, webui and cli, with one log per package under gate/. Results are in gate-run.log; see "Receipts" below.

Run singly before the slot, all 0 fail and 0 skipped:

Package File Tests
bus decision-route 5
bus messaging 12
bus review 8
bus decision-close 8
bus decisions 7
business assistant 10
business business 15
business role 14
tasks fields 5
tasks verbs 31
harness runner 22
seat session 9

Harness and seat use decision.raise or arbiters in fixtures without messaging lists. They aren't in the gate list.

Mutants

See MUTANTS.md.

Receipts

Slot granted by Sage in sage-0342 (busy check clear at 17:30Z); released 2026-10-15T17:32:54Z.

  • Mutants, 2026-10-15T17:31:07Z to 17:31:11Z: both control runs passed. All 5 mutants were killed, each by the tests named in MUTANTS.md.

  • Gate, 2026-10-15T17:31:17Z to 17:32:48Z, all 0 fail and 0 skipped:

    Package Tests Change
    business 94 +2
    bus 176 +5
    tasks 92
    webui 112
    cli 195
  • Candidate: candidate-manifest.sha256, sha256 edb43aed618ef11af55effeb161060c398c300ad0c3dd6ae90c22d7552f4ddd4. build.patch applies to the base with git apply --cached --check, and every applied blob matches the manifest.