diff --git a/docs/tess/TASKS.md b/docs/tess/TASKS.md index 2630588..6fdf5d9 100644 --- a/docs/tess/TASKS.md +++ b/docs/tess/TASKS.md @@ -26,7 +26,7 @@ | TESS-M2-FUP-001 | not-started | Delete dead unkeyed-sha256 OR-branch in tess-durable-session.repository.ts matchesContentDigest (:417-422) to match strict matchesCheckpointDigest | #708 | — | apps/gateway | — | — | 4K | NON-GATING follow-up from M2-V review (2026-07-13). Dead OR-branch NOT exploitable (all writers hmac:v1:-prefixed, content_digest NOT NULL from migration 0012) but weakens exactness guarantee. Low-priority. SCHEDULE TO LAND WITH M3 work. | | TESS-M2-FUP-002 | not-started | Add literal approval+compaction combined integration test | #708 | — | apps/gateway/src/__tests__/integration | — | — | 4K | NON-GATING follow-up from M2-V review (2026-07-13). Subsystems currently tested separately; what matters IS covered. OPTIONAL, low-priority. | | TESS-M2-FUP-003 | not-started | Cosmetic rename pass: 'Tess' in class/file/log names (TessDurableSessionRepository etc.) so Nova deployment logs don't say Tess | #708 | — | apps/gateway, packages/agent | — | — | 5K | NON-GATING follow-up from M2-V review (2026-07-13). Cosmetic only — functional name-as-config already correct (interaction_* data path). Low-priority. SCHEDULE TO LAND WITH M3 work. Related pre-existing: sourceLabel??'tess' default @packages/agent/src/tmux-fleet-runtime-provider.ts:142 (from #722/#724, OUT OF SCOPE — not a Tess-mission row). | -| TESS-M3-001 | in-progress | Bind dedicated Tess Discord channel with streaming, threads, attachments, pairing/RBAC and approvals | #709 | coder4 | plugins/discord, apps/gateway | feat/tess-discord | TESS-M2-V,TESS-M1-SEC-004 | 35K | TESS-DSC-001. Mos DIRECT-DISPATCHED to coder4 on feat/tess-discord (base=main, 2026-07-13) — orchestrator is DYOR-loaded so Mos dispatched to avoid double-dispatch; orchestrator TRACKS only, no competing lane. PR-open-STOP, independent non-author ROR then Mos merges. Land TESS-M1-FUP-001 (execute() authz-error mapping) + TESS-M2-FUP-001/003 with this M3 work. PR #730 OPEN (feat(#709): add configured Discord interaction binding; base=main, mergeable=true, head 25ed3676550649d805737ddd97cec08d49873662; config-owned Discord bindings w/ pairing/RBAC, thread metadata, attachments, streaming correlation, authenticated ingress reuse). NOTE: coder4 did not report PR-open to orchestrator; picked up from reviewer ROR. CI pipeline 1734 GREEN on head. ROR = REQUEST CHANGES (reviewer comment 16951 @25ed3676) — 2 functional blockers routed to coder4: (1) THREAD/SUB-SESSION ROUTING: allowedChannelIds check tests the THREAD id before parent-channel binding resolution → thread messages in a bound channel are wrongly rejected; must resolve parent-channel binding FIRST then evaluate allowlist against bound parent + add bound-channel-thread test; (2) APPROVAL NOT WIRED TO M2 DURABLE STORE: Discord approval op defined but no path invokes the durable M2 exact-action approval store (only send wired) — must route Discord approval through the #729 durable exact-action approval surface (one-time/exact-action consume, no replay) + denial + exact-action approval tests. Root-cause fixes only (no allowlist-loosen, no approval stub). coder4 remediating; head will move → re-ROR required at new exact head after CI terminal green. ROUND-1 REMEDIATED + pushed: new head 689d5b68706fd5f5b190b0e4d988efc59fb51acb, CI pipeline 1736 GREEN. RE-ROR = REQUEST CHANGES (reviewer comment 16968 @689d5b68) — 2 residuals routed to coder4: (1) thread allowlist directionally fixed but REQUESTED regression test absent — add explicit 'message in thread of bound channel is ACCEPTED' test; (2) CORE BLOCKER: discord:approve still calls commandExecutor.createApproval (generic slash-command approval), NOT the M2 durable exact-action store — must call createRuntimeTerminationApproval writing agent::command-approval exact-action key (durable one-time consume, no replay), plus Discord one-shot tests: approval consumes exact action once + second attempt rejected, and denial-path rejection. Root-cause only (no aliasing generic path). coder4 remediating; head will move → re-ROR at new exact head after CI terminal green. ROUND-2 REMEDIATED + pushed: head moved (via 34b82bd2), CI green — but ROUND-3 RE-ROR = REQUEST CHANGES (reviewer comment 16973 @34b82bd257154ece2f51d29df698b01150cb9a2b, CI pipeline 1738 green). Progress: discord:approve now CALLS createRuntimeTerminationApproval — but STILL WRONG: it binds the approval to DISCORD_SERVICE_USER_ID + approval-message correlation/channel, making a Discord-SILO record NOT consumable by the CLI/runtime stop exact-action path. CORE M3 AC = ONE durable exact-action approval consumable cross-surface (Discord OR CLI OR runtime); exact-action KEY must be agent::command-approval for the specific pending command/termination action (same key CLI 'mosaic tess stop'/runtime-stop consumes); Discord actor + message correlation belong in METADATA, not the key. Routed to coder4 (round-3): re-key to agent+action; add tests (a) discord:approve happy consumes exact action, (b) SAME approval consumable cross-surface by CLI/runtime stop, (c) one-shot replay rejected, (d) denial rejects, (e) thread-under-parent accept. THIRD round on the same durable-approval seam (16951→16968→16973); reviewer holding cross-surface exact-action boundary firm. coder4 remediating; re-ROR at new exact head after CI terminal green. ROUND-3 REMEDIATED + pushed: head a4c70c5a71a4a73f24f04060a301703ba5ac7530, CI pipeline 1739 GREEN — but ROUND-4 RE-ROR = REQUEST CHANGES (reviewer comment 16978 @a4c70c5a). coder4 OVER-CORRECTED: removed actor/tenant/channel/correlation from runtimeActionDigest/consume (WEAKENS command-authorization exactness — the merged M2 contract digests all 7 fields), still NO Discord-origin consume/terminate path for the minted approval, required Discord-path tests still absent (approve happy+denial, one-shot replay, thread-under-parent accept). ROUND-5 ROUTED to coder4 with the FROZEN merged contract extracted from origin/main:apps/gateway/src/commands/command-authorization.service.ts: runtimeActionDigest is sha256 over EXACTLY {providerId,sessionId,actorId,tenantId,channelId,correlationId,agentName} — do NOT modify/strip (revert round-4 change); consume also re-checks actorId+tenantId, requires approver role=admin, one-shot redis.del; store key interaction:command-approval::. Cross-surface = Discord mint and CLI/runtime stop present the SAME 7 fields of the TARGET pending termination (NOT the Discord message's own channel/correlation, NOT DISCORD_SERVICE_USER_ID); actorId = approving admin's resolved user id. Add the missing Discord-origin consume/terminate invocation (via runtime-approval-verifier.ts adapter) + 5 tests. FOURTH round same seam (16951→16968→16973→16978); reviewer holding boundary firm. coder4 remediating; re-ROR at new exact head after CI terminal green. ROUND-5: writer RE-ROUTED coder4→coder0 (Mos-dispatched follow-up; coder0 is original author of the M2 durable approval store, so the ideal lane to wire the Discord path to it — orchestrator did not have this re-route tracked, flagged to Mos for confirmation, single-writer stand-down requested from coder4). coder0 pushed head 6af68e76de3657d837875b1c9d0f5c9678429e59 (branch tip confirmed), CI Woodpecker pipeline 1742 = SUCCESS (terminal green). Scope: approve-gated stop command (provider/session/approval args), one-shot durable approval consumption, explicit stop authorization (Discord-origin consume/terminate path now present), 4 security regressions; command-authorization.service.ts UNCHANGED (frozen 7-field runtimeActionDigest preserved — round-4 field-stripping reverted). ROUND-5 ROR routed to reviewer (non-author) at exact head 6af68e76; prior round-4 REQUEST CHANGES 16978 void at old head. ROUND-5 RE-ROR = REQUEST CHANGES (reviewer comment 16986 @6af68e76, CI 1742 green). PROGRESS: 7-field digest preserved, thread routing + tests present, no live creds. RESIDUAL (actor-identity seam) routed to coder0 (round-6): (1) approval/stop still binds actorId = DISCORD_SERVICE_USER_ID (bot) — must be the RESOLVED APPROVING ADMIN's mosaic user id at both mint and consume (consume requires approval.actorId===action.actorId AND resolveRole(actorId)==='admin'; bot is not the approver); (2) stop consumes as service actor — must present the same approving-admin actorId bound at mint; (3) approve→stop tests share one fixture correlation, masking production separate-message flow — must model approval message + stop command as separate correlations resolving to the SAME target action 7-field identity (admin A approves T → stop consumes T once as A → replay rejected). Root-cause only (do not make the bot admin). FIFTH round on the seam (16951→16968→16973→16978→16986); reviewer holding actor boundary firm. coder0 remediating; re-ROR at new exact head after CI terminal green. HARD STOP at ROR — Mos merges. | +| TESS-M3-001 | in-progress | Bind dedicated Tess Discord channel with streaming, threads, attachments, pairing/RBAC and approvals | #709 | coder4 | plugins/discord, apps/gateway | feat/tess-discord | TESS-M2-V,TESS-M1-SEC-004 | 35K | TESS-DSC-001. Mos DIRECT-DISPATCHED to coder4 on feat/tess-discord (base=main, 2026-07-13) — orchestrator is DYOR-loaded so Mos dispatched to avoid double-dispatch; orchestrator TRACKS only, no competing lane. PR-open-STOP, independent non-author ROR then Mos merges. Land TESS-M1-FUP-001 (execute() authz-error mapping) + TESS-M2-FUP-001/003 with this M3 work. PR #730 OPEN (feat(#709): add configured Discord interaction binding; base=main, mergeable=true, head 25ed3676550649d805737ddd97cec08d49873662; config-owned Discord bindings w/ pairing/RBAC, thread metadata, attachments, streaming correlation, authenticated ingress reuse). NOTE: coder4 did not report PR-open to orchestrator; picked up from reviewer ROR. CI pipeline 1734 GREEN on head. ROR = REQUEST CHANGES (reviewer comment 16951 @25ed3676) — 2 functional blockers routed to coder4: (1) THREAD/SUB-SESSION ROUTING: allowedChannelIds check tests the THREAD id before parent-channel binding resolution → thread messages in a bound channel are wrongly rejected; must resolve parent-channel binding FIRST then evaluate allowlist against bound parent + add bound-channel-thread test; (2) APPROVAL NOT WIRED TO M2 DURABLE STORE: Discord approval op defined but no path invokes the durable M2 exact-action approval store (only send wired) — must route Discord approval through the #729 durable exact-action approval surface (one-time/exact-action consume, no replay) + denial + exact-action approval tests. Root-cause fixes only (no allowlist-loosen, no approval stub). coder4 remediating; head will move → re-ROR required at new exact head after CI terminal green. ROUND-1 REMEDIATED + pushed: new head 689d5b68706fd5f5b190b0e4d988efc59fb51acb, CI pipeline 1736 GREEN. RE-ROR = REQUEST CHANGES (reviewer comment 16968 @689d5b68) — 2 residuals routed to coder4: (1) thread allowlist directionally fixed but REQUESTED regression test absent — add explicit 'message in thread of bound channel is ACCEPTED' test; (2) CORE BLOCKER: discord:approve still calls commandExecutor.createApproval (generic slash-command approval), NOT the M2 durable exact-action store — must call createRuntimeTerminationApproval writing agent::command-approval exact-action key (durable one-time consume, no replay), plus Discord one-shot tests: approval consumes exact action once + second attempt rejected, and denial-path rejection. Root-cause only (no aliasing generic path). coder4 remediating; head will move → re-ROR at new exact head after CI terminal green. ROUND-2 REMEDIATED + pushed: head moved (via 34b82bd2), CI green — but ROUND-3 RE-ROR = REQUEST CHANGES (reviewer comment 16973 @34b82bd257154ece2f51d29df698b01150cb9a2b, CI pipeline 1738 green). Progress: discord:approve now CALLS createRuntimeTerminationApproval — but STILL WRONG: it binds the approval to DISCORD_SERVICE_USER_ID + approval-message correlation/channel, making a Discord-SILO record NOT consumable by the CLI/runtime stop exact-action path. CORE M3 AC = ONE durable exact-action approval consumable cross-surface (Discord OR CLI OR runtime); exact-action KEY must be agent::command-approval for the specific pending command/termination action (same key CLI 'mosaic tess stop'/runtime-stop consumes); Discord actor + message correlation belong in METADATA, not the key. Routed to coder4 (round-3): re-key to agent+action; add tests (a) discord:approve happy consumes exact action, (b) SAME approval consumable cross-surface by CLI/runtime stop, (c) one-shot replay rejected, (d) denial rejects, (e) thread-under-parent accept. THIRD round on the same durable-approval seam (16951→16968→16973); reviewer holding cross-surface exact-action boundary firm. coder4 remediating; re-ROR at new exact head after CI terminal green. ROUND-3 REMEDIATED + pushed: head a4c70c5a71a4a73f24f04060a301703ba5ac7530, CI pipeline 1739 GREEN — but ROUND-4 RE-ROR = REQUEST CHANGES (reviewer comment 16978 @a4c70c5a). coder4 OVER-CORRECTED: removed actor/tenant/channel/correlation from runtimeActionDigest/consume (WEAKENS command-authorization exactness — the merged M2 contract digests all 7 fields), still NO Discord-origin consume/terminate path for the minted approval, required Discord-path tests still absent (approve happy+denial, one-shot replay, thread-under-parent accept). ROUND-5 ROUTED to coder4 with the FROZEN merged contract extracted from origin/main:apps/gateway/src/commands/command-authorization.service.ts: runtimeActionDigest is sha256 over EXACTLY {providerId,sessionId,actorId,tenantId,channelId,correlationId,agentName} — do NOT modify/strip (revert round-4 change); consume also re-checks actorId+tenantId, requires approver role=admin, one-shot redis.del; store key interaction:command-approval::. Cross-surface = Discord mint and CLI/runtime stop present the SAME 7 fields of the TARGET pending termination (NOT the Discord message's own channel/correlation, NOT DISCORD_SERVICE_USER_ID); actorId = approving admin's resolved user id. Add the missing Discord-origin consume/terminate invocation (via runtime-approval-verifier.ts adapter) + 5 tests. FOURTH round same seam (16951→16968→16973→16978); reviewer holding boundary firm. coder4 remediating; re-ROR at new exact head after CI terminal green. ROUND-5: writer RE-ROUTED coder4→coder0 (Mos-dispatched follow-up; coder0 is original author of the M2 durable approval store, so the ideal lane to wire the Discord path to it — orchestrator did not have this re-route tracked, flagged to Mos for confirmation, single-writer stand-down requested from coder4). coder0 pushed head 6af68e76de3657d837875b1c9d0f5c9678429e59 (branch tip confirmed), CI Woodpecker pipeline 1742 = SUCCESS (terminal green). Scope: approve-gated stop command (provider/session/approval args), one-shot durable approval consumption, explicit stop authorization (Discord-origin consume/terminate path now present), 4 security regressions; command-authorization.service.ts UNCHANGED (frozen 7-field runtimeActionDigest preserved — round-4 field-stripping reverted). ROUND-5 ROR routed to reviewer (non-author) at exact head 6af68e76; prior round-4 REQUEST CHANGES 16978 void at old head. ROUND-5 RE-ROR = REQUEST CHANGES (reviewer comment 16986 @6af68e76, CI 1742 green). PROGRESS: 7-field digest preserved, thread routing + tests present, no live creds. RESIDUAL (actor-identity seam) routed to coder0 (round-6): (1) approval/stop still binds actorId = DISCORD_SERVICE_USER_ID (bot) — must be the RESOLVED APPROVING ADMIN's mosaic user id at both mint and consume (consume requires approval.actorId===action.actorId AND resolveRole(actorId)==='admin'; bot is not the approver); (2) stop consumes as service actor — must present the same approving-admin actorId bound at mint; (3) approve→stop tests share one fixture correlation, masking production separate-message flow — must model approval message + stop command as separate correlations resolving to the SAME target action 7-field identity (admin A approves T → stop consumes T once as A → replay rejected). Root-cause only (do not make the bot admin). FIFTH round on the seam (16951→16968→16973→16978→16986); reviewer holding actor boundary firm. coder0 remediating; re-ROR at new exact head after CI terminal green. ROUND-6 REMEDIATED + pushed: head 533e9702591436810160dfb1cf8a42a222cfb7c7 (branch tip confirmed), CI Woodpecker pipeline 1743 = SUCCESS (terminal green). Scope: stable target correlation + real RuntimeProviderService consume coverage; approval agent binding matches MOSAIC_AGENT_NAME with explicit mismatch denial; command-authorization.service.ts unchanged. ROUND-6 ROR routed to reviewer (non-author) at exact head 533e9702; prior round-5 REQUEST CHANGES 16986 void at old head. Awaiting reviewer verdict. HARD STOP at ROR — Mos merges. | | TESS-M3-002 | done | Implement `mosaic tess` chat/status/sessions/tree/attach/send/stop/health/recover CLI | #709 | diskhygiene-terra | packages/mosaic | feat/tess-cli | TESS-M2-V | 30K | TESS-CLI-001. Mos DIRECT-DISPATCHED to diskhygiene-terra on feat/tess-cli (base=main, 2026-07-13) — orchestrator TRACKS only, no competing lane. PR-open-STOP, independent non-author ROR then Mos merges. Intake initially blocked on wrapper (issue-view.sh bare positional → 'Unknown option: 709'); orchestrator relayed -i flag fix. PR #731 OPEN (feat(tess): add generic interaction CLI; base=main, mergeable=true, head de74e46a0640c44c6b7294c24669496980761c92, fresh origin/main base 99a2d0fc). Scope: generic mosaic interaction command chat/status/sessions/tree/attach/send/stop/health/recover (NO instance-specific literal); --agent/MOSAIC_AGENT_NAME + Nova name-as-config test; authenticated gateway durable/provider boundary — server-derived actor scope, required non-simple correlation header, identity binding, durable recovery, registry routing, exact-action approval stop; status/health safe. Terra: full cold-cache pnpm turbo typecheck/lint/test --force + gates green, Codex security clean after remediation. CI pipeline 1735 TERMINAL GREEN (success) on de74e46a. ROR = APPROVE — canonical VERIFIED APPROVE reviewer-of-record [W-jarvis:reviewer] head de74e46a0640c44c6b7294c24669496980761c92 (visible Gitea comment 16959). Head confirmed unchanged at ROR target + mergeable=true. Reviewer verified generic mosaic interaction CLI verbs, --agent/MOSAIC_AGENT_NAME name-as-config, server-derived actor scope + required correlation, durable identity/recovery path, registry routing, exact-action approval stop, no live creds; no merge by reviewer (self-approve wrapper blocked → recorded as verified PR comment). MERGED to main by Mos — merge_commit 8246ee01 (independent Sonnet ROR 16959, all criteria + name-as-config Nova test verified). TESS-M3-002 DONE. TESS-M3-V (M3→M4 gate) advances once M3-001 #730 also merges — Mos-owned reviewer, no competing lane from orchestrator. | | TESS-M3-V | not-started | Discord+CLI same-session E2E, denial/approval tests, and operator-flow review | #709 | sonnet | apps/gateway/src/__tests__/integration, plugins/discord, packages/mosaic/src | review/tess-m3 | TESS-M3-001,TESS-M3-002 | 20K | Gate M4 | | TESS-M4-001 | not-started | Implement Mos coordination handoff/observe/result contract with authority-boundary tests | #710 | codex | packages/coord, apps/gateway | feat/tess-mos-coordination | TESS-M3-V | 25K | TESS-MOS-001 |