bug(config): an absolute changelog: is read as given by decide and manifest-check, but prep and release join it under the repo root #1528
Labels
No labels
bump
major
bump
minor
bump
patch
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
loop/paused
mirror-drift
priority
critical
priority
high
priority
low
priority
medium
size
L
size
M
size
S
size
XL
status
blocked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
frankenbit/release-toolkit#1528
Loading…
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?
An absolute
changelog:path inrelease-toolkit.ymlis honoured by some verbs and joined under the repository root by others.rt prepandrt releasetherefore cannot run with one, on every OS, whiledecide,manifest-checkandrecover-pending-cutread it as given. Nothing in config validation says which reading is the contract.Found while verifying #1527 (#1526), which made
recover-pending-cuttreat a Windows-absolute path as absolute, asdecidealready did.Measured
2026-10-03,
rtbuilt atdd871e8ingolang:1.25. The fixture is a repo at/tmp/f/repowithchangelog: /tmp/f/repo/CHANGELOG.md, and that file exists with an## [Unreleased]section and a## [0.1.0]section.rt manifest-checkall checks passed, exit 0rt recover-pending-cut --dry-run(runsdecide)decide reports mode=update; the changelog path raised no errorrt prep --dry-runError: CHANGELOG file not found: /tmp/f/repo/CHANGELOG.md, exit 1rt preprt release --dry-run --version 0.1.0Error: CHANGELOG missing: /tmp/f/repo/CHANGELOG.md, exit 1With
changelog: CHANGELOG.mdon the same fixture,prep --dry-runexits 0 andrelease --dry-rungets past the changelog tono git remote 'origin' configured.Cause
Each verb resolves
cfg.Changelogon its own, in one of three ways:joined under the root, unconditionally:
cmd/rt/prep.go:189,filepath.Join(repoRoot, cfg.Changelog);cmd/rt/release.go:91, the same;internal/release/cutter.go:109,changelogPath(), the cut's read and seal write.On Linux
/repojoined with/abs/CHANGELOG.mdgives/repo/abs/CHANGELOG.md. On Windows a joinedC:\...is an invalid name (not measured for these verbs; #1526 measured the same join inresolveUnderRoot).absolute kept, relative joined:
internal/decide/decide.go:1362,decide.resolvewithfilepath.IsAbs;cmd/rt/recover_pending_cut.go,resolveUnderRoot, the same rule since #1527.used as given, relative to the working directory:
cmd/rt/manifest_check.go:170;cmd/rt/prepared_uncut_check.go:439. This one is read from the code only; on this fixture it exited 2 with no output, so it was not graded.config.Loaddoes not constrainchangelog:.docs/architecture/contracts/config.schema.jsondescribes it only as "Path to the changelog file."version_files, in contrast, must be repo-relative (#181).Why it matters
changelog:gets green frommanifest-checkand a normaldecide, then a failingprepwhose message says the file does not exist, although it does.version_filesdoes not coverchangelog:. By the code,recover-pending-cutwrites the changelog at an absolute path as given, so it can write outside the repository. That was not run here, because the fixture has no pending cut.Nothing is broken for a repo-relative
changelog:, the form this repository's own config uses. Hence priority/low.Possible directions (for whoever picks this up)
changelog:inconfig.Load, as #181 does forversion_files. This is right if the changelog must live in the repository, whichprepand the cut already assume because theygit addand seal it. Cost: a config thatdecideandmanifest-checkaccept today would fail validation.decide.resolveway, for every verb. This is right if a changelog outside the checkout is a real use case. Cost:prepand the cut would then stage and commit a file outside the repository, whichgit addrefuses. That needs its own answer.Acceptance criteria
changelog:applies one rule to an absolute path, whether that is refusal at config time or a single resolution. The choice is recorded as a decision tree (AGENTS.md section 7).changelog:is byte-identical before and after.changelog.dfragment, if adopters can see the change.Anchor
#1527's PR body, section "Observed, not changed". Filed at alex's request, without a commitment to fix it now.
..\paths, recover-pending-cut joins an absolute changelog, an atomic write fails over a read-only file #1526