Repository navigation
refactor(tests): share Workboard Gateway registration fixtures - #145106
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 maintainer review before merge. Reviewed September 11, 2026, 2:22 PM ET / 18:22 UTC (Revision 2). ClawSweeper reviewWhat this changesShares repeated Workboard Gateway test setup through a file-local factory while preserving each test’s independent state and coverage. Merge readiness✅ Ready for maintainer review Keep open with no actionable findings. The refactor preserves fresh per-test state, registration calls, and assertions, and current main still contains the duplicated setup. The linked maintainer-requested campaign supports this cleanup. Priority: P3 Review scores
Verification
How this fits togetherWorkboard manages task cards through Gateway methods backed by SQLite. These tests capture registered handlers and scopes, invoke them, and check responses and stored card state. flowchart LR
A[Test cases] --> B[Fresh registration fixture]
B --> C[Workboard Gateway registration]
D[Isolated SQLite store] --> C
C --> E[Captured handlers and scopes]
E --> F[Response and state assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -43. Total -43 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one local factory for the identical registration captures while retaining specialized fixtures and independent SQLite lifecycles. Do we have a high-confidence way to reproduce the issue? Not applicable: this is fixture consolidation, not a reported runtime defect; source inspection confirms the repeated setup and preserved scenarios. Is this the best way to solve the issue? Yes. A file-local factory removes identical setup without adding production seams, sharing mutable state across tests, or changing specialized fixtures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a04db132522d. 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.
|
Related: #139428
What Problem This Solves
Four Workboard Gateway tests repeat the same registration-capture setup, adding maintenance work when the fixture changes. This is part of the maintainer-requested test consolidation campaign.
Why This Change Was Made
Move those four identical blocks into one file-local factory that creates fresh API objects, spies, and a method map on every call. Keep SQLite creation, actual Gateway registration, every assertion, and the other five specialized setups unchanged. This removes 43 net test lines.
User Impact
No user-visible behavior changes. The Workboard tests retain their registration, scope, metadata, validation, and lifecycle coverage with less duplicated setup.
Evidence