Repository navigation
ci: read the simulator verdict from the device log when the console loses it - #15
Merged
Merged
Conversation
The runner failed any run whose console capture had no passing verdict, but simctl can stop relaying when the app exits, with the last lines undelivered. DatadogNet run 41110146674 failed that way with every check passing, and the stream was about two seconds behind the app, so a short wait in the app would not reliably close the gap. Read PASS or FAIL from the console first, and fall back to the unified log only when the console has no verdict, so a real failure still fails from either source. Start every log query at this launch instead of --last 2m, so a PASS left by an earlier local run cannot stand in for this one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Problem
The simulator checks can fail on a run where every check passed. DatadogNet PR 26 fixed this in DatadogNet, and this repo's runner has the same exposure: it greps the
simctl launch --console-ptycapture forFFMPEGKIT_E2E_DONE PASS, and the app exits straight after printing that line.simctlcan stop relaying with the last lines undelivered, which is what happened in run 41110146674.It's the same code path as the DatadogNet failure. I didn't search this repo's run history for a past occurrence.
Fix
Only
.github/scripts/run-simulator-tests.shchanges, with the same logic as DatadogNet PR 26.PASS,FAILor nothing, instead of only looking forPASS.PASS,FAILandFFMPEGKIT_E2E_DONElines from the unified log, up to three times, and appends them tosimulator-tests.log. Only then can it fail. A recovered verdict raises a::warning::, so the race stays visible.FFMPEGKIT_E2E_DONE FAILstill fails, from either source.--start @<unix time>) rather than--last 2m, so a PASS left by an earlier local run can't stand in for this one.Test report
This repo's real verdict code, from
echo "==> running"to the end of the script, ran against recorded console and log fixtures through a fakexcrunthat honours the time bound, process name andBEGINSWITHprefixes. MarkerFFMPEGKIT_E2E_DONE, processFFmpegKit.iOS.DeviceTests, the latter matching the device test project's name.::warning::FAILline in the uploaded loggrep -a)The harness catches a broken port: on SFMCSDK.Net, dropping
-a, using--last 2m, reading onlyPASSand using a wrong process name each failed the matrix.The same logic ran end to end on real iOS 26.5 and 26.0 simulators in DatadogNet PR 26, where a real app printed real verdicts through a truncated console.
Not covered
🤖 Generated with Claude Code