Commit bf406d6
authored
ci(governance): R5b — version-string drift gate in reusable (#329)
## Summary
Adds R5b to the `security-policy` job in `governance-reusable.yml`,
right alongside R0 / R1 (where the existing tooling-version integrity
rules live).
Hard-blocks `Version: x.y.z` / `**Version**: x.y.z` / `_Version_=
v1.2.3` patterns in repo-root `*.md` + `*.adoc` files (excluding
`CHANGELOG.{md,adoc}`). Defers all version state to `CHANGELOG.md`
(release history), `Cargo.toml`'s `[package].version` (semver pin), and
the git log (dates).
## Why now
echidna shipped this exact rule locally last week as
`governance-doc-drift.yml` R5b
([echidna#171](hyperpolymath/echidna#171)). The
drift pattern that motivated it — `Version: 1.5.0` in `README.adoc`,
`**Version**: 2.3.0` in `CLAUDE.md`, `2.1.0` in `Cargo.toml`, all
simultaneously — generalises to every long-lived repo.
## Scope decision
R5b only (version strings). R5a (bare prover counts) stays repo-local in
echidna because the count semantics are domain-specific (prover backends
vs. stdlib functions vs. proof obligations vs. syntax features). A
future generic R5 with per-repo configurable canonical patterns is the
natural extension, but R5b stands alone today.
Sub-tree docs (`docs/handover/`, `docs/decisions/`, `docs/releases/`,
audit reports) deliberately out of scope — owner-managed snapshots, not
the canonical narrative surface.
## Baseline scan results
- **standards** (this repo): 0 hits ✓
- **proven**: 0 hits ✓
- **ephapax**: 0 hits ✓
- **affinescript**: 0 hits ✓
- **typed-wasm**: 0 hits ✓
Estate-wide rollout is safe — no caller repo will be retroactively
broken.
## Self-tested
- `python3 -c "import yaml; yaml.safe_load(...)"` → OK
- Negative test (synthetic):
- `*Version*: 1.2.3` → fires ✓
- `Version: v0.5.0` → fires ✓
- `**Version**= 9.9.9` → fires ✓
- `This is v1.2.3 software.` → correctly does NOT fire (no `Version:`
prefix anchored)
## Downstream rollout
Caller repos consume by bumping their `governance.yml` wrapper SHA pin.
echidna can also drop its local R5b (keeping R5a) once it bumps the pin.
Cohort fan-out will follow this change.
## Test plan
- [x] YAML safe_load OK
- [x] Self-test on this repo's root docs → 0 hits
- [x] Negative test on synthetic drift → fires
- [x] Baseline-scan on 4 cohort repos → 0 hits each
- [ ] CI on this PR
- [ ] Downstream caller-repo SHA-pin bumps (echidna + cohort)
Refs hyperpolymath/echidna#171.1 parent d3f799c commit bf406d6
1 file changed
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
575 | 618 | | |
576 | 619 | | |
577 | 620 | | |
| |||
0 commit comments