Skip to content

refactor(tests): share Workboard Gateway registration fixtures - #145106

Merged
steipete merged 2 commits into
mainfrom
codex/test-workboard-gateway-capture
Sep 11, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/test-workboard-gateway-capture

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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

  • Complete Gateway and sibling registration-lifecycle suites pass before and after: the same 15 ordered cases, all passed.
  • Expanding the four factory calls reconstructs the original full test file byte for byte; formatting does not change the reviewed projection.
  • The complete changed-file gate passes, including extension test typechecking, lint, formatting, boundary and dead-export guards.
  • Independent P2 review found no issues. No whole-suite runtime improvement is claimed.

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 11, 2026 17:39
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 11, 2026, 2:22 PM ET / 18:22 UTC (Revision 2).

ClawSweeper review

What this changes

Shares 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
Reviewed head: 2200881e9f4080ceff434daefb4ba812fd596051

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with retained coverage and no actionable correctness or security findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a member-authored PR, and the diff only consolidates test fixtures; no production behavior or authority changes require live proof. Reported before/after suites are supplemental validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a member-authored PR, and the diff only consolidates test fixtures; no production behavior or authority changes require live proof. Reported before/after suites are supplemental validation.
Evidence reviewed 7 items Introduced change preserves test behavior: The complete pinned-base diff extracts four identical setup blocks into a factory that allocates its map, API object, and spies on every invocation. Store creation, registration calls, assertions, and five specialized setups remain unchanged.
Current main still needs the consolidation: The fetched main version retains the repeated registration setup; comparison with the pinned base produces no change for this file. The proposed consolidation is therefore still distinct work.
Production and lifecycle boundaries preserved: The unchanged registration owner wraps handlers in store operations and retains injected-store ownership. The SQLite fixture retains per-test cleanup, and the sibling lifecycle suite covers retirement and independently registered generations.
Findings None None.
Security None None.

How this fits together

Workboard 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -43. Total -43 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 25 68 -43
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 25 68 -43

Review metrics

None.

Technical review

Best 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.

Labels

Label justifications:

  • P3: This is bounded test-maintenance cleanup with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies a member-authored PR, and the diff only consolidates test fixtures; no production behavior or authority changes require live proof. Reported before/after suites are supplemental validation.

Evidence

What I checked:

  • Introduced change preserves test behavior: The complete pinned-base diff extracts four identical setup blocks into a factory that allocates its map, API object, and spies on every invocation. Store creation, registration calls, assertions, and five specialized setups remain unchanged. (extensions/workboard/src/gateway.test.ts:7, 2200881e9f40)
  • Current main still needs the consolidation: The fetched main version retains the repeated registration setup; comparison with the pinned base produces no change for this file. The proposed consolidation is therefore still distinct work. (extensions/workboard/src/gateway.test.ts:9, a04db132522d)
  • Production and lifecycle boundaries preserved: The unchanged registration owner wraps handlers in store operations and retains injected-store ownership. The SQLite fixture retains per-test cleanup, and the sibling lifecycle suite covers retirement and independently registered generations. (extensions/workboard/src/gateway.ts:39, 2200881e9f40)
  • Review continuity: The test file is unchanged from the previously reviewed head. The supplied completed review contains no findings or published rank-up moves. The merged daemon-lint repair at fix: restore core lint for daemon install tests #145115 is separate base-branch work. (extensions/workboard/src/gateway.test.ts, 2200881e9f40)
  • Campaign and validation context: The supplied body links Test audit: reduce redundant test code and full-suite runtime #139428, which explicitly requests independently reviewed test consolidation preserving behavioral contracts. The PR reports the same 15 ordered Gateway and lifecycle cases passing before and after, inverse-source equivalence, and a complete changed-file gate. These are author-reported results; this read-only review did not execute tests. (2200881e9f40)
  • Area history and inspection limits: Current-main history identifies Peter Steinberger’s Gateway consolidation and SQLite work and NianJiu’s registration-lifecycle repair. Exact-line blame and older patch inspection could not finish because a historical blob retrieval returned HTTP 403; no introducing-author claim is made. Current source and the introduced diff were available. (extensions/workboard/src/gateway.ts, a04db132522d)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • NianJiu: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-11T17:44:21.331Z sha baafde9 :: needs maintainer review before merge. :: none

@steipete
steipete merged commit ca3485b into main Sep 11, 2026
91 checks passed
@steipete
steipete deleted the codex/test-workboard-gateway-capture branch September 11, 2026 18:31
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: workboard rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant