Repository navigation
refactor(slack): exercise runtime owners in consolidated tests - #156344
vincentkoc wants to merge 13 commits into
Conversation
|
Codex review: blocked before merge. Reviewed October 8, 2026, 2:49 AM ET / 06:49 UTC (Revision 3). ClawSweeper reviewWhat this changesConsolidates Slack test fixtures, replaces simulated policy checks with owner-level coverage, and strengthens preview cleanup, abort, and media-download assertions. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this maintainer-authored PR contributes distinct work to the requested test audit. No concrete introduced defect was found, but final-head validation remains incomplete. Priority: P3 Before merge
FindingsNone. Provenance
Tests
Agent review detailsHow this fits togetherThe Slack plugin connects conversations, attachments, and interactive actions to OpenClaw’s shared session and reply services. These tests exercise that boundary and inspect prepared context, stored media, and outgoing delivery operations. flowchart LR
A[Slack event fixtures] --> B[Slack adapter tests]
B --> C[Shared session and interaction owners]
B --> D[Reply and progress owners]
B --> E[Guarded media download and storage]
C --> F[Context and authorization assertions]
D --> G[Delivery and cleanup assertions]
E --> H[Stored bytes and rejection assertions]
Technical reviewBest possible solution: Retain the owner-level cleanup, integrate it with current main, and substantiate coverage preservation with the campaign’s authorized final-head validation. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR addresses test maintenance and misleading simulated coverage rather than a reported production defect; no tests were executed during this read-only review. Is this the best way to solve the issue? Yes: consolidating fixtures and checking shared policy at its actual owner is appropriate for the requested audit, with final-head coverage preservation still to be demonstrated. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2f1f73ccb222. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. Added test files: 15. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests -1592. Total -1592 across 18 files. 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:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 History |
Baseline-Refresh: 8206c5f9111da546ed9503ef03c819ea1fa3ea0f
Classify only the native exec scenario as an exec checkpoint. Codex command approvals use plugin checkpoints, as emitted by the producer. Exercise the real completion, writer, artifact collector, and controlled operator path with independent four-scenario expectations and strict kind and identity rejection.
Baseline-Refresh: 617c0f6307b4b9cb2c67847117c41f19d5131ac7
Related: #139428
What Problem This Solves
Slack tests duplicate fixtures and sometimes reproduce policy in mocks, leaving real routing, recording, interaction, download, and cleanup contracts insufficiently exercised.
User Impact
This is primarily test maintenance. QA Slack approval artifacts now distinguish native execution approvals from plugin approvals correctly, including Codex command and file approvals. Slack's normal question-resolution path is unchanged; its unused private test resolver injection is removed. No configuration change or migration is required.
Why This Change Was Made
Use independent literal expectations and exercise the existing runtime owners. Preserve routing inputs, asynchronous recording, state transitions, delivery ordering, and cleanup assertions while extracting stateless fixtures. Integrate the frozen October 16 baseline into the original signed branch and preserve both candidate assertions and current owner behavior.
The QA artifact fix uses the native-execution scenario identity. Suffix matching incorrectly classified Codex command approval, whose actual producer uses the plugin approval owner. All four admitted scenarios now agree with their producers and artifact consumer.
The latest correction types the exported missing-channel-info mock with the actual Slack method contract, fixing TS2883 during package compilation. It also makes the media timeout constant private after its last external use became an independent literal
60_000assertion. Runtime behavior and assertions are preserved.Evidence
Draft; final ready, approval, auto-merge and merge decisions remain with the maintainer.
39df3ce2284fdd6f490bf5eb263860218955d144, tree0b99eed1c0dc139463bc6df2ba4791dfb3daa15d. Frozen product baseline:fd2d5d0ae8ca4fa7eb8f4ce4fddb03508713160e. The original seven signed commits, signed baseline merge and prior corrections remain in history.prepare.test.ts,media.test.ts,prepare-thread-context.test.ts), native Slack package compilation, two-file typed lint, formatting, whitespace and changed-source line-cap checks passed. Node 26.7.0, one worker. The compile-only boundary run did not rerun the negative canary.packages/ai/src/transports/transport-utils.ts: redactSensitiveText; no scanner exemption or artificial consumer was added.0693c070passed 14 files / 523 cases, four type graphs and 44-file lint;02ea3611passed two affected suites / 163 cases, the affected test-type graph and four-file lint. Counts overlap and are not added together. Earlier mutation and2bbc2803proof remain historical.02ea3611: 68 successful jobs, four failed jobs including the aggregate gate, and 23 skipped. Its Slack declaration and unused-export failures are repaired locally. Other failures are inherited:applyProviderAuthConfigPatchwrapper shadowing and AI/UI unused exports (redactSensitiveText,I18nController). Relevant source and checker/config bytes match the frozen baseline; these remain named provider-auth and AI/UI follow-ups.39df3ceand was in progress at 2026-10-16T16:41:04Z (preflight running). Exactly one default-backend native dispatch was made after verifying the fresh merge ref's second parent. This manual run is separate from the required PR gate; hosted qualification is pending.checks-fast-baseline-ratchetsjob passed. No equivalence between those check surfaces is assumed.Scope and dependency contract
Against the frozen baseline: 52 paths. Production +4/-4 (net 0) across three files; tests +2,240/-1,526 (net +714); support +669/-89 (net +580); CI/config +5/-2; guides +8/-0; trace fixtures +10/-10. The increase preserves assertions across baseline changes and extracts fixtures. Historical deletion totals are not counted again.
Installed Vitest 5.0.3 and Slack Bolt 5.1.0/Web API 8.2.0 types were inspected directly for the mock annotation. The timeout constant has no public API export or remaining external consumer.
The personally inspected Codex contract remains pinned to
414782450952a196bbb64b1605a458c2531c47b6:codex-rs/app-server-protocol/src/protocol/v2/item.rs:45-103,255-283,922-941,1127-1133,1201-1207,1324-1423andcodex-rs/app-server-protocol/src/protocol/common.rs:1445-1458,1622-1639. OpenClaw owns the approval-kind classification; the upstream protocol is unchanged.