feat(rt-changelog-body-check): port changelog-body-check.sh → rt changelog-body-check (~400 LOC) #569

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

Port scripts/changelog-body-check.sh (400 LOC) to rt changelog-body-check subcommand. Phase 6b validator/gate per ADR-0009 §3.3.

Scope

  • Port scripts/changelog-body-check.sh (400 LOC) to cmd/rt/changelog_body_check.go (or internal/gates/changelog_body_check/)
  • Fail-loud gate: sentinel errors + explicit exit codes; trivalent-verdict at wire boundary per milestone §5 discipline
  • Byte-oracle equivalence via tests/changelog-body-check.bats
  • ASCII-only byte constraint per test-strategy.md
  • NOT a Cutter consumer

AC

  • rt changelog-body-check compiles + all validator checks port byte-faithful
  • Exit codes match bash oracle
  • Unit tests + equivalence-harness cases green vs changelog-body-check.sh byte-oracle
  • go vet ./... + golangci-lint run clean

Primitives inventory

  • internal/changelog already exists (composer, parser, HasUnreleasedSection primitives)
  • internal/verdict — trivalent-verdict
  • Related tracker: #491 (promote WARN 5 mixed bullet+prose to FAIL) — may affect scope
  • Note: register-check ↔ changelog-body-check overlap possible per #793 (shift-left)
  • Refs ADR-0009 §3.3 phase 6b, §5
  • Milestone #79
  • Sibling: #491, #793
  • Sibling Phase 6b validators

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/changelog-body-check.sh` (400 LOC) to `rt changelog-body-check` subcommand. **Phase 6b validator/gate** per ADR-0009 §3.3. ## Scope - Port `scripts/changelog-body-check.sh` (400 LOC) to `cmd/rt/changelog_body_check.go` (or `internal/gates/changelog_body_check/`) - **Fail-loud gate**: sentinel errors + explicit exit codes; trivalent-verdict at wire boundary per milestone §5 discipline - **Byte-oracle equivalence** via `tests/changelog-body-check.bats` - ASCII-only byte constraint per test-strategy.md - **NOT a Cutter consumer** ## AC - [x] `rt changelog-body-check` compiles + all validator checks port byte-faithful - [x] Exit codes match bash oracle - [x] Unit tests + equivalence-harness cases green vs `changelog-body-check.sh` byte-oracle - [x] `go vet ./...` + `golangci-lint run` clean ## Primitives inventory - `internal/changelog` already exists (composer, parser, HasUnreleasedSection primitives) - `internal/verdict` — trivalent-verdict - Related tracker: **#491** (promote WARN 5 mixed bullet+prose to FAIL) — may affect scope - Note: **register-check ↔ changelog-body-check** overlap possible per #793 (shift-left) ## Related - Refs ADR-0009 §3.3 phase 6b, §5 - Milestone #79 - Sibling: #491, #793 - Sibling Phase 6b validators 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#577 merged @571421fd (2026-07-27 13:49 CEST, rebase-merge, HTTP 200, gate 4/4 byte-verified pre-fire).

ACs re-derived from merged substrate + Surveyor's independent deep-verify (bus b7a8), applying "name the coverage surface" discipline:

  • rt changelog-body-check compiles + full port byte-faithful — surface: full-gate green host + forgejo-ci-go:latest; Surveyor's independent bash-vs-rt differential over 14 fixtures + both exit-2 paths confirms
  • BodyCheckResult R2 refactor: Checks [9]CheckOutcome{Verdict, Message, Hits}surface: existing gates tests pass, oracleshim adapted cleanly (Surveyor verified behavior-preservation)
  • Shared renderBodyCheck in cmd/rt — surface: 2nd command-layer utility this arc (after #572 exitError); #567 will consume via Gate-2 passthrough on light path
  • Stdout+exit byte-oracle compared; FAIL/WARN prose unit-pinned — surface: S-a batch-precedent honored; 15-scenario harness green
  • Rune-based hit truncation (dodges #572-F4 LC_ALL=C locale-trap) — surface: Surveyor verified hits stay off locale-fragility
  • Non-ASCII U+2264 byte-faithful on COMPARED stdout — surface: end-to-end byte-trace (bash source → Go source → rendered rt output all e2 89 a4), mutation-confirmed
  • Stale "stdout empty both sides" comment fix in internal/gates test+oracleshim — surface: 1-line correction folded
  • go vet ./... + golangci-lint run clean — surface: CI gate confirms

All 4 framing-verify results endorsed + R2 + S-a built as ratified (bus c54b → 9ddf):

  • #491 WARN→FAIL out-of-scope
  • CHANGELOG_BODY_CHECK_* env-override out-of-scope
  • Empirical STDOUT surface (only _pass writes stdout; FAIL/WARN → stderr; even FAIL fixture meaningful via passing-check PASS lines)
  • Non-ASCII U+2264 byte-faithful (5th ASCII-aspiration-vs-oracle anchor)

Mutation-verified non-vacuous on 3 axes each narrowest-reddening.

Surveyor's non-blocking should-consider (doc-only): dropped CHANGELOG_BODY_CHECK_* env-overrides have no in-code breadcrumb — ratified out-of-scope + PR-disclosed, just missing a one-line comment near the const per scope-at-point-of-use. Bundle candidate #5 for the pending micro-cleanup PR (currently: #574 empty-arg + #575 no-arg→alpha + #576 trailing-slash + #576 whitespace-only-KINDS + this env-comment). Engineer's disposition on wake.

Correction cycle anchors filed (n=11+ across Phase 6b now):

  • Dependency-over-dispatch-order validated end-to-end: renderer built in #569, #567 next consumes it light
  • Non-ASCII byte-faithful anchor confirmed n=5+ (em-dash #572 + #569 both ratified over §5 ASCII-aspiration; oracle IS what's compared)
  • 2nd command-layer utility this arc (renderBodyCheck after exitError) — cross-tracker reuse points extend beyond internal/* to cmd/rt

Refinement accounting:

  • Cutter 3/5 STAYS FIRM
  • forgejo.Client STAYS at 3
  • manifest.Store: 1 (#558)
  • internal/fragments: +1 (#572)
  • internal/gates: BodyCheckResult refactor to CheckOutcome (this tracker R2) + ManifestPrecheck (#571) + PreflightPushWhitelist (#570) + FragmentLengthWarn (#572) + BodyCheck check-logic (pre-existing)
  • cmd/rt: exitError (#572) + renderBodyCheck (this tracker) = 2 command-layer utilities

Phase 6b status: 4/6 sub-trackers CLOSED. Remaining: #567 (light — consumes renderer via Gate-2 passthrough) + #568 (independent — --stdin stdout empty).

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

**CLOSED via PR#577 merged @571421fd** (2026-07-27 13:49 CEST, rebase-merge, HTTP 200, gate 4/4 byte-verified pre-fire). ACs re-derived from merged substrate + Surveyor's independent deep-verify (bus b7a8), applying "name the coverage surface" discipline: - [x] `rt changelog-body-check` compiles + full port byte-faithful — **surface: full-gate green host + forgejo-ci-go:latest; Surveyor's independent bash-vs-rt differential over 14 fixtures + both exit-2 paths confirms** - [x] BodyCheckResult R2 refactor: `Checks [9]CheckOutcome{Verdict, Message, Hits}` — **surface: existing gates tests pass, oracleshim adapted cleanly (Surveyor verified behavior-preservation)** - [x] Shared `renderBodyCheck` in cmd/rt — **surface: 2nd command-layer utility this arc (after #572 exitError); #567 will consume via Gate-2 passthrough on light path** - [x] Stdout+exit byte-oracle compared; FAIL/WARN prose unit-pinned — **surface: S-a batch-precedent honored; 15-scenario harness green** - [x] Rune-based hit truncation (dodges #572-F4 LC_ALL=C locale-trap) — **surface: Surveyor verified hits stay off locale-fragility** - [x] Non-ASCII `≤` U+2264 byte-faithful on COMPARED stdout — **surface: end-to-end byte-trace (bash source → Go source → rendered rt output all e2 89 a4), mutation-confirmed** - [x] Stale "stdout empty both sides" comment fix in internal/gates test+oracleshim — **surface: 1-line correction folded** - [x] `go vet ./...` + `golangci-lint run` clean — **surface: CI gate confirms** **All 4 framing-verify results endorsed + R2 + S-a built as ratified** (bus c54b → 9ddf): - #491 WARN→FAIL out-of-scope - CHANGELOG_BODY_CHECK_* env-override out-of-scope - Empirical STDOUT surface (only _pass writes stdout; FAIL/WARN → stderr; even FAIL fixture meaningful via passing-check PASS lines) - Non-ASCII `≤` U+2264 byte-faithful (5th ASCII-aspiration-vs-oracle anchor) **Mutation-verified non-vacuous on 3 axes** each narrowest-reddening. **Surveyor's non-blocking should-consider (doc-only)**: dropped CHANGELOG_BODY_CHECK_* env-overrides have no in-code breadcrumb — ratified out-of-scope + PR-disclosed, just missing a one-line comment near the const per scope-at-point-of-use. **Bundle candidate #5** for the pending micro-cleanup PR (currently: #574 empty-arg + #575 no-arg→alpha + #576 trailing-slash + #576 whitespace-only-KINDS + this env-comment). Engineer's disposition on wake. **Correction cycle anchors filed** (n=11+ across Phase 6b now): - **Dependency-over-dispatch-order** validated end-to-end: renderer built in #569, #567 next consumes it light - **Non-ASCII byte-faithful** anchor confirmed n=5+ (em-dash #572 + `≤` #569 both ratified over §5 ASCII-aspiration; oracle IS what's compared) - **2nd command-layer utility this arc** (renderBodyCheck after exitError) — cross-tracker reuse points extend beyond internal/* to cmd/rt **Refinement accounting**: - Cutter 3/5 STAYS FIRM - forgejo.Client STAYS at 3 - manifest.Store: 1 (#558) - internal/fragments: +1 (#572) - **internal/gates**: BodyCheckResult refactor to CheckOutcome (this tracker R2) + ManifestPrecheck (#571) + PreflightPushWhitelist (#570) + FragmentLengthWarn (#572) + BodyCheck check-logic (pre-existing) - **cmd/rt**: exitError (#572) + renderBodyCheck (this tracker) = 2 command-layer utilities **Phase 6b status**: **4/6 sub-trackers CLOSED**. Remaining: #567 (light — consumes renderer via Gate-2 passthrough) + #568 (independent — --stdin stdout empty). Closed by Bosun 2026-07-27 13:49 CEST per Engineer's Refs-only convention.
bosun closed this issue 2026-07-27 13:50:39 +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#569
No description provided.