|
1 | | -// Bustfile.a2ml — meta-repo bust contractile (breakage / rollback) |
2 | | -// SPDX-License-Identifier: PMPL-1.0-or-later |
3 | | - |
4 | | -Bust { |
5 | | - name: "the-nash-equilibrium" |
6 | | - version: "1.0.0" |
7 | | - description: "Rollback procedures when something breaks in the meta-repo" |
8 | | - |
9 | | - scenarios: { |
10 | | - "bad-pointer-bump": "git revert <bump-commit> in meta-repo; child repo itself untouched" |
11 | | - "submodule-pointer-points-at-missing-sha": "git submodule update --init --checkout <path> resets child to parent-recorded SHA; OR revert the stale bump commit" |
12 | | - "submodule-orphan-after-local-only-commit": "roll back locally with git reset to before the stranded commit; fix remote situation before re-attempting" |
13 | | - "accidental-private-repo-content-leaked-to-public-submodule": "hard-rotate the leaked secret immediately; git-filter-repo or BFG on the submodule's own history; public re-publication only after rotation complete" |
14 | | - } |
15 | | - |
16 | | - escalation-ladder: [ |
17 | | - "1. revert the meta-repo commit (reversible, low blast radius)", |
18 | | - "2. reset the local submodule clone (affects only local workspace)", |
19 | | - "3. force-push to main — PROHIBITED without explicit user confirmation (violates branch protection)", |
20 | | - "4. registry-level (delete/archive the GitHub repo) — human-only action, never by AI" |
21 | | - ] |
22 | | - |
23 | | - backup-points: [ |
24 | | - "GitHub serves as the durable backup for every submodule's own history", |
25 | | - "Meta-repo history on origin/main is the durable backup for pointer state", |
26 | | - "Local backup tags (backup/pre-<operation>-<date>) retained on risky rewrites" |
27 | | - ] |
28 | | -} |
| 1 | +# SPDX-License-Identifier: AGPL-3.0-or-later |
| 2 | +# Bustfile — Error-handling / failure-recovery contract |
| 3 | +# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> |
| 4 | +# |
| 5 | +# Rewritten 2026-04-24: old `Bust { }` domain-specific format → standard A2ML |
| 6 | +# @abstract/@end format. Scenarios updated from generic submodule scenarios to |
| 7 | +# Nash-specific ones. |
| 8 | + |
| 9 | +@abstract: |
| 10 | +Declared failure modes for The Nash Equilibrium. Every failure mode must |
| 11 | +have a recovery path. Hard gate on any failure mode with missing or broken |
| 12 | +recovery. |
| 13 | +@end |
| 14 | + |
| 15 | +## License Integrity |
| 16 | + |
| 17 | +### wrong-spdx-header |
| 18 | +- description: AGPL-3.0-or-later header accidentally replaced by PMPL-1.0-or-later in source files |
| 19 | +- class: rollback |
| 20 | +- injection-probe: "grep -rl 'SPDX-License-Identifier: PMPL-1.0-or-later' src/ .machine_readable/ 2>/dev/null | head -1 | grep -q ." |
| 21 | +- recovery-probe: "! grep -rl 'SPDX-License-Identifier: PMPL-1.0-or-later' src/ .machine_readable/ 2>/dev/null | head -1 | grep -q ." |
| 22 | +- expected-recovery-time-seconds: 60 |
| 23 | +- status: declared |
| 24 | +- notes: This project is AGPL-3.0-or-later. PMPL is the template default and can drift in when files are copied from rsr-template-repo. Recovery — sed replace + commit. |
| 25 | + |
| 26 | +## Game Design Integrity |
| 27 | + |
| 28 | +### game-design-doc-overwritten |
| 29 | +- description: docs/game-design/OVERVIEW.adoc accidentally replaced with stub or empty file |
| 30 | +- class: rollback |
| 31 | +- injection-probe: "! grep -q '6X\\|eXchange\\|Nash' docs/game-design/OVERVIEW.adoc 2>/dev/null" |
| 32 | +- recovery-probe: "grep -q '6X\\|eXchange\\|Nash' docs/game-design/OVERVIEW.adoc 2>/dev/null" |
| 33 | +- expected-recovery-time-seconds: 120 |
| 34 | +- status: declared |
| 35 | +- notes: Recovery — git checkout HEAD -- docs/game-design/OVERVIEW.adoc |
| 36 | + |
| 37 | +### state-a2ml-template-residue |
| 38 | +- description: STATE.a2ml reverts to rsr-template-repo content after a bad merge |
| 39 | +- class: rollback |
| 40 | +- injection-probe: "grep -q 'project = .rsr-template-repo.' .machine_readable/6a2/STATE.a2ml 2>/dev/null" |
| 41 | +- recovery-probe: "! grep -q 'project = .rsr-template-repo.' .machine_readable/6a2/STATE.a2ml 2>/dev/null" |
| 42 | +- expected-recovery-time-seconds: 120 |
| 43 | +- status: declared |
| 44 | +- notes: Recovery — restore from last good commit. |
| 45 | + |
| 46 | +## ABI Integrity |
| 47 | + |
| 48 | +### abi-breaking-change-without-version-bump |
| 49 | +- description: Idris2 ABI types changed without version bump recorded in META.a2ml |
| 50 | +- class: rollback |
| 51 | +- injection-probe: "git diff HEAD~1 -- src/interface/abi/ 2>/dev/null | grep -q '^-'" |
| 52 | +- recovery-probe: "git diff HEAD~1 -- .machine_readable/6a2/META.a2ml 2>/dev/null | grep -q 'version\\|ADR'" |
| 53 | +- expected-recovery-time-seconds: 300 |
| 54 | +- status: declared |
| 55 | +- notes: Recovery — revert ABI change or add ADR entry + version bump in META.a2ml before merging. |
| 56 | + |
| 57 | +## Secrets and Privacy |
| 58 | + |
| 59 | +### accidental-private-leak |
| 60 | +- description: Private key, credential, or personal data accidentally committed |
| 61 | +- class: rollback |
| 62 | +- injection-probe: "git log --all --oneline -- '*.pem' '*.key' '.env' 'credentials.json' 2>/dev/null | head -1 | grep -q ." |
| 63 | +- recovery-probe: "! git log --all --oneline -- '*.pem' '*.key' '.env' 'credentials.json' 2>/dev/null | head -1 | grep -q ." |
| 64 | +- expected-recovery-time-seconds: 3600 |
| 65 | +- status: declared |
| 66 | +- notes: | |
| 67 | + Escalation ladder (in order): |
| 68 | + 1. Rotate the leaked secret IMMEDIATELY before anything else. |
| 69 | + 2. git-filter-repo or BFG to purge from all history. |
| 70 | + 3. Force-push to main only with explicit user confirmation. |
| 71 | + 4. If a GitHub token: contact GitHub support. |
| 72 | + Public re-publication only after rotation confirmed complete. |
0 commit comments