Repository navigation
fix(release): make the local iOS runner xctestrun portable - #5290
Conversation
Xcode 27.1 writes CodeCoverageBuildableInfos with a host-absolute SourceFilesCommonPathPrefix, and inserts the Main Thread Checker from the build host's simulator runtime mount. The release packager refused both, which failed the v0.21.45 "Publish iOS Simulator Runner" job. Drop both from the staged xctestrun and keep refusing any other absolute path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 84baddb. The verdict and the full list are in the summary comment.
|
At 84baddb, the local runner packager needs three fixes before its portability check can be relied on. A second independent pass found that removing A second independent pass found that the Main Thread Checker pattern matches any absolute path that ends in A second independent pass found that the Not blocking: one owner could normalize and edit the parsed plist, validate that exact object and write it as the staged xctestrun (or at least compute the edits from the already normalized staged file), which can be taken or left. One lower-priority inline thread still applies. The checker pattern thread does not apply to the shipped plist, because the matched item is removed and no host path ships, so it can be resolved on that point; the second fix above covers refusing a custom library instead of stripping it.
Not verified here: release run 46443377199 and the reported local Xcode 27.1 Before merge, the three fixes are needed and the Fallow audit must pass, for example by moving the staging and edit step out of |
Build the portable plist once: normalize the /private TESTROOT prefix, drop only SourceFilesCommonPathPrefix from each coverage entry, drop the Main Thread Checker only from its simulator runtime layout, validate that object and write it as the staged xctestrun. Split packageLocalRunner so the Fallow audit passes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Addressed at d2cba4f:
I re-ran the real-runner check on the new output: |
This comment has been minimized.
This comment has been minimized.
|
At d2cba4f, all three merge-blocking problems from the review of 84baddb are fixed, including the failing Fallow audit. One new problem remains: staging can change numeric values that the change does not need to touch. A second independent pass found that the new staged write can alter metadata. A certified v2 xctestrun with valid relative launch product paths and a retained integer value of 9007199254740993 passes the path checks, because certification reads the product references and digests the source bytes. Base cddba76 writes XML directly from the source and keeps the integer. Now JSON parsing in Both earlier threads no longer apply and can be resolved: checker path match, because the pattern is now anchored to the simulator runtime library and a test refuses the Not verified here: the full packager on a real derived-data build and a local run of the test file were not performed. The reported Xcode 27.1 The only check not passing is Before merge, the numeric preservation problem must be fixed and |
Parse the plutil xml1 output into a plist tree whose scalars keep their source text, edit only the deliberate strings, validate that tree and write it once. The JSON route rounded integers past 2^53 and turned whole-valued reals into integers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Addressed at 05f97b5. The packager reads
Both earlier threads are resolved. |
This comment has been minimized.
This comment has been minimized.
|
At 05f97b5, the numeric preservation problem from the review of d2cba4f is fixed, because scalars that are not edited now keep their plist type and source text. One new problem remains: a plist that could be packaged before can now fail during XML conversion. A second independent pass found that the XML conversion can exceed the default 1 MiB buffer of Both review threads no longer apply and can be resolved: checker path match, because the pattern is anchored to the simulator runtime library and the Not verified here: the packager was not run on a real Xcode derived-data build, and the test file was not run locally. The match with the The Before merge, the buffer limit must be fixed, |
A coverage-enabled build lists every source file in the xctestrun, so its xml1 form can pass execFileSync's 1 MiB default buffer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Addressed at 184c8d5. The certified xctestrun's xml1 read now passes CI at 05f97b5:
A fresh Apple run (46524511102) is queued at 184c8d5. |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
The buffer limit problem with large xctestrun files from the earlier review is fixed at 184c8d5, and no new problems that must be fixed were found. Two earlier threads no longer apply and can be resolved: this one, because the pattern is now anchored to the simulator runtime path, and this one, because the validated XML is now what gets written and no CI is green, with all 26 checks passing. Nothing else needs to change before merge. Not verified here: the large-file reproduction ( |
Summary
The release local iOS runner must ship an xctestrun that names no build-host path. Xcode 27.1 writes a host-absolute
SourceFilesCommonPathPrefixin each coverage entry. It also insertslibMainThreadChecker.dylibfrom the host's simulator runtime mount. The packager refused both, so the v0.21.45 "Publish iOS Simulator Runner" job failed (run 46443377199).portableXctestrunXmlparses theplutilXML into a tree whose scalars keep their source text. It then:/private__TESTROOT__prefix.SourceFilesCommonPathPrefix..simruntime/Contents/Resources/RuntimeRootlayout.Untouched values keep their type and text. Every other absolute path is still refused. The XML read has no buffer cap, because coverage lists every source file.
Before / after
package-ios-local-runner.mjson an Xcode 27.1 build:Error: Absolute path in xctestrun: SourceFilesCommonPathPrefix. The next refusal would beDYLD_INSERT_LIBRARIES./usr/lib/libRPAC.dylib.Validation
Head 184c8d5.
pnpm exec vitest run --project unit-core scripts/__tests__/ios-local-runner-xctestrun.test.ts: 5 passed, including integer 9007199254740993 and<real>30</real>unchanged.fallow audit: no issues.plutil -lintand matchesplutilformatting byte for byte.AGENT_DEVICE_RUNNER_LISTENER_READYon a fresh iOS 27.0 simulator.SourceFilesfails withENOBUFSat the default buffer and packages at this head.🤖 Generated with Claude Code