]> git.hungrycats.org Git - bees/commit
config: do not resolve a pinned version through newer schemas next
authorZygo Blaxell <bees@furryterror.org>
Sat, 10 Oct 2026 18:59:20 +0000 (14:59 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sat, 10 Oct 2026 18:59:20 +0000 (14:59 -0400)
commitd72a1f79bcce78997f5fcc6cec5a2bbd3b12de56
treebbf047e72f035d98dea6cbde8ca81da30b7888e3
parentf9bcacd280b4fe3deb9b026566bb965bf239d3e3
config: do not resolve a pinned version through newer schemas

version_chain() consulted a version's ancestors and then its
descendants, so a key the selected version did not define resolved to
the value a newer schema introduced it with.  A configuration pinned to
an old version then changes behaviour whenever a newer schema adds an
option, which is what pinning is meant to prevent.

Resolve a version through itself and its ancestors only, and drop
next_version(), which only the descendant walk used.  Every key the code
reads must now be defined in the oldest schema; version 1 gained the
two it was missing in the previous commit, and test_builtin_versions()
already fails if any version cannot resolve a key another version
defines.

Update the version_chain(), config.version and --show-builtin-config
descriptions to match, and say in the version 1 file comment that new
options get a key there too, at the value that keeps v0.11 behaviour.

Assisted-by: Claude-Code:claude-opus-5-5
docs/config-file.md
docs/options.md
src/bees-config-v1.cc
src/bees-config.cc
src/bees-config.h