Repository navigation
test(cli): reuse canonical pairing call guard - #137210
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 3, 2026, 7:59 AM ET / 11:59 UTC. ClawSweeper reviewWhat this changesThe PR replaces a one-use Pairing CLI test helper with the shared Merge readiness✅ Ready for maintainer review No blocking correctness or security findings. The cleanup is not yet on current main, and the maintainer label and active assignment keep this PR open for normal maintainer handling. Priority: P3 Review scores
Verification
How this fits togetherThe Pairing CLI approves a channel sender, then asks the command-owner bootstrap to write an owner allowlist only when one is absent. The affected test verifies that configuration side effect and its visible approval output. flowchart LR
A[Pairing approve command] --> B[Pairing CLI]
B --> C[Command-owner bootstrap]
C --> D[Configuration writer]
E[Pairing CLI test] --> F[First writer-call assertion]
F --> D
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -7. Total -7 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the shared assertion and remove the duplicated local helper, preserving the existing pairing-owner behavior tests. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors a test assertion and does not report or alter a user-facing failure. Source inspection confirms the production pairing and command-owner paths are unchanged. Is this the best way to solve the issue? Yes. The shared helper has the required defined-value contract and removes duplicated test support while retaining the same first-call and first-argument assertion. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1aea7351628f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…36761-session-mode-local-20260903 * commit '58187248c8cafd7b8cfbba3de8d001762fb08b48': improve(testing): add watchOS Gateway upgrade survivor (#137203) improve(ui): structure Devices rows with an actions menu and a facts panel (#137084) test(cli): reuse canonical pairing call guard (#137210) fix(sessions): prevent gateway stalls during large session cleanup (#126035) fix(qa): resolve Slack runtime dependency (#137283) fix: fence Session Observer catalog requests (#137243) fix(memory): make watcher pressure guidance actionable (#137181) test(entry): type the respawn exit mock directly (#137258) fix(release): install first-hop fixtures through the candidate registry (#137286) # Conflicts: # scripts/e2e/lib/upgrade-survivor/assertions.mjs
Replace the single-use Pairing CLI mock-call guard with the existing
expectDefined<unknown[]>helper. The test still selects the first call and first argument and preserves the exact scoped-owner, log-order, and non-overwrite assertions. All 18 CLI cases remain; no production code changes.Validation: the complete Pairing CLI, Doctor command-owner, and shared-helper suites passed 26 tests before and after in identical order. The normal local changed-file gate and a fresh independent Codex review through P2 passed. Test delta: +3/-10 lines.