Repository navigation
test(macos): preserve remote hosts and presence assertions - #170938
Merged
Merged
Conversation
Match the persisted URL assertion to the parameterized host, just as the command output assertion already does. Preserve the direct URL, authentication, local port and SSH cleanup checks.
Keep the real throttle and keepalive predicate calls outside Swift Testing expression capture. Preserve all original inputs and the three negative and two positive boundary assertions.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 14, 2026
## What Problem This Solves Scheduled main run [38378024699](https://github.com/openclaw/openclaw/actions/runs/38378024699), macos-swift tests job [115231436768](https://github.com/openclaw/openclaw/actions/runs/38378024699/job/115231436768), reports five issues in three test functions after openclaw#170823 (`ff203514f5a27662658d66ed6c815d978137d7c2`). The direct-URL test gained IPv4 and IPv4-mapped IPv6 loopback cases, but its persisted-config assertion still expected the first host literal. Match that expectation to each input, preserving the existing command-output, authentication, local-port and SSH-cleanup assertions. The presence tests began passing an optional delivery-state initializer directly through Swift Testing's captured function expression when their forwarding wrapper was removed. The three negative expectations fail with a `()` outer diagnostic and an unevaluated inner call, although the unchanged production predicate returns false for each supplied input. Evaluate the predicate before `#expect`; retain the original throttle, refresh, saturation and keepalive inputs and all five assertions. The exact native replay now passes all original inputs and assertions. Macro/call capture remains the suspected mechanism; this patch does not claim a proven compiler defect. ## Evidence - Two test-only commits, one per root: 2 files, +16/-11 (net +5); no production, security, configuration, timing or timeout changes. - Culprit attribution: openclaw#170823 parameterized the URL input without updating the persisted expectation and removed the presence forwarding wrapper without changing the production throttle predicate. - One Codex review per focused commit through P2, within the two-round cap. Both reviews are scoped-clean with no actionable findings. - `git diff --check` passes; normal commit hooks pass. Local tests/builds were not run under compute conservation. Swift format/lint and runtime proof are delegated to CI. - No SQL, request-count or T1 change is claimed; no SQL harness was run. No checks or security boundaries were removed. Update/migration compatibility proof is not applicable. ## Validation Ordinary PR CI passed but omitted Swift. A focused [native replay](https://github.com/openclaw/openclaw/actions/runs/38382317749/job/115245520688) passed on exact candidate `a27178926a65099dd748643746d2964cf7786052`: continuous activity 0.018 seconds, idle keepalive 0.016 seconds, and direct private URL with all three host arguments 0.027 seconds; three tests/two suites passed in 0.029 seconds, launcher exit 0. Source and test blobs were recorded before execution. The proof used the canonical disposable `xcode-27` macOS runner, `scripts/lib/swift-toolchain.sh` to select `/Applications/Xcode.app`, and the locked native asset preparation from CI. Required toolchain is Swift 6.3+ / Xcode 26.4+. ```bash swift build --package-path apps/macos --build-system native \ --enable-code-coverage --disable-index-store -Xswiftc -gline-tables-only --build-tests node scripts/test-macos-native.mts default \ --package-path apps/macos --build-system native \ --enable-code-coverage --disable-index-store -Xswiftc -gline-tables-only --skip-build \ --filter 'MacNodePresenceReporterTests/`(continuous activity is throttled and then refreshed|idle presence gets a sparse keepalive)`|ConfigureRemoteCommandTests/`configure remote can write direct private url`' ``` The filter selects only the three failing functions, including all three direct-host arguments. The native launcher owns the isolated home, profile, state and keychain; it must run on disposable macOS CI, never on an operator desktop. No local native build or test ran. The temporary proof workflow is not part of this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Scheduled main run 38378024699, macos-swift tests job 115231436768, reports five issues in three test functions after #170823 (
1e9431b71fea74688132412f995f32cf88ba863e).The direct-URL test gained IPv4 and IPv4-mapped IPv6 loopback cases, but its persisted-config assertion still expected the first host literal. Match that expectation to each input, preserving the existing command-output, authentication, local-port and SSH-cleanup assertions.
The presence tests began passing an optional delivery-state initializer directly through Swift Testing's captured function expression when their forwarding wrapper was removed. The three negative expectations fail with a
()outer diagnostic and an unevaluated inner call, although the unchanged production predicate returns false for each supplied input. Evaluate the predicate before#expect; retain the original throttle, refresh, saturation and keepalive inputs and all five assertions. The exact native replay now passes all original inputs and assertions. Macro/call capture remains the suspected mechanism; this patch does not claim a proven compiler defect.Evidence
git diff --checkpasses; normal commit hooks pass. Local tests/builds were not run under compute conservation. Swift format/lint and runtime proof are delegated to CI.Validation
Ordinary PR CI passed but omitted Swift. A focused native replay passed on exact candidate
a27178926a65099dd748643746d2964cf7786052: continuous activity 0.018 seconds, idle keepalive 0.016 seconds, and direct private URL with all three host arguments 0.027 seconds; three tests/two suites passed in 0.029 seconds, launcher exit 0. Source and test blobs were recorded before execution. The proof used the canonical disposablexcode-27macOS runner,scripts/lib/swift-toolchain.shto select/Applications/Xcode.app, and the locked native asset preparation from CI. Required toolchain is Swift 6.3+ / Xcode 26.4+.swift build --package-path apps/macos --build-system native \ --enable-code-coverage --disable-index-store -Xswiftc -gline-tables-only --build-tests node scripts/test-macos-native.mts default \ --package-path apps/macos --build-system native \ --enable-code-coverage --disable-index-store -Xswiftc -gline-tables-only --skip-build \ --filter 'MacNodePresenceReporterTests/`(continuous activity is throttled and then refreshed|idle presence gets a sparse keepalive)`|ConfigureRemoteCommandTests/`configure remote can write direct private url`'The filter selects only the three failing functions, including all three direct-host arguments. The native launcher owns the isolated home, profile, state and keychain; it must run on disposable macOS CI, never on an operator desktop. No local native build or test ran. The temporary proof workflow is not part of this PR.