PRACTICE
iOS delivery: verification evidence and package traceability
A green CI run isn't enough to ship. Making “tests passed” provable: which build it ran against, which cases actually ran, what evidence remains — and why tests, uploads, and releases are three different things.
Practice scope: iOS verification tooling and CI workflow improvements
What a green result needs to establish
A useful verification result identifies its inputs, the checks that actually ran, and their output evidence. Missing any one of these can turn a stale artifact, empty report, or skipped method into a misleading success. Uploading a package and identifying its contents also require separate checks.
A passing check needs an identifiable test scope and artifact. An old success record after a failed build, a missing required method despite other tests passing, or an empty report after a tool error can all mislead. The same issue appears in delivery: uploading a package does not establish its complete change list, successful notification, or download availability.
Implementation and tradeoffs
Constrain reuse with inputs and evidence
- Identify code and build inputs
- Check which tests actually ran
- Retain current results and screenshots
- Detect missing, skipped and failed checks
Starting a new build invalidates old success; an empty report is not a pass.
Select tests by impact while retaining required smoke checks and full release validation. Invalidate old evidence before a new build starts; failure, cancellation, or timeout cannot restore the old success. Isolate logs, xcresult files, and screenshots by run, and check each explicitly required XCTest method. Zero matches, unexecuted tests, or missing screenshots are incomplete results.
Test selection initially runs in observation mode, recording recommended tests before enforcing the rules throughout the workflow. Artifact reuse requires matching inputs, environment, and selectors. Historical results are recorded separately from checks run for the current build.
Separate static checks from build resources
Move PR static checks to a Linux workflow, pin SwiftLint, and compare the lockfile and actual tool version. Calculate scope using commit identity and merge-base so a deleted branch or target-only file does not distort the diff. Violations on new or changed lines block while existing issues remain reported. Tool failures, version mismatches, and empty reports still fail.
Static checks can now run independently, reducing their use of macOS build resources.
Separate upload facts, change scope, and notification
Package tracing uses confirmed upload receipts and the actual build commit, rather than inferring contents from a trigger title. Concurrent registration conflicts require rereading state; an older job cannot overwrite a newer package. An uncertain write is checked before retry, and registration recovery does not upload the binary again.
Receipt redirects accept only trusted destinations and do not forward authentication headers. Commit-to-PR queries have bounded concurrency and a shared budget; failures cancel remaining work. Unknown scope and a valid empty range remain distinct. When the complete change list cannot be determined, show the build description and mark the change scope as unknown.
Testing the mechanism
Inject empty reports, tool-version mismatches, missing required methods, and absent screenshots. Check that a failed new build cannot reuse old success evidence. For package tracing, distinguish a valid empty range from an unknown range.
ENGINEERING SCENARIO
Key engineering scenarios
Illustrative scenarios · not real product interfaces
A new build fails
Old evidence cannot approve a new result
An artifact that was valid earlier may no longer match the current inputs. Its previous validity must be cleared when a new build begins.
Handling principleKeep the current failure visible instead of falling back to an earlier success.
A check produces no usable report
An empty result is not a pass
A tool error, version mismatch, or empty report does not establish that no violations were found.
Handling principleReturn a failure and retain the corresponding logs.
Tests run without the required evidence
Check scope alongside results
A passing summary alone does not prove that required tests ran. Screenshots must also belong to the current run.
Handling principleMatch required tests, results, and screenshots, and state what was not covered.
- Select verification scope from the change
- Check artifact applicability
- Run tests and retain evidence by run
- Review failures and coverage gaps before delivery
Expand a scenario to explore its state and how it is handled.