|
| 1 | +<!-- |
| 2 | +Copyright (C) 2026 Marco Fortina |
| 3 | +SPDX-License-Identifier: AGPL-3.0-or-later |
| 4 | +--> |
| 5 | + |
| 6 | +# Runtime evidence index and retention |
| 7 | + |
| 8 | +`scripts/runtime-evidence-index.sh` builds a stable JSON index across runtime |
| 9 | +validation pack evidence and SSH runtime evidence. |
| 10 | + |
| 11 | +Build or refresh the index: |
| 12 | + |
| 13 | +```bash |
| 14 | +scripts/runtime-evidence-index.sh |
| 15 | +``` |
| 16 | + |
| 17 | +The default index path is: |
| 18 | + |
| 19 | +```text |
| 20 | +dist/runtime-evidence-index.json |
| 21 | +``` |
| 22 | + |
| 23 | +## Verification |
| 24 | + |
| 25 | +Use `--verify` to validate every discovered `SHA256SUMS` file before the index is |
| 26 | +written: |
| 27 | + |
| 28 | +```bash |
| 29 | +scripts/runtime-evidence-index.sh --verify |
| 30 | +``` |
| 31 | + |
| 32 | +Verification covers runtime validation pack directories under `dist/runtime-packs` |
| 33 | +and SSH runtime evidence files under `dist/runtime-evidence`. |
| 34 | + |
| 35 | +## Retention |
| 36 | + |
| 37 | +Use `--retain N` to keep only the latest N runtime validation pack runs per pack |
| 38 | +and the latest N SSH runtime evidence runs: |
| 39 | + |
| 40 | +```bash |
| 41 | +scripts/runtime-evidence-index.sh --verify --retain 10 |
| 42 | +``` |
| 43 | + |
| 44 | +Retention rewrites the runtime evidence checksum file after pruning SSH evidence |
| 45 | +files. |
| 46 | + |
| 47 | +## Automatic index updates |
| 48 | + |
| 49 | +`scripts/runtime-validation-packs.sh` and `scripts/runtime-evidence.sh` update the |
| 50 | +index automatically after producing evidence. Disable this only while debugging a |
| 51 | +narrow failure: |
| 52 | + |
| 53 | +```bash |
| 54 | +AUTOMAX_RUNTIME_EVIDENCE_INDEX_UPDATE=0 scripts/runtime-validation-packs.sh --pack package-only |
| 55 | +``` |
| 56 | + |
| 57 | +Useful controls: |
| 58 | + |
| 59 | +```bash |
| 60 | +AUTOMAX_RUNTIME_EVIDENCE_INDEX=dist/runtime-evidence-index.json |
| 61 | +AUTOMAX_RUNTIME_EVIDENCE_RETAIN=10 |
| 62 | +``` |
| 63 | + |
| 64 | +## Index schema |
| 65 | + |
| 66 | +The index has a stable top-level shape: |
| 67 | + |
| 68 | +```json |
| 69 | +{ |
| 70 | + "schema_version": 1, |
| 71 | + "generated_at": "2026-01-01T00:00:00Z", |
| 72 | + "entry_count": 1, |
| 73 | + "entries": [] |
| 74 | +} |
| 75 | +``` |
| 76 | + |
| 77 | +Entries use `type: runtime-pack` or `type: runtime-evidence` and include relative |
| 78 | +paths to manifests, summaries, checksums and evidence files. |
0 commit comments