Repository navigation
test(macos): deduplicate onboarding AI setup fixtures - #118092
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 2:46 PM ET / 18:46 UTC. ClawSweeper reviewWhat this changesThe PR replaces repeated mocked Gateway, model, view, route, and defaults setup in macOS onboarding AI setup tests with a shared test-only harness while retaining specialized lifecycle tests. Merge readinessKeep this PR open for normal maintainer review. The branch is a test-only fixture refactor that preserves the production onboarding boundary and has no discrete correctness or security finding, but the protected Priority: P3 Review scores
Verification
How this fits togethermacOS onboarding asks the Gateway to detect, activate, and verify usable AI access, then exposes the resulting state through the onboarding model and view. This test suite simulates Gateway WebSocket responses and checks the model and view behavior without changing production onboarding code. flowchart LR
A[Onboarding AI setup tests] --> B[Shared test harness]
B --> C[Mock Gateway WebSocket]
C --> D[Gateway connection]
D --> E[Onboarding AI model]
E --> F[Onboarding view and state]
F --> G[Assertions and lifecycle cases]
Decision needed
Why: The patch has no supported line-level defect, but the protected maintainer label and lifecycle-sensitive coverage make the landing judgment an owner review rather than an automated close or repair action. Before merge
Agent review detailsSecurityNone. PR surfaceOther -582. Total -582 across 1 file. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the shared test harness only after the current-head macOS checks finish green and the macOS owner confirms that the retained specialized restart, authentication, cancellation, and device-state cases still express their intended ordering. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a test-fixture consolidation, not a report of a user-facing failure. The relevant validation is preservation of the existing macOS onboarding test behavior on the proposed head. Is this the best way to solve the issue? Yes. Centralizing stable mocked Gateway/model/view setup in the test target is the narrowest maintainable approach, while keeping restart and other ordering-sensitive scenarios explicit avoids hiding lifecycle contracts behind the generic fixture. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e92a98c77d6a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
* test(macos): deduplicate onboarding AI setup fixtures * test(macos): fix fixture handler binding
Summary
Root cause and owner boundary
The single onboarding AI setup test suite repeated the same session, gateway, model, view, route, and UserDefaults scaffolding across dozens of cases. The duplication belonged to test fixture ownership, not production. This change creates one canonical test-only harness and leaves the production onboarding, gateway, auth, config, persistence, and protocol owners untouched.
Canonical fix and removed paths
The fixture now owns decoded request dispatch, health handling, recording, response emission, isolated defaults cleanup, and common model/view construction. Obsolete per-test copies of those flows are removed. Restart generations, mutable auth/route reads, request gates, Keychain/device state, and lazy model/view lifecycle remain specialized where consolidation would hide ordering.
Scope and LOC
Parity
Validation
Exact corrected-head native proof is green at a43049c:
The normal ready-PR required CI gate remains the final landing gate.
Dependency and Codex contracts
The review checked pinned ConcurrencyExtras LockIsolated behavior and existing same-target usage. Both independent reviewers personally inspected sibling Codex at ee0247f95a6f, including canonical openai provider/auth routing and session persistence in codex-rs/model-provider-info/src/lib.rs, codex-rs/login/src/auth/manager.rs, codex-rs/core/src/session/session.rs, and the gpt-5.5 model catalog.