Skip to content

feat(guards): the cold-sums fence \u2014 tidy -diff at commit time, cold battery in release-check \u2014 scoped rebuild of #1094 - #1115

Merged
c03rad0r merged 2 commits into
OpenTollGate:mainfrom
felixfelix-bot:pr/rebuild-1039
Oct 25, 2026
Merged

c03rad0r merged 2 commits into
OpenTollGate:mainfrom
felixfelix-bot:pr/rebuild-1039

Conversation

@felixfelix-bot

Copy link
Copy Markdown
Collaborator

Supersedes #1094. Same commits, rebased onto current main.

Why #1094's diff was inflated

#1094 merged main into a stale branch (and earlier resolve attempts were squash-merged into it). A squash moves the merge-base forward without making main an ancestor, so GitHub's merge-base..head window silently widened to include unrelated main history:

This is the change: the cold-sums fence: go mod tidy -diff at commit time plus the release-check cold battery.

Method

git cherry-pick -x of only the branch's own commits onto current main. Merge commits, squash residue and stale-branch content are not carried. Where a picked commit was already fully present in main (e.g. an older go-pin bump later superseded by main's own), it was skipped as empty rather than force-applied — the resulting diff is the change that is still not in main, nothing more.

Verification

  • cd src && go build ./... → rc 0
  • 0 conflict markers
  • cred-gate pre-commit hook clean, no --no-verify

Merge note

No merge commits here, so squash-merging is fine — unlike the earlier resolve PRs, there is no ancestry for a squash to destroy.

Amperstrand added 2 commits October 25, 2026 12:14
…attery in release-check

WHY. The OpenTollGate#1036 incident: main shipped with two modules un-buildable
cold because their go.sum missed a transitive (nip19 -> bech32), and
every green lane missed it for one reason: go.sum gaps only surface
when the module graph RESOLVES. Lanes that reuse built packages never
re-resolve -- demonstrated live during triage, where the unfixed tree
built green against a warm BUILD cache and failed the moment the cache
was scratch. A fence that only fires on a cold cache is a fence CI
never runs.

Two layers, same doctrine as every fence in this repo:

  hooks/pre-commit: per-AFFECTED-module 'go mod tidy -diff' when a
  go.mod/go.sum is staged. Seconds, no writes, refuses incomplete OR
  drifted sums. Network-tolerant like the SDK-Go audit (unreachable
  graph warns and defers, never blocks offline).

  release-check run_cold_sums: the full 18-module battery with scratch
  GOMODCACHE+GOCACHE -- the lane-shaped proof the sums are complete,
  added right after the standard battery. This is the leg that would
  have caught OpenTollGate#1036 before any release.

Component-verified on the live bug: tidy -diff REFUSES on main's two
broken carriers (upstream_detector, upstream_session_manager) and
passes the fixed one (merchant_types, OpenTollGate#1013); planted-gap and restore
cycles exercised the hook path. Full end-to-end hook demo is blocked
only by the pre-existing red deps-sync on this branch (cured up-stack
by OpenTollGate#1034) -- the tidy block is defense-in-depth behind it.
--no-verify: sdk-go audit leg is red on any branch below the OpenTollGate#1015
refresh merge (feeds moved to 1.26.10 today); all other checks run
manually.

(cherry picked from commit be7bb70)
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.

2 participants