swift-testing-baseline — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited swift-testing-baseline (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
@Test case.<Type>Tests.swift) and group related cases with @Suite.// swift-snapshot-testing >= 1.17 for its swift-testing-compatible assertSnapshot).__Snapshots__/ next to the test file) so visual diffs show up in PR review.#### Snapshot gate strategy — strict content / tolerant board (a settled design decision, not a global knob)
Tolerance is per-suite by view type, not a global knob:
| View class | Strategy | Precision | Why | Re-record rule |
|---|---|---|---|---|
| Text-heavy content views (screens dominated by text, cards, badges) | Default strict .image | 1.0 (bit-exact) | Adding any visible element (a new label/badge) changes pixels and fails without a re-record — the only reliable "a new label appeared" gate (see dead end below) | Never re-record to silence a fail; investigate as a behavior change first |
| Anti-aliasing-heavy grid / board / overlay views | .tolerantImage (project-local, see below) | ≈0.95 | Strict false-fails on dozens of antialiased cells | Same rule — re-record only for an intended visual change or a deliberate Xcode-version bump |
.tolerantImage is not a built-in pointfreeco/swift-snapshot-testing strategy — it's a project-local extension each app defines once (naming and location are the reader's own choice; the library itself ships .image(precision:) / .image(perceptualPrecision:)). Choose strategy at the call site via as: .image vs as: .tolerantImage; never sprinkle ad-hoc `precision:` overrides at call sites.
Baselines are the source of truth. A suite failing on PNGs means behavior changed → STOP and investigate; do not re-record to make it pass.
Snapshot suites run local-Mac only, gated behind a project-local flag you define (e.g. an isXcodeCloud check on a .enabled(if:) trait) — cross-machine AA drift makes them unreliable on CI runners.
DEAD END — do not re-spike: building a non-pixel "new label appeared" gate by extracting rendered SwiftUI text via the accessibility tree (accessibilityLabel/Value + accessibilityChildren) returns 0 lines headlessly on both a bare and a windowed NSHostingView — SwiftUI builds the AX tree lazily, tied to a live AX client that headless swift test lacks. Strict pixels (above) is the only viable content gate.
<Project>KitTesting target consumed by multiple test targets.--no-parallel on that one package is a legitimate, fast workaround; diagnose with capped per-suite --filter runs (background the run, poll, kill-and-record-timeout) rather than stacking retries.swift build is not swift testswift build — test targets are not rebuilt. A test target's own conformer written against the OLD signature silently breaks and is invisible to swift build. Rule: after any protocol-requirement change, grep for conformers (": <Protocol>") across every package including Tests/, and run swift test — not just swift build — on each package that has a test-target conformer.swift test, not a re-read of the diagnostic. ┌─────────────────────┐
│ E2E (host-driven, │ Fewest, slowest — launches the real
│ XCUITest) │ app (`host-driven-xcuitest-e2e`)
├─────────────────────┤
│ Snapshot (UI) │ Few, starting from main screens
├─────────────────────┤
│ Integration │ With fakes
│ (with fakes) │
├─────────────────────┤
│ Unit (logic) │ Most, fastest
└─────────────────────┘foundations.md (enforced by the Xcode Cloud workflow setting — xcode-cloud-single-track-ci)..serialized trait to avoid races. Plain in-memory fakes should be constructed per test instead (see swift-dependency-injection).#expect). Swift 6.2 / Xcode 26 add exit tests for testing precondition/fatalError paths — macOS/Linux/FreeBSD/OpenBSD/Windows only, not supported on the iOS simulator — and attachments for saving debug artifacts from a test run; for the exact macro/API signatures, read references/official-docs.md.xcodebuild/swift test exit 0 is not proof tests ran — a scheme/target wiring mistakecan produce "Executed 0 tests" alongside a green exit code. Read the test-count line, not just the exit status, and confirm it's > 0. Before trusting any new gate, deliberately break it once (e.g. force an assertion to fail) to prove it actually goes red.
<Module>Tests.__Snapshots__/ is committed to git and not accidentally excluded by .gitignore..image; only AA-heavy board suites use .tolerantImage (project-local extension) — no ad-hoc per-call precision: overrides.swiftpm-modularization: one-to-one test target layout and shared <Project>KitTesting.xcode-cloud-single-track-ci: CI Xcode lock and when PR CI runs tests.mise-tool-management: CLI tools the test run shells out to (xcbeautify …) are pinned via mise; Xcode itself is not.cloudkit-schema-source-of-truth: this skill's "unentitled runner" section is the seam that keeps live CloudKit/Game Center access — and the schema SSOT concerns it gates — out of the unentitled SwiftPM test run; use its test-doubles instead of a live container.host-driven-xcuitest-e2e: the E2E tier at the top of this pyramid — launches the real app instead of running inside the unentitled SwiftPM test run.apple-skills:swift-testing (external): @Test / @Suite / parameterized / exit-test syntax and XCTest migration; this skill only decides the stack and the CI isolation rule.references/official-docs.md.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.