# One requirement-to-evidence chain: Go cache teaching fixture

This kit accompanies a practical DO-178C subject guide. It is an ordinary Go
teaching example, not airborne software, a certification package or a qualified
tool. The deliberately incomplete cache helper ignores `Entry.Deleted`.

The fixture and its historical measurement are unchanged from the public
[Go MC/DC example](https://reqproof.com/topics/mcdc-coverage-go). The historical
MC/DC report was recorded on 9 October 2026 with
`proof 0.1.0-dev+geeb5981c`. It contains one decision, three covered conditions
and four runtime samples. This kit's runner does not regenerate that measurement.

## Inspect first

- `fixture/cache/cache.go`: deliberately incomplete helper.
- `fixture/cache/cache_test.go`: four ordinary test subcases A-D.
- `fixture/cache/requirement_test.go`: one opt-in test requiring a deleted entry
  not to be served. It is expected to fail against the included helper.
- `fixture/evidence/`: original archived results and provenance, with their own
  date and source hashes.
- `captured/`: the new standalone-test capture, with its own timestamp, runtime,
  commands, source hashes and output. It contains no new MC/DC measurement.
The article’s review worksheet/register are separate artifacts. This evidence
kit reproduces the contrast; it does not supply a normative objective matrix.

## Reproduce

Prerequisites: Python 3.9+ and an installed Go 1.22+ toolchain. No third-party Go
modules, pip packages, Proof CLI, account or network service are needed. The
runner sets `GOTOOLCHAIN=local`, `GOPROXY=off` and `GOSUMDB=off`, uses a fresh
temporary Go cache, and refuses to overwrite captured output.

From the extracted kit directory:

```sh
python3 reproduce.py --output rerun-results
```

The runner checks source hashes against the archived provenance and executes:

```sh
cd fixture
go test -count=1 -v ./cache
go test -count=1 -tags requirement -run TestTombstoneIsNotServed -v ./cache
```

The first command should exit 0 with A-D passing. The second should exit 1 with
`a deleted entry must not be served`. Its input is
`Fresh=true, Hit=true, Stale=true, Deleted=true`. The teaching promise expects
false, while the helper returns true. This is the deliberately exposed defect,
not a setup error. The outer Python runner exits 0 when this expected contrast
has been reproduced. That exit is not candidate acceptance.

New output has its own timestamp and runtime. Whole-file digests therefore need
not equal `captured/provenance.json`. The runner never overwrites `captured/`.
Checksums identify bytes; they are not signatures or approval records.

## Boundaries

The four ordinary cases test the expression implemented in the helper. The
deleted-entry counterexample addresses a promise absent from that expression.
A trace link or green code-coverage report cannot turn that failure into a pass.
No repair is included or claimed. No new Proof audit, MC/DC instrumentation,
target integration, system safety assessment, approved software-level assignment,
independence arrangement, tool qualification or certification was performed.
The worksheet is a practical original artifact, not a complete DO-178C objective
matrix or a prescribed regulatory deliverable. Use your governing project basis
and authorized reviewers for real assurance decisions.
