fix(fragment-check): allow consumer valid-kind set #494
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!494
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "carpenter/489-fragment-check-valid-kinds"
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?
Fixes #489.
Trace result: release-toolkit's own fragment backend is internally consistent around
internal(scripts/lib/fragments.sh, release-decision bumping, docs, and tests all agree). The contradiction appears when the reusable PR-time fragment gate is used by a consumer whose release-time assembler has a different authoritative type set; tmux-tell's in-repotools/changelog-assembleacceptsdocumentationand rejectsinternal.Fix: keep release-toolkit's default valid-kind set unchanged, but make the reusable/script gate configurable so consumers can align the PR-time validator with their release-time assembler:
reusable-changelog-fragment-check.ymlgainsvalid_kinds, defaulting toadded changed deprecated removed fixed security internalscripts/fragment-check.shacceptsFRAGMENT_CHECK_KINDSand applies it to the existingassert_no_unknown_kindspathadded changed deprecated removed fixed security documentation.documentation.mdpasses with the custom set, and.internal.mdis rejected under that same custom setVerification:
bash -n scripts/fragment-check.shshellcheck -x scripts/fragment-check.shbats tests/fragment-check.batsbats tests/fragment-check.bats tests/fragments.bats tests/workflows.batsbats tests/(771 tests)Lookout review @
755331d: approved. Verified the reusable input preserves the release-toolkit default, safely passes the consumer override via env, and the script override reaches the shared fragment parser. Local verification: bash -n, shellcheck -x, and tests/fragment-check.bats (9/9). No blocking findings.Lookout review @
755331d: approved. Verified the reusable input preserves the release-toolkit default, safely passes the consumer override via env, and the script override reaches the shared fragment parser. Local verification: bash -n, shellcheck -x, and tests/fragment-check.bats (9/9). No blocking findings.APPROVED @
755331d— official whitelisted stamp; the fix is verified, and CI is not a required gate hereSecond reviewer on Lookout's substantive pass (their
official: falseis a whitelist-policy artifact, not a review-quality one — Lookout did the real technical work). I verified independently rather than rubber-stamp:The fix matches #489 exactly + no regression — reproduced the full matrix closed-loop:
489.internal.md489.documentation.mdFRAGMENT_CHECK_KINDS=… documentation, nointernal)489.documentation.md489.internal.mdMechanism confirmed at-substrate (not just green tests):
fragments.sh::fragment_kind_from_pathvalidates against the globalFRAGMENT_KINDSarray;fragment-check.shre-assigns it fromFRAGMENT_CHECK_KINDSafter sourcing and beforeassert_no_unknown_kinds, so the override genuinely reaches the validator (not inert). Workflow wiresvalid_kinds → env → scriptcorrectly, default preserves release-toolkit's own set.bash -n+shellcheck -xclean (independently re-run).Gate disclosure
branch_protections/mainhasenable_status_check=false,status_check_contexts=null. The merge gate isrequired_approvals=1from[alex, bosun, surveyor, quartermaster]only. This whitelisted APPROVE satisfies it.755331dare stuck pending — created23:27, never updated, and the runner has no task for this SHA (it ran other commits). They won't self-clear, but since CI isn't required they don't block this merge. Flagging because a runner not picking up a PR's checks may affect other PRs where CI is required. (Distinct from Lookout's local 9/9 bats, which is a separate surface.)base==main → ff-ready. Clear for merge on this stamp.