Skip to content

feat: verified bootstrap engine and release signature contract - #12

Merged
3leapsdave merged 14 commits into
mainfrom
chore/trust-anchor-bootstrap-v0411
Jul 31, 2026
Merged

feat: verified bootstrap engine and release signature contract#12
3leapsdave merged 14 commits into
mainfrom
chore/trust-anchor-bootstrap-v0411

Conversation

@3leapsdave

Copy link
Copy Markdown
Member

Summary

Adds a fail-closed verified bootstrap path for sfetch installers and hardens the release/signature contract around published assets.

Bootstrap

  • Shared bootstrap-sfetch-verified engine with dual verification routes (minisig vs SHA256SUMS) selected by version pin
  • Supported-range gate with order-preserving semver comparison (no machine-integer arithmetic)
  • Canonical trust-anchor verification for release minisigs
  • Thin GitHub Action wrapper that does not resolve into the consumer workspace

Release process

  • Installer minisign required at the release gate; signing refuses a missing key
  • Release-time assert that bootstrap range constants match VERSION (committed constants only; not self-advancing at engine runtime)
  • Checklist and CI/CD guide updates for range advances and pin coupling
  • Post-release smoke via the verified bootstrap path

Test plan

  • ./scripts/test-bootstrap-sfetch-verified.sh
  • ./scripts/assert-bootstrap-range-release.sh
  • ./scripts/test-release-verify-signatures.sh (as applicable)
  • go test ./...
  • Pre-push goneat assessment green

Tip: 804ff2e41d9a388955969aa16c70c6970b5f5095

3leapsdave and others added 14 commits July 31, 2026 12:05
Publish a detached minisign signature for install-sfetch.sh, require it at
the release gate, and ship a dual-route verified bootstrap engine with a
thin composite action wrapper. Tag CI creates draft releases until
maintainer sign/upload/publish. Self-bootstrap uses the verified engine
against the N-1 pin. VERSION 0.4.11.

Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
Colocate the bootstrap engine under the action path (no workspace
fallback). Always download hash-pinned minisign 0.12; scrub test-only
env in the action. Exact version token matching and required route
logging. Remove best-effort self-close. Replace floating latest CI
examples; pin Windows dogfood minisign via official archives. Expand
bootstrap and signature harnesses (positive minisig/sha256sums fixtures,
hostile workspace resolve, goneat fail-closed, PGP manifests-only).

Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
Emit one stdout route= field for the action wrapper; human logs use
verify-route=. Resolve the shared engine from the action repository
root scripts/ path only (remove colocated copy). Acquire-minisign is a
thin wrapper over --acquire-minisign-only. Match versions by exact
whitespace tokens (reject -rc1 suffixes). Drop production || true on
minisign -v. Expand harness for action parse simulation and negatives.

Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
Drop SFETCH_BOOTSTRAP_BASE_URL and SKIP_MINISIGN_INSTALL from the
production engine (fixtures patch temporary copies). Action uses awk
route counts without || true and trusts engine post-install asserts.
Remove version-matches-pin helper; engine matcher is the sole SSOT.

Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
Assert SFETCH_MINISIGN_PUB equals the canonical consumer trust anchor
(scripts/sfetch-minisign-anchor.pub SSOT, go:embed in main) before
verify-signatures proceeds. Reject leading-zero semver components and
fail semver_cmp loudly. Harden PowerShell path env, prefix-strip action
outputs, and defer install-dir mkdir until after validation.

Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
minisign -V always uses scripts/sfetch-minisign-anchor.pub (SSOT).
SFETCH_MINISIGN_PUB remains a required advisory that must match the
operative key line (comment+key format), so operator/key divergence
cannot reintroduce a green gate with a non-consumer verifier key.

Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
Replace Bash $((10#$n)) arithmetic in semver_cmp with length-then
C-locale lexical decimal comparison so oversized components cannot wrap
and pass the supported-range gate. Add huge-component harness negative.

Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
Harness asserts early reject for huge-major wrap-to-zero and
huge-patch wrap-into-range (nonzero exit, no verify-route=, no
fetch log, install dir absent). Document arithmetic-free
comparator rationale; suppress SC2016 on intentional PowerShell
$env: single-quoted command.

Generated by Grok (https://x.ai) running Grok Build under supervision of [@3leapsdave](https://github.com/3leapsdave)

Co-Authored-By: Grok <noreply@3leaps.net>
Committer-of-Record: Dave Thompson <dave@3leaps.net> [@3leapsdave]
Role: devlead
Add release-checklist steps to advance SFETCH_BOOTSTRAP_MAX/MINISIG_SINCE,
assert MAX equals v(VERSION) from committed constants (not engine runtime),
document action-SHA / sfetch-version pin coupling, and smoke-test post-release
install via the verified engine instead of pipe-to-bash.

Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
The bootstrap engine acquired minisign into a private temp dir for
verification, then invoked install-sfetch.sh which requires minisign on
PATH and failed on clean runners without ambient minisign.

Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
sfetch --version writes to stderr, so the setup-sfetch PATH assert grepped
an empty tee file. Fixture engines no longer inject ambient minisign (CI
distro packages are often 0.11); they use the engine's pinned 0.12 download.

Generated by Grok 4.5 (https://x.ai) running Grok Build (https://x.ai) under supervision of @3leapsdave

Co-Authored-By: Grok 4.5 <noreply@3leaps.net>
Role: devlead
Committer-of-Record: Dave Thompson <dave.thompson@3leaps.net> [@3leapsdave]
@3leapsdave
3leapsdave merged commit 0c2e749 into main Jul 31, 2026
8 checks passed
@3leapsdave
3leapsdave deleted the chore/trust-anchor-bootstrap-v0411 branch July 31, 2026 19:55
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