Skip to content

refactor(macos): remove final private test seams - #122202

Merged
steipete merged 2 commits into
mainfrom
test/remove-final-macos-test-seams
Aug 12, 2026
Merged

steipete merged 2 commits into
mainfrom
test/remove-final-macos-test-seams

Conversation

@steipete

@steipete steipete commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The macOS test target still carried an unconditional placeholder, body-only probes, no-op assertions, and private Quick Chat/Tailscale state façades whose only purpose was making tests reach implementation details.

Why This Change Was Made

Delete the inert and strict-subset tests, remove Tailscale's DEBUG service/state injection path, and rewrite the valuable Quick Chat lifecycle regression through its existing monitor and hotkey dependency injections. The test now observes installs, removals, token clearing, visibility, and enablement directly; no replacement production seam is added. The native i18n source inventory is regenerated canonically because deleting the Tailscale helper block shifts line metadata for existing strings; no localization text changes.

User Impact

No intended user-visible change. Quick Chat lifecycle and Tailscale runtime behavior are unchanged, while the macOS app and test target carry less private testing state and duplicated smoke coverage.

Evidence

  • Quick Chat, Tailscale, Instances/Settings, and buffered audio suites: 33 tests passed across five Swift Testing suites.
  • swift build --package-path apps/macos --target OpenClaw: passed.
  • pnpm native:i18n:verify: passed with 5,370 entries and changed=false; the generated diff contains 17 Tailscale line-number updates and no source-text changes.
  • Full changed-file gate passed SwiftFormat, SwiftLint, 296 packaging/service and app-adjacent tests, native i18n/schema, boundaries, and repository safety guards. Blacksmith/Testbox was unavailable on this host, so trusted heavy proof fell back locally.
  • Structured autoreview and deleted-content secret scan: clean.
  • git diff --check: clean.
  • Production: -46 lines. Source test support: -64 lines. Tests: -42 lines. Generated inventory: 17 line metadata replacements. Overall non-generated change: -152 lines.

AI-assisted maintenance cleanup; the lifecycle effects, caller graph, generated inventory, and retained platform contracts were reviewed directly.

@clawsweeper

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

clawsweeper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

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

ClawSweeper review

What this changes

This macOS cleanup deletes private DEBUG-only test facades and shallow smoke tests, rewrites the Quick Chat lifecycle test around existing dependency injection, and refreshes generated i18n line metadata.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for normal maintainer review: current main still contains the DEBUG-only Quick Chat and Tailscale test seams this branch removes, while the retained lifecycle test observes the existing monitor and hotkey injection boundary. No blocking patch defect was found.

Priority: P3
Reviewed head: fae5bec71a5141f27a1dbe8bf2c704fef5fe859b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused net-negative cleanup with source-backed retained lifecycle coverage and no blocking review finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, behavior-neutral cleanup is outside the external-contributor real-behavior-proof gate; the PR body supplies focused build and suite evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, behavior-neutral cleanup is outside the external-contributor real-behavior-proof gate; the PR body supplies focused build and suite evidence.
Evidence reviewed 5 items Current-main seams remain: Current main still exposes DEBUG-only monitor and hotkey test properties, so this cleanup is not already implemented or superseded.
Tailscale boundary: The app injects its Tailscale service into the Settings window, and current main’s section adds a separate DEBUG-only replacement service; the branch removes that parallel path rather than changing the service contract.
Lifecycle coverage moved to the owner boundary: The replacement test counts monitor installation/clearing and hotkey registration/removal through the controller’s existing injected dependencies, preserving the meaningful lifecycle invariant without private snapshots.
Findings None None.
Security None None.

How this fits together

Quick Chat is a macOS menu-bar feature whose lifecycle installs monitors and a keyboard shortcut; the app’s settings can enable or disable it. The Tailscale settings view receives the app-owned status service through SwiftUI’s environment and renders its state for operators.

flowchart LR
  A[Mac app lifecycle] --> B[Quick Chat controller]
  B --> C[Monitor and hotkey dependencies]
  C --> D[Lifecycle regression test]
  E[Settings window] --> F[Environment Tailscale service]
  F --> G[Tailscale controls]
Loading

Before merge

  • Resolve merge risk (P1) - Exact-head macOS build, dead-code, and repository checks were still queued or running in the supplied PR context; retain the normal terminal-green merge gate.
  • Complete next step (P2) - No discrete repair is needed; this maintainer-labeled cleanup should follow normal exact-head CI and maintainer review.
Agent review details

Security

None.

PR surface

Other -152. Total -152 across 9 files.

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 9 80 232 -152
Total 9 80 232 -152

Review metrics

Metric Value Why it matters
Production versus test delta production -46, test support -64, tests -42; generated inventory 17 replacements The branch reduces production-adjacent test seams and test code without adding runtime capability; generated changes are line metadata only.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the focused deletion-based cleanup, then merge after exact-head macOS checks finish successfully and maintainer review confirms the retained lifecycle boundary remains sufficient.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the focused deletion-based cleanup, then merge after exact-head macOS checks finish successfully and maintainer review confirms the retained lifecycle boundary remains sufficient.

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

Not applicable: this PR is a test-seam cleanup rather than a report of a user-visible failure; the relevant behavior is inspected directly in source and focused tests.

Is this the best way to solve the issue?

Yes. Reusing the controller’s existing monitor and hotkey injections preserves observable lifecycle coverage while deleting test-only production state and the parallel Tailscale service path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 69983f80113a.

Labels

Label justifications:

  • P3: This is a behavior-neutral, net-negative macOS test-architecture cleanup with no reported user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, behavior-neutral cleanup is outside the external-contributor real-behavior-proof gate; the PR body supplies focused build and suite evidence.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Authored both reviewed commits across the exact Quick Chat, Tailscale, test, and generated-inventory paths; deeper current-main blame could not be completed because this partial checkout could not resolve its promisor remote. (role: recent macOS cleanup contributor; confidence: medium; commits: 8f0d0fbaad42, fae5bec71a51; files: apps/macos/Sources/OpenClaw/QuickChatController.swift, apps/macos/Sources/OpenClaw/TailscaleIntegrationSection.swift, apps/macos/Tests/OpenClawIPCTests/QuickChatControllerTests.swift)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wait for the terminal exact-head macOS and repository checks before merging.

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 (1 earlier review cycle)
  • reviewed 2026-08-11T18:59:13.808Z sha 8f0d0fb :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for fae5bec71a5141f27a1dbe8bf2c704fef5fe859b:

  • ClawSweeper and native review artifacts found no actionable issues; its only rank-up move was to wait for terminal exact-head checks, now complete.
  • Quick Chat, Tailscale, Instances/Settings, and buffered audio suites: 33 tests passed across five Swift Testing suites.
  • swift build --package-path apps/macos --target OpenClaw: passed.
  • pnpm native:i18n:verify: passed with 5,370 entries and changed=false; the generated diff contains 17 Tailscale line-number updates and no source-text or identifier changes.
  • Full changed-file gate passed SwiftFormat, SwiftLint, 296 packaging/service and app-adjacent tests, native i18n/schema, boundaries, and repository safety guards. Blacksmith/Testbox was unavailable on this host, so trusted heavy proof fell back locally before hosted CI.
  • Structured autoreview, deleted-content secret scan, and git diff --check: clean.
  • Exact-head hosted CI: run 31559924963, success with no failed or pending jobs.

Production delta is -46 lines; source test support is -64; tests are -42; generated inventory has 17 metadata replacements. The non-generated patch is net -152 lines, with no known proof gaps.

@steipete
steipete merged commit 4401ff2 into main Aug 12, 2026
99 checks passed
@steipete
steipete deleted the test/remove-final-macos-test-seams branch August 12, 2026 03:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 12, 2026
* test(macos): remove final private test seams

* chore(macos): refresh native i18n inventory
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: 🐚 platinum hermit Good normal PR readiness with ordinary 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