feat(self-bootstrap): wire rt to bake its own consumer-ready artifacts using internal/bake.Baker — closes dogfood meta-loop (rt-baked-by-rt) #547
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#547
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Wire
rtto bake its own consumer-ready artifacts usinginternal/bake.Baker(from #546). Closes the self-bootstrap / dogfood meta-loop: rt IS the release-toolkit and rt bakes rt.Motivation
Phase 5 self-bootstrap gate per ADR-0009 §3.3 phase 5. Sibling to #546 bake impl. This tracker wires the Baker implementation into rt itself — rt uses Baker to produce its own reusable-workflow artifacts + manifest state that consumers pin.
Scope
cmd/rtsubcommand(s) that produce baked artifacts (likelyrt bakeor invoked fromrt release/rt prep)AC
rtinvokesinternal/bake.Bakerfor its own reusable-workflow + related artifacts — verified in PR#5497b3eda5via internal/selfboot.CommitBake (pure Bake + commit-tree -p HEAD). AC1 satisfied via internal-pkg (F3 endorsement — no C5 CLI expansion per F1). Binary-facingrtinvocation lands in Phase-6 #508 per ratified scope879de5dBaker clean-staged precondition enforce with dirty-wc test asserting ErrBakeFailed + Surveyor mutation proving removal-reds-both-dirty-wc-tests;7b3eda5caller-seam with round-trip gate)go vet ./...+golangci-lint runclean — verified: gate own instrument (golangci-lint) fired 0 issues; full gate green local + CI-imageRelated
Anchor
Filed 2026-07-26 by Bosun on operator continuation direction for Phase 5 dispatch.
Carry-forward from #546 / PR#548 review (Surveyor 4585, non-blocking should-consider): land a Baker-side clean-staged precondition check as the first commit of #547, before the caller-seam wiring.
The hazard (Surveyor reproduced it):
internal/bake.Baker.Bakesources the marked files from the working copy (os.ReadFile, design-call 4) but the bash oraclecreate_detached_bake_commitsources from HEAD. Under the documented clean-staged precondition (working copy == HEAD) these coincide, but the precondition is disclosed-yet-unenforced: dirtying a canonical reusable in the working copy (uncommitted, marker intact) makesBakereturn a different tree with no error (cleancfad477…vs dirtyc139b8a…), silently breakingrepin == cutprep == Go(design-call 2). Not red today because the shipped equivalence harness is clean-staged; latent for any #547 caller.Fix (Surveyor option A — the scope-correct §5 precondition-check-inside-method the milestone #77 names): in
Bake, for each canonical file being baked, assert working-copy bytes == HEAD bytes; on mismatch fail loud with the existingErrBakeFailed("working tree not clean-staged at base"). Add a dirty-wc test (dirty canonical file →ErrBakeFailed) and mutation-verify that removing the check reds it. Design-call 2 preserved (the check only fail-louds a dirty wc; clean-staged fixtures unaffected).The self-bootstrap caller must additionally stage
RepoDirat the intended base and say so at the seam. Refs #546.Closed by hand — PR#549 merged as
7b3eda50e7627ce6ca515d10fa7b2c3bf8d03eceon v2/next (fast-forward). All 5 ACs ticked with substrate anchors above.Substrate landed:
879de5d— Baker clean-staged precondition enforced (Surveyor Option A from #548 review 4585).git diff --quiet HEAD -- fper baked canonical file → ErrBakeFailed. §5 precondition-check-inside-method per milestone #77 naming.7b3eda5—internal/selfboot.CommitBake= purebake.Bakertree +git commit-tree tree -p HEAD. Caller-seam wiring composing Baker with commit-wrap per design-call-1 endorsed scope line (#546→#547).All 3 forks landed as ratified (Bosun 27f8):
internal/selfbootinternal-package only. No newrtsubcommand. Frozen C5 contract preserved (Surveyor-approved 4543).git commit-tree tree -p base. Consistent with #546 design-call-1 scope line.internal/selfboot) — Phase-6 #508 rt release/prep is the natural binary-facing consumer. Baker interface stays frozen/pure-tree-only.Scope-holds disclosed as Phase-6 concerns (per Surveyor 4587 forward-notes to #508):
Cross-references:
internal/selfboot.CommitBakeat binary-facing surfacePhase 5 SUBSTRATE COMPLETE: #546 bake + #547 self-bootstrap both landed. Milestone #77 NOT YET CLOSED — #544 (v2/next → main merge coordination) remains open + fires as the next operator-ratified action.