Repository navigation
refactor(signal): strengthen probe assertions and simplify mocks - #156399
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: blocked before merge. Reviewed October 8, 2026, 4:31 AM ET / 08:31 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch replaces Signal test wrappers with direct production-contract calls, removes duplicate scenarios, and simplifies test mocks. Review scores
ProductKind: Test only · Worth it: Yes Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this member-authored PR belongs to an explicitly requested test-audit campaign. No concrete introduced defect was found, but candidate validation remains unexecuted and overlapping changes on current main still require reconciliation. Priority: P3 Before merge
FindingsNone. Provenance
Tests
Agent review detailsHow this fits togetherThe Signal plugin translates OpenClaw messages and reactions into native Signal requests or container HTTP requests. These tests check request translation, delivery results, configuration validation, and approval replay. flowchart TD
A[Signal test scenarios] --> B[Plugin status and send operations]
A --> C[Container request translator]
B --> D[Native transport adapter]
C --> E[HTTP request boundary]
D --> F[Delivery and approval results]
E --> F
F --> G[Retained contract assertions]
Technical reviewBest possible solution: Retain only cleanup still needed on current main, preserve the stronger surviving contracts, and validate the reconciled candidate. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR reports redundant test coverage rather than a product defect; candidate execution remains pending. Is this the best way to solve the issue? Yes for the reviewed baseline: direct owner calls and stronger surviving scenarios provide a coherent cleanup, but current-main overlap requires a refreshed patch assessment. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fc3e09736432. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: none. Added test files: 7. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -286. Total -286 across 8 files. View PR surface stats
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: c5d7c4958958b16b4a0a4042bb7a38cb03d8c0da
|
ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment |
|
Merged via squash.
|
…nclaw#156399) * test(signal): exercise canonical RPC contracts * test(signal): use real approval error classification * test(signal): remove redundant probe and fixture coverage * test(signal): verify probe forwarding and remove unused mock
What Problem This Solves
The two cold-runtime Signal probe tests could return the expected version even when the wrong request arguments were forwarded.
User Impact
No user-visible behavior change. This strengthens existing tests and removes an unused native-client mock; production code and permanent case inventory are unchanged.
Why This Change Was Made
Both existing managed-native/container rows now assert exactly one health check and version RPC with the complete URL, timeout and transport arguments. The shared monitor harness keeps its adapter mock and the real
SignalSseRejectionError; its unused native-client function mock is removed.The original eight-file proposal was reconciled against frozen baseline
eb370ce611393818f488854aaa530afe36c3c7c2. Only these two residual files remain. The other six paths already have stronger canonical coverage; their retired cases and mocks are not restored.Original-intent reconciliation
These are source/history findings. The unchanged six surfaces are not claimed as newly executed local suites.
Evidence
Exact signed candidate:
862ecc63205ce9e48790cfe61659d5633d5e1e4a. Independent guarded source review found no actionable issue in the reviewed scope.Focused runs used actual Node 26.12.1 orchestration and the pinned Bun
1.4.4-canary.1+191755ec1test runtime. Baseline and candidate passed the same 65 cases with the same per-file case counts, with zero filtered cases or unexpected errors.Native command wall times were 79.485 s and 39.443 s, including preparation and report aggregation. Each ordinary phase executed two routed test invocations once; native report merging replayed recorded reporter events, not test cases. These timings are observations, not a speedup claim.
Two temporary mutations of the real probe owner then demonstrated assertion sensitivity:
Each control intentionally exited 1 with exactly two expected assertion failures and no file/JUnit errors. The ordinary candidate used the exact signed head; controls used its temporary one-line producer mutations. Both mutations were restored and all owned processes settled. This is assertion-strength and harness-sibling proof, not a production bug or live Signal-device demonstration.
Canonical oxfmt passed. The native aggregate ratchet passed: 6,440,436 ≤ 6,440,877, slack 441. Production delta is 0; core test growth is +10 counted LF, and the harness removes 7 lines outside the counter's test patterns. No allocation was added.
The existing review's rank-up requests are addressed by the reconciliation, surviving-consumer coverage, controls and measured timings above. That older comment reviewed
7438f67; it is not an exact-candidate verdict.Hosted CI passed: run 41695986526, attempt 2 on the exact signed candidate: 28 successful and 30 intentionally skipped jobs, with the required aggregate gate successful. Full plugin lint/type preparation, the ratchet and security checks passed. Attempt 1 failed during pinned-Bun setup with HTTP 500 before that job ran tests. One job-specific recovery rerun completed that job and its native dependency graph; earlier passing jobs were retained. Skipped jobs are not proof, and no CI exception was used.