Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR shares Twitch’s existing messaging-target parser across routing and outbound delivery to remove internal prefixes before sending. Example: Send a reply to twitch:channel:ProofRoom.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR repairs a source-confirmed Twitch reply-delivery defect still present on main, and no proven replacement supersedes it. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Twitch plugin receives internal conversation targets from Gateway reply delivery and translates them into channel names for its Twurple transport. flowchart LR
A[Twitch chat] --> B[Twitch monitor]
B --> C[Agent reply]
C --> D[Durable delivery]
D --> E[Twitch target parser]
E --> F[Twitch outbound sender]
F --> G[Twurple transport]
G --> A
Technical reviewBest possible solution: Use the existing plugin-local parser consistently at Twitch outbound boundaries while preserving account selection, fallback behavior, and delivery safeguards. Do we have a high-confidence way to reproduce the issue? Source establishes the failure path from the monitor’s prefixed durable target to the prefix-blind outbound sender; the reporter supplies matching release logs, but this review executed no target code. Is this the best way to solve the issue? Sharing the existing messaging parser fixes the owning boundary without broadening the low-level channel normalizer or bypassing runtime-handoff safeguards. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0387f4f96a29. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +10, Tests +35. Total +45 across 4 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 8:18 PM ET / October 12, 2026, 00:18 UTC (Revision 2). |
|
Thanks for digging into this. On current main (fafa5d4) we ran a built Gateway with real Twurple IRC against a local Twitch contract server, with block streaming off so the final reply goes through final delivery. The final-reply target was twitch:channel:proofroom, durable delivery declined it at preflight, and the direct fallback sent PRIVMSG #proofroom correctly. We couldn't reach a real configuration where durable final delivery accepts the prefixed target and then fails. Closing for now. If you can share the config or logs from a run where a Twitch final reply actually failed or went to the wrong channel, reopen and we'll pick it up. |
Related: #166672
What Problem This Solves
Fixes Twitch replies failing with an invalid channel-name error when delivery receives an internal target such as
twitch:channel:mychannel.User Impact
Replies and media links reach the intended Twitch channel. Plain channel names,
#channelnames, and empty-target default-channel delivery retain their existing behavior. Unsupported direct-message targets are rejected before sending.Why This Change Was Made
The Twitch plugin already understands these target prefixes, but its outbound adapter used a different normalizer. Share the existing plugin-local parser with target resolution and delivery so Twitch receives the bare channel name.
This addresses the target-format failure in the linked report. The separate runtime handoff error remains outside this change.
Evidence
pnpm test:extension twitch --maxWorkers=1: 239/239 passed across 17 executed files, 311.91 seconds command wall time. The initial candidate run had 234 passes and five ingresswaitForIdletimeouts. A pinned-baseline run passed 225/225 (477.66 seconds), followed by the unchanged candidate passing 239/239 after competing checks finished. Test timeouts and assertions were unchanged. Vitest's file order differed in the last run, so this is not a controlled same-order reproduction or proof that those timeouts are fixed or flaky. The failing ingress owner and fixture are unchanged; their exact failure cause remains unresolved.toChannelNamevalidator. Only network delivery is replaced by a recording transport. The original reproduction had 8 passes / 8 failures; the final check has 18 passes / 0 failures, including text, media, receipts, allowlist matching, default-channel fallback, and rejection before transport. No live Twitch connection was used.Before/after runtime output
pnpm test extensions/twitch/src/outbound.test.ts --maxWorkers=1: 40/40 passed. Full command wall time was 971.32 s; Vitest reported 795.74 s, with 707.04 s in transforms. No sleeps, timers, or extra process boots were added. Hosted CI completed successfully. The changed-extension shard ran 218 tests across 15 files in 23.15 seconds (21.48 seconds reported by Vitest); the full job took 170 seconds including setup. This is shard-level timing. CI job.SQLite-worker, timeout-race, and mock-export ratchets passed in their native
--stagedmode on the same four-file patch. Working-tree SQLite scanning misclassifies Windows backslash paths (806 versus 1,969 calls); the index-based scan preserves Git path identities. Production and extension-test typechecks passed.Doctor contract declarations and closure guards: 6/6 passed across both required files.
Changed-file formatting and type-aware lint, plugin boundaries, dependency guards, line/assertion ratchets, deprecation/coercion guards, storage/media/sidecar guards, and import-cycle checks passed. All three unused-export scans passed with the original configurations and acceptance rules. Their initial concurrent runs exceeded the 600-second tool timeout; sequential runs completed in 451 / 1,367 / 934 seconds. No scan rules or baselines were relaxed.
Remaining live validation
An authenticated Twitch test account and channel were not available, so the recording-transport output above is supplemental boundary proof only. This PR still needs an after-fix run in a real Twitch setup; CI passing does not establish delivery.
For a reviewer with a test setup: run this head with the existing Twitch plugin configuration, trigger a normal channel reply whose outbound target is
twitch:channel:<channel>, and confirm the reply appears once in that channel. Also check the media-link reply path and a plain-channel control. Capture the redacted terminal delivery result and the resulting Twitch messages. The expected transport channel is the bare channel name, without the internal prefix. Do not publish credentials, private endpoints, or unrelated chat content.