You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commands that accept --config pointing at a changelog.yml outside the current working tree fail, because the ScopedFileSystem they read through does not include the config file's own directory as a scope root.
Split out of #3742, where this surfaced. It is not a regression from that PR — the same limitation exists on main.
Detail
ChangelogPrEvaluationService reads config through the ScopedFileSystem it is handed:
Neither includes the directory the --config path actually lives in, so a config outside the working tree is out of scope.
Why it is confusing
ScopedFileInfo.Exists returns false for an out-of-scope path rather than throwing. The failure therefore presents as "the file does not exist" even when the file is plainly there on disk, which sends you looking for a typo'd path instead of a scope boundary.
This affects any caller that surfaces existence before reading, not just the changelog commands.
Repro sketch
docs-builder changelog evaluate-pr --config /some/path/outside/repo/changelog.yml ...
# reports the config as missing; the file exists and is readable
Possible directions
Add the resolved config file's directory as an explicit scope root when a config path is supplied — a short-lived branch in Make PR_BODY_FILE work in CI by scoping reads to RUNNER_TEMP #3742 did this via a ChangelogPrEvaluationFileSystem helper, dropped in favour of the simpler RealReadForCI factory method.
Fold it into FileSystemFactory so every --config-accepting command benefits rather than one command at a time.
Independently: make an out-of-scope read distinguishable from a genuinely missing file, so the diagnostic points at the scope rather than at the path.
Worth deciding whether out-of-tree --config is a supported scenario at all before implementing — for CI-only commands the config is always in-repo, so option 3 alone may be sufficient.
Summary
Commands that accept
--configpointing at achangelog.ymloutside the current working tree fail, because theScopedFileSystemthey read through does not include the config file's own directory as a scope root.Split out of #3742, where this surfaced. It is not a regression from that PR — the same limitation exists on
main.Detail
ChangelogPrEvaluationServicereads config through theScopedFileSystemit is handed:mainthis defaults toFileSystemFactory.RealRead— scoped toPaths.WorkingDirectoryRoot+Paths.ApplicationData.evaluate-prpassesFileSystemFactory.RealReadForCI, which is the same scope plusRUNNER_TEMP.Neither includes the directory the
--configpath actually lives in, so a config outside the working tree is out of scope.Why it is confusing
ScopedFileInfo.Existsreturnsfalsefor an out-of-scope path rather than throwing. The failure therefore presents as "the file does not exist" even when the file is plainly there on disk, which sends you looking for a typo'd path instead of a scope boundary.This affects any caller that surfaces existence before reading, not just the changelog commands.
Repro sketch
docs-builder changelog evaluate-pr --config /some/path/outside/repo/changelog.yml ... # reports the config as missing; the file exists and is readablePossible directions
ChangelogPrEvaluationFileSystemhelper, dropped in favour of the simplerRealReadForCIfactory method.FileSystemFactoryso every--config-accepting command benefits rather than one command at a time.Worth deciding whether out-of-tree
--configis a supported scenario at all before implementing — for CI-only commands the config is always in-repo, so option 3 alone may be sufficient.