Skip to content

Let the owner approve an exact snapshot change when the corpus is unchanged - #32

Merged
joeharris76 merged 1 commit into
mainfrom
fix/snapshot-change-approval
Oct 14, 2026
Merged

joeharris76 merged 1 commit into
mainfrom
fix/snapshot-change-approval

Conversation

@joeharris76

Copy link
Copy Markdown
Contributor

The snapshot digest gate refuses any candidate whose snapshot contents differ from the deployed ones while the corpus is unchanged. That stops accidental changes to published numbers. It also refuses every deliberate core pipeline change, and there was no way to approve one.

Production is blocked on exactly this today. Core BenchBox-dev/benchbox#2922 adds list-price cost estimates and query-ID repairs to the snapshot without changing the corpus. Every bundle since then fails with canonical digest 2c1a0fbb… became b33aef4b….

The gate now passes such a change only when:

  • the repository variable SITE_SNAPSHOT_APPROVED_CHANGE equals the exact <deployed canonical digest>-><candidate canonical digest> pair, and
  • SITE_SNAPSHOT_APPROVAL_REASON is not empty.

When the gate fails, it prints the value to set. A different candidate, a different baseline, a reversed pair or an empty reason still fails. When the approval is used, the gate report shows its reason.

The flow follows the exact-match visual approval in core:

  1. Review the change.
  2. Set both variables.
  3. Rerun the deploy.
  4. Clear both variables.

The next deploy records the new canonical digest in its receipt, so later bundles compare against it.

Tests:

  • npm run test:deploy: 36 of 36 pass, including a new test covering the exact pair, other pairs, a reversed pair and an empty reason.
  • tsc -p deploy, lint:comments, lint:guard, YAML, markdownlint and cspell are clean.

…hanged

The snapshot digest gate refuses a candidate whose snapshot contents
differ from the deployed ones while the corpus is unchanged. That guards
against accidental changes to published numbers, but it also refuses
every deliberate core pipeline change, such as new derived columns or
cost estimates, with no way through short of a corpus change.

The gate now passes such a change only when the repository variable
SITE_SNAPSHOT_APPROVED_CHANGE names the exact deployed-to-candidate
canonical digest pair and SITE_SNAPSHOT_APPROVAL_REASON gives a reason.
A failed gate prints the value to set. Any other pair, a reversed pair or
an empty reason still fails, and the approved reason appears in the gate
report.
@joeharris76
joeharris76 merged commit 2810899 into main Oct 14, 2026
8 checks passed
@joeharris76
joeharris76 deleted the fix/snapshot-change-approval branch October 14, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant