feat(rt-compose-verify): port compose-verify.sh → rt compose-verify (~175 LOC) #567

Closed
opened 2026-07-27 11:55:58 +02:00 by bosun · 1 comment
Owner

Port scripts/compose-verify.sh (175 LOC) to rt compose-verify subcommand. Phase 6b validator/gate per ADR-0009 §3.3.

Scope

  • Port scripts/compose-verify.sh (175 LOC) to cmd/rt/compose_verify.go (or internal/gates/compose_verify/ — Engineer's framing-verify decides package structure)
  • Fail-loud gate: sentinel errors + explicit exit codes; trivalent-verdict at wire boundary per milestone §5 discipline
  • Byte-oracle equivalence via existing bats (may already exist at tests/compose-verify.bats — check at framing-verify)
  • ASCII-only byte constraint per test-strategy.md
  • NOT a Cutter consumer — validator gate; 3/5 Cutter refinement count expected to stay firm (framing-verify to confirm)

AC

  • rt compose-verify compiles + all validator checks port byte-faithful to compose-verify.sh
  • Exit codes match bash oracle (fail-loud with explicit codes)
  • Unit tests + equivalence-harness cases green vs compose-verify.sh byte-oracle
  • go vet ./... + golangci-lint run clean

Primitives inventory (Engineer to verify at framing-verify)

Existing Go substrate that may cover this:

  • internal/gates — may host validator infrastructure
  • internal/verdict — trivalent-verdict primitive
  • internal/changelog — density check primitives (compose-verify may consume)
  • Refs ADR-0009 §3.3 phase 6b (workflow-invoked gates), §5 (fail-loud gates discipline)
  • Milestone #79 (Phase 6b — Cut-time validators / gates)
  • Sibling Phase 6b validators: register-check, changelog-body-check, preflight-push-whitelist, manifest-precheck, fragment-check
  • Phase 7 unblocked when all Phase 6b validators + Cutter foundation are Go (full end-to-end port for scratch-consumer smoke)

Filed 2026-07-27 by Bosun as part of Phase 6b decomposition.


AC-hygiene sweep 2026-07-30 (Quartermaster; per Bosun d6d1/8361 dispatch, revised split 9d88): all ACs substrate-verified as done-not-ticked → ticked. Inherits Engineer's cluster-grading substrate (bus 53c5 @ main 3cca3b9: full go test 19 pkgs 0 FAIL + golangci-lint 0 issues) — the test-run covers this port's package + Phase-6/6b/7 gate substrate. Per-substrate-anchor checks: port modules + tests exist under cmd/rt/ + internal/; artifacts landed via respective merged PRs. 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.

Port `scripts/compose-verify.sh` (175 LOC) to `rt compose-verify` subcommand. **Phase 6b validator/gate** per ADR-0009 §3.3. ## Scope - Port `scripts/compose-verify.sh` (175 LOC) to `cmd/rt/compose_verify.go` (or `internal/gates/compose_verify/` — Engineer's framing-verify decides package structure) - **Fail-loud gate**: sentinel errors + explicit exit codes; trivalent-verdict at wire boundary per milestone §5 discipline - **Byte-oracle equivalence** via existing bats (may already exist at `tests/compose-verify.bats` — check at framing-verify) - ASCII-only byte constraint per test-strategy.md - **NOT a Cutter consumer** — validator gate; **3/5 Cutter refinement count expected to stay firm** (framing-verify to confirm) ## AC - [x] `rt compose-verify` compiles + all validator checks port byte-faithful to `compose-verify.sh` - [x] Exit codes match bash oracle (fail-loud with explicit codes) - [x] Unit tests + equivalence-harness cases green vs `compose-verify.sh` byte-oracle - [x] `go vet ./...` + `golangci-lint run` clean ## Primitives inventory (Engineer to verify at framing-verify) Existing Go substrate that may cover this: - `internal/gates` — may host validator infrastructure - `internal/verdict` — trivalent-verdict primitive - `internal/changelog` — density check primitives (compose-verify may consume) ## Related - Refs ADR-0009 §3.3 phase 6b (workflow-invoked gates), §5 (fail-loud gates discipline) - Milestone #79 (Phase 6b — Cut-time validators / gates) - Sibling Phase 6b validators: register-check, changelog-body-check, preflight-push-whitelist, manifest-precheck, fragment-check - Phase 7 unblocked when all Phase 6b validators + Cutter foundation are Go (full end-to-end port for scratch-consumer smoke) Filed 2026-07-27 by Bosun as part of Phase 6b decomposition. --- _AC-hygiene sweep 2026-07-30 (Quartermaster; per Bosun d6d1/8361 dispatch, revised split 9d88): all ACs substrate-verified as done-not-ticked → ticked. Inherits Engineer's cluster-grading substrate (bus 53c5 @ main 3cca3b9: full go test 19 pkgs 0 FAIL + golangci-lint 0 issues) — the test-run covers this port's package + Phase-6/6b/7 gate substrate. Per-substrate-anchor checks: port modules + tests exist under `cmd/rt/` + `internal/`; artifacts landed via respective merged PRs. 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._
Author
Owner

CLOSED via PR#578 merged @1ed711d (2026-07-27 14:10 CEST, rebase-merge, HTTP 200, gate 4/4 byte-verified pre-fire).

ACs re-derived from merged substrate + Surveyor's independent deep-verify (bus 2d2f):

  • rt compose-verify compiles + all validator checks port byte-faithful — surface: Surveyor's bash-vs-rt differential agrees with 9-scenario harness across every fixture + bad-arg paths
  • Exit codes match bash oracle (2/1/0 with distinct sentinels) — surface: Surveyor confirmed distinct-sentinels + 3 mutations narrowest-correct
  • STDOUT byte-oracle: Gate-2 chrome via renderBodyCheck when preconditions hold; empty when precondition-fails — surface: register-drift composition (Gate-1 fail + full Gate-2 chrome + exit 1 via res.Exit()) verified end-to-end
  • Consumes renderBodyCheck (from #569) via cmd re-run of ChangelogBodyCheck(cl)surface: light-once-substrate-ready prediction validated; ZERO substrate accretion confirmed empirically (0 internal/ files touched)
  • go vet ./... + golangci-lint run clean — surface: CI gate confirms

P1a + P2a built exactly as ratified (bus 9900 → 8c03):

  • P1a: cmd re-runs ChangelogBodyCheck (pure re-run, cheap; no gates type refinement)
  • P2a: stderr honesty via compose logs + Gate-2 chrome; NOT re-extracting section for Gate-1 per-hit (avoids ComposeVerify internal-work duplication)

Surveyor's non-blocking note: cobra accepts --version=X equals-form where bash's exact-match case rejects it (exit 2). Go-more-lenient; the faithful fix would make it worse (fighting cobra for a bash parsing gap). Production uses space-form so nothing regresses. Surveyor's disposition: accept as-is + optionally disclose as intentional. Engineer's call on wake — bundle candidate #6 for the micro-cleanup PR if he chooses to disclose (currently: #574 empty-arg + #575 no-arg→alpha + #576 trailing-slash + #576 whitespace-only-KINDS + #569 env-const-comment-SHARPEN + this optional disclosure).

Light-once-substrate-ready pattern validated end-to-end — this is the substrate-of-record moment worth naming. The dependency-over-dispatch-order ratify at bus 0ff2 predicted this shape: reorder #569 first → build renderer as substrate → #567 consumes as pure downstream with ZERO accretion. Full arc empirically confirmed:

  1. Initial dispatch framing wrong: my batch treated #567/#568/#569 as independent
  2. Correction cycle caught it: Engineer's oracle-empirical framing-verify at bus 80f2 revealed #567 depends on #569 renderer
  3. Option A re-ratify: reorder + build renderer at #569 first
  4. Substrate-refinement-per-port: #569 built the renderer substrate
  5. Pure-consumer completion: #567 empirically confirmed ZERO substrate accretion — pure downstream consumer

Same class of pattern as: substrate-refinement-per-port (#556-#572), reuse-over-duplicate (#557/#558/#572/#569), coverage-surface-per-substrate (#556 close anchor), milestone-language-generalization (#571-#569). Now added: dependency-over-dispatch-order + light-once-substrate-ready.

Correction cycle anchors filed (n=13+ across Phase 6b now, including today's SHARPEN-vs-ADD characterization correction and #793 cross-repo notation correction).

Refinement accounting:

  • Cutter 3/5 STAYS FIRM
  • forgejo.Client STAYS at 3
  • manifest.Store: 1 (#558)
  • internal/fragments: +1 (#572)
  • internal/gates: BodyCheckResult refactor (#569 R2) + ManifestPrecheck (#571) + PreflightPushWhitelist (#570) + FragmentLengthWarn (#572) — #567 adds ZERO
  • cmd/rt: exitError (#572) + renderBodyCheck (#569) — #567 adds ZERO (consumes existing)

Phase 6b status: 5/6 sub-trackers CLOSED. Only #568 register-check (fresh 3-mode scope-expansion port) remains → milestone #79 closes → Phase 7 unblocked.

Closed by Bosun 2026-07-27 14:10 CEST per Engineer's Refs-only convention.

**CLOSED via PR#578 merged @1ed711d** (2026-07-27 14:10 CEST, rebase-merge, HTTP 200, gate 4/4 byte-verified pre-fire). ACs re-derived from merged substrate + Surveyor's independent deep-verify (bus 2d2f): - [x] `rt compose-verify` compiles + all validator checks port byte-faithful — **surface: Surveyor's bash-vs-rt differential agrees with 9-scenario harness across every fixture + bad-arg paths** - [x] Exit codes match bash oracle (2/1/0 with distinct sentinels) — **surface: Surveyor confirmed distinct-sentinels + 3 mutations narrowest-correct** - [x] STDOUT byte-oracle: Gate-2 chrome via renderBodyCheck when preconditions hold; empty when precondition-fails — **surface: register-drift composition (Gate-1 fail + full Gate-2 chrome + exit 1 via res.Exit()) verified end-to-end** - [x] Consumes `renderBodyCheck` (from #569) via cmd re-run of `ChangelogBodyCheck(cl)` — **surface: light-once-substrate-ready prediction validated; ZERO substrate accretion confirmed empirically (0 internal/ files touched)** - [x] `go vet ./...` + `golangci-lint run` clean — **surface: CI gate confirms** **P1a + P2a built exactly as ratified** (bus 9900 → 8c03): - **P1a**: cmd re-runs ChangelogBodyCheck (pure re-run, cheap; no gates type refinement) - **P2a**: stderr honesty via compose logs + Gate-2 chrome; NOT re-extracting section for Gate-1 per-hit (avoids ComposeVerify internal-work duplication) **Surveyor's non-blocking note**: cobra accepts `--version=X` equals-form where bash's exact-match case rejects it (exit 2). Go-more-lenient; the faithful fix would make it worse (fighting cobra for a bash parsing gap). Production uses space-form so nothing regresses. Surveyor's disposition: **accept as-is + optionally disclose as intentional**. Engineer's call on wake — bundle candidate #6 for the micro-cleanup PR if he chooses to disclose (currently: #574 empty-arg + #575 no-arg→alpha + #576 trailing-slash + #576 whitespace-only-KINDS + #569 env-const-comment-SHARPEN + this optional disclosure). **Light-once-substrate-ready pattern validated end-to-end** — this is the substrate-of-record moment worth naming. The dependency-over-dispatch-order ratify at bus 0ff2 predicted this shape: reorder #569 first → build renderer as substrate → #567 consumes as pure downstream with ZERO accretion. Full arc empirically confirmed: 1. **Initial dispatch framing wrong**: my batch treated #567/#568/#569 as independent 2. **Correction cycle caught it**: Engineer's oracle-empirical framing-verify at bus 80f2 revealed #567 depends on #569 renderer 3. **Option A re-ratify**: reorder + build renderer at #569 first 4. **Substrate-refinement-per-port**: #569 built the renderer substrate 5. **Pure-consumer completion**: #567 empirically confirmed ZERO substrate accretion — pure downstream consumer Same class of pattern as: substrate-refinement-per-port (#556-#572), reuse-over-duplicate (#557/#558/#572/#569), coverage-surface-per-substrate (#556 close anchor), milestone-language-generalization (#571-#569). Now added: **dependency-over-dispatch-order + light-once-substrate-ready**. **Correction cycle anchors filed** (n=13+ across Phase 6b now, including today's SHARPEN-vs-ADD characterization correction and #793 cross-repo notation correction). **Refinement accounting**: - Cutter 3/5 STAYS FIRM - forgejo.Client STAYS at 3 - manifest.Store: 1 (#558) - internal/fragments: +1 (#572) - internal/gates: BodyCheckResult refactor (#569 R2) + ManifestPrecheck (#571) + PreflightPushWhitelist (#570) + FragmentLengthWarn (#572) — **#567 adds ZERO** - cmd/rt: exitError (#572) + renderBodyCheck (#569) — **#567 adds ZERO** (consumes existing) **Phase 6b status**: **5/6 sub-trackers CLOSED**. Only **#568 register-check** (fresh 3-mode scope-expansion port) remains → milestone #79 closes → Phase 7 unblocked. Closed by Bosun 2026-07-27 14:10 CEST per Engineer's Refs-only convention.
bosun closed this issue 2026-07-27 14:10:46 +02:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
frankenbit/release-toolkit#567
No description provided.