Repository navigation
test(ui): centralize cron controller fixtures - #117643
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 5:30 PM ET / 21:30 UTC. ClawSweeper reviewWhat this changesThe branch centralizes Cron controller test state, mock Gateway responses, and common Cron job shapes in typed helper factories within Merge readinessThis is a correct, production-neutral Cron test-fixture consolidation. It remains open for the assigned maintainer’s normal merge decision because it carries the protected Priority: P3 Review scores
Verification
How this fits togetherThe Control UI Cron controller owns scheduled-job form, list, status, and mutation state and calls Gateway Cron RPCs to load or change it. The affected tests provide fresh state and mocked RPC responses before verifying controller transitions and serialized payloads. flowchart LR
A[Controller test cases] --> B[State and RPC fixtures]
B --> C[Cron controller]
C --> D[Gateway Cron calls]
C --> E[Updated Cron state]
D --> F[Mock responses]
E --> G[Test assertions]
F --> G
Decision needed
Why: The patch appears correct, but the active Before merge
Agent review detailsSecurityNone. PR surfaceTests -491. Total -491 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Merge the one-file fixture consolidation after the assigned maintainer’s normal review, preserving the canonical initializer and the explicit specialized mocks that protect response-specific controller tests. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a test-fixture refactor, not a report of a separate user-visible failure. Its verification path is the focused test suite and direct source comparison. Is this the best way to solve the issue? Yes: using AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b82dd01ece19. 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.
|
Summary
createInitialCronState({ connected: true }), preserving a fresh state, form, error object, and arrays for every test.Exact structural parity
TypeScript AST comparison against the pristine current-main file:
6191f8ad6f05916bfbf7b45f92cf16b5a5bd80c913740bb08dc646b53c9afcd1.6940d7cb831a2e90ad2993cc18939ebf05c3108e4ebc1ba40054062f21f984c8.Independent review
Validation
Trusted Blacksmith Testbox, exact reviewed source:
CI=1 pnpm test ui/src/lib/cron/index.test.ts ui/src/pages/cron/cron-page.test.ts ui/src/pages/cron/timezone-suggestions.test.ts ui/src/pages/cron/view.test.ts— 162 passed across 4 files, including all 101 original Cron controller cases.pnpm tsgo:core:test— PASS.pnpm tsgo:ui— PASS.CI=1 pnpm check:changed— PASS; all three Knip scans clean, i18n baseline unchanged, formatter/guards/typecheck clean, typed lint 0 warnings and 0 errors.mainsynthetic merge — clean, no touched-file drift.