Skip to content

test(ios): remove construction-only probes - #124205

Merged
steipete merged 1 commit into
mainfrom
test/remove-ios-construction-probes
Aug 15, 2026
Merged

steipete merged 1 commit into
mainfrom
test/remove-ios-construction-probes

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Eight iOS tests only instantiated SwiftUI views, forced one synchronous layout, and discarded the window. They asserted no rendered state, geometry, accessibility, lifecycle, interaction, screenshot, or route outcome, and the suite is not selected by the normal iOS CI test step.

Why This Change Was Made

The deleted probes duplicated stronger owners: RootTabs layout policy tests, gateway state/security tests, onboarding behavior tests, and real XCUITest flows. Their private orientation matrix, synthetic gateway-state fixture, and duplicate preview gateway existed only to keep constructor coupling alive.

Meaningful render tests remain, including the managed-media lifecycle callback, delayed alert presentation, licenses surface, math fallback inputs, and the security-sensitive exec-approval layout.

User Impact

No production or UI behavior changes. The iOS suite loses 237 lines of compile-coupled construction exercises while retaining and directly proving the real layout, navigation, onboarding, and lifecycle contracts.

Evidence

  • ./scripts/lint-swift.sh ios — 0 violations
  • ./scripts/format-swift.sh ios — 0 files require formatting
  • PATH="/tmp/openclaw-xcodegen/bin:$PATH" pnpm ios:build — build succeeded with repository-pinned XcodeGen 2.46.0
  • Focused iOS owner suites (RootTabsPresentationTests, GatewayStatusBuilderTests, GatewayConnectionSecurityTests, GatewayQuickSetupSheetMoodTests, OnboardingDiscoveredGatewayTests) — 106 tests passed; result bundle apps/ios/build/ConstructionProbeOwnerTests.xcresult
  • Focused OpenClawUITests behavior proof (testOnboardingExplainsCapabilitiesAndTrust, testSidebarOverviewNavigation, testSidebarMoreAgentsMenuShowsAvatarsAndKeepsFooterVisible, testSidebarSlowEdgeDragOpensFromEveryRootDestination, testOnboardingPairCommandAndCompletionOpenChat) — 5 tests passed with 0 failures; result bundle apps/ios/build/ConstructionProbeUITests.xcresult
  • node scripts/check-changed.mjs -- apps/ios/Tests/SwiftUIRenderSmokeTests.swift — passed via documented local fallback because no remote provider was available
  • git diff --check — passed
  • Structured autoreview after rebase — clean

No physical iOS device was connected, so focused behavior proof used an available iPhone simulator. The first UI-test invocation selected the unit-test scheme and failed before execution; rerunning the same tests with the dedicated OpenClawUITests scheme passed without source changes.

Production delta: 0 lines. Test/test-support delta: -237 lines.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 15, 2026 16:24
@openclaw-barnacle openclaw-barnacle Bot added app: ios App: ios size: M maintainer Maintainer-authored PR labels Aug 15, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 12:30 PM ET / 16:30 UTC.

ClawSweeper review

What this changes

This PR deletes 237 lines of iOS SwiftUI construction-only tests and their private fixtures from the render smoke suite.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open. This focused maintainer test cleanup removes assertion-free SwiftUI hosting probes; source inspection found retained owner and simulator UI coverage for the affected behavior, with no blocking correctness finding. The branch is not on current main and exact-head iOS checks are still in progress.

Priority: P3
Reviewed head: 0ebe02ad00bf7f7e985d3b050b4992e697d8f498

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused test-only deletion with clear retained behavior coverage and reported simulator validation.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: This maintainer-authored test-only cleanup is outside the external contributor proof gate; its PR body nevertheless reports after-change iPhone-simulator owner and UI test runs.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored test-only cleanup is outside the external contributor proof gate; its PR body nevertheless reports after-change iPhone-simulator owner and UI test runs.
Evidence reviewed 6 items Deleted probes have no observable assertion: Current main’s deleted RootTabs probe only creates state, hosts the view, performs one layout pass through the helper, and discards the window; the analogous deleted blocks follow the same pattern.
RootTabs behavior remains directly asserted: Dedicated tests assert iPad portrait/landscape sidebar mode, visibility, sizing, and destination behavior rather than only constructing RootTabs.
Simulator UI tests exercise the removed screen families: The UI suite launches every root destination and asserts sidebar interactions; separate flows assert onboarding disclosures and successful manual setup through chat.
Findings None None.
Security None None.

How this fits together

The iOS test layer hosts SwiftUI views using app and gateway state, then validates app behavior through focused owner tests and simulator UI flows. It protects onboarding, gateway setup, sidebar layout, navigation, and security prompts without changing production app code.

flowchart LR
A[iOS app and gateway state] --> B[SwiftUI root and onboarding views]
B --> C[Construction-only render probes]
B --> D[Owner behavior tests]
B --> E[Simulator UI flows]
D --> F[Verified iOS behavior]
E --> F
Loading

Before merge

  • Resolve merge risk (P1) - Exact-head iOS build and dead-code checks were still running, so merge should wait for their completion.
  • Resolve merge risk (P1) - The checkout could not retrieve missing promisor history from GitHub, limiting deeper blame provenance but not the inspected current source or diff.
  • Complete next step (P2) - No repair job is warranted: no defect was found, and the remaining action is ordinary maintainer review after exact-head iOS checks complete.
Agent review details

Security

None.

PR surface

Other -237. Total -237 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 0 237 -237
Total 1 0 237 -237

Review metrics

Metric Value Why it matters
Production vs test delta production +0/-0; tests -237 The change removes only assertion-free test setup and private fixtures; production behavior and its focused owner/UI assertions remain unchanged.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep behavior assertions in the named owner and simulator UI suites, and remove construction-only hosting probes once exact-head iOS validation is green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep behavior assertions in the named owner and simulator UI suites, and remove construction-only hosting probes once exact-head iOS validation is green.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR removes low-value tests rather than reporting a user-facing defect; the relevant retained behavior is evidenced by source and simulator-suite coverage.

Is this the best way to solve the issue?

Yes. Removing probes that only host and discard views is preferable to preserving constructor coupling when named owner tests and simulator UI flows assert the real layout, onboarding, gateway, and navigation outcomes.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 96a7b25ca705.

Labels

Label changes:

  • add P3: This is a low-risk test-quality cleanup with no production behavior change.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored test-only cleanup is outside the external contributor proof gate; its PR body nevertheless reports after-change iPhone-simulator owner and UI test runs.

Label justifications:

  • P3: This is a low-risk test-quality cleanup with no production behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster 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 maintainer-authored test-only cleanup is outside the external contributor proof gate; its PR body nevertheless reports after-change iPhone-simulator owner and UI test runs.

Evidence

What I checked:

  • Deleted probes have no observable assertion: Current main’s deleted RootTabs probe only creates state, hosts the view, performs one layout pass through the helper, and discards the window; the analogous deleted blocks follow the same pattern. (apps/ios/Tests/SwiftUIRenderSmokeTests.swift:449, 96a7b25ca705)
  • RootTabs behavior remains directly asserted: Dedicated tests assert iPad portrait/landscape sidebar mode, visibility, sizing, and destination behavior rather than only constructing RootTabs. (apps/ios/Tests/RootTabsPresentationTests.swift:506, 96a7b25ca705)
  • Simulator UI tests exercise the removed screen families: The UI suite launches every root destination and asserts sidebar interactions; separate flows assert onboarding disclosures and successful manual setup through chat. (apps/ios/UITests/OpenClawSnapshotUITests.swift:164, 96a7b25ca705)
  • Normal CI uses focused behavioral iOS tests: The iOS workflow runs explicit lifecycle owner suites, not the construction-only smoke suite, while the project keeps all Tests sources in the OpenClawTests target. (.github/workflows/ci.yml:3807, 96a7b25ca705)
  • Area provenance: The PR head is directly based on current main; the immediately available earlier cleanup commit by steipete also modified this test file. (apps/ios/Tests/SwiftUIRenderSmokeTests.swift:449, f916e690c00f)
  • History inspection limitation: Deeper blame and pickaxe history could not complete because this partial checkout needed a missing promisor object and its GitHub remote was unreachable; source, head/base diff, and directly available commit-tree evidence were inspected.

Likely related people:

  • steipete: The directly available prior cleanup commit modified the same SwiftUI render smoke file, and the current PR continues that test-quality work. (role: recent iOS test-cleanup contributor; confidence: high; commits: f916e690c00f; files: apps/ios/Tests/SwiftUIRenderSmokeTests.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.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 0ebe02ad00bf7f7e985d3b050b4992e697d8f498:

  • ./scripts/lint-swift.sh ios — 0 violations.
  • ./scripts/format-swift.sh ios — 0 files require formatting.
  • PATH="/tmp/openclaw-xcodegen/bin:$PATH" pnpm ios:build — succeeded with repository-pinned XcodeGen 2.46.0.
  • Focused owner suites (RootTabsPresentationTests, GatewayStatusBuilderTests, GatewayConnectionSecurityTests, GatewayQuickSetupSheetMoodTests, OnboardingDiscoveredGatewayTests) — 106 tests passed; local result bundle apps/ios/build/ConstructionProbeOwnerTests.xcresult.
  • Focused OpenClawUITests behavior proof — 5 tests passed with 0 failures, covering onboarding trust, manual pairing through chat, sidebar navigation, agent-menu/footer visibility, and slow-edge sidebar gestures from every root destination; local result bundle apps/ios/build/ConstructionProbeUITests.xcresult.
  • App changed-surface gate passed through the documented local fallback after the Blacksmith Testbox CLI was unavailable; Swift lint and native schema guards were green.
  • git diff --check passed.
  • Structured autoreview before and after rebase reported no actionable findings.
  • Exact-head hosted CI run 31895423467 passed, including ios-build and openclaw/ci-gate.
  • Native review artifacts validated with READY FOR /prepare-pr, zero findings; Testbox-enabled scripts/pr prepare-run 124205 completed without changing the PR head.
  • ClawSweeper review shard Review shard 5 · openclaw/openclaw#124205 succeeded. Artifact publication remains queued and the durable PR comment remains at the start marker, so there are no published findings or rank-up moves to apply.

No physical iOS device was connected; local behavior proof used an available iPhone simulator. The first UI-test command selected the unit-test scheme and failed before execution; the identical test selection passed under the dedicated OpenClawUITests scheme without source changes.

This removes 237 test/test-support lines and no production lines. Real layout, gateway, onboarding, navigation, lifecycle, licenses, malformed-input fallback, and security-sensitive render coverage remains. No docs or changelog change is required.

@steipete
steipete merged commit 2d9a3f5 into main Aug 15, 2026
103 of 108 checks passed
@steipete
steipete deleted the test/remove-ios-construction-probes branch August 15, 2026 16:47
@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

app: ios App: ios 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: M 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