diff --git a/core/fixtures/retention_release_oracle.json b/core/fixtures/retention_release_oracle.json index 0f4ecad67..a48d9fc6a 100644 --- a/core/fixtures/retention_release_oracle.json +++ b/core/fixtures/retention_release_oracle.json @@ -2,7 +2,7 @@ "_provenance": { "generator": "scripts/retention_release_oracle.py", "method": "the reference verdicts are OBSERVED by running the reference over constructed segments on a real filesystem; the unified verdicts are derived mechanically from one rule, not chosen per row", - "source_revision": "ba31b082b8588298a229df8d925cb42c1825a09d", + "source_revision": "6a3b35b269cd8fd5d1aea8d40ff63d1d215d0ad0", "reference": { "segment_gate": "solstone/think/retention.py:190", "state_derivation": "solstone/think/data_state.py:121", diff --git a/scripts/retention_release_oracle.py b/scripts/retention_release_oracle.py index 987599076..b43420f22 100644 --- a/scripts/retention_release_oracle.py +++ b/scripts/retention_release_oracle.py @@ -482,9 +482,19 @@ def tally(rows: list[dict]) -> dict[str, int]: def revision() -> str: + """The revision of the reference this oracle was read from. + + ⛔ Deliberately NOT ``rev-parse HEAD``. Pinning HEAD makes the committed + fixture stale on every unrelated commit in the repository, so the gate reds + for a reason that has nothing to do with the reference it guards -- which + means the gate is the defect. Pinning the last commit that touched the + reference files goes stale exactly when the fixture should be regenerated, + and not otherwise. + """ + sources = sorted({citation.split(":", 1)[0] for citation in REFERENCE.values()}) try: return subprocess.run( - ["git", "rev-parse", "HEAD"], + ["git", "log", "-1", "--format=%H", "--", *sources], cwd=REPO, capture_output=True, text=True,