]> git.hungrycats.org Git - bees/commitdiff
config: align the config header prose with what the code does
authorZygo Blaxell <bees@furryterror.org>
Mon, 31 Aug 2026 00:46:32 +0000 (20:46 -0400)
committerZygo Blaxell <bees@furryterror.org>
Tue, 6 Oct 2026 05:51:40 +0000 (01:51 -0400)
Four comments in bees-config.h were written before the schema versions
inherited from one another and no longer describe the code under them.
m_builtin is not "compiled-in defaults" any more -- it holds the one
selected version and is kept for its origin label, with the rest of the
chain hanging off m_innie.  set_version_defaults accepts release aliases
as well as CURRENT and STABLE.  innie() had picked up a description of
the only caller that existed when it was added.  And version_chain's note
about the two walk directions read as if the ordering were a preference
rather than the fact that the two sets cannot overlap.

No behaviour change; this is the prose catching up.

Assisted-by: Claude-Code:claude-opus-5
src/bees-config.h

index cf7a4f2f8d62e846ccd608d362682ae3eb3fdd1d..933d30d07dbd80a81684c8b22538d193fd4a02ed 100644 (file)
@@ -96,7 +96,7 @@ class BeesConfig {
 
            @p version first, then its ancestors nearest-first, then its
            descendants nearest-first.  The two directions answer two different
-           questions over disjoint sets of versions, so one order serves both.
+           questions and the sets are disjoint, so there is no ambiguity.
 
            Ancestors are what let a schema state only the keys it changes.
            Descendants are what let a selected version go on working as the
@@ -107,12 +107,11 @@ class BeesConfig {
        */
        static vector<string> version_chain(const string &version);
 
-
        /// Hierarchy of Innies (one per config layer)
        Innie m_argv;     ///< Values provided via command-line flags.
        Innie m_local;    ///< Values from the per-filesystem config file.
        Innie m_global;   ///< Values from the global config file.
-       Innie m_builtin;  ///< Compiled-in defaults.
+       Innie m_builtin;  ///< The selected schema version; kept for its origin label.
 
        /// Merged view used for lookup.  Built once at the end of set_argv()
        /// by chaining m_argv -> m_local -> m_global -> m_builtin.
@@ -138,7 +137,7 @@ public:
 
            Every version in version_chain() is pushed as a default, in order,
            so @p target resolves the whole chain.  Accepts any name in
-           version_aliases().
+           version_aliases(), including release aliases such as "v0.11".
 
            This attaches to a caller's Innie rather than returning one because
            an Innie's fallback list does not survive being copied: the copy
@@ -189,9 +188,9 @@ public:
        /// Return the set of section-name suffixes immediately under @p prefix.
        /// E.g. sections("scan.extent") returns {"128K", "512K", ...}.
        set<string> sections(const string &prefix) const;
-       /// Return the merged Innie for direct key/section access.  Used by the
-       /// config dump helpers below, which walk every visible section rather
-       /// than looking up known keys through the typed get() template.
+       /// Return the merged Innie for direct key/section access.  Used where
+       /// sections must be enumerated rather than looked up by name, which the
+       /// typed get() template cannot do.
        const Innie &innie() const;
 
        /**