Repository navigation
fix(ci): unblock macOS Swift test discovery - #131866
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 3:23 PM ET / 19:23 UTC. ClawSweeper reviewWhat this changesThe PR runs macOS Swift test builds and execution through SwiftPM’s native backend and gives those artifacts a separate cache namespace, with guard coverage for the commands. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open: this is a focused, source-supported CI repair that remains necessary because current main still uses the default Swift test backend. The final-head macOS Swift job is currently skipped in pull-request CI, so merge should wait for its dedicated native-backend validation evidence. Priority: P2 Review scores
Verification
How this fits togetherThe macOS CI lane restores a Swift build cache, builds the desktop app, then builds and runs Swift tests. This change affects only the test-build backend and cache identity, leaving the release build on its existing backend. flowchart LR
A[Pull request CI] --> B[Restore Swift build cache]
B --> C[Default release build]
C --> D[Native Swift test build]
D --> E[Swift test execution]
E --> F[MacOS CI result]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +10, Config +5. Total +15 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the narrow native-test mitigation and separate cache namespace, backed by a completed exact-head macOS Swift execution on the affected hosted toolchain before merge. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main retains the default-backend test commands and the PR supplies a concrete affected Xcode/SwiftPM failure path. This review did not independently execute macOS Swift tooling. Is this the best way to solve the issue? Yes, as an acceptable temporary mitigation: it confines the native backend to test building/execution, preserves the release-build path, and separates cache identities. Hosted final-head execution remains the needed confirmation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cd19ee2cca09. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
e76dd81 to
de0e7fe
Compare
de0e7fe to
22a0fa2
Compare
|
Land-ready at The cache review/Rank-up move is addressed: both primary and fallback identities use Required exact-head CI: https://github.com/openclaw/openclaw/actions/runs/33202680239 — success. Complete native job at the exact PR checkout: https://github.com/openclaw/openclaw/actions/runs/33203113976/job/98957292290 — success in 8m38s, within the existing 20-minute budget. The one-off workflow pins this PR head; its parsed That job ran Xcode 26.6 / Swift 6.3.3 and passed the default release build, Talk-trait opt-out, 1,496 OpenClawKit tests, 1,872 app Swift Testing tests plus 3 XCTest cases, and the health-render test. I opened all four render artifacts and verified the expected ready, startup-grace/running, degraded/stale-socket and disabled channel states. The separate isolated Swift 6.4 proof remains explicit: complete instrumented native test-bundle build, three actual selected ownership tests in each parallel/serial mode (one four-case test), fresh LLVM coverage, the native relative RPATH and unchanged pinned Sparkle hash. This does not claim default-backend Swift 6.4 success or a full local Swift 6.4 suite. Original candidate and installed apps/Gateways remained untouched. Final local validation included: node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts --reporter=dot151 passed, 2 skipped. node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-root.tsbuildinfoactionlint .github/workflows/ci.ymlnode --import ./scripts/tsx.mjs scripts/native-app-i18n.ts verifynode --import ./scripts/tsx.mjs scripts/native-app-i18n.ts checkAll passed. Strict locale verification reads 4,301 entries across 21 catalogs without generating changes. Pinned zizmor, composite-input/conflict checks, prior changed type/lint/Knip gates and fresh isolated Codex reviews also passed. Recorded limitations are not hidden: the earlier cold GitHub-hosted full job exhausted its 30-minute budget and is not counted passed; the unrelated all-workflow local sweep hit a confirmed actionlint pipe deadlock on an unchanged oversized release script, while the changed workflow passes with ShellCheck enabled. Both are documented in the body. The Code Mode repair is already upstream and was dropped during rebase; the canonical locale/toast fixes are in the base rather than duplicated here. Final diff: two files, application runtime +0/-0, CI +9/-4, tests +15/-5. The pending ClawSweeper refresh is not being used as a substitute for proof; its substantive cache feedback is implemented and verified. |
|
Merged via squash.
|
* fix(ci): unblock macOS Swift test discovery * fix(ci): isolate native Swift test build caches
What Problem This Solves
macOS Swift tests can build successfully and then fail before discovery because SwiftPM's default Swift Build backend omits the runtime search path needed by the nested test bundle to load Sparkle.
The reproduction uses Xcode 27.0 build 27A5237l, Apple Swift 6.4 (swiftlang-6.4.0.30.4), SwiftPM 6.4.0-dev and pinned Sparkle 2.9.6. Generated extraction tasks and identical artifact hashes prove Sparkle is staged correctly; the test bundle cannot reach it. This matches swiftlang/swift-package-manager#10384.
Why This Change Was Made
Select the supported native backend for the macOS test build and test execution, using one shared argument array. Preserve current main's separate coverage-enabled
--build-testsphase, build-success output,--skip-buildexecution and isolated health-render gating. The preceding release build remains on the default backend. Neither phase retries test failures.The build-cache key and fallback prefix move to
swift-build-v4-native-tests. Exact cache hits are immutable and skip saving, so a pre-native exact hit otherwise keeps restoring old contents after a successful native build. The new namespace excludes those entries from both restore paths. The SwiftPM dependency cache, dependency pins and artifact handling are unchanged. This addresses the latest ClawSweeper cache-identity feedback without claiming old caches are corrupt.This is an explicitly temporary maintainer-requested mitigation. Native is deprecated; remove the override after runner toolchains containing swiftlang/swift-package-manager#10394 pass the default test path. No application code, Package.swift, library-search-path, framework-copy or packaged-app RPATH change is included.
User Impact
No application or Gateway runtime change. Maintainers retain actual macOS test execution on affected toolchains instead of stopping at discovery. Release builds continue to exercise the default backend; the native test rollout gets a distinct immutable build-cache identity.
Evidence
swiftpm-xctest-helperfailed loading@rpath/Sparkle.framework/Versions/B/Sparkle, exit 1.swift build --build-testscompleted in 551.59s. Subsequent coverage-enabledswift test --skip-buildexecuted all three selected ownership tests in each of parallel and serial modes, exit 0 (21.80s / 5.84s); one test has four cases. Selectors retain the actual listed literal backticks. Fresh LLVM coverage contains the tested source paths, and the binary has@loader_path/../../../. Sparkle's binary hash still matches the pinned artifact. This is selected execution, not full-suite or default-backend success.actions/cache's pinned restore implementation and documented exact-hit/prefix semantics were inspected directly.e76dd8: default release build, 1,493 OpenClawKit tests, 1,859 app Swift Testing tests in 191 suites and 3 XCTest tests passed on Xcode 26.6 / Swift 6.3.3: https://github.com/openclaw/openclaw/actions/runs/33188970674/job/98909571610. This result is not promoted to the final head.22a0fa21a9598abe46ea51ef2501a4aeb0a2fa1dand ran the unchanged parsedmacos-swiftjob/global environment via a one-off scope selector (workflow commitd23a944bb9f49e8f467c3be0f60f678d4c1ece0c, not part of this PR). On the configured Blacksmith 12-vCPU runner, Xcode 26.6 / Swift 6.3.3, it finished in 8m38s within the unchanged 20-minute limit. The dependency cache restored, both new v4-native-tests build-cache keys missed, and the preserve-exact-hit step was skipped. Default release build, trait opt-out, 1,496 Kit tests, 1,872 app Swift tests plus 3 XCTest cases, and the health-render test passed. All four generated ready/running/stale-socket/disabled renders were opened and inspected. Cache writes stayed disabled; no provider hydration occurred.Validation also exposed separate issues, tracked without folding unrelated runtime changes into this PR:
Final scope: two files. Application runtime +0/-0; CI +9/-4 (net +5, primarily context comments); tests +15/-5. No dependency, generated locale, persistence, release-publisher, app or Gateway changes.
CHANGELOG.mdis release-only and untouched. Documentation alignment already landed separately in #131502 and #131650.AI-assisted implementation and review.