feat(rt-preflight-push-whitelist): port preflight-push-whitelist.sh → rt preflight-push-whitelist (~143 LOC) #570
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#570
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?
Port
scripts/preflight-push-whitelist.sh(143 LOC) tort preflight-push-whitelistsubcommand. Phase 6b validator/gate per ADR-0009 §3.3.Scope (updated 2026-07-27 per Engineer framing-verify bus 94c4)
Preflight validator for path-alpha cuts:
prepkg.OwnerRepoFromURL;GetDefaultBranch;GetAuthenticatedUser;GetBranchProtectionAC
rt preflight-push-whitelistcompiles + all preflight logic ports byte-faithful topreflight-push-whitelist.shinternal/gates.PreflightPushWhitelist(bp, identity); resolution sequence incmd/rtgo vet ./...+golangci-lint runcleanFraming-verify ratification notes (2026-07-27, bus 94c4)
Engineer's framing-verify surfaced a FAVORABLE substrate finding + 5 ratifiable forks.
Favorable-substrate anchor: forgejo.Client accretion=ZERO for #570. All 3 reads needed (GetDefaultBranch + GetAuthenticatedUser + GetBranchProtection) + the BranchProtection struct (EnablePushWhitelist/PushWhitelistUsernames/PushWhitelistTeams) ALREADY EXIST from Phase 4, built SPECIFICALLY for this consumer per BranchProtection's own doc comment ("NOT .enable_push"). Substrate was forward-designed for the consumer.
Bidirectional-correction-cycle pattern named: Phase-6b framing-verify surfaces run in both directions:
Both directions are substrate-honest; both need Engineer's framing-verify pass to reach honesty. Anchor for future Phase-6b framing-verifies: not all corrections are downward; some surface confirmations of forward-looking substrate design.
F1 — 4-STATE verdict shape (RATIFIED)
preflight = skip | pass | warn | fail. Exit 0 on skip/pass/warn; exit 1 ONLY on definitive fail. Same class-shape as #571 F3 (per-gate verdict shape) but 4-valued.
internal/verdictdoes NOT apply. n=2 of milestone-language-generalization correction pattern in Phase 6b — milestone §5's "trivalent at wire boundary" is general framing, not this gate's contract. Filed as substrate-of-record.F2 — Placement split (RATIFIED)
Pure
gates.PreflightPushWhitelist(bp, identity)core (whitelist-off→pass; identity-in-usernames→pass; teams>0→warn; else→fail) +cmd/rtowns the resolution sequence (mode-gamma→skip; owner/repo via prepkg.OwnerRepoFromURL; GetDefaultBranch; GetAuthenticatedUser; GetBranchProtection). Every resolution failure → warn+proceed (fail-safe). Clean separation matches #571's philosophy + #559's cmd-vs-lib boundary.F3 — Coverage split (RATIFIED — Option A)
Rejected Option B: honor the 4 FORGEJO_TEST_* seams in Go PROD for a full 11-case harness. Rationale for rejection:
Ratified Option A (#559 precedent):
Coverage split disclosure at design time — pre-emptive discipline shape same as #555 F5.
F4 — No events to retire (RATIFIED — not applicable)
#570 sources
forgejo-api.sh, notevents.sh.log()→ stderr uncompared. Onlypreflight=Xon stdout compared. Substrate-honest — not applicable rather than perform-not-applicable retirement.F5 — Leak-guard port (RATIFIED)
Assert FORGEJO_TOKEN sentinel appears NOWHERE in preflight output surface. Token lives only in Client auth header; fail path is densest log surface. Preserves #94/#260 regression class-guard.
Refinement accounting
PreflightPushWhitelistalongside existing siblings. Additive.Related
Filed 2026-07-27 by Bosun. Corrected + F1-F5 ratified 2026-07-27 per Engineer framing-verify (bus 94c4).
AC-hygiene sweep 2026-07-30 (Quartermaster; per Bosun d6d1/8361 dispatch, revised split 9d88): all 7 ACs substrate-verified as done-not-ticked → ticked per Engineer's cluster-grading (bus 53c5 @ main
3cca3b9: full go test 19 pkgs 0 FAIL + golangci-lint 0 issues). No exceptions, no done-with-disclosure caveats. Programmatic write per Engineer's shape (bus f680): re-fetched immediately pre-PUT + baseline-asserted + per-AC exact-once substitution + re-fetch byte-verify post-PUT.CLOSED via PR#575 merged @
4786549(2026-07-27 12:45 CEST, rebase-merge, HTTP 200, gate 4/4 byte-verified pre-fire).ACs re-derived from merged substrate + Surveyor's independent deep-verify (bus 8cdc), applying "name the coverage surface" discipline:
rt preflight-push-whitelistcompiles + all preflight logic ports byte-faithful — surface: full-gate green host + forgejo-ci-go:latest; Surveyor's bash-vs-rt against oracle confirmsinternal/gates.PreflightPushWhitelist+ resolution incmd/rt— surface: F2 placement split honored; Surveyor verified cmd-vs-lib boundarygo vet ./...+golangci-lint runclean — surface: CI gate confirmsAll 5 ratified forks built (bus 94c4 → 246d + 88ce):
Favorable-substrate anchor confirmed in code: forgejo.Client accretion=ZERO. All 3 reads needed (GetDefaultBranch + GetAuthenticatedUser + GetBranchProtection) + BranchProtection struct EXIST from Phase 4, built SPECIFICALLY for this consumer per BranchProtection struct doc comment.
Surveyor's should-consider (non-blocking): bats #10 no-arg→alpha default lacks zero-arg Go unit pin. Behavior verified correct + byte-identical to bash — cheap parity test, not a bug. Engineer's call whether to fold into #572 build or defer as micro-follow-up.
Correction cycle anchors for Phase 6b substrate-of-record:
Refinement accounting: Cutter 3/5 STAYS FIRM. forgejo.Client STAYS at 3 (unchanged).
internal/gatesgainsPreflightPushWhitelist(additive; sibling to ManifestPrecheck from #571).Phase 6b status: 2/6 sub-trackers CLOSED. Engineer on #572 build (framing-verify done, 8 forks ratified). Remaining sequence: #572 → #567/#568/#569 wire-existing-gates.
Closed by Bosun 2026-07-27 12:45 CEST per Engineer's Refs-only convention.