Repository navigation
refactor: reuse Gateway fixtures for noncommitting config tests - #155709
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 real behavior proof before merge. Reviewed September 22, 2026, 8:10 AM ET / 12:10 UTC. ClawSweeper reviewWhat this changesReuses two Gateway fixtures across five noncommitting configuration tests and moves three unchanged payload builders into test support. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this is a useful, bounded test optimization absent from current main. Source review found no introduced correctness defect. Priority: P3 Review scores
Verification
How this fits togetherGateway configuration requests read settings or validate proposed edits before committing them. These tests exercise that boundary through a real Gateway client and server using isolated test state. flowchart LR
A[Test configuration requests] --> B[Shared Gateway fixture]
B --> C[Read or validate configuration]
C --> D[Response assertions]
D --> E[Per-case state reset]
E --> B
B --> F[Final client and server cleanup]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +29. Total +29 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the existing real-RPC assertions while sharing fixtures only among cases that cannot commit configuration. Do we have a high-confidence way to reproduce the issue? Not applicable to a product bug: source confirms redundant fixture startups, and the body reports successful baseline and candidate runs. Is this the best way to solve the issue? Yes. Sharing the existing fixture for noncommitting cases follows Gateway guidance and preserves the request boundary and assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 00f7785a0f55. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…claw#155709) Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Five noncommitting Config RPC tests unnecessarily start and stop a complete Gateway for each case.
User Impact
No user-visible behavior changes. The tests retain real Gateway requests and their existing assertions while avoiding three fixture startups.
Why This Change Was Made
Two shared-fixture cohorts retain per-case restart resets, rate-limit pruning, mock restoration and recovery checks, with complete server/client/state cleanup after each cohort. The five cases move after recovery-error tests and before schema lookups; their full names and bodies remain unchanged. Three pure payload builders move unchanged into sibling test support, keeping the oversized test file from growing. Total test/support growth is 29 lines.
Evidence
The unchanged baseline and final candidate each passed all 79 cases. Raw reports verify the explicit five-case order transformation and unchanged remaining identities/statuses. Payload builder bodies and parameters match exactly. Mapped checks and independent P2 review passed.
Before the payload-helper extraction, two five-case timing pairs recorded 40.65→36.92s and 40.94→37.20s, with five→two complete startup/cleanup cycles. Candidate peak RSS was higher in both pairs. These are scoped historical observations, not final-version or whole-suite speed claims; moving setup into beforeAll also changes Vitest per-case duration accounting.