Repository navigation
test(channels): reuse shared indexed call guards - #137350
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 3, 2026, 10:39 AM ET / 14:39 UTC. ClawSweeper reviewWhat this changesThe PR replaces duplicated mock-call guards in channel setup tests with the shared indexed-value assertion helper. Merge readiness✅ Ready for maintainer review No blocking findings. This is a focused, behavior-neutral test cleanup; current main still has the duplicated local guards, so the PR remains useful. The maintainer label and maintainer-authored status also require it to remain open for normal handling. Priority: P3 Review scores
Verification
How this fits togetherChannel setup tests drive interactive channel configuration with mocked prompts and plugin-catalog lookups. They verify the setup flow’s request shape and navigation behavior without changing runtime channel delivery. flowchart LR
A[Setup test inputs] --> B[Mocked prompts and catalog]
B --> C[Channel setup flow]
C --> D[Recorded mock calls]
D --> E[Shared assertion guard]
E --> F[Setup behavior assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -10. Total -10 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the shared assertion helper usage as the single test-side implementation of the indexed mock-call invariant. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors test assertions and does not report a runtime defect. Is this the best way to solve the issue? Yes. The existing package-owned helper has the same defined-value invariant and an exported narrow entrypoint, so replacing the duplicate local guards is the smallest maintainable cleanup. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2074e04c2756. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* refs/remotes/origin/main: fix(plugins): reject unverifiable pinned npm installs (#136725) improve(ui): lift sidebar section headers on hover and mark online owners (#136985) test(cron): reuse isolated run suite hooks (#137341) test(channels): reuse shared indexed call guards (#137350) fix(ui): sidebar header controls read misaligned after the + button lost its border (#137317) fix(qa-channel): preserve conversation kind for implicit actions (#137343) fix: target the source checkout in Control UI repair commands (#137354) chore: reduce CI job count and database test overhead (#137352) fix(ios): preserve chat live edge across keyboard transitions (#136660) refactor(control-ui): consolidate mention inbox requests (#137375) fix(openai): preserve ChatGPT HTTP status for retry pacing (#137146) fix(mcp): hide policy-denied plugin tools from ACP sessions [AI] (#136546) test(queue): reuse shared deferred fixtures (#137338) fix(gateway): repair the Gateway E2E shard (browser suite project, skill resource argv, Codex diagnostic) (#137358)
What Problem This Solves
Channel setup tests duplicate the same missing-recorded-call check in two local helpers, leaving a shared test precondition with multiple implementations.
Why This Change Was Made
Reuse the existing
expectDefinedhelper through its narrow package entrypoint and remove the redundantmockCallwrapper. Keep the generic first-argument projection, all eleven uses, the three specific call indices, bracket semantics and catalog tuple cast.User Impact
No user-visible behavior changes. All assertions, call counts, trust/workspace checks, navigation callbacks and persistent-effect coverage remain. Production: +0/-0. Tests: +8/-18 (net -10).
Evidence
check-changedgate passed all 20 stages, including core-test types, formatting, structural guards, dead-export scans and lint.Test-runner follow-up: the first baseline stopped before executing tests with a Vitest transform-cache
ENOENT. One canonical same-selection--clearCacheoperation followed by the unchanged baseline passed. The exact historical cache-removal cause remains unproven; this patch contains no cache or runtime workaround.