Skip to content

test(macos): deduplicate onboarding AI setup fixtures - #118092

Merged
steipete merged 2 commits into
mainfrom
codex/goal100k-macos-ai-setup-harness
Aug 2, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/goal100k-macos-ai-setup-harness

Conversation

@steipete

@steipete steipete commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • centralize repeated macOS onboarding AI setup gateway, model, view, resume-state, route, and isolated-defaults fixtures
  • preserve lifecycle-sensitive restart, cancellation, authentication, request-gate, and device-token scenarios as explicit tests
  • compact repeated response JSON while retaining exact mutation semantics

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

  • production: +0 / -0
  • tests: +879 / -1461
  • net: -582 LOC
  • config/API/default/schema/protocol changes: none

Parity

  • 89 test declarations; declaration lines and titles byte-identical
  • 90 expanded runtime cases
  • 401 #expect
  • 153 #require
  • 8 Issue.record

Validation

  • canonical SwiftFormat write + lint
  • swiftc parser
  • git diff --check
  • helper-shadowing and compact-JSON mutation scans
  • exact final Blacksmith check:changed delegation: passed, including 217 relevant app/tooling tests and repository guards
  • two independent gpt-5.6-sol xhigh reviews: clean after correcting URL typing, JSON replacement, and Swift name-shadowing findings
  • central open-PR collision census and immediate delta: zero exact-path matches through 2026-08-02T17:44Z

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.

@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: XL maintainer Maintainer-authored PR labels Aug 2, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 2:46 PM ET / 18:46 UTC.

ClawSweeper review

What this changes

The 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 readiness

⚠️ Ready for maintainer review - 4 items remain

Keep 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 maintainer label and still-running exact-head macOS gates require explicit human landing review.

Priority: P3
Reviewed head: a43049c3154c06ab19d7a67f425e1d3203a2bb8a
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The patch is a well-scoped test-only consolidation with strong stated native-test coverage and no supported correctness finding; final landing still awaits the running macOS gates and owner review.
Proof confidence 🌊 off-meta tidepool Not applicable: This protected, test-only macOS refactor is appropriately evaluated through source review and focused native test gates rather than an external user-flow recording.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This protected, test-only macOS refactor is appropriately evaluated through source review and focused native test gates rather than an external user-flow recording.
Evidence reviewed 5 items Shared fixture owns the repeated transport setup: The proposed harness centralizes request recording, mock WebSocket session construction, Gateway connection construction, and model/view factories; its handler emits exactly the response returned for each decoded request.
Production ownership remains unchanged: Current main defines onboarding AI setup as the owner of Gateway detect/activate behavior; the PR touches only its dedicated IPC test file, not that production model or its configuration surface.
Lifecycle-sensitive coverage remains explicit: The refactor retains separate helpers for indeterminate activation and restarting-session behavior instead of forcing those ordering-sensitive cases through the new generic harness.
Findings None None.
Security None None.

How this fits together

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

Decision needed

Question Recommendation
After the current-head macOS jobs complete, should the macOS owner approve this wide but test-only consolidation as the canonical fixture boundary for onboarding AI setup tests? Approve after current checks: Confirm the in-progress macOS jobs are green and accept the shared harness as the canonical test-fixture boundary.

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

  • Add real behavior proof - Not applicable: This protected, test-only macOS refactor is appropriately evaluated through source review and focused native test gates rather than an external user-flow recording.
  • Resolve merge risk (P1) - The exact-head macOS Swift and scan jobs are still queued or running in the supplied PR state, so merge should wait for their final result and maintainer confirmation.
  • Complete next step (P2) - No mechanical repair is indicated; the remaining landing gate is macOS owner judgment after the exact-head native checks finish.
Agent review details

Security

None.

PR surface

Other -582. Total -582 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 879 1461 -582
Total 1 879 1461 -582

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    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.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

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

Labels

Label justifications:

  • P3: This changes only macOS test scaffolding and does not alter production behavior, configuration, persistence, or public APIs.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This protected, test-only macOS refactor is appropriately evaluated through source review and focused native test gates rather than an external user-flow recording.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Current-main blame for the shared test-helper region and the available recent history connect this area to Peter Steinberger; he also authored the focused handler-binding follow-up on the proposed branch. (role: recent area contributor and fixture-history owner; confidence: high; commits: a3198023ea86, 6c6ffdf86452, a43049c3154c; files: apps/macos/Tests/OpenClawIPCTests/OnboardingAISetupTests.swift, apps/macos/Sources/OpenClaw/OnboardingAISetup.swift)

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 (2 earlier review cycles)
  • reviewed 2026-08-02T17:51:26.001Z sha 6c6ffdf :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-02T18:20:39.268Z sha a43049c :: needs real behavior proof before merge. :: none

@steipete
steipete marked this pull request as draft August 2, 2026 18:02
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 2, 2026
@steipete
steipete marked this pull request as ready for review August 2, 2026 18:40
@steipete steipete self-assigned this Aug 2, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 2, 2026
@steipete
steipete merged commit 5c2559e into main Aug 2, 2026
238 of 243 checks passed
@steipete
steipete deleted the codex/goal100k-macos-ai-setup-harness branch August 2, 2026 18:52
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
* test(macos): deduplicate onboarding AI setup fixtures

* test(macos): fix fixture handler binding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XL 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