feat(discord): connector pilot for the Sage seat, reviewed candidate (#1509)

Zero-dependency Discord connector under packages/discord: binding
validation, REST and gateway clients, pi engine adapter, journal with
append-only inbox, outbox, admissions and notices, and a run.lock
ownership record {pid, start, boot} whose identity is checked three ways
and whose cleanup is gated by STOP. CLI check|run|stop|unlock via
scripts/discord.sh; offline suite scripts/test-discord.sh (28 checks,
87 node tests).

Reviewed by rev-code-02 on #1509 over nine rounds; approved exact tree
4e0feb6758c0a7e4a71483912a8e0d3e3ec95aef at comment 26170. Corrections
(1) to (12) recorded in BUILD-LOG. No listener started, no token read,
no Discord write; the live pilot follows this commit per the brief.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
2026-09-13 01:15:37 -05:00
co-authored by Claude Fable 5.1
parent b023841c8a
commit 786e379c49
34 changed files with 4641 additions and 1 deletions
+11
View File
@@ -39,6 +39,7 @@ Gaps found while working go to `docs/plans/DEFERRED.md`, not here.
| 11 | Brief template `docs/plans/BRIEF-TEMPLATE.md`; `queue add` refuses a missing brief | darkwing | #1508 | required; with row 9 | two briefs accepted by Jason with no scope question | `2026-09-13_queue-as-data.md`, Piece C |
| 12 | Reviews as issue comments posted by `queue move ID in-review`, not files in `docs/plans/reviews/` | darkwing | #1508 | required; after row 9 | one review round with no new file under reviews/ | `2026-09-13_queue-as-data.md`, Piece D |
| 13 | Ledger "queue" section: issue/row/seat drift printed with the weekly number | darkwing; filbert reviews | #1508 | required; after row 9 | first run Monday 2026-09-21, zero violations or every one moved same day | `2026-09-13_queue-as-data.md`, Piece E |
| 14 | Discord connector pilot: Sage answers in Shared Signals (chat only, no tools, no repo writes) | coordinator; Filbert or orch-01 seat reviews | #1509 | in review: candidate built 2026-09-13, `scripts/test-discord.sh` 28/28 (87 node tests), existing suites green; Filbert deferred, rev-code-02 rounds 1-8 REQUEST CHANGES (26114, 26121, 26123, 26132, 26150, 26158, 26165, 26168) fixed, round 9 pending; no listener yet | H: offline suite green, eight-step live pilot with private receipts, then Jason says the reply reads as Sage | `2026-09-13_discord-connector-pilot.md` |
Start message for row 6, sent from the board to darkwing:
"Read docs/plans/QUEUE.md, then the plan page section "Piece 5: darkwing on
@@ -62,3 +63,13 @@ Gate F or when blocked."
- 2026-09-13 — dewey: WebUI row advanced to Jason-owned Gate E after Filbert approval, exact committed-tree 208/208 and remote-verified ea00ec66 publication. No other row changed.
- 2026-09-13 — rows 9 to 13 now point at the plan page `2026-09-13_queue-as-data.md` (pieces A to E, Gate G).
- 2026-09-13 — coordinator: row 14 added (Discord connector pilot for Sage on Shared Signals), briefed, unassigned, waiting on Jason for decisions D1-D7. No other row changed.
- 2026-09-13 — coordinator: row 14 moved to in progress (#1509) after Jason ruled Q1-Q27 through ms-grill-me. No other row changed.
- 2026-09-13 — coordinator: row 14 moved to in review; package, suite, wrapper, DISCORD-USER.md draft and README written, offline and existing suites green. No other row changed.
- 2026-09-13 — coordinator: row 14 stays in review; rev-code-02 round two findings (26121) fixed, round three requested. No other row changed.
- 2026-09-13 — coordinator: row 14 stays in review; rev-code-02 round three finding (26123, stale reclaim race) fixed by failing closed plus `unlock`, round four requested. No other row changed.
- 2026-09-13 — coordinator: row 14 stays in review; rev-code-02 round four finding (26132, unlock restore race) fixed with a `STOP` quiescence gate, round five requested. No other row changed.
- 2026-09-13 — coordinator: row 14 stays in review; rev-code-02 round five findings (26150, boot identity and unlock wording) fixed, round six requested. No other row changed.
- 2026-09-13 — coordinator: row 14 stays in review; rev-code-02 round six finding (26158, legacy record and unreadable record must refuse) fixed, round seven requested. No other row changed.
- 2026-09-13 — coordinator: row 14 stays in review; rev-code-02 round seven finding (26165, malformed identity strings must refuse) fixed, round eight requested. No other row changed.
- 2026-09-13 — coordinator: row 14 stays in review; rev-code-02 round eight finding (26168, noncanonical start digits must refuse) fixed, round nine requested. No other row changed.