Skip to content

test: run the first-decision test only where the task getter exists - #10

Merged
ryan-son merged 1 commit into
mainfrom
test/first-decision-needs-getter
Oct 14, 2026
Merged

ryan-son merged 1 commit into
mainfrom
test/first-decision-needs-getter

Conversation

@ryan-son

Copy link
Copy Markdown
Owner

Summary

Follow-up to #9, from the first run on a real iOS 16.4 runtime (Xcode 26.3, iPhone 14 Pro simulator, xcodebuild test -only-testing:NectoMapLocalPluginTests):

Build Result
340dd4c (before #9) -[MapLocalURLProtocol task]: unrecognized selector; xctest crashed three times in a row, 0 tests executed
a2e2f5e (with #9) 90 of 91 pass, no crash

The 16.4 runtime confirmed the crash and the fix. Both new no-getter tests passed there.

The one failure was "a task answers with its first decision even when the configuration changes before it starts": it expected 200 and got 500. That is the cost #9 states. Without the URLProtocol.task getter, the task is decided again when it starts. The test states the contract where the getter exists, so it now has .enabled(if: MapLocalURLProtocol.readsTask, …). It runs wherever the getter exists, and on an OS without it, it shows as skipped with the reason, instead of failing. The no-getter path stays covered by taskWithoutGetter and noDecisionKeptWithoutGetter.

Changelog

None. Tests only.

Agent interface

No change.

Test Plan

  • macOS: the test runs and passes (91 + 131, unchanged).
  • With the condition inverted temporarily, the test is reported as skipped: "needs the URLProtocol.task getter, which iOS 16.4 lacks". Reverted before committing.
  • script/ci exit 0.
  • iOS 16.4: to be rerun by the app's verification session once this reaches feature/ios-16-support. Expected: 90 pass, 1 skipped, 0 fail.

On iOS 16.4, with the fix from #9, the test "a task answers with its
first decision even when the configuration changes before it starts"
failed: the OS has no URLProtocol.task getter, so the task is decided
again by design and answered 500 instead of 200. The test states the
contract where the getter exists, so it now runs only there, and shows
as skipped with the reason elsewhere. taskWithoutGetter covers the
other path, and passed on a real iOS 16.4 runtime.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016HvfREejSbdqHNbZ87WYdW
@ryan-son
ryan-son merged commit d5e69fc into main Oct 14, 2026
1 check passed
@ryan-son
ryan-son deleted the test/first-decision-needs-getter branch October 14, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant