Merge pull request #127 from codex-bot-andresmgsl/build/126-changelog-assembled-trio

test: correct changelog guard trio interaction
This commit is contained in:
Daniel Marin 2026-07-24 12:05:58 +01:00 committed by GitHub
commit d84d8a5d31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 7 deletions

View file

@ -6,6 +6,7 @@ so entries say what changed, cite the issue, and stop.
## Unreleased ## Unreleased
- `test/changelog-assembled.test.sh` — keep the trio interaction aligned with fragment mode: a dropped entry makes armed red too, while a hand-edited section leaves assembled as the sole red (#126).
- `changelog-armed` — treat `changelog.d/` as the arming, validate every development fragment, and require bare releases to consume the directory into their exact publishable section (#115). - `changelog-armed` — treat `changelog.d/` as the arming, validate every development fragment, and require bare releases to consume the directory into their exact publishable section (#115).
- `actions/changelog-assembled` — a release PR's stamped section must be byte-for-byte what the fragments it consumed assemble to, replayed from the merge base; inapplicable trees pass with a NOTICE (#116). - `actions/changelog-assembled` — a release PR's stamped section must be byte-for-byte what the fragments it consumed assemble to, replayed from the merge base; inapplicable trees pass with a NOTICE (#116).
- `lib/changelog.sh` + `bin/changelog-assemble` — read the `changelog.d/` fragments, assemble one release section (canonical group order, one shape per repo), and consume exactly what was published (#114). - `lib/changelog.sh` + `bin/changelog-assemble` — read the `changelog.d/` fragments, assemble one release section (canonical group order, one shape per repo), and consume exactly what was published (#114).

View file

@ -252,9 +252,15 @@ check "a section stamped from zero fragments fails on the replay's refusal" 1 \
check "missing changelog fails" 1 "no such file" run faithful-flat base NOPE.md check "missing changelog fails" 1 "no such file" run faithful-flat base NOPE.md
# --- the trio interaction row (the issue's whole argument) ------------------- # --- the trio interaction row (the issue's whole argument) -------------------
# On the faithful tree all three guards are green; on the dropped-entry tree # On the faithful tree all three guards are green. On the dropped-entry tree
# armed is green (the section exists and has prose), monotonic is green (no # monotonic is green (no heading was deleted) and, since #115's fragment
# heading was deleted) — this guard is the ONLY one that goes red. # mode, armed is red too — the surviving fragment is unconsumed on a bare
# tree — but only this guard names the entry the release LOST (#116 was
# written before #115 landed and expected armed green there; #117's flip
# recorded the interaction as it now stands). The hand-edited tree is where
# this guard stands alone: armed sees a publishable section, monotonic sees
# no deleted heading, and only the replay knows the prose is not what the
# authors wrote.
run_armed() { (cd "$TMP/$1" && bash "$ARMED"); } run_armed() { (cd "$TMP/$1" && bash "$ARMED"); }
run_monotonic() { local name="$1"; shift; (cd "$TMP/$name" && bash "$MONOTONIC" "$@"); } run_monotonic() { local name="$1"; shift; (cd "$TMP/$name" && bash "$MONOTONIC" "$@"); }
@ -264,12 +270,17 @@ check "trio, faithful tree: changelog-monotonic green" 0 "still present" \
run_monotonic faithful-flat base run_monotonic faithful-flat base
check "trio, faithful tree: changelog-assembled green" 0 "byte-for-byte" \ check "trio, faithful tree: changelog-assembled green" 0 "byte-for-byte" \
run faithful-flat base run faithful-flat base
check "trio, dropped-entry tree: changelog-armed stays green" 0 "agrees" \ check "trio, dropped-entry tree: changelog-armed red too (unconsumed fragment)" 1 \
run_armed dropped "not consumed" run_armed dropped
check "trio, dropped-entry tree: changelog-monotonic stays green" 0 "still present" \ check "trio, dropped-entry tree: changelog-monotonic stays green" 0 "still present" \
run_monotonic dropped base run_monotonic dropped base
check "trio, dropped-entry tree: changelog-assembled is the only red" 1 "" \ check "trio, dropped-entry tree: changelog-assembled names the lost entry" 1 \
run dropped base "Nine landed" run dropped base
check "trio, hand-edited tree: changelog-armed green" 0 "agrees" run_armed edited
check "trio, hand-edited tree: changelog-monotonic stays green" 0 "still present" \
run_monotonic edited base
check "trio, hand-edited tree: changelog-assembled is the only red" 1 "allegedly" \
run edited base
# --- degradation: the loud skip and the STRICT refusal ----------------------- # --- degradation: the loud skip and the STRICT refusal -----------------------