{"schemaVersion":"2.0.0","locale":"en","title":"Rules","description":"Explore the documented source-scan conditions first, then switch to the full catalog to study the wider design. A rule's selection, historical evidence and observed coverage are se","htmlUrl":"https://docs.swift-analyzer.com/catalog/","markdownUrl":"https://docs.swift-analyzer.com/catalog/index.md","productRevision":"524fa07e0ae4153c84ac12ae9eb6559df89ec2be","catalogRevision":"4558458d","docsRevision":"1f17ba58ab08627e0de898f1442067b09e960b48cd5605d6529e9275f8930d68","channel":"pre-prod","maturity":"experimental","access":"owner-provided-checkout","markdown":"# Rules\n\nExplore the documented source-scan conditions first, then switch to the full catalog to study the wider design. A rule's selection, historical evidence and observed coverage are separate facts.\n\n## Availability in source-scan\n\n9 conditions are selected by default; 2 stdio conditions require --include-stdio-rules. The other 130 conditions are unavailable in source-scan. Each rule page also identifies any separate experimental source preview.\n\nThe catalog contains 138 stable Rule IDs grouping 141 conditions. The 33 historically accepted bounded conditions at 4558458d have not been requalified for product 524fa07e. Read the condition's method and evidence boundary before applying a result.\n\nWithout JavaScript, the links below remain available and the complete catalog is included in the readable page. Interactive filters narrow the same list when JavaScript is available.\n\n## Complete catalog\n\n- [repository-unused@1.0.0 — Unused declaration or declaration group](https://docs.swift-analyzer.com/catalog/repository-unused/)\n- [architecture.production-used-only-by-tests@1.0.0 — Production code used only by tests](https://docs.swift-analyzer.com/catalog/architecture.production-used-only-by-tests/)\n- [architecture.forbidden-dependency@1.0.0 — Forbidden dependency or layer bypass](https://docs.swift-analyzer.com/catalog/architecture.forbidden-dependency/)\n- [api.access-narrowing@1.0.0 — Excessive API visibility](https://docs.swift-analyzer.com/catalog/api.access-narrowing/)\n- [architecture.unused-product-dependency@1.0.0 — Unused product dependency](https://docs.swift-analyzer.com/catalog/architecture.unused-product-dependency/)\n- [architecture.undeclared-direct-provider@1.0.0 — Undeclared direct provider](https://docs.swift-analyzer.com/catalog/architecture.undeclared-direct-provider/)\n- [architecture.dependency-cycle@1.0.0 — Disallowed component cycle](https://docs.swift-analyzer.com/catalog/architecture.dependency-cycle/)\n- [api.implementation-type-leakage@1.0.0 — Implementation type exposed through an API](https://docs.swift-analyzer.com/catalog/api.implementation-type-leakage/)\n- [architecture.registration-contract-mismatch@1.0.0 — Incompatible registration or entry point](https://docs.swift-analyzer.com/catalog/architecture.registration-contract-mismatch/)\n- [portfolio.arch.10@1.0.0 — Required resource missing from a shipping variant](https://docs.swift-analyzer.com/catalog/portfolio.arch.10/)\n- [portfolio.arch.11@1.0.0 — Parameter unused across its dispatch family](https://docs.swift-analyzer.com/catalog/portfolio.arch.11/)\n- [portfolio.arch.12@1.0.0 — Property is written but never observed](https://docs.swift-analyzer.com/catalog/portfolio.arch.12/)\n- [portfolio.arch.13@1.0.0 — Redundant protocol or conformance](https://docs.swift-analyzer.com/catalog/portfolio.arch.13/)\n- [portfolio.arch.14@1.0.0 — Semantically redundant import](https://docs.swift-analyzer.com/catalog/portfolio.arch.14/)\n- [concurrency.incompatible-isolation@1.0.0 — Call crosses incompatible isolation](https://docs.swift-analyzer.com/catalog/concurrency.incompatible-isolation/)\n- [concurrency.unproven-mainactor-entry@1.0.0 — MainActor entry without a proven context](https://docs.swift-analyzer.com/catalog/concurrency.unproven-mainactor-entry/)\n- [concurrency.detached-task-context-loss@1.0.0 — Required context lost through detachment](https://docs.swift-analyzer.com/catalog/concurrency.detached-task-context-loss/)\n- [concurrency.dispatch-isolation-mismatch@1.0.0 — Callback runs in an incompatible scheduler context](https://docs.swift-analyzer.com/catalog/concurrency.dispatch-isolation-mismatch/)\n- [portfolio.exec.05@1.0.0 — Invalid isolation assumption](https://docs.swift-analyzer.com/catalog/portfolio.exec.05/)\n- [portfolio.exec.06@1.0.0 — Resource used outside its execution domain](https://docs.swift-analyzer.com/catalog/portfolio.exec.06/)\n- [portfolio.exec.07@1.0.0 — Thread-affine value survives a suspension](https://docs.swift-analyzer.com/catalog/portfolio.exec.07/)\n- [portfolio.exec.08@1.0.0 — Required task-local value or executor preference is lost](https://docs.swift-analyzer.com/catalog/portfolio.exec.08/)\n- [concurrency.main-actor-blocking@1.0.0 — Blocking call on a critical executor](https://docs.swift-analyzer.com/catalog/concurrency.main-actor-blocking/)\n- [portfolio.exec.10@1.0.0 — Expensive computation on a critical executor](https://docs.swift-analyzer.com/catalog/portfolio.exec.10/)\n- [portfolio.exec.11@1.0.0 — Removable scheduling boundary](https://docs.swift-analyzer.com/catalog/portfolio.exec.11/)\n- [portfolio.exec.12@1.0.0 — Cost amplified by actor crossings](https://docs.swift-analyzer.com/catalog/portfolio.exec.12/)\n- [portfolio.exec.13@1.0.0 — Independent work is unintentionally serialized](https://docs.swift-analyzer.com/catalog/portfolio.exec.13/)\n- [portfolio.exec.14@1.0.0 — Custom SerialExecutor violates serialization](https://docs.swift-analyzer.com/catalog/portfolio.exec.14/)\n- [concurrency.state-freshness-across-suspension@1.0.0 — State check becomes stale across await](https://docs.swift-analyzer.com/catalog/concurrency.state-freshness-across-suspension/)\n- [concurrency.actor-invariant-exposure@1.0.0 — Broken invariant is observable during suspension](https://docs.swift-analyzer.com/catalog/concurrency.actor-invariant-exposure/)\n- [concurrency.obsolete-generation-commit@1.0.0 — Stale result overwrites a newer generation](https://docs.swift-analyzer.com/catalog/concurrency.obsolete-generation-commit/)\n- [portfolio.async.04@1.0.0 — Operation requiring single-flight starts more than once](https://docs.swift-analyzer.com/catalog/portfolio.async.04/)\n- [portfolio.async.05@1.0.0 — Code depends on an unspecified actor-task order](https://docs.swift-analyzer.com/catalog/portfolio.async.05/)\n- [concurrency.lost-continuation-resume@1.0.0 — Continuation can finish without resume](https://docs.swift-analyzer.com/catalog/concurrency.lost-continuation-resume/)\n- [concurrency.double-continuation-resume@1.0.0 — Continuation can resume more than once](https://docs.swift-analyzer.com/catalog/concurrency.double-continuation-resume/)\n- [concurrency.cancel-register-start-race@1.0.0 — Cancellation is lost between registration and start](https://docs.swift-analyzer.com/catalog/concurrency.cancel-register-start-race/)\n- [concurrency.cancelled-forbidden-effect@1.0.0 — Forbidden commit after cancellation or rejection](https://docs.swift-analyzer.com/catalog/concurrency.cancelled-forbidden-effect/)\n- [concurrency.unresponsive-cancellation-work@1.0.0 — Work does not honor its cancellation contract](https://docs.swift-analyzer.com/catalog/concurrency.unresponsive-cancellation-work/)\n- [concurrency.timeout-sibling-outlives-race@1.0.0 — Timeout or first result does not finish its scope](https://docs.swift-analyzer.com/catalog/concurrency.timeout-sibling-outlives-race/)\n- [concurrency.task-outlives-scope@1.0.0 — Task outlives its required lifecycle scope](https://docs.swift-analyzer.com/catalog/concurrency.task-outlives-scope/)\n- [portfolio.async.13@1.0.0 — Required task result or error is lost](https://docs.swift-analyzer.com/catalog/portfolio.async.13/)\n- [concurrency.guard-held-across-suspension@1.0.0 — Guard is held across a disallowed await](https://docs.swift-analyzer.com/catalog/concurrency.guard-held-across-suspension/)\n- [concurrency.sole-producer-self-block@1.0.0 — Wait cycle blocks required producers](https://docs.swift-analyzer.com/catalog/concurrency.sole-producer-self-block/)\n- [portfolio.async.16@1.0.0 — Synchronous waits exhaust the cooperative pool](https://docs.swift-analyzer.com/catalog/portfolio.async.16/)\n- [portfolio.async.17@1.0.0 — Priority inversion through opaque waiting](https://docs.swift-analyzer.com/catalog/portfolio.async.17/)\n- [portfolio.async.18@1.0.0 — Shared-memory race across an unsafe or legacy boundary](https://docs.swift-analyzer.com/catalog/portfolio.async.18/)\n- [portfolio.async.19@1.0.0 — Synchronous callback re-enters an unfinished protocol](https://docs.swift-analyzer.com/catalog/portfolio.async.19/)\n- [portfolio.async.20@1.0.0 — Custom executor loses or repeats a job](https://docs.swift-analyzer.com/catalog/portfolio.async.20/)\n- [lifetime.escaping-value@1.0.0 — Borrowed pointer or view escapes its lifetime](https://docs.swift-analyzer.com/catalog/lifetime.escaping-value/)\n- [portfolio.life.02@1.0.0 — Use after free](https://docs.swift-analyzer.com/catalog/portfolio.life.02/)\n- [portfolio.life.03@1.0.0 — Repeated or incompatible deallocation](https://docs.swift-analyzer.com/catalog/portfolio.life.03/)\n- [portfolio.life.04@1.0.0 — Unowned access after owner deallocation](https://docs.swift-analyzer.com/catalog/portfolio.life.04/)\n- [lifetime.unmanaged-ownership-balance@1.0.0 — Unmanaged ownership imbalance](https://docs.swift-analyzer.com/catalog/lifetime.unmanaged-ownership-balance/)\n- [lifetime.ownership-cycle@1.0.0 — Strong ownership cycle without a valid termination](https://docs.swift-analyzer.com/catalog/lifetime.ownership-cycle/)\n- [portfolio.life.07@1.0.0 — Required weak consumer is released too early](https://docs.swift-analyzer.com/catalog/portfolio.life.07/)\n- [lifetime.registration-outlives-scope@1.0.0 — Registration outlives its allowed scope](https://docs.swift-analyzer.com/catalog/lifetime.registration-outlives-scope/)\n- [lifetime.undischarged-resource-obligation@1.0.0 — Cleanup obligation is not discharged](https://docs.swift-analyzer.com/catalog/lifetime.undischarged-resource-obligation/)\n- [portfolio.life.10@1.0.0 — Closed or transferred resource is still used](https://docs.swift-analyzer.com/catalog/portfolio.life.10/)\n- [portfolio.life.11@1.0.0 — Read from an uninitialized buffer region](https://docs.swift-analyzer.com/catalog/portfolio.life.11/)\n- [correctness.pointer-count-initialization@1.0.0 — Pointer or count exceeds its valid extent](https://docs.swift-analyzer.com/catalog/correctness.pointer-count-initialization/)\n- [performance.repeated-linear-traversal@1.0.0 — Repeated linear traversal / Lazy pipeline is recomputed](https://docs.swift-analyzer.com/catalog/performance.repeated-linear-traversal/)\n- [performance.repeated-sorting@1.0.0 — Repeated invariant sorting](https://docs.swift-analyzer.com/catalog/performance.repeated-sorting/)\n- [performance.repeated-consumed-materialization@1.0.0 — Repeated consumed materialization / Growing prefix is repeatedly materialized](https://docs.swift-analyzer.com/catalog/performance.repeated-consumed-materialization/)\n- [performance.array-fifo-shifts@1.0.0 — Array used as a growing shifting FIFO](https://docs.swift-analyzer.com/catalog/performance.array-fifo-shifts/)\n- [portfolio.perf.06@1.0.0 — Full sort used for an extremum or top-k result](https://docs.swift-analyzer.com/catalog/portfolio.perf.06/)\n- [performance.comparator-projection-amplification@1.0.0 — Expensive projection repeated by a comparator](https://docs.swift-analyzer.com/catalog/performance.comparator-projection-amplification/)\n- [portfolio.perf.08@1.0.0 — Eager materialization before a short consumer](https://docs.swift-analyzer.com/catalog/portfolio.perf.08/)\n- [portfolio.perf.09@1.0.0 — Repeated physical copy-on-write detach](https://docs.swift-analyzer.com/catalog/portfolio.perf.09/)\n- [portfolio.perf.10@1.0.0 — Get-copy-modify-set amplifies cost](https://docs.swift-analyzer.com/catalog/portfolio.perf.10/)\n- [portfolio.perf.12@1.0.0 — Capacity policy violates the amortized bound](https://docs.swift-analyzer.com/catalog/portfolio.perf.12/)\n- [portfolio.perf.13@1.0.0 — Repeated element-by-element bridging](https://docs.swift-analyzer.com/catalog/portfolio.perf.13/)\n- [portfolio.perf.14@1.0.0 — Repeated expensive hashing or equality work](https://docs.swift-analyzer.com/catalog/portfolio.perf.14/)\n- [portfolio.perf.15@1.0.0 — Small slice retains large storage](https://docs.swift-analyzer.com/catalog/portfolio.perf.15/)\n- [portfolio.perf.16@1.0.0 — Fine-grained tasks amplify scheduling work](https://docs.swift-analyzer.com/catalog/portfolio.perf.16/)\n- [portfolio.perf.17@1.0.0 — Fanout retains excessive live data](https://docs.swift-analyzer.com/catalog/portfolio.perf.17/)\n- [security.sensitive-data-flow@1.0.0 — Sensitive data reaches logs / Sensitive data reaches a forbidden destination](https://docs.swift-analyzer.com/catalog/security.sensitive-data-flow/)\n- [security.sql-structure-injection@1.0.0 — SQL injection](https://docs.swift-analyzer.com/catalog/security.sql-structure-injection/)\n- [security.shell-command-injection@1.0.0 — Shell injection](https://docs.swift-analyzer.com/catalog/security.shell-command-injection/)\n- [security.format-position-injection@1.0.0 — Format-string injection](https://docs.swift-analyzer.com/catalog/security.format-position-injection/)\n- [security.path-traversal@1.0.0 — Path traversal outside the extraction root](https://docs.swift-analyzer.com/catalog/security.path-traversal/)\n- [security.javascript-code-injection@1.0.0 — JavaScript or HTML context injection](https://docs.swift-analyzer.com/catalog/security.javascript-code-injection/)\n- [security.privileged-url-input@1.0.0 — Unprivileged input controls a privileged URL sink](https://docs.swift-analyzer.com/catalog/security.privileged-url-input/)\n- [portfolio.sec.09@1.0.0 — Predicate injection](https://docs.swift-analyzer.com/catalog/portfolio.sec.09/)\n- [portfolio.sec.10@1.0.0 — Regular-expression injection](https://docs.swift-analyzer.com/catalog/portfolio.sec.10/)\n- [portfolio.sec.11@1.0.0 — Algorithmic denial of service through a regular expression](https://docs.swift-analyzer.com/catalog/portfolio.sec.11/)\n- [portfolio.sec.12@1.0.0 — External-entity expansion from untrusted XML](https://docs.swift-analyzer.com/catalog/portfolio.sec.12/)\n- [portfolio.sec.13@1.0.0 — TLS trust evaluation is effectively disabled](https://docs.swift-analyzer.com/catalog/portfolio.sec.13/)\n- [portfolio.sec.14@1.0.0 — Cryptography does not provide the claimed property](https://docs.swift-analyzer.com/catalog/portfolio.sec.14/)\n- [portfolio.sec.15@1.0.0 — Keyed nonce or IV is reused in an unsafe mode](https://docs.swift-analyzer.com/catalog/portfolio.sec.15/)\n- [portfolio.sec.16@1.0.0 — Unsafe password-derivation contract](https://docs.swift-analyzer.com/catalog/portfolio.sec.16/)\n- [portfolio.sec.17@1.0.0 — Predictable randomness in a security-sensitive value](https://docs.swift-analyzer.com/catalog/portfolio.sec.17/)\n- [portfolio.sec.18@1.0.0 — Untrusted deserialization crosses the allowed-type boundary](https://docs.swift-analyzer.com/catalog/portfolio.sec.18/)\n- [portfolio.sec.19@1.0.0 — Privileged effect bypasses required authorization](https://docs.swift-analyzer.com/catalog/portfolio.sec.19/)\n- [portfolio.sec.20@1.0.0 — Security validator or sanitizer is bypassed](https://docs.swift-analyzer.com/catalog/portfolio.sec.20/)\n- [portfolio.sec.21@1.0.0 — Embedded secret reaches a security-sensitive use](https://docs.swift-analyzer.com/catalog/portfolio.sec.21/)\n- [portfolio.sec.22@1.0.0 — WebView receives forbidden capabilities](https://docs.swift-analyzer.com/catalog/portfolio.sec.22/)\n- [portfolio.sec.23@1.0.0 — Cryptographic key has insufficient strength](https://docs.swift-analyzer.com/catalog/portfolio.sec.23/)\n- [portfolio.sec.24@1.0.0 — Dependency is fetched over an untrusted channel](https://docs.swift-analyzer.com/catalog/portfolio.sec.24/)\n- [portfolio.sec.25@1.0.0 — Non-reproducible dependency resolution violates policy](https://docs.swift-analyzer.com/catalog/portfolio.sec.25/)\n- [portfolio.sec.26@1.0.0 — Debug capability is exposed in a shipping product](https://docs.swift-analyzer.com/catalog/portfolio.sec.26/)\n- [correctness.equality-hash-contract@1.0.0 — Equality and hashing disagree](https://docs.swift-analyzer.com/catalog/correctness.equality-hash-contract/)\n- [correctness.persisted-process-hash@1.0.0 — Process-local hash is used as a stable identity](https://docs.swift-analyzer.com/catalog/correctness.persisted-process-hash/)\n- [correctness.regex-range-units@1.0.0 — Incompatible length or index units](https://docs.swift-analyzer.com/catalog/correctness.regex-range-units/)\n- [correctness.invalidated-collection-index@1.0.0 — Invalidated collection index is used](https://docs.swift-analyzer.com/catalog/correctness.invalidated-collection-index/)\n- [correctness.mutable-collection-key@1.0.0 — Key changes equality or hash while in a collection](https://docs.swift-analyzer.com/catalog/correctness.mutable-collection-key/)\n- [correctness.bounded-ordering-law@1.0.0 — Ordering laws are violated](https://docs.swift-analyzer.com/catalog/correctness.bounded-ordering-law/)\n- [correctness.canonical-output-nondeterminism@1.0.0 — Unstable ordering reaches canonical output](https://docs.swift-analyzer.com/catalog/correctness.canonical-output-nondeterminism/)\n- [portfolio.cor.08@1.0.0 — Size or count exceeds its numeric range](https://docs.swift-analyzer.com/catalog/portfolio.cor.08/)\n- [portfolio.cor.09@1.0.0 — Non-finite value reaches a finite-only consumer](https://docs.swift-analyzer.com/catalog/portfolio.cor.09/)\n- [portfolio.cor.10@1.0.0 — Interprocedural path reaches an invalid force operation](https://docs.swift-analyzer.com/catalog/portfolio.cor.10/)\n- [portfolio.cor.11@1.0.0 — Single-pass sequence is consumed more than once](https://docs.swift-analyzer.com/catalog/portfolio.cor.11/)\n- [portfolio.cor.12@1.0.0 — Copy violates the state-independence contract](https://docs.swift-analyzer.com/catalog/portfolio.cor.12/)\n- [portfolio.cor.13@1.0.0 — Producer and consumer canonicalize identity differently](https://docs.swift-analyzer.com/catalog/portfolio.cor.13/)\n- [portfolio.cor.14@1.0.0 — Written value is lost before observation](https://docs.swift-analyzer.com/catalog/portfolio.cor.14/)\n- [portfolio.cor.15@1.0.0 — Predicate does not distinguish valid states](https://docs.swift-analyzer.com/catalog/portfolio.cor.15/)\n- [portfolio.cor.16@1.0.0 — Conditional-result branches are semantically identical](https://docs.swift-analyzer.com/catalog/portfolio.cor.16/)\n- [portfolio.cor.17@1.0.0 — Control-flow region is unreachable](https://docs.swift-analyzer.com/catalog/portfolio.cor.17/)\n- [portfolio.cor.18@1.0.0 — Computed result is discarded without a useful effect](https://docs.swift-analyzer.com/catalog/portfolio.cor.18/)\n- [portfolio.cor.19@1.0.0 — Comparison violates its numeric precision contract](https://docs.swift-analyzer.com/catalog/portfolio.cor.19/)\n- [portfolio.stream.01@1.0.0 — Buffer or accumulator lacks a required bound](https://docs.swift-analyzer.com/catalog/portfolio.stream.01/)\n- [portfolio.stream.02@1.0.0 — Drop policy violates required event delivery](https://docs.swift-analyzer.com/catalog/portfolio.stream.02/)\n- [portfolio.stream.03@1.0.0 — Concurrent next calls on a single-consumer iterator](https://docs.swift-analyzer.com/catalog/portfolio.stream.03/)\n- [portfolio.stream.04@1.0.0 — Stream is not finished on a required terminal path](https://docs.swift-analyzer.com/catalog/portfolio.stream.04/)\n- [portfolio.stream.05@1.0.0 — Retry or refresh forms a loop without progress or budget](https://docs.swift-analyzer.com/catalog/portfolio.stream.05/)\n- [portfolio.stream.06@1.0.0 — Retry duplicates a non-idempotent effect](https://docs.swift-analyzer.com/catalog/portfolio.stream.06/)\n- [portfolio.stream.07@1.0.0 — Related changes escape a required transaction](https://docs.swift-analyzer.com/catalog/portfolio.stream.07/)\n- [portfolio.ui.01@1.0.0 — Element identity is unstable across updates](https://docs.swift-analyzer.com/catalog/portfolio.ui.01/)\n- [portfolio.ui.02@1.0.0 — Distinct elements share one identity](https://docs.swift-analyzer.com/catalog/portfolio.ui.02/)\n- [portfolio.ui.03@1.0.0 — View computation causes a state-update cycle](https://docs.swift-analyzer.com/catalog/portfolio.ui.03/)\n- [portfolio.ui.04@1.0.0 — One-time state does not update with required input](https://docs.swift-analyzer.com/catalog/portfolio.ui.04/)\n- [portfolio.change.01@1.0.0 — Source API change breaks an admitted consumer](https://docs.swift-analyzer.com/catalog/portfolio.change.01/)\n- [portfolio.change.02@1.0.0 — ABI change breaks binary compatibility](https://docs.swift-analyzer.com/catalog/portfolio.change.02/)\n- [portfolio.change.03@1.0.0 — Existing signature gains incompatible behavior](https://docs.swift-analyzer.com/catalog/portfolio.change.03/)\n- [portfolio.change.04@1.0.0 — Consumer silently binds to a different symbol](https://docs.swift-analyzer.com/catalog/portfolio.change.04/)\n- [portfolio.change.05@1.0.0 — Version range admits an incompatible provider](https://docs.swift-analyzer.com/catalog/portfolio.change.05/)\n- [portfolio.change.06@1.0.0 — Change bypasses required consumer review](https://docs.swift-analyzer.com/catalog/portfolio.change.06/)\n- [portfolio.change.07@1.0.0 — Comparable resource bound regresses](https://docs.swift-analyzer.com/catalog/portfolio.change.07/)\n- [portfolio.change.08@1.0.0 — Cache key or invalidation omits a result dependency](https://docs.swift-analyzer.com/catalog/portfolio.change.08/)\n","anchors":["rules","availability-in-source-scan","complete-catalog"],"verifiedAt":"2026-09-11","profile":{"os":"macOS 26","architecture":"arm64","swift":"Apple Swift 6.3.3","profileID":"apple-swift-6.3.3-macos-arm64"},"historicalEvidence":{"revision":"4558458d","acceptedConditions":33,"totalConditions":141,"relationship":"Historical bounded evidence only; not requalified or inherited by the product snapshot."},"counts":{"rules":138,"conditions":141,"default":9,"optIn":2,"unavailable":130},"examples":[{"id":"positive","status":"degraded","exitCode":3,"admittedSourceCount":2,"findingCount":2,"unknownObservationCount":2,"reportSHA256":"25ecd3c558e91083b95a9b7087f4a08d4bb15bd41599258734801444346603cb","sourceUrl":"https://docs.swift-analyzer.com/examples/positive/","reportUrl":"https://docs.swift-analyzer.com/examples/positive/observed.json"},{"id":"control","status":"degraded","exitCode":3,"admittedSourceCount":2,"findingCount":0,"unknownObservationCount":3,"reportSHA256":"00b0067920bef49eef5ba1147afcc123d07b595122bea22de80d6e8d0870077e","sourceUrl":"https://docs.swift-analyzer.com/examples/control/","reportUrl":"https://docs.swift-analyzer.com/examples/control/observed.json"},{"id":"incomplete","status":"unavailable","exitCode":3,"admittedSourceCount":0,"findingCount":0,"unknownObservationCount":0,"reportSHA256":"32c30da5ed250ab138e3f5f16d1f2d2ad8737a0b21414d3320b9372f5f5dd4ce","sourceUrl":"https://docs.swift-analyzer.com/examples/incomplete/","reportUrl":"https://docs.swift-analyzer.com/examples/incomplete/observed.json"}],"rules":[{"ruleId":"repository-unused@1.0.0","slug":"repository-unused","title":"Unused declaration or declaration group","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-01","title":"Unused declaration or declaration group","kind":"Contract violation","kindCode":"P","family":"ARCH","description":"Unused declaration or declaration group. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Unused declaration or declaration group. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A private pricing helper remains in the selected product after its last caller was removed.","afterProse":"Remove the helper only after checking references, runtime registration and all shipping variants. Keep it if an admitted entry point still reaches it."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/repository-unused/","markdownUrl":"https://docs.swift-analyzer.com/catalog/repository-unused/index.md"},{"ruleId":"architecture.production-used-only-by-tests@1.0.0","slug":"architecture.production-used-only-by-tests","title":"Production code used only by tests","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-02","title":"Production code used only by tests","kind":"Contract violation","kindCode":"P","family":"ARCH","description":"Production code used only by tests. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Production code used only by tests. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A fixture factory ships in the application even though only the test target calls it.","afterProse":"Move the factory into the test target and update test imports. First confirm that no shipping target or generated registration uses it."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/architecture.production-used-only-by-tests/","markdownUrl":"https://docs.swift-analyzer.com/catalog/architecture.production-used-only-by-tests/index.md"},{"ruleId":"architecture.forbidden-dependency@1.0.0","slug":"architecture.forbidden-dependency","title":"Forbidden dependency or layer bypass","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-03","title":"Forbidden dependency or layer bypass","kind":"Contract violation","kindCode":"P","family":"ARCH","description":"Forbidden dependency or layer bypass. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Forbidden dependency or layer bypass. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A UI target imports DatabaseDriver directly even though the project policy requires UI to use the Repository boundary.","afterProse":"Route the UI operation through the allowed Repository interface and remove the direct UI-to-DatabaseDriver dependency. Check transitive and generated dependencies against the same policy."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/architecture.forbidden-dependency/","markdownUrl":"https://docs.swift-analyzer.com/catalog/architecture.forbidden-dependency/index.md"},{"ruleId":"api.access-narrowing@1.0.0","slug":"api.access-narrowing","title":"Excessive API visibility","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-04","title":"Excessive API visibility","kind":"Improvement opportunity","kindCode":"O","family":"ARCH","description":"Excessive API visibility. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Excessive API visibility. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"public struct InternalCache { }","after":"internal struct InternalCache { }","action":"Inspect the consumers, runtime registrations and selected build variants before removing or narrowing an API. Preserve externally observable behavior.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/api.access-narrowing/","markdownUrl":"https://docs.swift-analyzer.com/catalog/api.access-narrowing/index.md"},{"ruleId":"architecture.unused-product-dependency@1.0.0","slug":"architecture.unused-product-dependency","title":"Unused product dependency","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-05","title":"Unused product dependency","kind":"Improvement opportunity","kindCode":"O","family":"ARCH","description":"Unused product dependency. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Unused product dependency. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Package.swift lists ImageCodec for a product that no longer imports or links it.","afterProse":"Remove the unused product dependency from the affected target, then build the admitted variants. Check resources, plugins and runtime loading before treating an absent source import as sufficient evidence."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/architecture.unused-product-dependency/","markdownUrl":"https://docs.swift-analyzer.com/catalog/architecture.unused-product-dependency/index.md"},{"ruleId":"architecture.undeclared-direct-provider@1.0.0","slug":"architecture.undeclared-direct-provider","title":"Undeclared direct provider","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-06","title":"Undeclared direct provider","kind":"Contract violation","kindCode":"P","family":"ARCH","description":"Undeclared direct provider. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Undeclared direct provider. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Feature imports Networking through a transitive dependency but does not declare the provider directly.","afterProse":"Declare the intended Networking product on Feature, or remove the import if it is redundant. Resolve the exact provider rather than adding an unrelated module with the same name."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/architecture.undeclared-direct-provider/","markdownUrl":"https://docs.swift-analyzer.com/catalog/architecture.undeclared-direct-provider/index.md"},{"ruleId":"architecture.dependency-cycle@1.0.0","slug":"architecture.dependency-cycle","title":"Disallowed component cycle","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-07","title":"Disallowed component cycle","kind":"Contract violation","kindCode":"P","family":"ARCH","description":"Disallowed component cycle. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Disallowed component cycle. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"FeatureA depends on FeatureB, which depends back on FeatureA despite an acyclic layer policy.","afterProse":"Move the shared interface into an allowed lower-level module and make both features depend on it. Recheck the complete component graph; moving an import alone may leave another cycle."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/architecture.dependency-cycle/","markdownUrl":"https://docs.swift-analyzer.com/catalog/architecture.dependency-cycle/index.md"},{"ruleId":"api.implementation-type-leakage@1.0.0","slug":"api.implementation-type-leakage","title":"Implementation type exposed through an API","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-08","title":"Implementation type exposed through an API","kind":"Contract violation","kindCode":"P","family":"ARCH","description":"Implementation type exposed through an API. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Implementation type exposed through an API. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"public func load() -> DatabaseRow { /* ... */ }","after":"public func load() -> UserDTO { /* ... */ }","action":"Inspect the consumers, runtime registrations and selected build variants before removing or narrowing an API. Preserve externally observable behavior.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/api.implementation-type-leakage/","markdownUrl":"https://docs.swift-analyzer.com/catalog/api.implementation-type-leakage/index.md"},{"ruleId":"architecture.registration-contract-mismatch@1.0.0","slug":"architecture.registration-contract-mismatch","title":"Incompatible registration or entry point","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-09","title":"Incompatible registration or entry point","kind":"Defect","kindCode":"D","family":"ARCH","description":"Incompatible registration or entry point. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Incompatible registration or entry point. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A shipping registration names a handler whose signature no longer matches the runtime entry-point contract.","afterProse":"Update the registration and handler together, preserving the expected name, signature and lifetime. Exercise the actual registration path in each admitted shipping variant."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/architecture.registration-contract-mismatch/","markdownUrl":"https://docs.swift-analyzer.com/catalog/architecture.registration-contract-mismatch/index.md"},{"ruleId":"portfolio.arch.10@1.0.0","slug":"portfolio.arch.10","title":"Required resource missing from a shipping variant","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-10","title":"Required resource missing from a shipping variant","kind":"Defect","kindCode":"D","family":"ARCH","description":"Required resource missing from a shipping variant. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"Accepted scope: literal resource lookup in a bounded SwiftPM package, with copied-resource provenance and generated accessors checked against the build. Required lookup is distinct from optional or fallback lookup. Arbitrary bundles and dynamic paths are outside this scope."},"explanation":{"purpose":"Required resource missing from a shipping variant. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A shipping feature loads template.txt but its selected bundle does not include that resource.","afterProse":"Include the resource in the correct target bundle and shipping variant, or remove the feature path that requires it. Verify the exact resource name and bundle identity."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.arch.10/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.arch.10/index.md"},{"ruleId":"portfolio.arch.11@1.0.0","slug":"portfolio.arch.11","title":"Parameter unused across its dispatch family","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-11","title":"Parameter unused across its dispatch family","kind":"Improvement opportunity","kindCode":"O","family":"ARCH","description":"Parameter unused across its dispatch family. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"Accepted scope: private singleton free functions in a closed supported consumer world. This does not claim generalized analysis of every Swift parameter."},"explanation":{"purpose":"Parameter unused across its dispatch family. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"private func price(_ discount: Int) -> Int { 100 }\npublic func total() -> Int { price(20) }","after":"private func price() -> Int { 100 }\npublic func total() -> Int { price() }","action":"Inspect the consumers, runtime registrations and selected build variants before removing or narrowing an API. Preserve externally observable behavior.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.arch.11/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.arch.11/index.md"},{"ruleId":"portfolio.arch.12@1.0.0","slug":"portfolio.arch.12","title":"Property is written but never observed","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-12","title":"Property is written but never observed","kind":"Improvement opportunity","kindCode":"O","family":"ARCH","description":"Property is written but never observed. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"Accepted scope: owned Int fields and closed source uses. Arbitrary reference effects and open-world consumers remain outside the boundary."},"explanation":{"purpose":"Property is written but never observed. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"private struct State { var cached: Int = 0 }\nprivate func consume(_: State) {}\npublic func entry() {\n    var state = State(); state.cached = 2; consume(state)\n}","after":"private struct State {}\nprivate func consume(_: State) {}\npublic func entry() { consume(State()) }","action":"Inspect the consumers, runtime registrations and selected build variants before removing or narrowing an API. Preserve externally observable behavior.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.arch.12/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.arch.12/index.md"},{"ruleId":"portfolio.arch.13@1.0.0","slug":"portfolio.arch.13","title":"Redundant protocol or conformance","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-13","title":"Redundant protocol or conformance","kind":"Improvement opportunity","kindCode":"O","family":"ARCH","description":"Redundant protocol or conformance. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"Accepted scope: private marker protocols in a closed supported world, including erasure and inherited roles. This is not authorization to remove conformances in bulk."},"explanation":{"purpose":"Redundant protocol or conformance. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"private protocol Marker {}\nprivate struct State: Marker { var value: Int = 0 }","after":"private struct State { var value: Int = 0 }","action":"Inspect the consumers, runtime registrations and selected build variants before removing or narrowing an API. Preserve externally observable behavior.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.arch.13/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.arch.13/index.md"},{"ruleId":"portfolio.arch.14@1.0.0","slug":"portfolio.arch.14","title":"Semantically redundant import","family":"ARCH","familyTitle":"Architecture and reachability","conditions":[{"conditionId":"V-ARCH-14","title":"Semantically redundant import","kind":"Improvement opportunity","kindCode":"O","family":"ARCH","description":"Semantically redundant import. It examines repository-wide reachability, dependencies, resources, and API boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"Accepted scope: a private or internal Foundation import. Independent builds compare complete compiler bindings with the same Package.swift before and after removal. A changed binding is a hard negative; unsupported grammar remains unknown."},"explanation":{"purpose":"Semantically redundant import. It examines repository-wide reachability, dependencies, resources, and API boundaries.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"private import Foundation\npublic func value() -> Swift.Int { 1 }","after":"public func value() -> Swift.Int { 1 }","action":"Inspect the consumers, runtime registrations and selected build variants before removing or narrowing an API. Preserve externally observable behavior.","method":"Intended reasoning: Model declarations, uses and entry points as a graph. A dependency or visibility decision needs the relevant consumers and build variants; an absence claim additionally needs a closed, complete graph. Required evidence: reachability, dependency, resource, and API-boundary facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.arch.14/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.arch.14/index.md"},{"ruleId":"concurrency.incompatible-isolation@1.0.0","slug":"concurrency.incompatible-isolation","title":"Call crosses incompatible isolation","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-01","title":"Call crosses incompatible isolation","kind":"Defect","kindCode":"D","family":"EXEC","description":"Call crosses incompatible isolation. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"default","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Call crosses incompatible isolation. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"legacy.onValue = { model.updateUI() }","after":"legacy.onValue = { value in\n    Task { @MainActor in model.updateUI(value) }\n}","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"The selected execution evaluator compares recognized source/SDK context facts with the condition’s required context. Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. The [Swift concurrency guide](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html) explains the underlying language concepts. Registration establishes selection, not coverage of this illustrative example.","boundary":"The current workflow recognizes bounded source forms. An unresolved required context, callback contract, resource domain or thread-affinity fact can remain unknown. A condition with no supported observations is reported as no-observations, not as proof that all uses are valid."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.incompatible-isolation/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.incompatible-isolation/index.md"},{"ruleId":"concurrency.unproven-mainactor-entry@1.0.0","slug":"concurrency.unproven-mainactor-entry","title":"MainActor entry without a proven context","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-02","title":"MainActor entry without a proven context","kind":"Review signal","kindCode":"W","family":"EXEC","description":"MainActor entry without a proven context. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"default","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"MainActor entry without a proven context. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"foreignAPI.callback = { renderUI() }","after":"foreignAPI.callback = { event in\n    Task { @MainActor in renderUI(event) }\n}","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"The selected execution evaluator compares recognized source/SDK context facts with the condition’s required context. Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. The [Swift concurrency guide](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html) explains the underlying language concepts. Registration establishes selection, not coverage of this illustrative example.","boundary":"The current workflow recognizes bounded source forms. An unresolved required context, callback contract, resource domain or thread-affinity fact can remain unknown. A condition with no supported observations is reported as no-observations, not as proof that all uses are valid."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.unproven-mainactor-entry/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.unproven-mainactor-entry/index.md"},{"ruleId":"concurrency.detached-task-context-loss@1.0.0","slug":"concurrency.detached-task-context-loss","title":"Required context lost through detachment","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-03","title":"Required context lost through detachment","kind":"Contract violation","kindCode":"P","family":"EXEC","description":"A detached task can lose the execution context required by an operation it calls. The tutorial asks for a MainActor context inside the detached task.","workflow":"source-scan","availability":"default","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"A detached task can lose the execution context required by an operation it calls. The tutorial asks for a MainActor context inside the detached task.","exampleLabel":"Reproduced as part of the first-analysis package at product 524fa07e on Apple Swift 6.3.3, macOS arm64. The complete package and command are in [First analysis](/get-started/first-analysis/).","before":"func requireMain() { MainActor.assumeIsolated {} }\n@MainActor func check() { Task.detached { requireMain() } }","after":"func requireMain() { MainActor.assumeIsolated {} }\n@MainActor func check() { requireMain() }","action":"The control removes detachment and calls the operation directly from the MainActor function. The finding disappears in this example, but other observations remain unknown and the full report is still degraded.","method":"The extractor recognizes the MainActor origin, detached-task transition and required MainActor operation, and binds them to admitted source evidence. The context lost through that transition supplies the witness. [Structured concurrency](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0304-structured-concurrency.md) defines the relevant task-context distinction. This implementation claim is limited to the reproduced source form.","boundary":"The current workflow recognizes bounded source forms. An unresolved required context, callback contract, resource domain or thread-affinity fact can remain unknown. A condition with no supported observations is reported as no-observations, not as proof that all uses are valid."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.detached-task-context-loss/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.detached-task-context-loss/index.md"},{"ruleId":"concurrency.dispatch-isolation-mismatch@1.0.0","slug":"concurrency.dispatch-isolation-mismatch","title":"Callback runs in an incompatible scheduler context","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-04","title":"Callback runs in an incompatible scheduler context","kind":"Defect","kindCode":"D","family":"EXEC","description":"Callback runs in an incompatible scheduler context. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"default","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Callback runs in an incompatible scheduler context. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"workerQueue.async {\n    legacyView.setNeedsLayout()\n}","after":"Task { @MainActor in\n    legacyView.setNeedsLayout()\n}","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"The selected execution evaluator compares recognized source/SDK context facts with the condition’s required context. Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. The [Swift concurrency guide](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html) explains the underlying language concepts. Registration establishes selection, not coverage of this illustrative example.","boundary":"The current workflow recognizes bounded source forms. An unresolved required context, callback contract, resource domain or thread-affinity fact can remain unknown. A condition with no supported observations is reported as no-observations, not as proof that all uses are valid."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.dispatch-isolation-mismatch/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.dispatch-isolation-mismatch/index.md"},{"ruleId":"portfolio.exec.05@1.0.0","slug":"portfolio.exec.05","title":"Invalid isolation assumption","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-05","title":"Invalid isolation assumption","kind":"Defect","kindCode":"D","family":"EXEC","description":"Invalid isolation assumption. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"default","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Invalid isolation assumption. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"backgroundCallback {\n    MainActor.assumeIsolated { updateView() }\n}","after":"backgroundCallback {\n    Task { @MainActor in updateView() }\n}","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"The selected execution evaluator compares recognized source/SDK context facts with the condition’s required context. Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. The [Swift concurrency guide](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html) explains the underlying language concepts. Registration establishes selection, not coverage of this illustrative example.","boundary":"The current workflow recognizes bounded source forms. An unresolved required context, callback contract, resource domain or thread-affinity fact can remain unknown. A condition with no supported observations is reported as no-observations, not as proof that all uses are valid."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.05/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.05/index.md"},{"ruleId":"portfolio.exec.06@1.0.0","slug":"portfolio.exec.06","title":"Resource used outside its execution domain","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-06","title":"Resource used outside its execution domain","kind":"Defect","kindCode":"D","family":"EXEC","description":"Resource used outside its execution domain. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"default","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Resource used outside its execution domain. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"Task.detached { use(object) }","after":"await context.perform {\n\n    useLocalObject()\n}","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"The selected execution evaluator compares recognized source/SDK context facts with the condition’s required context. Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. The [Swift concurrency guide](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html) explains the underlying language concepts. Registration establishes selection, not coverage of this illustrative example.","boundary":"The current workflow recognizes bounded source forms. An unresolved required context, callback contract, resource domain or thread-affinity fact can remain unknown. A condition with no supported observations is reported as no-observations, not as proof that all uses are valid."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.06/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.06/index.md"},{"ruleId":"portfolio.exec.07@1.0.0","slug":"portfolio.exec.07","title":"Thread-affine value survives a suspension","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-07","title":"Thread-affine value survives a suspension","kind":"Defect","kindCode":"D","family":"EXEC","description":"Thread-affine value survives a suspension. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"default","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Thread-affine value survives a suspension. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let handle = acquireThreadLocalHandle()\nawait load()\nuse(handle)","after":"await load()\nwithThreadLocalHandle { handle in\n    use(handle)\n}","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"The selected execution evaluator compares recognized source/SDK context facts with the condition’s required context. Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. The [Swift concurrency guide](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html) explains the underlying language concepts. Registration establishes selection, not coverage of this illustrative example.","boundary":"The current workflow recognizes bounded source forms. An unresolved required context, callback contract, resource domain or thread-affinity fact can remain unknown. A condition with no supported observations is reported as no-observations, not as proof that all uses are valid."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.07/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.07/index.md"},{"ruleId":"portfolio.exec.08@1.0.0","slug":"portfolio.exec.08","title":"Required task-local value or executor preference is lost","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-08","title":"Required task-local value or executor preference is lost","kind":"Contract violation","kindCode":"P","family":"EXEC","description":"Required task-local value or executor preference is lost. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"default","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Required task-local value or executor preference is lost. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"bridge { Task.detached { readRequiredContext() } }","after":"let context = captureRequiredContext()\nbridge {\n    Task.detached { useExplicitContext(context) }\n}","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"The selected execution evaluator compares recognized source/SDK context facts with the condition’s required context. Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. The [Swift concurrency guide](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html) explains the underlying language concepts. Registration establishes selection, not coverage of this illustrative example.","boundary":"The current workflow recognizes bounded source forms. An unresolved required context, callback contract, resource domain or thread-affinity fact can remain unknown. A condition with no supported observations is reported as no-observations, not as proof that all uses are valid."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.08/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.08/index.md"},{"ruleId":"concurrency.main-actor-blocking@1.0.0","slug":"concurrency.main-actor-blocking","title":"Blocking call on a critical executor","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-09","title":"Blocking call on a critical executor","kind":"Contract violation","kindCode":"P","family":"EXEC","description":"Blocking call on a critical executor. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"execution.blocking-in-concurrency-context","condition":"V-EXEC-09","description":"Blocking call in an explicit concurrency context"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Blocking call on a critical executor. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"@MainActor func refresh() {\n    Thread.sleep(forTimeInterval: 2)\n}","after":"@MainActor func refresh() async throws {\n    try await Task.sleep(for: .seconds(2))\n}","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"Intended reasoning: Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. Required evidence: isolation, executor, scheduler, and path facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.main-actor-blocking/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.main-actor-blocking/index.md"},{"ruleId":"portfolio.exec.10@1.0.0","slug":"portfolio.exec.10","title":"Expensive computation on a critical executor","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-10","title":"Expensive computation on a critical executor","kind":"Improvement opportunity","kindCode":"O","family":"EXEC","description":"Expensive computation on a critical executor. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Expensive computation on a critical executor. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"@MainActor func refresh() {\n    viewState = decodeHugePayload(payload)\n}","after":"let decoded = await decoder.decode(payload)\nawait present(decoded)","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"Intended reasoning: Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. Required evidence: isolation, executor, scheduler, and path facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.10/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.10/index.md"},{"ruleId":"portfolio.exec.11@1.0.0","slug":"portfolio.exec.11","title":"Removable scheduling boundary","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-11","title":"Removable scheduling boundary","kind":"Improvement opportunity","kindCode":"O","family":"EXEC","description":"Removable scheduling boundary. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Removable scheduling boundary. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"@MainActor func update() {\n    Task { @MainActor in render() }\n}","after":"@MainActor func update() {\n    render()\n}","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"Intended reasoning: Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. Required evidence: isolation, executor, scheduler, and path facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.11/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.11/index.md"},{"ruleId":"portfolio.exec.12@1.0.0","slug":"portfolio.exec.12","title":"Cost amplified by actor crossings","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-12","title":"Cost amplified by actor crossings","kind":"Improvement opportunity","kindCode":"O","family":"EXEC","description":"Cost amplified by actor crossings. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Cost amplified by actor crossings. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"for value in values {\n    await store.insert(value)\n}","after":"await store.insertBatch(values)","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"Intended reasoning: Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. Required evidence: isolation, executor, scheduler, and path facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.12/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.12/index.md"},{"ruleId":"portfolio.exec.13@1.0.0","slug":"portfolio.exec.13","title":"Independent work is unintentionally serialized","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-13","title":"Independent work is unintentionally serialized","kind":"Improvement opportunity","kindCode":"O","family":"EXEC","description":"Independent work is unintentionally serialized. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Independent work is unintentionally serialized. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let a = await loadA()\nlet b = await loadB()\nshow(a, b)","after":"async let a = loadA()\nasync let b = loadB()\nawait show(a, b)","action":"Make the required context explicit at the boundary. Review ordering, lifetime and transferred values before adding a task or changing isolation.","method":"Intended reasoning: Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. Required evidence: isolation, executor, scheduler, and path facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.13/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.13/index.md"},{"ruleId":"portfolio.exec.14@1.0.0","slug":"portfolio.exec.14","title":"Custom SerialExecutor violates serialization","family":"EXEC","familyTitle":"Isolation and executors","conditions":[{"conditionId":"V-EXEC-14","title":"Custom SerialExecutor violates serialization","kind":"Defect","kindCode":"D","family":"EXEC","description":"Custom SerialExecutor violates serialization. It examines isolation, executor, scheduler, and execution-domain relationships.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Custom SerialExecutor violates serialization. It examines isolation, executor, scheduler, and execution-domain relationships.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Compare the required execution or isolation context with recognized context transitions and use sites. Actor context, task context and physical thread identity are different facts; suspension alone does not prove a thread hop. Required evidence: isolation, executor, scheduler, and path facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A custom SerialExecutor dispatches two accepted jobs onto workers that can run them simultaneously.","afterProse":"Arrange a single serialized execution domain for those jobs, and preserve the executor identity used by isolation checks. Validate ordering, reentrancy and shutdown; a queue name alone does not prove serialization."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.14/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.exec.14/index.md"},{"ruleId":"concurrency.state-freshness-across-suspension@1.0.0","slug":"concurrency.state-freshness-across-suspension","title":"State check becomes stale across await","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-01","title":"State check becomes stale across await","kind":"Defect","kindCode":"D","family":"ASYNC","description":"State check becomes stale across await. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"async.actor-state-check-before-await","condition":"V-ASYNC-01","description":"Actor state check may be stale after suspension"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"State check becomes stale across await. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"guard balance >= amount else { return }\nawait authorize()\nbalance -= amount","after":"await authorize()\nguard balance >= amount else { return }\nbalance -= amount","action":"Make the lifecycle or state transition explicit. Review cancellation, suspension and error paths before applying the illustrative change.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.state-freshness-across-suspension/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.state-freshness-across-suspension/index.md"},{"ruleId":"concurrency.actor-invariant-exposure@1.0.0","slug":"concurrency.actor-invariant-exposure","title":"Broken invariant is observable during suspension","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-02","title":"Broken invariant is observable during suspension","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Broken invariant is observable during suspension. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Broken invariant is observable during suspension. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"debit(source)\nawait notifyRemote()\ncredit(destination)","after":"debit(source)\ncredit(destination)\nawait notifyRemote()","action":"Make the lifecycle or state transition explicit. Review cancellation, suspension and error paths before applying the illustrative change.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.actor-invariant-exposure/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.actor-invariant-exposure/index.md"},{"ruleId":"concurrency.obsolete-generation-commit@1.0.0","slug":"concurrency.obsolete-generation-commit","title":"Stale result overwrites a newer generation","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-03","title":"Stale result overwrites a newer generation","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Stale result overwrites a newer generation. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Stale result overwrites a newer generation. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let result = await search(query)\nstate.results = result","after":"let revision = generation\nlet result = await search(query)\nguard revision == generation else { return }\nstate.results = result","action":"Make the lifecycle or state transition explicit. Review cancellation, suspension and error paths before applying the illustrative change.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.obsolete-generation-commit/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.obsolete-generation-commit/index.md"},{"ruleId":"portfolio.async.04@1.0.0","slug":"portfolio.async.04","title":"Operation requiring single-flight starts more than once","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-04","title":"Operation requiring single-flight starts more than once","kind":"Contract violation","kindCode":"P","family":"ASYNC","description":"Operation requiring single-flight starts more than once. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Operation requiring single-flight starts more than once. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Two actor calls miss the same cache entry, suspend in fetch, and start duplicate work for the same key.","afterProse":"Record the in-flight operation before the first suspension and let subsequent callers join it. Define who cancels shared work, how errors clear the entry and how completion avoids deleting a newer generation."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.04/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.04/index.md"},{"ruleId":"portfolio.async.05@1.0.0","slug":"portfolio.async.05","title":"Code depends on an unspecified actor-task order","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-05","title":"Code depends on an unspecified actor-task order","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Code depends on an unspecified actor-task order. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Code depends on an unspecified actor-task order. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"Task { await actor.set(value) }\nTask { await actor.readAndPublish() }","after":"await actor.set(value)\nawait actor.readAndPublish()","action":"Make the lifecycle or state transition explicit. Review cancellation, suspension and error paths before applying the illustrative change.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.05/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.05/index.md"},{"ruleId":"concurrency.lost-continuation-resume@1.0.0","slug":"concurrency.lost-continuation-resume","title":"Continuation can finish without resume","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-06","title":"Continuation can finish without resume","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Continuation can finish without resume. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Continuation can finish without resume. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"await withCheckedContinuation { c in\n    api { value in\n        if let value { c.resume(returning: value) }\n    }\n}","after":"await withCheckedContinuation { c in\n    api { value in c.resume(returning: value) }\n}","action":"Make the lifecycle or state transition explicit. Review cancellation, suspension and error paths before applying the illustrative change.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.lost-continuation-resume/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.lost-continuation-resume/index.md"},{"ruleId":"concurrency.double-continuation-resume@1.0.0","slug":"concurrency.double-continuation-resume","title":"Continuation can resume more than once","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-07","title":"Continuation can resume more than once","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Continuation can resume more than once. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"async.continuation-double-resume","condition":"V-ASYNC-07","description":"Continuation may be resumed twice"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Continuation can resume more than once. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A success callback and a timeout both retain the same continuation and can each resume it.","afterProse":"Give completion a single synchronized owner that atomically chooses the winning outcome. Resume once outside the protected state transition and release the losing callbacks; include cancellation in the same protocol."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.double-continuation-resume/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.double-continuation-resume/index.md"},{"ruleId":"concurrency.cancel-register-start-race@1.0.0","slug":"concurrency.cancel-register-start-race","title":"Cancellation is lost between registration and start","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-08","title":"Cancellation is lost between registration and start","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Cancellation is lost between registration and start. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Cancellation is lost between registration and start. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Cancellation arrives before an operation handle is stored, so the cancellation callback has nothing to cancel and start proceeds afterward.","afterProse":"Keep cancelled, starting and started states under one synchronization protocol. A start that observes prior cancellation must not escape it; registering a handle after cancellation must immediately follow the defined cancellation path."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.cancel-register-start-race/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.cancel-register-start-race/index.md"},{"ruleId":"concurrency.cancelled-forbidden-effect@1.0.0","slug":"concurrency.cancelled-forbidden-effect","title":"Forbidden commit after cancellation or rejection","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-09","title":"Forbidden commit after cancellation or rejection","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Forbidden commit after cancellation or rejection. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Forbidden commit after cancellation or rejection. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let result = await compute()\ncommit(result)","after":"let result = await compute()\ntry Task.checkCancellation()\ncommit(result)","action":"Make the lifecycle or state transition explicit. Review cancellation, suspension and error paths before applying the illustrative change.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.cancelled-forbidden-effect/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.cancelled-forbidden-effect/index.md"},{"ruleId":"concurrency.unresponsive-cancellation-work@1.0.0","slug":"concurrency.unresponsive-cancellation-work","title":"Work does not honor its cancellation contract","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-10","title":"Work does not honor its cancellation contract","kind":"Contract violation","kindCode":"P","family":"ASYNC","description":"Work does not honor its cancellation contract. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"async.swallowed-task-sleep-cancellation-loop","condition":"V-ASYNC-10","description":"Cancellation from Task.sleep is swallowed in an unconditional loop"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Work does not honor its cancellation contract. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"while true {\n    try? await Task.sleep(for: .milliseconds(100))\n    poll()\n}","after":"while true {\n    try Task.checkCancellation()\n    try await Task.sleep(for: .milliseconds(100))\n    poll()\n}","action":"In this async throwing context, propagate cancellation instead of suppressing the error from Task.sleep. The surrounding caller must preserve that cancellation path. The experimental selector recognizes the swallowed-sleep loop form; cancellation responsiveness inside poll still depends on its implementation.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.unresponsive-cancellation-work/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.unresponsive-cancellation-work/index.md"},{"ruleId":"concurrency.timeout-sibling-outlives-race@1.0.0","slug":"concurrency.timeout-sibling-outlives-race","title":"Timeout or first result does not finish its scope","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-11","title":"Timeout or first result does not finish its scope","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Timeout or first result does not finish its scope. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Timeout or first result does not finish its scope. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A timeout wins a task-group race, but a losing child waits forever and the group scope cannot finish.","afterProse":"Ensure losing operations cooperate with cancellation or otherwise have a bounded completion path. Calling cancelAll alone does not make an uncooperative child finish."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.timeout-sibling-outlives-race/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.timeout-sibling-outlives-race/index.md"},{"ruleId":"concurrency.task-outlives-scope@1.0.0","slug":"concurrency.task-outlives-scope","title":"Task outlives its required lifecycle scope","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-12","title":"Task outlives its required lifecycle scope","kind":"Contract violation","kindCode":"P","family":"ASYNC","description":"Task outlives its required lifecycle scope. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Task outlives its required lifecycle scope. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"func start() {\n    Task { await pollForever() }\n}","after":"func start() {\n    pollingTask = Task { await pollUntilCancelled() }\n}\nfunc stop() { pollingTask?.cancel() }","action":"Make the lifecycle or state transition explicit. Review cancellation, suspension and error paths before applying the illustrative change.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.task-outlives-scope/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.task-outlives-scope/index.md"},{"ruleId":"portfolio.async.13@1.0.0","slug":"portfolio.async.13","title":"Required task result or error is lost","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-13","title":"Required task result or error is lost","kind":"Contract violation","kindCode":"P","family":"ASYNC","description":"Required task result or error is lost. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Required task result or error is lost. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"Task { try await saveRequiredData() }\nshowSuccess()","after":"do {\n    try await saveRequiredData()\n    showSuccess()\n} catch { showFailure(error) }","action":"Make the lifecycle or state transition explicit. Review cancellation, suspension and error paths before applying the illustrative change.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.13/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.13/index.md"},{"ruleId":"concurrency.guard-held-across-suspension@1.0.0","slug":"concurrency.guard-held-across-suspension","title":"Guard is held across a disallowed await","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-14","title":"Guard is held across a disallowed await","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Holding a synchronous guard across an await can violate its allowed suspension or thread-affinity contract and prevent other work from making progress.","workflow":"source-scan","availability":"default","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Holding a synchronous guard across an await can violate its allowed suspension or thread-affinity contract and prevent other work from making progress.","exampleLabel":"Reproduced as part of the first-analysis package at product 524fa07e on Apple Swift 6.3.3, macOS arm64. Read the [complete example](/get-started/first-analysis/) before running it.","before":"import Foundation\nprivate let gate = NSLock()\nprivate func enter() { gate.lock() }\nprivate func leave() { gate.unlock() }\nfunc perform() async { enter(); await Task.yield(); leave() }","after":"import Foundation\nprivate let gate = NSLock()\nprivate func enter() { gate.lock() }\nprivate func leave() { gate.unlock() }\nfunc perform() async { enter(); leave(); await Task.yield() }","action":"The control releases the guard before suspension. In a real application, copy the necessary state under the guard and revalidate it before applying a later result. Moving release is not safe if the operation requires a stronger state protocol.","method":"The check follows recognized guard acquisition, suspension and release events in an admitted trace. An acquired guard that survives the disallowed suspension supplies a witness. The tutorial produces one such finding and also an incomplete trace; both are preserved in the degraded report.","boundary":"The source mapper does not model every lock wrapper or synchronization primitive. Missing events, unclear guard identity or an incomplete trace preserve unknown. A witness in one trace does not establish completeness of another trace."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.guard-held-across-suspension/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.guard-held-across-suspension/index.md"},{"ruleId":"concurrency.sole-producer-self-block@1.0.0","slug":"concurrency.sole-producer-self-block","title":"Wait cycle blocks required producers","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-15","title":"Wait cycle blocks required producers","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Wait cycle blocks required producers. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Wait cycle blocks required producers. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A task blocks a serial executor waiting for a callback that must run on that same executor.","afterProse":"Replace the blocking wait with an asynchronous handoff that lets the executor run the producer. Reconstruct the whole wait cycle before changing queues; another dependency can preserve the deadlock."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/concurrency.sole-producer-self-block/","markdownUrl":"https://docs.swift-analyzer.com/catalog/concurrency.sole-producer-self-block/index.md"},{"ruleId":"portfolio.async.16@1.0.0","slug":"portfolio.async.16","title":"Synchronous waits exhaust the cooperative pool","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-16","title":"Synchronous waits exhaust the cooperative pool","kind":"Review signal","kindCode":"W","family":"ASYNC","description":"Synchronous waits exhaust the cooperative pool. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Synchronous waits exhaust the cooperative pool. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"Task {\n    semaphore.wait()\n\n}","after":"let result = await producer.value","action":"Make the lifecycle or state transition explicit. Review cancellation, suspension and error paths before applying the illustrative change.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.16/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.16/index.md"},{"ruleId":"portfolio.async.17@1.0.0","slug":"portfolio.async.17","title":"Priority inversion through opaque waiting","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-17","title":"Priority inversion through opaque waiting","kind":"Improvement opportunity","kindCode":"O","family":"ASYNC","description":"Priority inversion through opaque waiting. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Priority inversion through opaque waiting. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"High-priority work synchronously waits on low-priority work through an opaque synchronization mechanism.","afterProse":"Make the dependency explicit to a supported scheduling mechanism or redesign the handoff to avoid the blocking dependency. Measure the relevant latency and avoid assuming priority inheritance across an opaque wait."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.17/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.17/index.md"},{"ruleId":"portfolio.async.18@1.0.0","slug":"portfolio.async.18","title":"Shared-memory race across an unsafe or legacy boundary","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-18","title":"Shared-memory race across an unsafe or legacy boundary","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Shared-memory race across an unsafe or legacy boundary. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Shared-memory race across an unsafe or legacy boundary. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"Task.detached { box.count += 1 }\nTask.detached { box.count += 1 }","after":"actor Counter {\n    private var count = 0\n    func increment() { count += 1 }\n}\nlet counter = Counter()\nawait withTaskGroup(of: Void.self) { group in\n    group.addTask { await counter.increment() }\n    group.addTask { await counter.increment() }\n}","action":"Preserve both requested increments while moving all access to the mutable count behind the actor. The structured scope also waits for both tasks; that is a lifecycle change from detached work. Integrate ownership, reads and cancellation according to the caller contract, and do not leave another unsynchronized copy of the counter.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.18/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.18/index.md"},{"ruleId":"portfolio.async.19@1.0.0","slug":"portfolio.async.19","title":"Synchronous callback re-enters an unfinished protocol","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-19","title":"Synchronous callback re-enters an unfinished protocol","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Synchronous callback re-enters an unfinished protocol. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Synchronous callback re-enters an unfinished protocol. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A start API invokes its completion synchronously before the caller has stored the returned handle.","afterProse":"Initialize the protocol state before registering callbacks and make completion tolerate synchronous reentry. Define ownership of a handle returned after completion instead of reading an uninitialized handle."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.19/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.19/index.md"},{"ruleId":"portfolio.async.20@1.0.0","slug":"portfolio.async.20","title":"Custom executor loses or repeats a job","family":"ASYNC","familyTitle":"Tasks, reentrancy, and cancellation","conditions":[{"conditionId":"V-ASYNC-20","title":"Custom executor loses or repeats a job","kind":"Defect","kindCode":"D","family":"ASYNC","description":"Custom executor loses or repeats a job. It examines task ordering, suspension, cancellation, progress, and async obligations.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Custom executor loses or repeats a job. It examines task ordering, suspension, cancellation, progress, and async obligations.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow the relevant state, task or synchronization events across control-flow and suspension boundaries. The intended decision needs the complete event ordering and the operation contract; opaque events can leave the result unknown. Required evidence: task, suspension, cancellation, ordering, and progress facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A custom executor accepts a job, then a retry or shutdown path can run it twice or drop it.","afterProse":"Give each accepted job one explicit ownership transfer and one execution path. Reconcile enqueue, cancellation and shutdown states, and exercise both duplicate-delivery and lost-delivery paths."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.20/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.async.20/index.md"},{"ruleId":"lifetime.escaping-value@1.0.0","slug":"lifetime.escaping-value","title":"Borrowed pointer or view escapes its lifetime","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-01","title":"Borrowed pointer or view escapes its lifetime","kind":"Defect","kindCode":"D","family":"LIFE","description":"Borrowed pointer or view escapes its lifetime. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"lifetime.borrowed-pointer-escape","condition":"V-LIFE-01","description":"Borrowed buffer base address returned from its access closure"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Borrowed pointer or view escapes its lifetime. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let escaped = data.withUnsafeBytes { bytes in\n    bytes.baseAddress\n}\nuse(escaped)","after":"data.withUnsafeBytes { bytes in\n    use(bytes.baseAddress)\n}","action":"Keep the borrowed pointer inside the withUnsafeBytes access scope. Here use must finish synchronously and must not retain or return the pointer. The experimental selector recognizes the returned-baseAddress form; this illustration does not expand it to every pointer escape.","method":"Intended reasoning: Track the resource identity, ownership or valid extent through creation, transfer, use and cleanup events. The intended decision requires evidence that those events refer to the same object and that the relevant paths are covered. Required evidence: ownership, lifetime, allocation, and resource-state facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/lifetime.escaping-value/","markdownUrl":"https://docs.swift-analyzer.com/catalog/lifetime.escaping-value/index.md"},{"ruleId":"portfolio.life.02@1.0.0","slug":"portfolio.life.02","title":"Use after free","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-02","title":"Use after free","kind":"Defect","kindCode":"D","family":"LIFE","description":"Use after free. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Use after free. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"pointer.deallocate()\nconsume(pointer.pointee)","after":"consume(pointer.pointee)\npointer.deallocate()","action":"Review the owner, transfer points and every exit path. Keep cleanup obligations and the valid lifetime explicit; avoid introducing a second cleanup or extending an invalid borrow.","method":"Intended reasoning: Track the resource identity, ownership or valid extent through creation, transfer, use and cleanup events. The intended decision requires evidence that those events refer to the same object and that the relevant paths are covered. Required evidence: ownership, lifetime, allocation, and resource-state facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.02/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.02/index.md"},{"ruleId":"portfolio.life.03@1.0.0","slug":"portfolio.life.03","title":"Repeated or incompatible deallocation","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-03","title":"Repeated or incompatible deallocation","kind":"Defect","kindCode":"D","family":"LIFE","description":"Repeated or incompatible deallocation. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Repeated or incompatible deallocation. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let p = UnsafeMutablePointer<Int>.allocate(capacity: 1)\np.deallocate()\np.deallocate()","after":"let p = UnsafeMutablePointer<Int>.allocate(capacity: 1)\ndefer { p.deallocate() }","action":"Review the owner, transfer points and every exit path. Keep cleanup obligations and the valid lifetime explicit; avoid introducing a second cleanup or extending an invalid borrow.","method":"Intended reasoning: Track the resource identity, ownership or valid extent through creation, transfer, use and cleanup events. The intended decision requires evidence that those events refer to the same object and that the relevant paths are covered. Required evidence: ownership, lifetime, allocation, and resource-state facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.03/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.03/index.md"},{"ruleId":"portfolio.life.04@1.0.0","slug":"portfolio.life.04","title":"Unowned access after owner deallocation","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-04","title":"Unowned access after owner deallocation","kind":"Defect","kindCode":"D","family":"LIFE","description":"Unowned access after owner deallocation. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Unowned access after owner deallocation. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"registerLongLivedCallback { [unowned self] in\n    self.refresh()\n}","after":"registerLongLivedCallback { [weak self] in\n    self?.refresh()\n}","action":"Review the owner, transfer points and every exit path. Keep cleanup obligations and the valid lifetime explicit; avoid introducing a second cleanup or extending an invalid borrow.","method":"Intended reasoning: Track the resource identity, ownership or valid extent through creation, transfer, use and cleanup events. The intended decision requires evidence that those events refer to the same object and that the relevant paths are covered. Required evidence: ownership, lifetime, allocation, and resource-state facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.04/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.04/index.md"},{"ruleId":"lifetime.unmanaged-ownership-balance@1.0.0","slug":"lifetime.unmanaged-ownership-balance","title":"Unmanaged ownership imbalance","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-05","title":"Unmanaged ownership imbalance","kind":"Defect","kindCode":"D","family":"LIFE","description":"Unmanaged ownership imbalance. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Unmanaged ownership imbalance. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let token = Unmanaged.passRetained(object)","after":"let token = Unmanaged.passRetained(object)\ndefer { token.release() }\ncallSynchronousBorrowingAPI(token.toOpaque())","action":"Review the owner, transfer points and every exit path. Keep cleanup obligations and the valid lifetime explicit; avoid introducing a second cleanup or extending an invalid borrow.","method":"Intended reasoning: Track the resource identity, ownership or valid extent through creation, transfer, use and cleanup events. The intended decision requires evidence that those events refer to the same object and that the relevant paths are covered. Required evidence: ownership, lifetime, allocation, and resource-state facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/lifetime.unmanaged-ownership-balance/","markdownUrl":"https://docs.swift-analyzer.com/catalog/lifetime.unmanaged-ownership-balance/index.md"},{"ruleId":"lifetime.ownership-cycle@1.0.0","slug":"lifetime.ownership-cycle","title":"Strong ownership cycle without a valid termination","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-06","title":"Strong ownership cycle without a valid termination","kind":"Review signal","kindCode":"W","family":"LIFE","description":"Strong ownership cycle without a valid termination. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"lifetime.stored-closure-self-cycle","condition":"V-LIFE-06","description":"Stored closure strongly captures its owner"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Strong ownership cycle without a valid termination. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"self.callback = { self.refresh() }","after":"self.callback = { [weak self] in self?.refresh() }","action":"Review the owner, transfer points and every exit path. Keep cleanup obligations and the valid lifetime explicit; avoid introducing a second cleanup or extending an invalid borrow.","method":"Intended reasoning: Track the resource identity, ownership or valid extent through creation, transfer, use and cleanup events. The intended decision requires evidence that those events refer to the same object and that the relevant paths are covered. Required evidence: ownership, lifetime, allocation, and resource-state facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/lifetime.ownership-cycle/","markdownUrl":"https://docs.swift-analyzer.com/catalog/lifetime.ownership-cycle/index.md"},{"ruleId":"portfolio.life.07@1.0.0","slug":"portfolio.life.07","title":"Required weak consumer is released too early","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-07","title":"Required weak consumer is released too early","kind":"Defect","kindCode":"D","family":"LIFE","description":"Required weak consumer is released too early. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Required weak consumer is released too early. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"service.delegate = Handler()\nservice.start()","after":"let handler = Handler()\nowner.handler = handler\nservice.delegate = handler\nservice.start()","action":"Review the owner, transfer points and every exit path. Keep cleanup obligations and the valid lifetime explicit; avoid introducing a second cleanup or extending an invalid borrow.","method":"Intended reasoning: Track the resource identity, ownership or valid extent through creation, transfer, use and cleanup events. The intended decision requires evidence that those events refer to the same object and that the relevant paths are covered. Required evidence: ownership, lifetime, allocation, and resource-state facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.07/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.07/index.md"},{"ruleId":"lifetime.registration-outlives-scope@1.0.0","slug":"lifetime.registration-outlives-scope","title":"Registration outlives its allowed scope","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-08","title":"Registration outlives its allowed scope","kind":"Contract violation","kindCode":"P","family":"LIFE","description":"Registration outlives its allowed scope. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Registration outlives its allowed scope. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"token = source.observe { handle($0) }","after":"func stop() {\n    token?.cancel()\n    token = nil\n}","action":"Review the owner, transfer points and every exit path. Keep cleanup obligations and the valid lifetime explicit; avoid introducing a second cleanup or extending an invalid borrow.","method":"Intended reasoning: Track the resource identity, ownership or valid extent through creation, transfer, use and cleanup events. The intended decision requires evidence that those events refer to the same object and that the relevant paths are covered. Required evidence: ownership, lifetime, allocation, and resource-state facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/lifetime.registration-outlives-scope/","markdownUrl":"https://docs.swift-analyzer.com/catalog/lifetime.registration-outlives-scope/index.md"},{"ruleId":"lifetime.undischarged-resource-obligation@1.0.0","slug":"lifetime.undischarged-resource-obligation","title":"Cleanup obligation is not discharged","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-09","title":"Cleanup obligation is not discharged","kind":"Defect","kindCode":"D","family":"LIFE","description":"Cleanup obligation is not discharged. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"opt-in","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build --include-stdio-rules","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Cleanup obligation is not discharged. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"import Darwin\nfunc writeSample(to path: String) {\n    guard let file = fopen(path, \"w\") else { return }\n    fputs(\"sample\", file)\n}","after":"import Darwin\nfunc writeSample(to path: String) {\n    guard let file = fopen(path, \"w\") else { return }\n    defer { fclose(file) }\n    fputs(\"sample\", file)\n}","action":"The successful fopen creates a FILE resource whose owner must discharge the close obligation on every exit. Scope-bound cleanup is appropriate only while ownership remains here; do not add a second close after a transfer. A production writer must also handle write and close failures.","method":"The opt-in stdio evaluator follows recognized resource creation, use and discharge events for the same owner/resource identity. An obligation that is not discharged on a supported path can supply a finding. This FILE illustration is not a replayed fixture and does not establish admission of every shown source form.","boundary":"This workflow is restricted to admitted stdio source forms. It does not establish arbitrary socket, Swift object, pointer or user-defined resource coverage. The tutorial selects this condition but contains no stdio observations; no stdio positive case is claimed from that run."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/lifetime.undischarged-resource-obligation/","markdownUrl":"https://docs.swift-analyzer.com/catalog/lifetime.undischarged-resource-obligation/index.md"},{"ruleId":"portfolio.life.10@1.0.0","slug":"portfolio.life.10","title":"Closed or transferred resource is still used","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-10","title":"Closed or transferred resource is still used","kind":"Defect","kindCode":"D","family":"LIFE","description":"Closed or transferred resource is still used. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"opt-in","invocation":"\"$ANALYZER\" source-scan --package-path <package> --product <product> --allow-build --include-stdio-rules","experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Closed or transferred resource is still used. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"import Darwin\nfunc writeSample(to path: String) {\n    guard let file = fopen(path, \"w\") else { return }\n    fclose(file)\n    fputs(\"sample\", file)\n}","after":"import Darwin\nfunc writeSample(to path: String) {\n    guard let file = fopen(path, \"w\") else { return }\n    fputs(\"sample\", file)\n    fclose(file)\n}","action":"Use the FILE resource while its owner still holds a valid open handle, then close it once. Review all exits and ownership transfers; the illustration omits production error handling for write and close failures.","method":"The opt-in stdio evaluator follows recognized resource creation, use and discharge events for the same owner/resource identity. A recognized use after close or transfer can supply a finding. This FILE illustration is not a replayed fixture and does not establish admission of every shown source form.","boundary":"This workflow is restricted to admitted stdio source forms. It does not establish arbitrary socket, Swift object, pointer or user-defined resource coverage. The tutorial selects this condition but contains no stdio observations; no stdio positive case is claimed from that run."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.10/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.10/index.md"},{"ruleId":"portfolio.life.11@1.0.0","slug":"portfolio.life.11","title":"Read from an uninitialized buffer region","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-11","title":"Read from an uninitialized buffer region","kind":"Defect","kindCode":"D","family":"LIFE","description":"Read from an uninitialized buffer region. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Read from an uninitialized buffer region. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let p = UnsafeMutablePointer<Int>.allocate(capacity: 1)\nprint(p.pointee)","after":"let p = UnsafeMutablePointer<Int>.allocate(capacity: 1)\np.initialize(to: 0)\nprint(p.pointee)\np.deinitialize(count: 1)\np.deallocate()","action":"Review the owner, transfer points and every exit path. Keep cleanup obligations and the valid lifetime explicit; avoid introducing a second cleanup or extending an invalid borrow.","method":"Intended reasoning: Track the resource identity, ownership or valid extent through creation, transfer, use and cleanup events. The intended decision requires evidence that those events refer to the same object and that the relevant paths are covered. Required evidence: ownership, lifetime, allocation, and resource-state facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.11/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.life.11/index.md"},{"ruleId":"correctness.pointer-count-initialization@1.0.0","slug":"correctness.pointer-count-initialization","title":"Pointer or count exceeds its valid extent","family":"LIFE","familyTitle":"Memory and resources","conditions":[{"conditionId":"V-LIFE-12","title":"Pointer or count exceeds its valid extent","kind":"Defect","kindCode":"D","family":"LIFE","description":"Pointer or count exceeds its valid extent. It examines ownership, resource state, and lifetime obligations across program paths.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Pointer or count exceeds its valid extent. It examines ownership, resource state, and lifetime obligations across program paths.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"bytes.withUnsafeBytes { raw in\n    consume(raw.baseAddress, count: raw.count + 1)\n}","after":"bytes.withUnsafeBytes { raw in\n    consume(raw.baseAddress, count: raw.count)\n}","action":"Review the owner, transfer points and every exit path. Keep cleanup obligations and the valid lifetime explicit; avoid introducing a second cleanup or extending an invalid borrow.","method":"Intended reasoning: Track the resource identity, ownership or valid extent through creation, transfer, use and cleanup events. The intended decision requires evidence that those events refer to the same object and that the relevant paths are covered. Required evidence: ownership, lifetime, allocation, and resource-state facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/correctness.pointer-count-initialization/","markdownUrl":"https://docs.swift-analyzer.com/catalog/correctness.pointer-count-initialization/index.md"},{"ruleId":"performance.repeated-linear-traversal@1.0.0","slug":"performance.repeated-linear-traversal","title":"Repeated linear traversal / Lazy pipeline is recomputed","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-01","title":"Repeated linear traversal","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Repeated linear traversal. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"performance.repeated-linear-traversal","condition":"V-PERF-01","description":"Repeated linear traversal"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Repeated linear traversal. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"for item in items {\n    if allowed.contains(item.id) { accept(item) }\n}","after":"let allowedIDs = Set(allowed)\nfor item in items {\n    if allowedIDs.contains(item.id) { accept(item) }\n}","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}},{"conditionId":"V-PERF-05","title":"Lazy pipeline is recomputed","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Lazy pipeline is recomputed. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"performance.repeated-lazy-consumption","condition":"V-PERF-05","description":"Repeated lazy pipeline consumption"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Lazy pipeline is recomputed. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let values = input.lazy.map(expensive)\nconsume(values.reduce(0, +))\nconsume(values.reduce(0, +))","after":"let values = input.map(expensive)\nconsume(values.reduce(0, +))\nconsume(values.reduce(0, +))","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/performance.repeated-linear-traversal/","markdownUrl":"https://docs.swift-analyzer.com/catalog/performance.repeated-linear-traversal/index.md"},{"ruleId":"performance.repeated-sorting@1.0.0","slug":"performance.repeated-sorting","title":"Repeated invariant sorting","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-02","title":"Repeated invariant sorting","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Repeated invariant sorting. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"performance.repeated-sorting","condition":"V-PERF-02","description":"Repeated invariant sorting"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Repeated invariant sorting. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"for request in requests {\n    respond(request, using: records.sorted(by: order))\n}","after":"let sortedRecords = records.sorted(by: order)\nfor request in requests { respond(request, using: sortedRecords) }","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/performance.repeated-sorting/","markdownUrl":"https://docs.swift-analyzer.com/catalog/performance.repeated-sorting/index.md"},{"ruleId":"performance.repeated-consumed-materialization@1.0.0","slug":"performance.repeated-consumed-materialization","title":"Repeated consumed materialization / Growing prefix is repeatedly materialized","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-03","title":"Repeated consumed materialization","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Repeated consumed materialization. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"performance.repeated-consumed-materialization","condition":"V-PERF-03","description":"Repeated consumed materialization"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Repeated consumed materialization. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"for chunk in chunks {\n    output = Array(output + chunk)\n}","after":"var output: [Element] = []\nfor chunk in chunks { output.append(contentsOf: chunk) }","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}},{"conditionId":"V-PERF-11","title":"Growing prefix is repeatedly materialized","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Growing prefix is repeatedly materialized. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Growing prefix is repeatedly materialized. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"for end in 1...items.count {\n    consume(Array(items.prefix(end)))\n}","after":"for item in items { consumeNext(item) }","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/performance.repeated-consumed-materialization/","markdownUrl":"https://docs.swift-analyzer.com/catalog/performance.repeated-consumed-materialization/index.md"},{"ruleId":"performance.array-fifo-shifts@1.0.0","slug":"performance.array-fifo-shifts","title":"Array used as a growing shifting FIFO","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-04","title":"Array used as a growing shifting FIFO","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Array used as a growing shifting FIFO. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"performance.array-fifo-shifts","condition":"V-PERF-04","description":"Array used as a repeated FIFO"},"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Array used as a growing shifting FIFO. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"while !queue.isEmpty {\n    process(queue.removeFirst())\n}","after":"var head = 0\nwhile head < queue.count {\n    process(queue[head])\n    head += 1\n}","action":"Head-index traversal avoids repeated front shifts, but it leaves queue populated and retains processed elements until the storage is released. It is suitable only when those changed postconditions are acceptable. If callers require an emptied queue or prompt release of each element, use an appropriate bounded queue representation instead and measure peak retention. Preserve ordering and mutation behavior during process.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/performance.array-fifo-shifts/","markdownUrl":"https://docs.swift-analyzer.com/catalog/performance.array-fifo-shifts/index.md"},{"ruleId":"portfolio.perf.06@1.0.0","slug":"portfolio.perf.06","title":"Full sort used for an extremum or top-k result","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-06","title":"Full sort used for an extremum or top-k result","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Full sort used for an extremum or top-k result. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Full sort used for an extremum or top-k result. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let smallest = values.sorted().first","after":"let smallest = values.min()","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.06/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.06/index.md"},{"ruleId":"performance.comparator-projection-amplification@1.0.0","slug":"performance.comparator-projection-amplification","title":"Expensive projection repeated by a comparator","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-07","title":"Expensive projection repeated by a comparator","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Expensive projection repeated by a comparator. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Expensive projection repeated by a comparator. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let sorted = rows.sorted { key($0) < key($1) }","after":"let keyed = rows.map { (key: key($0), value: $0) }\nlet sorted = keyed.sorted { $0.key < $1.key }.map(\\.value)","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/performance.comparator-projection-amplification/","markdownUrl":"https://docs.swift-analyzer.com/catalog/performance.comparator-projection-amplification/index.md"},{"ruleId":"portfolio.perf.08@1.0.0","slug":"portfolio.perf.08","title":"Eager materialization before a short consumer","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-08","title":"Eager materialization before a short consumer","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Eager materialization before a short consumer. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Eager materialization before a short consumer. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let preview = Array(items.map(expensive).prefix(10))","after":"let preview = Array(items.lazy.map(expensive).prefix(10))","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.08/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.08/index.md"},{"ruleId":"portfolio.perf.09@1.0.0","slug":"portfolio.perf.09","title":"Repeated physical copy-on-write detach","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-09","title":"Repeated physical copy-on-write detach","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Repeated physical copy-on-write detach. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Repeated physical copy-on-write detach. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A loop retains each Array snapshot before mutating the buffer, forcing repeated physical detachments.","afterProse":"If intermediate snapshots are unnecessary, move snapshot creation outside the mutation loop. If they are required, choose a representation that shares safely and measure copies and retained memory without discarding observable versions."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.09/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.09/index.md"},{"ruleId":"portfolio.perf.10@1.0.0","slug":"portfolio.perf.10","title":"Get-copy-modify-set amplifies cost","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-10","title":"Get-copy-modify-set amplifies cost","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Get-copy-modify-set amplifies cost. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Get-copy-modify-set amplifies cost. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"for item in items {\n    var copy = model.values\n    copy.append(item)\n    model.values = copy\n}","after":"var values = model.values\nvalues.append(contentsOf: items)\nmodel.values = values","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.10/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.10/index.md"},{"ruleId":"portfolio.perf.12@1.0.0","slug":"portfolio.perf.12","title":"Capacity policy violates the amortized bound","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-12","title":"Capacity policy violates the amortized bound","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Capacity policy violates the amortized bound. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Capacity policy violates the amortized bound. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A custom buffer grows by one slot on every append and copies all previous elements each time.","afterProse":"Use a capacity growth policy with the required amortized bound, while handling overflow, allocation failure and memory limits. Check peak memory as well as total copy work."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.12/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.12/index.md"},{"ruleId":"portfolio.perf.13@1.0.0","slug":"portfolio.perf.13","title":"Repeated element-by-element bridging","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-13","title":"Repeated element-by-element bridging","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Repeated element-by-element bridging. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Repeated element-by-element bridging. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"for index in indices {\n    consume(convertToFoundation(values)[index])\n}","after":"let bridged = convertToFoundation(values)\nfor index in indices { consume(bridged[index]) }","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.13/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.13/index.md"},{"ruleId":"portfolio.perf.14@1.0.0","slug":"portfolio.perf.14","title":"Repeated expensive hashing or equality work","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-14","title":"Repeated expensive hashing or equality work","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Repeated expensive hashing or equality work. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Repeated expensive hashing or equality work. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Repeated dictionary lookups recompute an expensive normalized identity for the same immutable key.","afterProse":"Compute or cache the stable identity once when its lifetime permits. Preserve equality and hashing consistency and invalidate any cache when the underlying identity can change."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.14/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.14/index.md"},{"ruleId":"portfolio.perf.15@1.0.0","slug":"portfolio.perf.15","title":"Small slice retains large storage","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-15","title":"Small slice retains large storage","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Small slice retains large storage. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Small slice retains large storage. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"cached = hugeArray.prefix(3)","after":"cached = Array(hugeArray.prefix(3))","action":"Confirm the operation is on a relevant path and measure with representative input. Preserve evaluation order, laziness, errors and memory behavior when changing the algorithm.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.15/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.15/index.md"},{"ruleId":"portfolio.perf.16@1.0.0","slug":"portfolio.perf.16","title":"Fine-grained tasks amplify scheduling work","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-16","title":"Fine-grained tasks amplify scheduling work","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Fine-grained tasks amplify scheduling work. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Fine-grained tasks amplify scheduling work. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Thousands of child tasks each perform less useful work than their scheduling overhead.","afterProse":"Batch independent items into bounded chunks and measure throughput and latency. Preserve ordering, cancellation responsiveness and error propagation; batching is not always beneficial."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.16/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.16/index.md"},{"ruleId":"portfolio.perf.17@1.0.0","slug":"portfolio.perf.17","title":"Fanout retains excessive live data","family":"PERF","familyTitle":"Performance","conditions":[{"conditionId":"V-PERF-17","title":"Fanout retains excessive live data","kind":"Improvement opportunity","kindCode":"O","family":"PERF","description":"Fanout retains excessive live data. It examines repeated work, allocation, traversal, retention, and scheduling cost.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Fanout retains excessive live data. It examines repeated work, allocation, traversal, retention, and scheduling cost.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate a repeated operation to its input size, consumption and cost assumptions. An intended cost warning needs the loop bounds and actual collection behavior; syntax alone is not a measured runtime regression. Required evidence: cost, multiplicity, collection, allocation, and lifetime facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A task is launched for every large payload, retaining all payloads while most tasks wait.","afterProse":"Bound the number of in-flight tasks and admit new payloads as earlier work completes. Include result buffering, cancellation and producer retention when measuring peak live memory."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.17/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.perf.17/index.md"},{"ruleId":"security.sensitive-data-flow@1.0.0","slug":"security.sensitive-data-flow","title":"Sensitive data reaches logs / Sensitive data reaches a forbidden destination","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-01","title":"Sensitive data reaches logs","kind":"Defect","kindCode":"D","family":"SEC","description":"Sensitive data reaches logs. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Sensitive data reaches logs. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"logger.write(\"Authorization: \\(token)\")","after":"logger.write(\"Authorization attempt completed\")","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}},{"conditionId":"V-SEC-02","title":"Sensitive data reaches a forbidden destination","kind":"Contract violation","kindCode":"P","family":"SEC","description":"Sensitive data reaches a forbidden destination. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Sensitive data reaches a forbidden destination. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"analytics.send([\"email\": account.email])","after":"analytics.send([\"event\": \"account_opened\"])","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/security.sensitive-data-flow/","markdownUrl":"https://docs.swift-analyzer.com/catalog/security.sensitive-data-flow/index.md"},{"ruleId":"security.sql-structure-injection@1.0.0","slug":"security.sql-structure-injection","title":"SQL injection","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-03","title":"SQL injection","kind":"Defect","kindCode":"D","family":"SEC","description":"SQL injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"SQL injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"db.execute(\"SELECT * FROM users WHERE name = '\\(input)'\")","after":"db.execute(\"SELECT * FROM users WHERE name = ?\", bindings: [input])","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/security.sql-structure-injection/","markdownUrl":"https://docs.swift-analyzer.com/catalog/security.sql-structure-injection/index.md"},{"ruleId":"security.shell-command-injection@1.0.0","slug":"security.shell-command-injection","title":"Shell injection","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-04","title":"Shell injection","kind":"Defect","kindCode":"D","family":"SEC","description":"Shell injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Shell injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"import Foundation\nlet process = Process()\nprocess.executableURL = URL(fileURLWithPath: \"/bin/sh\")\nprocess.arguments = [\"-c\", \"convert \\(input)\"]","after":"import Foundation\nlet process = Process()\nprocess.executableURL = URL(fileURLWithPath: trustedConverterPath)\nprocess.arguments = [\"--\", input]","action":"Replace the shell executable as well as its arguments. Here trustedConverterPath is an application-controlled absolute path to a trusted converter whose documented interface accepts -- followed by a file operand. Never derive the executable path from input. Validate the permitted files and the converter-specific argument semantics: separating arguments prevents shell interpretation but does not make every tool invocation safe. Prefer a library API when possible.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/security.shell-command-injection/","markdownUrl":"https://docs.swift-analyzer.com/catalog/security.shell-command-injection/index.md"},{"ruleId":"security.format-position-injection@1.0.0","slug":"security.format-position-injection","title":"Format-string injection","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-05","title":"Format-string injection","kind":"Defect","kindCode":"D","family":"SEC","description":"Format-string injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Format-string injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let text = String(format: externalFormat, value)","after":"let text = String(format: \"%@\", value)","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/security.format-position-injection/","markdownUrl":"https://docs.swift-analyzer.com/catalog/security.format-position-injection/index.md"},{"ruleId":"security.path-traversal@1.0.0","slug":"security.path-traversal","title":"Path traversal outside the extraction root","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-06","title":"Path traversal outside the extraction root","kind":"Defect","kindCode":"D","family":"SEC","description":"Path traversal outside the extraction root. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Path traversal outside the extraction root. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"An archive entry such as ../outside.txt is joined to an extraction root without validating its destination.","afterProse":"Use an extraction policy that rejects escaping paths and handles symlinks and path races. Validate the actual destination at the write boundary; a string-prefix comparison alone is insufficient."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/security.path-traversal/","markdownUrl":"https://docs.swift-analyzer.com/catalog/security.path-traversal/index.md"},{"ruleId":"security.javascript-code-injection@1.0.0","slug":"security.javascript-code-injection","title":"JavaScript or HTML context injection","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-07","title":"JavaScript or HTML context injection","kind":"Defect","kindCode":"D","family":"SEC","description":"JavaScript or HTML context injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"JavaScript or HTML context injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Untrusted text is interpolated inside a JavaScript string sent to a WebView.","afterProse":"Pass data through an API that separates script from arguments where supported, or use encoding appropriate to the exact interpreter context. HTML escaping does not by itself make a JavaScript string safe."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/security.javascript-code-injection/","markdownUrl":"https://docs.swift-analyzer.com/catalog/security.javascript-code-injection/index.md"},{"ruleId":"security.privileged-url-input@1.0.0","slug":"security.privileged-url-input","title":"Unprivileged input controls a privileged URL sink","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-08","title":"Unprivileged input controls a privileged URL sink","kind":"Defect","kindCode":"D","family":"SEC","description":"Unprivileged input controls a privileged URL sink. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Unprivileged input controls a privileged URL sink. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"An untrusted URL is fetched by a client that can reach privileged services.","afterProse":"Restrict the allowed schemes and destinations at the fetch boundary, including redirects and address resolution. Avoid forwarding privileged credentials to destinations chosen by untrusted input."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/security.privileged-url-input/","markdownUrl":"https://docs.swift-analyzer.com/catalog/security.privileged-url-input/index.md"},{"ruleId":"portfolio.sec.09@1.0.0","slug":"portfolio.sec.09","title":"Predicate injection","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-09","title":"Predicate injection","kind":"Defect","kindCode":"D","family":"SEC","description":"Predicate injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Predicate injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"NSPredicate(format: \"name == '\\(input)'\")","after":"NSPredicate(format: \"name == %@\", input)","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.09/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.09/index.md"},{"ruleId":"portfolio.sec.10@1.0.0","slug":"portfolio.sec.10","title":"Regular-expression injection","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-10","title":"Regular-expression injection","kind":"Defect","kindCode":"D","family":"SEC","description":"Regular-expression injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Regular-expression injection. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let pattern = \"^\\(input)$\"","after":"let literal = NSRegularExpression.escapedPattern(for: input)\nlet pattern = \"^\\(literal)$\"","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.10/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.10/index.md"},{"ruleId":"portfolio.sec.11@1.0.0","slug":"portfolio.sec.11","title":"Algorithmic denial of service through a regular expression","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-11","title":"Algorithmic denial of service through a regular expression","kind":"Defect","kindCode":"D","family":"SEC","description":"Algorithmic denial of service through a regular expression. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Algorithmic denial of service through a regular expression. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let pattern = \"^(a+)+$\"","after":"let pattern = \"^a+$\"","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.11/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.11/index.md"},{"ruleId":"portfolio.sec.12@1.0.0","slug":"portfolio.sec.12","title":"External-entity expansion from untrusted XML","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-12","title":"External-entity expansion from untrusted XML","kind":"Defect","kindCode":"D","family":"SEC","description":"External-entity expansion from untrusted XML. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"External-entity expansion from untrusted XML. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"parser.shouldResolveExternalEntities = true","after":"parser.shouldResolveExternalEntities = false","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.12/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.12/index.md"},{"ruleId":"portfolio.sec.13@1.0.0","slug":"portfolio.sec.13","title":"TLS trust evaluation is effectively disabled","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-13","title":"TLS trust evaluation is effectively disabled","kind":"Defect","kindCode":"D","family":"SEC","description":"TLS trust evaluation is effectively disabled. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"TLS trust evaluation is effectively disabled. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A network challenge handler accepts a server credential without enforcing the required trust evaluation.","afterProse":"Use the platform trust evaluation for the intended host, or an explicitly reviewed stricter policy. Test rejection paths and remove unconditional credential acceptance from shipping code."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.13/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.13/index.md"},{"ruleId":"portfolio.sec.14@1.0.0","slug":"portfolio.sec.14","title":"Cryptography does not provide the claimed property","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-14","title":"Cryptography does not provide the claimed property","kind":"Defect","kindCode":"D","family":"SEC","description":"Cryptography does not provide the claimed property. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Cryptography does not provide the claimed property. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let storedPassword = fastDigest(password)","after":"let storedPassword = passwordKDF(password, parameters: policy)","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.14/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.14/index.md"},{"ruleId":"portfolio.sec.15@1.0.0","slug":"portfolio.sec.15","title":"Keyed nonce or IV is reused in an unsafe mode","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-15","title":"Keyed nonce or IV is reused in an unsafe mode","kind":"Defect","kindCode":"D","family":"SEC","description":"Keyed nonce or IV is reused in an unsafe mode. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Keyed nonce or IV is reused in an unsafe mode. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"for message in messages {\n    encrypt(message, key: key, nonce: fixedNonce)\n}","after":"for message in messages {\n    encrypt(message, key: key, nonce: nonceProvider.next())\n}","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.15/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.15/index.md"},{"ruleId":"portfolio.sec.16@1.0.0","slug":"portfolio.sec.16","title":"Unsafe password-derivation contract","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-16","title":"Unsafe password-derivation contract","kind":"Defect","kindCode":"D","family":"SEC","description":"Unsafe password-derivation contract. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Unsafe password-derivation contract. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"derivePassword(password, workFactor: obsoleteMinimum)","after":"derivePassword(password, workFactor: calibratedPolicy)","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.16/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.16/index.md"},{"ruleId":"portfolio.sec.17@1.0.0","slug":"portfolio.sec.17","title":"Predictable randomness in a security-sensitive value","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-17","title":"Predictable randomness in a security-sensitive value","kind":"Defect","kindCode":"D","family":"SEC","description":"Predictable randomness in a security-sensitive value. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Predictable randomness in a security-sensitive value. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let token = predictableGenerator.next()","after":"let token = try securityRandomToken(byteCount: policy.tokenBytes)","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.17/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.17/index.md"},{"ruleId":"portfolio.sec.18@1.0.0","slug":"portfolio.sec.18","title":"Untrusted deserialization crosses the allowed-type boundary","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-18","title":"Untrusted deserialization crosses the allowed-type boundary","kind":"Defect","kindCode":"D","family":"SEC","description":"Untrusted deserialization crosses the allowed-type boundary. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Untrusted deserialization crosses the allowed-type boundary. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"decodeAnyObject(untrustedArchive)","after":"decodeAllowedObjects(untrustedArchive, types: allowedTypes)","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.18/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.18/index.md"},{"ruleId":"portfolio.sec.19@1.0.0","slug":"portfolio.sec.19","title":"Privileged effect bypasses required authorization","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-19","title":"Privileged effect bypasses required authorization","kind":"Contract violation","kindCode":"P","family":"SEC","description":"Privileged effect bypasses required authorization. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Privileged effect bypasses required authorization. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"guard await canEdit(user, document) else { return }\nawait waitForInput()\nwrite(document)","after":"await authorization.commitEdit(user, document, change)","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.19/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.19/index.md"},{"ruleId":"portfolio.sec.20@1.0.0","slug":"portfolio.sec.20","title":"Security validator or sanitizer is bypassed","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-20","title":"Security validator or sanitizer is bypassed","kind":"Defect","kindCode":"D","family":"SEC","description":"Security validator or sanitizer is bypassed. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Security validator or sanitizer is bypassed. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"if validate(input) { store(input) }\nlegacyFallback(input)","after":"guard let validated = validateAndWrap(input) else { return }\nstore(validated)","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.20/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.20/index.md"},{"ruleId":"portfolio.sec.21@1.0.0","slug":"portfolio.sec.21","title":"Embedded secret reaches a security-sensitive use","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-21","title":"Embedded secret reaches a security-sensitive use","kind":"Defect","kindCode":"D","family":"SEC","description":"Embedded secret reaches a security-sensitive use. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Embedded secret reaches a security-sensitive use. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A signing secret embedded in a distributable application authorizes privileged server requests.","afterProse":"Move the privileged signing operation behind an appropriate trusted boundary and rotate the exposed secret. Obfuscating the string or moving it into another bundled file does not protect it."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.21/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.21/index.md"},{"ruleId":"portfolio.sec.22@1.0.0","slug":"portfolio.sec.22","title":"WebView receives forbidden capabilities","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-22","title":"WebView receives forbidden capabilities","kind":"Contract violation","kindCode":"P","family":"SEC","description":"WebView receives forbidden capabilities. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"WebView receives forbidden capabilities. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A WebView exposes a privileged native bridge to content outside the approved origin policy.","afterProse":"Remove capabilities that the content does not need and enforce the approved origin and navigation policy at every bridge entry. Treat messages from web content as untrusted input."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.22/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.22/index.md"},{"ruleId":"portfolio.sec.23@1.0.0","slug":"portfolio.sec.23","title":"Cryptographic key has insufficient strength","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-23","title":"Cryptographic key has insufficient strength","kind":"Contract violation","kindCode":"P","family":"SEC","description":"Cryptographic key has insufficient strength. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Cryptographic key has insufficient strength. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"generateKey(size: legacyKeySize)","after":"generateKey(size: securityPolicy.requiredKeySize)","action":"Confirm the trust boundary and required security property. Apply the API-specific protection at the sensitive operation and review all bypass paths.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.23/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.23/index.md"},{"ruleId":"portfolio.sec.24@1.0.0","slug":"portfolio.sec.24","title":"Dependency is fetched over an untrusted channel","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-24","title":"Dependency is fetched over an untrusted channel","kind":"Contract violation","kindCode":"P","family":"SEC","description":"Dependency is fetched over an untrusted channel. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Dependency is fetched over an untrusted channel. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A dependency is fetched from a transport or origin that violates the project trust policy.","afterProse":"Use an approved authenticated origin and transport, and verify the dependency identity required by the policy. Encryption alone does not make an untrusted publisher trustworthy."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.24/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.24/index.md"},{"ruleId":"portfolio.sec.25@1.0.0","slug":"portfolio.sec.25","title":"Non-reproducible dependency resolution violates policy","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-25","title":"Non-reproducible dependency resolution violates policy","kind":"Contract violation","kindCode":"P","family":"SEC","description":"Non-reproducible dependency resolution violates policy. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Non-reproducible dependency resolution violates policy. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A shipping build resolves a moving dependency reference without the lock or identity evidence required by release policy.","afterProse":"Record and verify the admitted dependency identities using the required lock process. Reject unexpected resolution drift instead of silently updating the release inputs."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.25/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.25/index.md"},{"ruleId":"portfolio.sec.26@1.0.0","slug":"portfolio.sec.26","title":"Debug capability is exposed in a shipping product","family":"SEC","familyTitle":"Security","conditions":[{"conditionId":"V-SEC-26","title":"Debug capability is exposed in a shipping product","kind":"Contract violation","kindCode":"P","family":"SEC","description":"Debug capability is exposed in a shipping product. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Debug capability is exposed in a shipping product. It examines trust boundaries, sensitive flows, validation, and security-sensitive effects.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate the selected security contract to a source, transformation and sensitive operation. The intended check requires identity, flow and policy evidence; a suspicious API name alone does not establish exploitation. Required evidence: source, sink, trust, policy, validation, and flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A shipping variant includes a debug endpoint that can read privileged application state.","afterProse":"Exclude the debug capability from the shipping build or protect it with the explicitly required policy. Verify the built variant and reachable entry points, not only the debug source annotation."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.26/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.sec.26/index.md"},{"ruleId":"correctness.equality-hash-contract@1.0.0","slug":"correctness.equality-hash-contract","title":"Equality and hashing disagree","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-01","title":"Equality and hashing disagree","kind":"Defect","kindCode":"D","family":"COR","description":"Equality and hashing disagree. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Equality and hashing disagree. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Two records compare equal by ID, but their hash also includes a mutable display name.","afterProse":"Use the same stable identity fields for equality and hashing. Check equal values with different display names and avoid mutating identity while a value is a set member or dictionary key."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/correctness.equality-hash-contract/","markdownUrl":"https://docs.swift-analyzer.com/catalog/correctness.equality-hash-contract/index.md"},{"ruleId":"correctness.persisted-process-hash@1.0.0","slug":"correctness.persisted-process-hash","title":"Process-local hash is used as a stable identity","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-02","title":"Process-local hash is used as a stable identity","kind":"Defect","kindCode":"D","family":"COR","description":"Process-local hash is used as a stable identity. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"correctness.persisted-process-hash","condition":"V-COR-02","description":"Process-randomized hash reaches persistent preferences"},"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Process-local hash is used as a stable identity. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let preferences = UserDefaults.standard\npreferences.set(item.hashValue, forKey: \"selectedItem\")","after":"let preferences = UserDefaults.standard\npreferences.set(item.stableID, forKey: \"selectedItem\")","action":"Persist an explicitly defined stable identifier, not a process-randomized hash. This Foundation illustration assumes stableID has a representation supported by UserDefaults and remains stable across launches. The experimental selector recognizes the preferences sink; it does not infer every custom persistence wrapper.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/correctness.persisted-process-hash/","markdownUrl":"https://docs.swift-analyzer.com/catalog/correctness.persisted-process-hash/index.md"},{"ruleId":"correctness.regex-range-units@1.0.0","slug":"correctness.regex-range-units","title":"Incompatible length or index units","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-03","title":"Incompatible length or index units","kind":"Defect","kindCode":"D","family":"COR","description":"Incompatible length or index units. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":{"rule":"correctness.regex-range-units","condition":"V-COR-03","description":"Grapheme count supplies a regex UTF-16 range"},"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Incompatible length or index units. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"import Foundation\nlet text = \"😀\"\nlet regex = try NSRegularExpression(pattern: \".\")\nlet range = NSRange(location: 0, length: text.count)\nlet matches = regex.matches(in: text, range: range)","after":"import Foundation\nlet text = \"😀\"\nlet regex = try NSRegularExpression(pattern: \".\")\nlet range = NSRange(text.startIndex..<text.endIndex, in: text)\nlet matches = regex.matches(in: text, range: range)","action":"NSRegularExpression consumes a UTF-16 range. Convert the indices of this same String with NSRange(_:in:), rather than supplying the grapheme count. Include emoji and composed characters when checking the consuming operation. The experimental selector is specific to this regex range context.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/correctness.regex-range-units/","markdownUrl":"https://docs.swift-analyzer.com/catalog/correctness.regex-range-units/index.md"},{"ruleId":"correctness.invalidated-collection-index@1.0.0","slug":"correctness.invalidated-collection-index","title":"Invalidated collection index is used","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-04","title":"Invalidated collection index is used","kind":"Defect","kindCode":"D","family":"COR","description":"Invalidated collection index is used. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Invalidated collection index is used. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"var values = [10, 20]\nlet index = values.index(before: values.endIndex)\nvalues.removeAll()\nprint(values[index])","after":"values.removeAll()\nif let first = values.first { print(first) }","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/correctness.invalidated-collection-index/","markdownUrl":"https://docs.swift-analyzer.com/catalog/correctness.invalidated-collection-index/index.md"},{"ruleId":"correctness.mutable-collection-key@1.0.0","slug":"correctness.mutable-collection-key","title":"Key changes equality or hash while in a collection","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-05","title":"Key changes equality or hash while in a collection","kind":"Defect","kindCode":"D","family":"COR","description":"Key changes equality or hash while in a collection. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Key changes equality or hash while in a collection. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"set.insert(key)\nkey.id = 2","after":"set.remove(key)\nkey.id = 2\nset.insert(key)","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/correctness.mutable-collection-key/","markdownUrl":"https://docs.swift-analyzer.com/catalog/correctness.mutable-collection-key/index.md"},{"ruleId":"correctness.bounded-ordering-law@1.0.0","slug":"correctness.bounded-ordering-law","title":"Ordering laws are violated","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-06","title":"Ordering laws are violated","kind":"Defect","kindCode":"D","family":"COR","description":"Ordering laws are violated. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Ordering laws are violated. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let ordered = values.sorted { $0 <= $1 }","after":"let ordered = values.sorted { $0 < $1 }","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/correctness.bounded-ordering-law/","markdownUrl":"https://docs.swift-analyzer.com/catalog/correctness.bounded-ordering-law/index.md"},{"ruleId":"correctness.canonical-output-nondeterminism@1.0.0","slug":"correctness.canonical-output-nondeterminism","title":"Unstable ordering reaches canonical output","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-07","title":"Unstable ordering reaches canonical output","kind":"Defect","kindCode":"D","family":"COR","description":"Unstable ordering reaches canonical output. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Unstable ordering reaches canonical output. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let encoded = dictionary.map { \"\\($0.key)=\\($0.value)\" }","after":"let encoded = dictionary.keys.sorted().map { \"\\($0)=\\(dictionary[$0]!)\" }","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/correctness.canonical-output-nondeterminism/","markdownUrl":"https://docs.swift-analyzer.com/catalog/correctness.canonical-output-nondeterminism/index.md"},{"ruleId":"portfolio.cor.08@1.0.0","slug":"portfolio.cor.08","title":"Size or count exceeds its numeric range","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-08","title":"Size or count exceeds its numeric range","kind":"Defect","kindCode":"D","family":"COR","description":"Size or count exceeds its numeric range. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Size or count exceeds its numeric range. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let count: Int = 300\nlet stored = UInt8(count)","after":"guard let stored = UInt8(exactly: count) else { return }","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.08/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.08/index.md"},{"ruleId":"portfolio.cor.09@1.0.0","slug":"portfolio.cor.09","title":"Non-finite value reaches a finite-only consumer","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-09","title":"Non-finite value reaches a finite-only consumer","kind":"Defect","kindCode":"D","family":"COR","description":"Non-finite value reaches a finite-only consumer. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Non-finite value reaches a finite-only consumer. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let value = Double.infinity\nfiniteOnlyConsumer(value)","after":"guard value.isFinite else { return }\nfiniteOnlyConsumer(value)","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.09/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.09/index.md"},{"ruleId":"portfolio.cor.10@1.0.0","slug":"portfolio.cor.10","title":"Interprocedural path reaches an invalid force operation","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-10","title":"Interprocedural path reaches an invalid force operation","kind":"Defect","kindCode":"D","family":"COR","description":"Interprocedural path reaches an invalid force operation. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Interprocedural path reaches an invalid force operation. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"func absent() -> Int? { nil }\npublic func value() -> Int { absent()! }","after":"public func value() -> Int? { absent() }","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.10/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.10/index.md"},{"ruleId":"portfolio.cor.11@1.0.0","slug":"portfolio.cor.11","title":"Single-pass sequence is consumed more than once","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-11","title":"Single-pass sequence is consumed more than once","kind":"Defect","kindCode":"D","family":"COR","description":"Single-pass sequence is consumed more than once. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Single-pass sequence is consumed more than once. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let count = singlePass.reduce(0) { n, _ in n + 1 }\nlet result = Array(singlePass)","after":"let snapshot = Array(singlePass)\nlet count = snapshot.count\nlet result = snapshot","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.11/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.11/index.md"},{"ruleId":"portfolio.cor.12@1.0.0","slug":"portfolio.cor.12","title":"Copy violates the state-independence contract","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-12","title":"Copy violates the state-independence contract","kind":"Defect","kindCode":"D","family":"COR","description":"Copy violates the state-independence contract. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Copy violates the state-independence contract. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let copy = original\ncopy.storage.value = 2","after":"let copy = original.deepCopy()","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.12/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.12/index.md"},{"ruleId":"portfolio.cor.13@1.0.0","slug":"portfolio.cor.13","title":"Producer and consumer canonicalize identity differently","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-13","title":"Producer and consumer canonicalize identity differently","kind":"Defect","kindCode":"D","family":"COR","description":"Producer and consumer canonicalize identity differently. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Producer and consumer canonicalize identity differently. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"store[name.lowercased()] = value\nlet result = store[name]","after":"let key = canonicalKey(name)\nstore[key] = value\nlet result = store[key]","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.13/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.13/index.md"},{"ruleId":"portfolio.cor.14@1.0.0","slug":"portfolio.cor.14","title":"Written value is lost before observation","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-14","title":"Written value is lost before observation","kind":"Improvement opportunity","kindCode":"O","family":"COR","description":"Written value is lost before observation. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Written value is lost before observation. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"var value = 10\nvalue = 20\nreturn value","after":"let value = 20\nreturn value","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.14/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.14/index.md"},{"ruleId":"portfolio.cor.15@1.0.0","slug":"portfolio.cor.15","title":"Predicate does not distinguish valid states","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-15","title":"Predicate does not distinguish valid states","kind":"Defect","kindCode":"D","family":"COR","description":"Predicate does not distinguish valid states. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Predicate does not distinguish valid states. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let count = 1\nif count > 0 { accept() } else { reject() }","after":"accept()","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.15/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.15/index.md"},{"ruleId":"portfolio.cor.16@1.0.0","slug":"portfolio.cor.16","title":"Conditional-result branches are semantically identical","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-16","title":"Conditional-result branches are semantically identical","kind":"Improvement opportunity","kindCode":"O","family":"COR","description":"Conditional-result branches are semantically identical. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Conditional-result branches are semantically identical. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"func choose(_ flag: Bool) -> Int {\n    flag ? 7 : 7\n}","after":"func choose(_ flag: Bool) -> Int { 7 }","action":"Make the relevant units, identity or protocol invariant explicit. Exercise boundary inputs and preserve collection and error semantics when applying an edit.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.16/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.16/index.md"},{"ruleId":"portfolio.cor.17@1.0.0","slug":"portfolio.cor.17","title":"Control-flow region is unreachable","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-17","title":"Control-flow region is unreachable","kind":"Defect","kindCode":"D","family":"COR","description":"Control-flow region is unreachable. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Control-flow region is unreachable. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A branch requires a constant zero value to be greater than one, so its body cannot run.","afterProse":"If the branch is obsolete, remove it. If the branch was intended to handle real input, correct the assignment or predicate and test both sides of the boundary."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.17/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.17/index.md"},{"ruleId":"portfolio.cor.18@1.0.0","slug":"portfolio.cor.18","title":"Computed result is discarded without a useful effect","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-18","title":"Computed result is discarded without a useful effect","kind":"Improvement opportunity","kindCode":"O","family":"COR","description":"Computed result is discarded without a useful effect. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Computed result is discarded without a useful effect. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let values = [3, 1, 2]\n_ = values.sorted()","after":"let values = [3, 1, 2]\nlet sortedValues = values.sorted()\nrender(sortedValues)","action":"Use the computed result in the intended observable operation: render consumes the sorted sequence here. If no consumer needs the result and evaluation has no required effect, remove the computation instead.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.18/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.18/index.md"},{"ruleId":"portfolio.cor.19@1.0.0","slug":"portfolio.cor.19","title":"Comparison violates its numeric precision contract","family":"COR","familyTitle":"Value correctness","conditions":[{"conditionId":"V-COR-19","title":"Comparison violates its numeric precision contract","kind":"Contract violation","kindCode":"P","family":"COR","description":"Comparison violates its numeric precision contract. It examines value, collection, identity, ordering, and control-flow contracts.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"accepted-subset","currentQualification":"not-established","scope":"A bounded source subset is accepted for the documented source forms, build profile, positive and negative cases, and unknown boundary. This does not accept every similar program."},"explanation":{"purpose":"Comparison violates its numeric precision contract. It examines value, collection, identity, ordering, and control-flow contracts.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"let equal = measured == reference","after":"let equal = measured.isFinite && reference.isFinite\n    && abs(measured - reference) <= measurementTolerance","action":"measurementTolerance is a nonnegative finite absolute tolerance agreed for this measurement domain and expressed in the same units as the two finite inputs. Define the required behavior for nonfinite values and decide whether a relative or combined tolerance is needed across scales. Do not copy an arbitrary epsilon into an unrelated numeric contract.","method":"Intended reasoning: Compare the value, unit, identity or protocol assumptions at each operation. The intended conclusion requires consistent source identities and the relevant path constraints; an unrecognized abstraction can invalidate the comparison. Required evidence: value, identity, ordering, collection, and control-flow facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.19/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.cor.19/index.md"},{"ruleId":"portfolio.stream.01@1.0.0","slug":"portfolio.stream.01","title":"Buffer or accumulator lacks a required bound","family":"STREAM","familyTitle":"Event streams and transactions","conditions":[{"conditionId":"V-STREAM-01","title":"Buffer or accumulator lacks a required bound","kind":"Contract violation","kindCode":"P","family":"STREAM","description":"Buffer or accumulator lacks a required bound. It examines buffering, delivery, progress, retry, and transaction boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Buffer or accumulator lacks a required bound. It examines buffering, delivery, progress, retry, and transaction boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow subscription, production, buffering, consumption and completion events under the stream or transaction contract. The intended decision needs lifecycle and ordering evidence across every relevant participant. Required evidence: buffer, delivery, retry, progress, and transaction facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A producer outpaces a consumer while an unbounded stream buffer retains every event.","afterProse":"Choose a bounded buffering or backpressure contract and define what happens at capacity. Include retained payload size and downstream accumulators in the bound."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.01/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.01/index.md"},{"ruleId":"portfolio.stream.02@1.0.0","slug":"portfolio.stream.02","title":"Drop policy violates required event delivery","family":"STREAM","familyTitle":"Event streams and transactions","conditions":[{"conditionId":"V-STREAM-02","title":"Drop policy violates required event delivery","kind":"Defect","kindCode":"D","family":"STREAM","description":"Drop policy violates required event delivery. It examines buffering, delivery, progress, retry, and transaction boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Drop policy violates required event delivery. It examines buffering, delivery, progress, retry, and transaction boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow subscription, production, buffering, consumption and completion events under the stream or transaction contract. The intended decision needs lifecycle and ordering evidence across every relevant participant. Required evidence: buffer, delivery, retry, progress, and transaction facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A stream drops older events although the consumer contract requires delivery of every transaction.","afterProse":"Use a delivery mechanism that meets the transaction contract, such as backpressure or durable acknowledgement. A larger lossy buffer postpones loss; it does not establish reliable delivery."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.02/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.02/index.md"},{"ruleId":"portfolio.stream.03@1.0.0","slug":"portfolio.stream.03","title":"Concurrent next calls on a single-consumer iterator","family":"STREAM","familyTitle":"Event streams and transactions","conditions":[{"conditionId":"V-STREAM-03","title":"Concurrent next calls on a single-consumer iterator","kind":"Defect","kindCode":"D","family":"STREAM","description":"Concurrent next calls on a single-consumer iterator. It examines buffering, delivery, progress, retry, and transaction boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Concurrent next calls on a single-consumer iterator. It examines buffering, delivery, progress, retry, and transaction boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow subscription, production, buffering, consumption and completion events under the stream or transaction contract. The intended decision needs lifecycle and ordering evidence across every relevant participant. Required evidence: buffer, delivery, retry, progress, and transaction facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Two tasks concurrently request the next element from an iterator whose contract admits only one consumer.","afterProse":"Assign iterator advancement to a single owner and distribute results through an explicitly coordinated channel. Specify whether consumers share work or each receive a copy of every event."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.03/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.03/index.md"},{"ruleId":"portfolio.stream.04@1.0.0","slug":"portfolio.stream.04","title":"Stream is not finished on a required terminal path","family":"STREAM","familyTitle":"Event streams and transactions","conditions":[{"conditionId":"V-STREAM-04","title":"Stream is not finished on a required terminal path","kind":"Defect","kindCode":"D","family":"STREAM","description":"Stream is not finished on a required terminal path. It examines buffering, delivery, progress, retry, and transaction boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Stream is not finished on a required terminal path. It examines buffering, delivery, progress, retry, and transaction boundaries.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"source.onEnd = { cleanup() }","after":"source.onEnd = {\n    cleanup()\n    continuation.finish()\n}","action":"Make completion, cancellation and backpressure behavior explicit. Review slow consumers, repeated subscriptions, errors and termination before changing the flow.","method":"Intended reasoning: Follow subscription, production, buffering, consumption and completion events under the stream or transaction contract. The intended decision needs lifecycle and ordering evidence across every relevant participant. Required evidence: buffer, delivery, retry, progress, and transaction facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.04/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.04/index.md"},{"ruleId":"portfolio.stream.05@1.0.0","slug":"portfolio.stream.05","title":"Retry or refresh forms a loop without progress or budget","family":"STREAM","familyTitle":"Event streams and transactions","conditions":[{"conditionId":"V-STREAM-05","title":"Retry or refresh forms a loop without progress or budget","kind":"Contract violation","kindCode":"P","family":"STREAM","description":"Retry or refresh forms a loop without progress or budget. It examines buffering, delivery, progress, retry, and transaction boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Retry or refresh forms a loop without progress or budget. It examines buffering, delivery, progress, retry, and transaction boundaries.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Follow subscription, production, buffering, consumption and completion events under the stream or transaction contract. The intended decision needs lifecycle and ordering evidence across every relevant participant. Required evidence: buffer, delivery, retry, progress, and transaction facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A failing operation retries forever without delay, progress or an attempt budget.","afterProse":"Define retryable errors, an attempt or time budget, backoff and cancellation behavior. Stop or report failure when the budget is exhausted, and avoid retrying permanent failures."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.05/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.05/index.md"},{"ruleId":"portfolio.stream.06@1.0.0","slug":"portfolio.stream.06","title":"Retry duplicates a non-idempotent effect","family":"STREAM","familyTitle":"Event streams and transactions","conditions":[{"conditionId":"V-STREAM-06","title":"Retry duplicates a non-idempotent effect","kind":"Defect","kindCode":"D","family":"STREAM","description":"Retry duplicates a non-idempotent effect. It examines buffering, delivery, progress, retry, and transaction boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Retry duplicates a non-idempotent effect. It examines buffering, delivery, progress, retry, and transaction boundaries.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"try await retry { try await charge(amount) }","after":"let operationID = stableIDForThisPurchase\ntry await retry { try await charge(amount, idempotencyKey: operationID) }","action":"Make completion, cancellation and backpressure behavior explicit. Review slow consumers, repeated subscriptions, errors and termination before changing the flow.","method":"Intended reasoning: Follow subscription, production, buffering, consumption and completion events under the stream or transaction contract. The intended decision needs lifecycle and ordering evidence across every relevant participant. Required evidence: buffer, delivery, retry, progress, and transaction facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.06/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.06/index.md"},{"ruleId":"portfolio.stream.07@1.0.0","slug":"portfolio.stream.07","title":"Related changes escape a required transaction","family":"STREAM","familyTitle":"Event streams and transactions","conditions":[{"conditionId":"V-STREAM-07","title":"Related changes escape a required transaction","kind":"Defect","kindCode":"D","family":"STREAM","description":"Related changes escape a required transaction. It examines buffering, delivery, progress, retry, and transaction boundaries.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Related changes escape a required transaction. It examines buffering, delivery, progress, retry, and transaction boundaries.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"try debitAccount()\ntry creditAccount()","after":"try database.transaction {\n    try debitAccount()\n    try creditAccount()\n}","action":"Make completion, cancellation and backpressure behavior explicit. Review slow consumers, repeated subscriptions, errors and termination before changing the flow.","method":"Intended reasoning: Follow subscription, production, buffering, consumption and completion events under the stream or transaction contract. The intended decision needs lifecycle and ordering evidence across every relevant participant. Required evidence: buffer, delivery, retry, progress, and transaction facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.07/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.stream.07/index.md"},{"ruleId":"portfolio.ui.01@1.0.0","slug":"portfolio.ui.01","title":"Element identity is unstable across updates","family":"UI","familyTitle":"SwiftUI","conditions":[{"conditionId":"V-UI-01","title":"Element identity is unstable across updates","kind":"Defect","kindCode":"D","family":"UI","description":"Element identity is unstable across updates. It examines SwiftUI identity, update, and state-lifecycle behavior.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Element identity is unstable across updates. It examines SwiftUI identity, update, and state-lifecycle behavior.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"var id: UUID { UUID() }","after":"let id: UUID","action":"Review the identity and lifetime of state and effects across updates. Check navigation, repeated rendering and cancellation before applying the illustrative change.","method":"Intended reasoning: Relate view identity and lifecycle to the state or effect that depends on them. The intended analysis needs the selected framework semantics and the relevant update paths, not only a matching property or view name. Required evidence: view identity, input, update, and state-lifecycle facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.ui.01/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.ui.01/index.md"},{"ruleId":"portfolio.ui.02@1.0.0","slug":"portfolio.ui.02","title":"Distinct elements share one identity","family":"UI","familyTitle":"SwiftUI","conditions":[{"conditionId":"V-UI-02","title":"Distinct elements share one identity","kind":"Defect","kindCode":"D","family":"UI","description":"Distinct elements share one identity. It examines SwiftUI identity, update, and state-lifecycle behavior.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Distinct elements share one identity. It examines SwiftUI identity, update, and state-lifecycle behavior.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"ForEach(items, id: \\.displayName) { row($0) }","after":"ForEach(items, id: \\.stableUniqueID) { row($0) }","action":"Review the identity and lifetime of state and effects across updates. Check navigation, repeated rendering and cancellation before applying the illustrative change.","method":"Intended reasoning: Relate view identity and lifecycle to the state or effect that depends on them. The intended analysis needs the selected framework semantics and the relevant update paths, not only a matching property or view name. Required evidence: view identity, input, update, and state-lifecycle facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.ui.02/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.ui.02/index.md"},{"ruleId":"portfolio.ui.03@1.0.0","slug":"portfolio.ui.03","title":"View computation causes a state-update cycle","family":"UI","familyTitle":"SwiftUI","conditions":[{"conditionId":"V-UI-03","title":"View computation causes a state-update cycle","kind":"Defect","kindCode":"D","family":"UI","description":"View computation causes a state-update cycle. It examines SwiftUI identity, update, and state-lifecycle behavior.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"View computation causes a state-update cycle. It examines SwiftUI identity, update, and state-lifecycle behavior.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Relate view identity and lifecycle to the state or effect that depends on them. The intended analysis needs the selected framework semantics and the relevant update paths, not only a matching property or view name. Required evidence: view identity, input, update, and state-lifecycle facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Computing a view mutates observed state that immediately triggers the same computation again.","afterProse":"Keep view computation free of that state transition. Move the transition to a lifecycle or event handler with an explicit guard so rendering itself does not drive the update loop."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.ui.03/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.ui.03/index.md"},{"ruleId":"portfolio.ui.04@1.0.0","slug":"portfolio.ui.04","title":"One-time state does not update with required input","family":"UI","familyTitle":"SwiftUI","conditions":[{"conditionId":"V-UI-04","title":"One-time state does not update with required input","kind":"Contract violation","kindCode":"P","family":"UI","description":"One-time state does not update with required input. It examines SwiftUI identity, update, and state-lifecycle behavior.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"One-time state does not update with required input. It examines SwiftUI identity, update, and state-lifecycle behavior.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"struct Child: View {\n    @State private var text: String\n    init(value: String) { _text = State(initialValue: value) }\n    var body: some View { TextField(\"Name\", text: $text) }\n}","after":"struct Parent: View {\n    @State private var text = \"\"\n    var body: some View { Child(text: $text) }\n}\nstruct Child: View {\n    @Binding var text: String\n    var body: some View { TextField(\"Name\", text: $text) }\n}","action":"For shared editing, Parent owns the source of truth and Child receives its binding. State(initialValue:) seeds local state; it does not keep it synchronized with later input values for the same view identity. A deliberately independent draft can still use local State, but must define explicit commit, cancel and reset behavior. These snippets assume SwiftUI is imported; they are not part of the macOS source-scan tutorial.","method":"Intended reasoning: Relate view identity and lifecycle to the state or effect that depends on them. The intended analysis needs the selected framework semantics and the relevant update paths, not only a matching property or view name. Required evidence: view identity, input, update, and state-lifecycle facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.ui.04/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.ui.04/index.md"},{"ruleId":"portfolio.change.01@1.0.0","slug":"portfolio.change.01","title":"Source API change breaks an admitted consumer","family":"CHANGE","familyTitle":"Change and compatibility","conditions":[{"conditionId":"V-CHANGE-01","title":"Source API change breaks an admitted consumer","kind":"Defect","kindCode":"D","family":"CHANGE","description":"Source API change breaks an admitted consumer. It examines source, ABI, dependency, resource, and cache compatibility across changes.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Source API change breaks an admitted consumer. It examines source, ABI, dependency, resource, and cache compatibility across changes.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Compare corresponding declarations and observable contracts across selected versions and build variants. The intended compatibility decision needs a complete consumer and configuration boundary. Required evidence: consumer, API, ABI, resolution, resource, and cache facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A provider removes an API still called by a supported source consumer.","afterProse":"Retain a compatible entry point or migrate and qualify the affected consumers before removing it. Compare the declared consumer set and build variants on both revisions."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.01/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.01/index.md"},{"ruleId":"portfolio.change.02@1.0.0","slug":"portfolio.change.02","title":"ABI change breaks binary compatibility","family":"CHANGE","familyTitle":"Change and compatibility","conditions":[{"conditionId":"V-CHANGE-02","title":"ABI change breaks binary compatibility","kind":"Defect","kindCode":"D","family":"CHANGE","description":"ABI change breaks binary compatibility. It examines source, ABI, dependency, resource, and cache compatibility across changes.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"ABI change breaks binary compatibility. It examines source, ABI, dependency, resource, and cache compatibility across changes.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Compare corresponding declarations and observable contracts across selected versions and build variants. The intended compatibility decision needs a complete consumer and configuration boundary. Required evidence: consumer, API, ABI, resolution, resource, and cache facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A distributed binary changes an ABI-relevant symbol or layout expected by existing binary clients.","afterProse":"Preserve the supported binary contract or make an explicit compatibility-breaking release. Source compilation alone does not establish ABI compatibility for already-built clients."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.02/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.02/index.md"},{"ruleId":"portfolio.change.03@1.0.0","slug":"portfolio.change.03","title":"Existing signature gains incompatible behavior","family":"CHANGE","familyTitle":"Change and compatibility","conditions":[{"conditionId":"V-CHANGE-03","title":"Existing signature gains incompatible behavior","kind":"Defect","kindCode":"D","family":"CHANGE","description":"Existing signature gains incompatible behavior. It examines source, ABI, dependency, resource, and cache compatibility across changes.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Existing signature gains incompatible behavior. It examines source, ABI, dependency, resource, and cache compatibility across changes.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Compare corresponding declarations and observable contracts across selected versions and build variants. The intended compatibility decision needs a complete consumer and configuration boundary. Required evidence: consumer, API, ABI, resolution, resource, and cache facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"An unchanged method signature begins interpreting timeout values in a different unit.","afterProse":"Preserve the old behavior or introduce an explicit versioned API and migrate consumers. Compare observable semantics, defaults and error behavior as well as the signature."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.03/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.03/index.md"},{"ruleId":"portfolio.change.04@1.0.0","slug":"portfolio.change.04","title":"Consumer silently binds to a different symbol","family":"CHANGE","familyTitle":"Change and compatibility","conditions":[{"conditionId":"V-CHANGE-04","title":"Consumer silently binds to a different symbol","kind":"Review signal","kindCode":"W","family":"CHANGE","description":"Consumer silently binds to a different symbol. It examines source, ABI, dependency, resource, and cache compatibility across changes.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Consumer silently binds to a different symbol. It examines source, ABI, dependency, resource, and cache compatibility across changes.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Compare corresponding declarations and observable contracts across selected versions and build variants. The intended compatibility decision needs a complete consumer and configuration boundary. Required evidence: consumer, API, ABI, resolution, resource, and cache facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"Adding an overload causes an existing consumer call to resolve to a different declaration.","afterProse":"Compare the selected declaration and behavior for the same consumer source before and after the change. Adjust the API or make consumer intent explicit, then requalify the affected calls."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.04/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.04/index.md"},{"ruleId":"portfolio.change.05@1.0.0","slug":"portfolio.change.05","title":"Version range admits an incompatible provider","family":"CHANGE","familyTitle":"Change and compatibility","conditions":[{"conditionId":"V-CHANGE-05","title":"Version range admits an incompatible provider","kind":"Contract violation","kindCode":"P","family":"CHANGE","description":"Version range admits an incompatible provider. It examines source, ABI, dependency, resource, and cache compatibility across changes.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Version range admits an incompatible provider. It examines source, ABI, dependency, resource, and cache compatibility across changes.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Compare corresponding declarations and observable contracts across selected versions and build variants. The intended compatibility decision needs a complete consumer and configuration boundary. Required evidence: consumer, API, ABI, resolution, resource, and cache facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A declared dependency range admits a provider version that breaks a supported consumer contract.","afterProse":"Constrain the range to qualified compatible versions or update the consumer and compatibility policy. A resolver accepting a version does not prove behavioral compatibility."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.05/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.05/index.md"},{"ruleId":"portfolio.change.06@1.0.0","slug":"portfolio.change.06","title":"Change bypasses required consumer review","family":"CHANGE","familyTitle":"Change and compatibility","conditions":[{"conditionId":"V-CHANGE-06","title":"Change bypasses required consumer review","kind":"Contract violation","kindCode":"P","family":"CHANGE","description":"Change bypasses required consumer review. It examines source, ABI, dependency, resource, and cache compatibility across changes.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Change bypasses required consumer review. It examines source, ABI, dependency, resource, and cache compatibility across changes.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Compare corresponding declarations and observable contracts across selected versions and build variants. The intended compatibility decision needs a complete consumer and configuration boundary. Required evidence: consumer, API, ABI, resolution, resource, and cache facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A provider change merges without the consumer review required by the release policy.","afterProse":"Route the change through the required affected-consumer review and retain its evidence. An unreviewed change is a process-contract violation even when no break has yet been demonstrated."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.06/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.06/index.md"},{"ruleId":"portfolio.change.07@1.0.0","slug":"portfolio.change.07","title":"Comparable resource bound regresses","family":"CHANGE","familyTitle":"Change and compatibility","conditions":[{"conditionId":"V-CHANGE-07","title":"Comparable resource bound regresses","kind":"Improvement opportunity","kindCode":"O","family":"CHANGE","description":"Comparable resource bound regresses. It examines source, ABI, dependency, resource, and cache compatibility across changes.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Comparable resource bound regresses. It examines source, ABI, dependency, resource, and cache compatibility across changes.","exampleLabel":"Illustrative design scenario, not a runnable Swift example or a reproduced analyzer result. The stated availability and evidence boundaries still apply.","action":"Review the following change against the contract and build variants described above.","method":"Intended reasoning: Compare corresponding declarations and observable contracts across selected versions and build variants. The intended compatibility decision needs a complete consumer and configuration boundary. Required evidence: consumer, API, ABI, resolution, resource, and cache facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability.","beforeProse":"A new revision exceeds a declared memory bound on the same workload and measurement profile.","afterProse":"Compare equivalent inputs, metrics and profiles, then repair the regression or explicitly approve a revised budget. Results from different workloads do not establish a comparable regression."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.07/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.07/index.md"},{"ruleId":"portfolio.change.08@1.0.0","slug":"portfolio.change.08","title":"Cache key or invalidation omits a result dependency","family":"CHANGE","familyTitle":"Change and compatibility","conditions":[{"conditionId":"V-CHANGE-08","title":"Cache key or invalidation omits a result dependency","kind":"Defect","kindCode":"D","family":"CHANGE","description":"Cache key or invalidation omits a result dependency. It examines source, ABI, dependency, resource, and cache compatibility across changes.","workflow":"source-scan","availability":"unavailable","invocation":null,"experimental":null,"historicalEvidence":{"revision":"4558458d","status":"recovery-required","currentQualification":"not-established","scope":"The source producer still requires recovery and qualification in this snapshot. The target description is not evidence of an active diagnostic."},"explanation":{"purpose":"Cache key or invalidation omits a result dependency. It examines source, ABI, dependency, resource, and cache compatibility across changes.","exampleLabel":"Illustrative pattern only. This is not a complete runnable package or a reproduced source-scan result. Helper APIs and omitted context must be supplied by the application.","before":"cache[userID] = render(userID, locale: locale)","after":"cache[CacheKey(userID: userID, locale: locale)] = result","action":"Identify the affected consumers and supported variants. Review source, binary and runtime compatibility separately and provide a migration where behavior changes.","method":"Intended reasoning: Compare corresponding declarations and observable contracts across selected versions and build variants. The intended compatibility decision needs a complete consumer and configuration boundary. Required evidence: consumer, API, ABI, resolution, resource, and cache facts","boundary":"The relevant facts must be admitted for the selected immutable build world. Unknown aliases, external effects, unsupported source forms or incomplete consumers can prevent a conclusion. Availability in this workflow is stated above; the illustration does not expand that availability."}}],"htmlUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.08/","markdownUrl":"https://docs.swift-analyzer.com/catalog/portfolio.change.08/index.md"}]}
