Repository navigation
fix(channels): isolate Mattermost sends and retain capture owner proof - #150915
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 maintainer review before merge. Reviewed September 28, 2026, 7:42 PM ET / 23:42 UTC (Revision 5). ClawSweeper reviewWhat this changesThe branch separates Mattermost outbound loading from inbound monitoring and strengthens a Discord Gateway transcript test’s checks that the selected provider instance survives publication and rerouting. Merge readiness✅ Ready for maintainer review Current main still loads Mattermost’s inbound monitor through the outbound runtime. The merged plugin-capture fix covers a separate part of the earlier work, while this focused, protected PR retains a distinct fix. Priority: P1 Review scores
Verification
How this fits togetherMattermost’s channel adapter receives message requests from OpenClaw and sends them to the Mattermost API; account startup separately launches inbound monitoring. A Discord test registers a capture provider and checks its identity as the Gateway publishes and reroutes transcript work. flowchart LR
A[Message request] --> B[Mattermost outbound adapter]
B --> C[Mattermost API]
D[Gateway account startup] --> E[Mattermost inbound monitor]
F[Discord provider fixture] --> G[Gateway capture owner]
G --> H[Transcript store]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -1, Tests +47. Total +46 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep outbound sends free of the inbound monitor dependency while account startup remains the sole monitoring entry point, with the Discord capture test checking the selected owner through rerouting. Do we have a high-confidence way to reproduce the issue? Yes. Current main loads the monitor through the outbound runtime barrel, and the added import regression directly tests that boundary; this read-only review did not execute the test. Is this the best way to solve the issue? Yes. The production change moves monitoring to its existing startup owner, and the Discord fixture uses the loader’s artifact selection to test provider identity without adding a second registry handoff. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 632b150d462f. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
e612705 to
ac1ec83
Compare
|
Retargeted this PR to The local candidate preserves main's Discord shared-state repair in Stopped at validation: the standalone No timeout, assertion, mock, baseline, or build requirement was relaxed to get green. The cold-import/test-artifact preparation interaction needs resolution and fresh boundary proof before this candidate can be published and landed. Original-head CI run 35227489914 is historical evidence only; no exact-head CI exists for the unpublished rebased candidate. The remaining production fix is absent from the 2026.9.5 cut at |
Keep Mattermost inbound monitoring behind account startup rather than the outbound runtime. Bind the Discord E2E fixture to its selected runtime artifact and assert exact provider/instance identity through model selection and rerouting, preserving late-STT, history, and cleanup fences. The prepared-registry handoff is already on main via #160658; do not duplicate it or retain the obsolete release-preparation ancestry. Co-authored-by: steipete <[email protected]> Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
What Problem This Solves
Fixes Mattermost first-send stalls when the outbound runtime also loads inbound monitoring.
User Impact
Mattermost outbound sends no longer load the inbound monitor; account startup still starts monitoring normally. No configuration, permission, stored-data, migration, or release-version changes are required.
Why This Change Was Made
Keep the monitor import at its account-startup owner. Preserve Discord capture coverage with loader-faithful artifact metadata and exact provider/instance identity assertions through model selection and rerouting. The shared prepared-registry handoff already landed in #160658 and is not duplicated here.
This replaces the obsolete release ancestry with a four-file change based on main at
eef2c0588a244, preserving the current instance-scoped fixture, late-transcription fencing, original-owner history, and cleanup.Evidence
pnpm buildpasses on the exact four-file source tree, as do changed formatting, typechecks, lint, and guards. Independent P0–P2 autoreview found no actionable findings in the unchanged four-file patch. That review preceded integrating the canonical registry handoff from main; subsequent build and boundary tests verified the final source tree.7c9e8334b2823fe871ab8cd75ebc2df73ce37345, based oneef2c0588a244c3e144f39399829ca2990fae3a1; all four source hashes were verified. The backing Actions run 36495082467 is CANCELLED following lease cleanup; these are successful Testbox command/source-tree results, not successful hosted PR CI. Full build: 392.14 s. Mattermost E2E: 546.26 s wall, including 499.5 s required runtime preparation, then 35.96 s Vitest duration. Discord E2E: 66.45 s wall / 57.20 s Vitest duration.2fbfb55844b5e702a8cc9469f1781cc753c076c6: CI run 36497513140, with the aggregateopenclaw/ci-gatereporting that CI and applicable security-review requirements passed. CI recorded 0.282 s test time for the Mattermost import regression inside its selected extension shard, and 56.803 s test time / 58.98 s file duration for Discord capture. These are separate from the cold standalone measurements above.Execution-environment notes
Local E2E artifact preparation was refused because the runner could not verify separation from managed Gateway artifacts; the documented network-isolated runner hit the same preparation check. No safeguard was disabled. The completed Testbox runs above supply the E2E evidence instead. An initial local focused run was rejected before execution when overlapping isolated-snapshot cleanup changed the compiler namespace; after cleanup settled, the same selection passed all 107 cases. These are environment/preparation failures, not claimed product fixes. Testbox command/source-verification receipts completed successfully despite a non-fatal portal-sync warning, and the task-owned lease was stopped.
Human credit: @steipete, @RomneyDa, @vincentkoc.
Work sessions