Repository navigation
refactor: deslop update, UI and AI test fixtures - #183565
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR consolidates repeated update, UI, and AI test fixtures while preserving existing scenarios and assertions. Example: Restart verification receives a protocol mismatch with client protocol 5 and Gateway protocol 4.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: the fixture consolidation is useful, and the pinned diff introduces no actionable correctness or security finding. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherTest support supplies filesystem records, Git environments, deferred promises, session responses, and errors to existing CLI, UI, and AI tests. flowchart TD
A[Shared test helpers] --> B[CLI update tests]
A --> C[UI lifecycle tests]
A --> D[Browser E2E scenarios]
E[Inline model fixture] --> F[AI continuation live test]
B --> G[Existing behavior assertions]
C --> G
D --> G
Technical reviewBest possible solution: Land the behavior-preserving fixture consolidation once the existing required CI gates pass. Do we have a high-confidence way to reproduce the issue? There is no product bug to reproduce; source inspection confirms repeated fixtures are replaced with equivalent constructions. Is this the best way to solve the issue? The change uses existing fixture owners where available and adds only narrow shared support for duplicated records and cleanup operations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b3ba4d622638. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -108. Total -108 across 32 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 25, 2026, 7:55 AM ET / 11:55 UTC. |
|
Merged via squash auto-merge.
|
What Problem This Solves
Test suites repeat fixture construction, promise gates, and mock cleanup already owned by shared test support.
User Impact
No user-visible change, production change, migration, configuration, protocol, dependency, or timeout change. Every assertion, scenario, table, and registration remains. The standalone session-memory backend is untouched.
Why This Change Was Made
Seven independent fixture cuts remove 108 net lines (169 additions, 277 deletions; 32 files; 0 production lines). This is an explicitly authorized 100+ residue under campaign rule 14, not a LARGE PR. Each slice is independently removable.
AI continuation fixture — 17 net
Inline the one-use model spread and symbol property instead of retaining a generic wrapper. The private-network opt-in, authored model, and real-API test stay unchanged.
Best-effort tradeoffs accepted: none; the same fresh object and symbol property are constructed at the original call site.
Disk-space fixtures — 10 net
Move the two identical statfs record builders to one narrow
disk-space.test-supportowner. Preserve all eight keys, key order, defaults, and fresh records; the CLI fixture retains its property name.Best-effort tradeoffs accepted: the statfs function reference is now shared rather than allocated per CLI fixture; no consumer observes that identity. Returned data stays fresh per call.
Git identity fixtures — 10 net
Reuse the existing Git fixture owner's
isolateGitIdentityin two consumers that already import that owner. Keep the same five environment stubs at the original conditional and allocation positions.Best-effort tradeoffs accepted: none; ordered environment effects and fixture lifetimes are preserved.
UI mock cleanup — 19 net
One six-line, hook-free owner performs
restoreAllMocksfollowed byunstubAllGlobals. Twelve original fresh-arrow hooks retain their lexical scopes and positions across eleven tests. Solid-root, DOM, timer, and storage cleanup remain with their existing owners.Best-effort tradeoffs accepted: none; exception behavior and cleanup ordering remain identical.
UI deferred gates — 15 net
Seven Node/test-realm E2E callbacks use the existing native deferred owner at their original promise-allocation positions. Releases, optional calls, and
finallycleanup remain. The two browser-serialized resolver closures are deliberately unchanged.Best-effort tradeoffs accepted: none; every invocation still creates a fresh promise and resolver pair.
UI session envelopes — 29 net
Reuse unchanged fixed-one and fresh-clock response owners only for exact matching inputs. Rows, defaults, expected arrays, clocks, and placement/model fields remain independently authored. The fresh-clock owner samples after row construction, as before; the navigation array is dense and preserves its exact count.
Best-effort tradeoffs accepted: independent row/default allocation and unobserved key-enumeration order follow the fixed-one owner. Consumers inspect parsed fields, not those orders. No scenario data becomes shared mutable state.
Restart protocol-error fixtures — 8 net
The existing, already-imported restart-health test owner constructs both protocol-mismatch inputs. Each call retains the actual error subclass, fresh details, and correlated-response metadata required by the production classifier. No protocol guard or mismatch scenario is removed.
Best-effort tradeoffs accepted: the unasserted error-stack frame moves to the helper; error identity remains fresh per scenario.
Evidence
The complete assertion AST and ordered registration/table AST compare exactly before/after, without operand normalization. Counts below cover each cut's affected proof closure, including supporting registration roots; they are lexical declarations, not expanded runtime-case counts. Overlapping closures are not additive.
Additional registrations also remain exactly equal: statfs 3 register calls/2 hoists; Git 2 register calls/1 hoist; cleanup 1 register call; gates 7 suite definitions; envelopes 4 suite definitions. The broader 41-path preservation closure, including unchanged supporting/excluded files, retains 1,722 assertions, 131 custom assertion calls, 219 tests, 19 suites, 40 hooks, 3 test-finished callbacks, 30 mocks, 86 tables, 6 register calls, 16 suite definitions, and 3 hoists.
Completed proof: canonical focused CLI/disk tests 36 passed / 3 files (712.247 seconds wrapper; 659.76 seconds Vitest), narrow infra/CLI types and typed lint; AI package narrow types/lint and successful live-config collection with its existing opt-in test skipped. This is not authenticated live API proof.
UI focused tests: 142 passed / 11 files (22.030 seconds wrapper; 14.28 seconds Vitest). Protocol/restart sibling tests: 64 passed / 3 files (69.540 seconds wrapper; 58.27 seconds Vitest). Seven additional narrow UI/services/update test typechecks passed. Typed lint initially caught seven redundant default
voidtype arguments; they were removed, both affected E2E typechecks and all-path lint passed again. The correction has identical erased JavaScript AST and unchanged assertion/registration AST; completed runtime proof is reused.Mock-export checks, timeout ratchet, changed-check dry planner, format,
git diff --check, 14 suppression tests, runtime cycles (0), and Madge no-new-component check passed. The broad changed-check plan was classified, not executed locally. Independent managed P0–P2 review finished scoped-clean, with no actionable findings; the subsequent type-only lint correction was verified mechanically against that reviewed source. Hosted exact-head CI remains the broad gate; CI timing is not yet available.No local browser E2E or broad runtime build was run. The unchanged updater recovery registration root was attempted, then stopped when the canonical wrapper selected its broad runtime prerequisite; no pass is claimed. Exact-head
ci:fullmust supply that recovery/browser and broad proof. Long updater tests retain their real migration/activation boundaries; no cheaper mocked substitute or timeout change was introduced.Fresh publication collision census: 67 recent open PRs, 82 bounded reads, maximum two in flight; no overlap with these 32 paths. Four collision-owned UI consumers and the Mistral candidate remain excluded.