# A bounded correctness-audit handoff

This kit is a synthetic teaching exercise, not a customer audit, security
certification, accepted Change or release decision. Its six handoff artifact
categories are authored engineering choices. They help separate an observed
defect, a selected repair recheck and the wider work still needing owners.

## Run the actual functions without Proof

Extract the complete evidence ZIP, inspect its source and from the extracted
root run normal CPython 3.12 or later with standard-library sqlite3:

```sh
python3 -B reproduce.py --output /tmp/audit-handoff-new-run
```

Choose a directory that does not exist. The wrapper refuses to overwrite
evidence. Do not use optimized Python (`-O`). No Proof binary, account,
credential, Git checkout, network service or pip dependency is needed.

The primary capture used CPython 3.14.7, SQLite 3.53.4, Darwin/arm64,
optimization0. A new run must retain its own actual versions, times and
results. Store new output beside, not over, `observed/`.

| Child gate | Expected exit | Result expected by the demonstration |
| --- | --- | --- |
| old | 0 | Both selected response/state expectations met. |
| candidate | 1 | Foreign request returns403 after committing a forbidden label change. |
| fixed | 0 | New teaching correction meets both selected expectations. |
| reject_all | 1 | Seeded no-write repair denies owner success and is rejected. |

Wrapper exit0 means those expected contrasts occurred. It does not accept the
faulty candidate or blanket denial. Raw stdout/stderr and `summary.json` are
written to the new output directory. Empty stderr and the structured failed
assertions distinguish the expected rejected candidates from a setup error.

## Exact scope and independent expectations

The unchanged EX-TENANT-1 permits an owner to update its existing document.
Another tenant receives403 and must leave all document rows unchanged. The
authority is a fictional service owner. Each independent call starts with
`[[1,"alpha","quarterly"]]`. Alpha and beta directly request label `revised`.
These tenant strings are function arguments, not authenticated sessions or
HTTP identities. Deterministic request IDs are supplied correlation inputs,
not an idempotency protocol.

The separately authored literal oracle in `expected.json` checks exact whole
response keys/types/values and complete ordered document rows. Its response
shape/error/request-ID assertions supplement the retained teaching promise;
they are not customer approval or a retroactive claim about the old runner.
The historical runner independently asserted status and rows, while capturing
the rest of the response. The fresh oracle is explicitly stronger.

`migration.py` is the unchanged archived module. Its `old_api` checks ownership
before writing; `candidate_api` writes and commits before checking. They are
two callable identities in one file, not two measured Git revisions. New
`implementations.py` contains `fixed_api`, an explicit sequential teaching
correction, and a deliberately inadequate `reject_all_no_write` control.

The new harness calls each function once for each of the two cases. Actual
code-object entry events, supplied arguments, callable/file/function hashes,
SQL traces and transaction settings are retained. The same observations feed
the status-only and full-response/state comparisons; evaluating both does not
create extra handler calls.

The operation connection closes before an independent fresh connection reads
`SELECT id,tenant,label FROM documents ORDER BY id`. These are observed
committed selected writes under ordinary execution, not a crash, restart,
power-loss or cross-engine durability test. The source uses runtime connection
defaults; captures record them rather than implying newly pinned settings.

The faulty candidate meets both response-status expectations, but its foreign
case leaves `revised` in storage. The new fix leaves `quarterly` for that denied
case and still stores `revised` for owner success. The reject-all control meets
the foreign case but fails the owner case. A denial-only observation cannot
justify closing the behavior obligation.

## History, fresh execution and counting units

`historical/` preserves all12 original public files, including their original
ten-member ZIP, captured report, output and checksums. The archived report is
dated October3,2026 at09:30:30.809118UTC. It records two tenant cases/four local
handler calls and zero repaired-candidate runs. Its separate token experiment
records12 assertion observations; those are not migration/audit handler calls.

The approved migration companion's October27 rerun also contains no executed
repair. This guide's new correction is separate October28 evidence. It does
not alter or repair historical evidence, change the companion article or
establish a completed migration/cutover plan. The token experiment was not
rerun in the new audit campaign.

The fresh campaign contains two selected cases through four variants: eight
profiled top-level handler calls, in four child gates. These are not eight
distinct requirements, security controls or an exhaustive authorization suite.
The new fix meets2/2 selected whole-response/state expectations; that is local
repair evidence. It does not demonstrate all siblings or authorize closure by
an actual customer, maintainer or deployment owner.

## Use the six-artifact handoff

`audit-handoff.json` is an authored filled work record tied to the actual raw
observations. It records:

1. Intent and its fictional authority, selected scope and supplemental oracle.
2. Impact/risk map, affected callables and important unexamined work.
3. Evidence plan, independent observations and positive/control checks.
4. Execution identities, command/runtime/results and expected-failure meaning.
5. Decision/disposition, fictional implementation owner and real acceptance
   still unperformed.
6. Reusable checks and changes that require evidence review or renewal.

The artifact is not a generated Proof Change, a standard-mandated form or an
actual approval. A team can keep implementation with its engineers or scope
implementation and verification separately; the teaching executor cannot
silently decide the real customer's acceptance, merge or deployment.

No authentication, HTTP transport, missing-document case, other endpoint,
information-disclosure property, concurrent ownership change, retry, external
effect, production schema/data migration, load, crash recovery or real release
was exercised. Checking ownership earlier does not establish atomic tenant
isolation under concurrency. Keep these limits and accountable next decisions
visible rather than relabeling them as passed.

## Integrity and freshness

`PROVENANCE.json` binds the source, archive and fresh capture identities.
`manifest.json` hashes all substantive members before the two top-level
integrity indexes. `SHA256SUMS` also hashes the manifest; the separate outer
ZIP checksum binds the complete archive. A file cannot include its own hash.
Digests identify bytes, not signatures or proof of customer approval.

Policy, response schema, code, oracle, harness, dependencies, database runtime,
scope and observation-point changes require a named freshness decision and
appropriate renewed evidence. Preserve reproduced failures and unperformed
work. A passing finite teaching campaign is not a correctness certificate.
