<!-- description: Compare HoldFast's Safe, Contracted, and Complete assurance presets and see how proof obligations, evidence status, and exported contracts compose. -->

# Assurance presets and evidence policy

The [first-release contract](../../language/first-release/#release-boundary)
defines the synchronous subset. A preset selects the claims a build must
establish for that subset and the evidence each claim requires.

## Scope and the governing rule

All three presets require operation safety and evidence for every exported
promise. **Contracted** also requires the selected functional, protocol or
resource claims. **Complete** requires evidence for every requirement within
the declared release boundary.
[Preset implementation](../../assurance/completion-log/#q25bo-implement-assurance-preset-selection-and-evidence-status)

The locked mathematical package checker reports evidence for the source
closure. Binary admission requires separate artifact evidence under the
platform's assurance tiers and certification rules. [Assurance tiers](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/spec.md#r-13-011) ·
[Certification](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/spec.md#r-13-014)

## Four concerns that one strictness setting conflates

| Concern | Question | Owner |
| --- | --- | --- |
| Authoring experience | Which concepts does the developer manipulate? | Application, systems and optional proof interfaces within [one language](../../assurance/verification-strategy/#feature-decisions) |
| Assurance policy | Which properties must this build establish? | The preset's explicit obligation set below |
| Execution profile | Which operations and resource behavior are permitted? | A target profile and its [required guarantee theorems](../../assurance/verification-strategy/#required-guarantees-not-feature-flags); VerifiedOS's bounded profile is the first instance. A preset cannot introduce excluded GC, threads, exceptions or dynamic allocation. A hosted target is a separate deliverable. |
| Evidence endpoint | Which representation does the claim concern? | [Source-verified, artifact-connected or production-qualified](../../assurance/verification-strategy/#expected-developer-experience), with explicit assumptions |

A build reports properties, scope, assumptions and endpoint. Source-level Complete supplies no machine-code theorem; a safety-certified executable need not prove every aspect of application intent.
The locked mathematical `check-assurance` command reports at `source-verified`.
Its default Complete scope covers the locked mathematical closure. The required
properties are type safety, ownership, effects and functional contracts. An
explicit request for a property without a source producer, such as bounded
memory, refuses. Use `--replay` to establish exported proofs with Rocq and
`rocqchk`. Skipped or failed replay cannot license proof-based optimization.
Requests for an artifact-connected or production endpoint refuse with missing
evidence, leaving the requested claims unestablished.

Shared constructs retain their semantics across presets: overflow, evaluation order, ownership, exits and cancellation belong to the [language rules](../../assurance/verification-strategy/#feature-decisions). A checked operation retains its failure behavior; eliminating its check requires preservation on every admitted input.

Generated definitions, instances, descriptors and dependencies follow the same
evidence policy. Validate generated theorems and their source and dependency
correspondence before use, including optimization. Preserve effects, runtime
checks and mandatory results even when their values are unused.
[Metaprogramming contract](../metaprogramming/)

## The three presets

### Safe: ordinary programming without optional theorem obligations

Safe checks types, ownership, initialization and effects. Closed bounds and
package policy constrain operations. Discharge open invariant, safety and reuse
obligations by proof or an approved boundary. Other specifications and named
lemmas are optional. Runtime validation needs an admitted failure path and a
cost budget. [Effect rules](../../language/first-release/#package-effect-contracts)

### Contracted: selected stronger claims become mandatory

Contracted adds selected functional, protocol or resource specifications at
function, module or package interfaces. Discharge them by inference, verified
construction or a checked boundary and report scope and assumptions. Open
required goals block acceptance. To weaken an export, edit its declaration
and recheck dependents.

### Complete: policy-complete verification over a declared boundary

Complete requires evidence for each release requirement across the declared
execution and implementation closure, under its stated assumptions and at its
required endpoint. Helpers may be covered by enclosing proofs or automatic
analysis. A service can run indefinitely and still prove progress for each
admitted request. Name timing, termination, deadlock freedom, safety and
information flow separately. Record approved foundational and environmental
assumptions. [Assumption policy](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/spec.md#r-05-164)

### Default obligations

| Obligation or feature | Safe | Contracted | Complete |
| --- | --- | --- | --- |
| Baseline language and profile safety | Required | Required | Required |
| Handwritten theorems | Not routinely required | Where other evidence is insufficient | Not inherently required; every required goal is discharged |
| Optional functional specifications | May be omitted | Required in selected scope | Required to express release requirements |
| Evidence for authored exported `requires`/`ensures` | Required | Required | Required |
| Unproved scratch conjecture | Editor/scratch only; no exported promise | Editor/scratch only; no selected-contract credit | No release evidence |
| Runtime validation | Where the profile permits it | For explicitly checked boundary properties | Where requirements permit rejection and account for cost |
| Unsafe or foreign implementation | Explicit boundary and actual safety guarantees | Same, with transitive contract accounting | Meets release proof/assumption policy |
| Coverage report | Baseline and exported evidence | Selected claims and dependencies | Requirements, closure, assumptions and endpoint |

## Exported contracts and scratch claims

Every preset enforces public `requires` and `ensures`. Callers establish entry
conditions. For those inputs, implementations establish postconditions, safety
and resource duties. For locked mathematical packages, `check-assurance` under
Complete refuses a public callable when its checked requirements prove its
caller domain empty. Guard and range vacuity produce advisory findings.
[Authoring lint policy](../../tooling/authoring-tools/#lint-policy)
Independent review uses valid entry witnesses and distinguishing negative cases
to assess contract adequacy.

A checked boundary establishes a premise or result on explicit success.
Its interface includes failure, effects and cost. External interfaces name
assumptions and provenance in the resolved declaration and evidence record
under platform trust policy. Presets add no implicit assertions, traps,
unchecked assumptions or external-interface status.

Scratch propositions carry source context and `Unestablished` status.
They stay outside executable `requires`/`ensures`, interfaces, elaboration and
optimization facts and automatic runtime checks. An editor may propose edits
or proofs, but promotion requires an edit, ordinary checking and current
evidence. Conjecture syntax remains outside the parser and mathematical prototype.

## Claim status, and what each status licenses

Evidence attaches to claims. Each claim record, including unfinished editor work,
has one machine-readable status. An accepted exported contract has applicable
evidence; `Unestablished` is never an accepted contract status.

| Status | Meaning | Permitted consumers |
| --- | --- | --- |
| Established | Accepted evidence proves the property under recorded assumptions | Proof search, elimination, proof-based optimization and dependent contracts |
| Checked on success | A verified boundary establishes a decidable predicate when successful; failure remains possible | Success branch only; failure behavior and cost remain accounted |
| Conditional | Result depends on a declared external assumption | Consumers carrying that assumption into their own reports |
| Unestablished | No accepted evidence; scratch or unfinished build only | No accepted exported contract or use as a proof premise, safe-elimination justification or optimization fact |

Tests and measurements establish no universal theorem. A solver timeout is no counterexample; unchecked unsatisfiability is no accepted proof. Checked success promises neither universal parsing nor inexhaustible allocation: invalid input and [bounded-pool exhaustion](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/spec.md#r-08-046) remain explicit outcomes.

An ordinary sorter may export an array without sortedness. An opaque sorted-array invariant requires a verified algorithm, verified validation or approved assumption; disabling verification cannot manufacture that stronger value through a safe interface. Mutable abstractions must also control invalidating writes. Validation of one snapshot licenses no later write or alias, under the [snapshot rules](../interior-mutability/#snapshots-and-dependent-indices). Verus's ignored code, external specifications and assumed contracts provide a trust-accounting precedent in [the survey](../../assurance/verification-strategy/#what-the-rust-verifiers-contribute).

### Evidence beside the declaration

API documentation, signature help and editor contract views show each claim's
status as text and its endpoint beside the source spelling. `Conditional` names
assumptions; `Checked on success` names the establishing outcome; `Established`
links to assumptions and exact subject. Unfinished snapshots may lack evidence;
accepted builds must discharge the declaration's contract.

For example, this exported declaration requires its postcondition in every
accepted build; the final line illustrates generated API information for one
source-verified build:

```hf
public Unit Sort(ref Span<Key> keys)
    ensures IsSorted(keys.Model);
    // Evidence: Established; endpoint: source; exact build and assumptions linked.
```

While its proof is unfinished, an editor shows `Unestablished` and the package
cannot export this declaration as accepted. A developer exploring sortedness
without taking on that interface obligation keeps it in the separate scratch
channel and exports a declaration with no sortedness clause.

The display reads the [release and policy record](#erasure-compilation-and-the-release-record)
for the resolved claim, source closure, semantic dependencies, build configuration
and endpoint. Missing, stale or incompatible records show `Unestablished` with a
reason and block exported-contract acceptance. Stable names/spans cannot preserve
verdicts across dependency changes. Documentation identifies its build; editors
cannot present historical verdicts as current after source changes. Source and
final-byte evidence remain visibly distinct; comments and badges confer no proof
authority.

For a locked package, `holdfast-parser check-assurance WORKSPACE LOCK --replay`
emits a JSON inventory with declaration and clause identities, assumptions,
status and endpoint. Retain the report with its selected policy and lock. Run
the same command with `--verify-report FILE` in place of `--replay` to
reconstruct the expected claims and cold-replay the package in Rocq. A
recomputed report digest cannot hide an omitted public claim. The inventory
includes exported claims outside the caller's exercised surface.
[Tool commands](https://github.com/symbiogenesis/HoldFast/blob/main/tools/README.md#commands)

## Composition across mixed assurance

| Call boundary | Rule |
| --- | --- |
| Ordinary caller into verified library | Preconditions are inferred, proved or checked through the public interface; callers need not see the proof language. |
| Verified caller into ordinary implementation | Rely only on its established interface; stronger behavior needs evidence or a declared assumption. |
| Verified caller into validating wrapper | Rely on the exact success predicate, effects and failure behavior the wrapper establishes. |
| Any caller into unsafe/foreign implementation | State safety preconditions, ownership transfer, effects, failure behavior and transitive trust provenance. |
| Generic, callback or dynamic dispatch | Account for every permitted implementation or prove robustness against the declared external behavior. |

In the locked mathematical build, declaration-scoped assumptions follow
resolved source references through private helpers and qualified imports.
Each declaration selector must match a declaration in the package that owns
the assumption. A short name covers every matching declaration there. An
unknown selector refuses assurance for the closure, including when another
selector in the same assumption still matches.
Unresolved reference forms retain conservative attribution within the reachable
modules. Package-wide assumptions follow the import closure.

Postcondition validation cannot repair earlier memory corruption, disclosure or unbounded stalls. It substitutes for proof only where the predicate can be established at that boundary.

Unresolved editor/scratch annotations cannot influence accepted typing or compilation as facts: [typed holes stay outside accepted packages](../../assurance/verification-strategy/#mechanically-produced-evidence). Explicit interface downgrades are source/interface changes that recheck dependents and remove unjustified theorem-dependent optimization or invariant elimination. A build flag cannot perform that downgrade.

## What complete coverage must mean

Complete requires property-by-boundary coverage, following the platform's [coverage matrix](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/assurance/coverage-matrix.md), rather than an annotation percentage. Each cell cites discharge evidence; an empty discharge fails. [Coverage changes](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/assurance/coverage-matrix.md#4-how-to-read-a-cell-and-how-to-change-one) start from requirements.

| Dimension | Example requirement | Easily missed obligation |
| --- | --- | --- |
| Functional behavior | Specified request response | Express intent independently of implementation |
| Safety | No invalid access on admitted inputs | Include foreign calls, callbacks, generated code, aliases and failures |
| Resources | Admitted memory budget | Count stack, frames, metadata and backing reservations for their full lifetimes, including foreign retention and reclamation delay |
| Progress | Allowed terminal result per admitted request | Establish scheduler/device premises; fairness is no deadline |
| Security | Policy confines authority and information | Functional equivalence and memory safety imply neither guarantee |
| Executable correspondence | Source properties hold of shipped image | Connect lowering, optimization, linkage and runtime |

The closure includes reachable implementations, generic instantiations, dynamic selections, dependencies, generated code and relevant runtime components. Exclusions require explicit environmental/boundary models; plugins or foreign implementations must satisfy them or trigger requalification. Requirement IDs map to formal statements and evidence. Review checks inconsistent preconditions, unreachable success and vacuity; its judgment remains a [recorded residual](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/spec.md#17-residual-risks-the-honest-ceiling). Witnesses and negatives do not prove requirement completeness, and a specification generated from code proves no intent.

## Meanings no preset may reinterpret

| Distinction | Owner | Forbidden inference |
| --- | --- | --- |
| Use count, memory permission, information-flow label, cost | [Graded foundation](../graded-foundation/#dimensions-and-lawful-domains) | Cost/security grants ownership; idempotent use means single use |
| Transitive continuation captures | [Handler rules](../handlers-async/#handler-lookup-capture-and-return) | Storage duplicates an exclusive loan/token or permits dropping cleanup/erasure duties |
| Cancellation request, terminal result, safe reuse | [Cancellation](../handlers-async/#cancellation-commit-and-all-exits), [typed protocol](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/spec.md#r-12-097) | `cancelled` frees backing before device/participant access ends |
| Historical snapshot, current contents | [Mutability](../interior-mutability/#snapshots-and-dependent-indices) | An observed refinement survives arbitrary interference |
| Ghost data, runtime witnesses | [Erasure](../graded-foundation/#inference-specialization-and-admission) | Erase execution-needed indices or make bounds checks/dynamic indexing free |
| Pool capacity | [Bounded pools](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/spec.md#r-08-046) | Treat exhaustion as impossible |

Mutable dependencies require stable snapshots or invariant protocols under every preset. Continuations, frames, queues and cleanup still fit the resource/scheduling model; hiding proofs behind an API hides no obligation.

## A simple subset that stays simple when libraries compose

Initial application interfaces cover parsing, bounded collections, iteration and errors without unexpectedly exposing separation-logic resources or grade algebras. Later structured async interfaces must meet the same ordinary-use criterion. A parser returns a valid packet or explicit failure while its library accounts for bounds and backing ownership; loop/iterator interfaces supply routine bounds facts. The [ownership-library contract](../../language/first-release/#ownership-libraries) defines the first client-facing initialization and borrowing cases.

Limits remain visible: collections fill, views cannot outlive storage, and closures retain captures. Diagnostics name the developer's operation and values and distinguish rule violation, refuted contract, unknown/timeout, unsupported feature and profile refusal. Checking proceeds through ordinary checking, a declared automatic refinement fragment, domain automation and contextual proof goals. The [proof-interaction contract](../../assurance/verification-strategy/#language-product-contract) measures that ladder; it promises no automatic-proof percentage or unbounded search at every keystroke.

## Static-memory claims stay separate

A syntax- and CHERI-independent planner consumes ordinary instances and returns offsets. A verified frontend must additionally connect its instance to every execution the contracts admit.

| Claim | Establishes | Leaves open |
| --- | --- | --- |
| Extraction | Executions respect coexistence and safe-reuse constraints | Layout validity cannot validate the extraction |
| Placement | Offsets satisfy sizes, alignment, pools, aliases, fixed locations and conflicts | Feasibility implies no optimality |
| Optimality/approximation | Objective relation to the specified feasible set | A conservative graph's optimum may differ from the program's |
| Preservation | Lowering/deployment preserve lifetime, representation and resources | Packing removes no retained authority, nonborrowable reservations or workload-bound duty |

The [research agenda](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/background/static-memory-research.md) owns capacity questions, certificate checking, constraint encoding, source relation and deployment connections. These integrations need not wait for the complete language.

## Erasure, compilation and the release record

Ghost data cannot influence runtime results through unaccounted dependencies; execution-needed witnesses stay represented. Erasure, optimization and physical-resource preservation need separate theorems: source equivalence proves no stack, constant-time or capability-reuse bound. The [compiler obligations](../../assurance/verification-strategy/#mechanically-produced-evidence) retain these boundaries and validation costs.

A release record binds the source closure, contracts, target semantics, compiler
configuration, artifact and evidence. The proposed policy extends it with the
preset, expanded obligations and status of each exported claim. Semantic dependency
changes reopen affected obligations even when names and goal IDs stay stable.

## The policy record

Proposed configuration pseudocode; names resolve to separately versioned definitions.

```toml
[authoring]
api_surface = "application"        # does not restrict the eventual assurance

[assurance]
preset = "complete"
scope = "release-implementation-closure"
requirements = "spec/service-requirements"
required_properties = ["memory-safety", "functional", "bounded-memory"]
pending_required_goals = "reject"
project_added_axioms = "reject"
approved_environment = "spec/environment-assumptions"

[execution]
profile = "verifiedos-bounded"
profile_definition = "profiles/verifiedos-bounded"
runtime_validation = "explicit-and-budgeted"

[evidence]
endpoint = "production-qualified-image"
assumptions_manifest = "assurance/assumptions"
coverage_manifest = "assurance/coverage"
replay = "pinned-toolchain"
```

Complete refuses missing specifications/evidence for mandatory dimensions; it never fills them with trivial properties. Safe authoring can feed a Complete release when libraries and automation discharge its obligations.

## Qualification protocol

The [extension plan](../../plan/#language-extensions) owns selection and
implementation. [Frontend admission](../full-language-review/#frontend-admission)
specifies checked interpretation and concrete-law requirements.

| Stage | Exercise | Acceptance |
| --- | --- | --- |
| Policy semantics | Claim status and mixed-assurance rules on bounded core | Reject an unproved exported clause under every preset, a flag-only contract downgrade, scratch claims used as facts, invented invariants, unresolved safety goals, hidden assumptions and unjustified optimizations |
| Ordinary application | Parser, collection and service using application interfaces alone | Add one checked public functional guarantee with executable reuse and show what a caller gains. [Trial](#ordinary-application-trial) |
| Later systems boundary | [Fixed-capacity arena and hardware-facing async operation](../../language/systems-profile/#fixed-capacity-arena-trial) | Preserve state on capacity refusal, establish when backing becomes reusable, and account for the reservation under the admitted memory budget |
| Complete release | Requirements over declared closure and endpoint | Dependency changes, callbacks, foreign interfaces and generated code invalidate affected evidence in test |
| Maintenance | Representation change, concurrency, new failure path, replaced library | Separate executable/specification churn, proof repair, checking cost and target resources |

The `preset-policy` and `core-diagnostics` owners qualify
[evidence presentation](#evidence-beside-the-declaration) for all four statuses in
signature help and review views. Accepted API views exclude unestablished promises.
Controls change the claim, dependency, build configuration or endpoint, or remove
evidence: incompatible established verdicts must disappear. Keep conditional
assumptions, success-only outcomes and historical documentation's build identity
visible. Preset changes cannot discharge unresolved exported clauses. Prove
validating wrappers' success predicates with errors/resource behavior retained;
reject external assumptions lacking permitted provenance.

Acceptance requires sound assurance boundaries and useful ordinary clients under composition/change, without a predetermined automatic-proof percentage.

### Ordinary application trial

Build the application under Safe using its ordinary interfaces. Choose one
public operation and one functional guarantee a caller needs. Under Contracted,
add the guarantee and its proof to the same implementation. Keep the operation's
executable body and execution profile fixed. Record the declaration and proof
edits, the effort to establish and review the guarantee, and any executable
rewrites elsewhere in the application.

Recheck the ordinary caller unchanged. With the provider implementation opaque,
check a caller proof that needs the new guarantee. The proof must fail at the
missing guarantee against the Safe interface and replay against the Contracted
interface with current checked evidence. Record the established claim and its
endpoint beside the declaration.
[Q25br](../../assurance/completion-log/#q25br-qualify-ordinary-applications-under-increasing-assurance) ·
[Public-contract review](../../assurance/workflow-contract/#reviewing-a-public-contract-change)

<a id="what-this-dossier-does-not-establish"></a>

## Design references

SPARK's [usage scenarios](https://docs.adacore.com/spark2014-docs/html/ug/en/usage_scenarios.html), [Dafny's contracts and ghost material](https://dafny.org/dafny/DafnyRef/DafnyRef) and [Verus's trust accounting](https://verus-lang.github.io/verus/guide/tcb.html) supply adoption patterns and vocabulary, with wider assessment in the [research landscape](../../assurance/verification-strategy/#research-landscape) and source/licence readings in the [proof inventory](https://github.com/symbiogenesis/VerifiedOS/blob/main/docs/assurance/proof-reuse.md).
