2f60825bdf72a8d0c99b81552266c9537e9ee2dc
braney
  Sat Sep 5 08:03:52 2026 -0700
cartTrackVarCatalog: tell an hg.conf name from a cart name.

An hg.conf setting and a track-scoped cart variable are built the same way.
jksql.c:1325 does safef(cfgName, sizeof cfgName, "%s.excludeDbs",
failoverProf->name) and reads the result with cfgOption on the next line,
which the scan cannot distinguish from safef(buf, size, "%s.heightPer",
track).  So excludeDbs sat in cartVarsNotCataloged.txt: correctly, in that
it is not a cart variable, but that left the setting described in no
registry at all and suppressed in the wrong one.

The accessor that reads the buffer back is what tells them apart, so
hgConfRead() looks for a cfg* call taking the same identifier within six
lines of the safef.  Six because the read is normally the next line and a
buffer reused later in the function for something else must not excuse an
unrelated name; the destination has to be a plain identifier, or we do not
know what was filled in.  It claims exactly one name in the tree today, and
harvestCartVars.py --hgconf prints it with its call site.

--reconcile no longer asks about such a name and --update-baseline no
longer writes it back, so the baseline is 55 names to 54.  The reverse case
is now an error rather than a silence: if this catalog ever describes a name
the tree reads with a cfg* accessor, --reconcile says so and exits 1,
because that is one of the two registries being wrong about what the name
is rather than a matter of taste.  Verified by planting excludeDbs in the
catalog and confirming the report.

hgConfCatalog gained the row in the companion commit.

refs #37838 #37925

diff --git src/hg/utils/cartTrackVarCatalog/cartVarsNotCataloged.txt src/hg/utils/cartTrackVarCatalog/cartVarsNotCataloged.txt
index 77bbafa7415..8e96aee1400 100644
--- src/hg/utils/cartTrackVarCatalog/cartVarsNotCataloged.txt
+++ src/hg/utils/cartTrackVarCatalog/cartVarsNotCataloged.txt
@@ -1,83 +1,82 @@
 # cartVarsNotCataloged.txt - names that harvestCartVars.py finds at a
 # cart*ClosestToHome() or safef("%s.%s") call site but that cartTrackVarCatalog.py
 # does not describe as a track-scoped cart variable.  Refs #37838.
 #
 # Most are not cart variables at all: the scan cannot tell one from a table
 # name or an SQL fragment, so _gold comes out of it too.  Some are cart
 # variables that simply have not been cataloged yet.
 #
 # Filenames are NOT in here.  A "%s.tmp" built from a filename has the same
 # shape as a "%s.heightPer" built from a track name, and 15 names of that kind
 # used to sit below with a new one arriving every few weeks.  The harvester now
 # reads them from the trailing extension instead: harvestCartVars.py
 # --filenames lists what that rule claims and explains it.
 #
 # cartTrackVarCatalog.py --reconcile complains about any harvested name in
 # neither the catalog nor this file, so this is what keeps a nightly run quiet
 # until something actually changes.  Regenerate with --update-baseline, then read
 # the diff before committing: a name appearing here is a decision that it is not
 # a cart variable worth cataloging, and a name disappearing means its call site
 # went away.
 #
 # The first version of this file was accepted wholesale, as a snapshot of the
 # gap on the day reconcile learned to fail.  So a name being in here is not
 # evidence that anybody has looked at it; only the ones added since, which
 # arrive a few at a time in a reviewable diff, carry that weight.
 #
 # Names are stored with the leading separator stripped, which is how reconcile
 # compares them.
 FilterLabel                        # hg/lib/hui.c
 FilterValuesDefault                # hg/lib/hui.c
 HighlightType                      # hg/hgTracks/bigBedTrack.c
 \n                                 # hg/hgc/hgc.c
 add                                # hg/lib/hui.c
 alt                                # hg/hgc/myVariantsClick.c
 bin                                # hg/cgilib/annoStreamDb.c
 bip                                # hg/hgTracks/gvfTrack.c
 blockCount                         # hg/hgTracks/myVariantsTrack.c
 blockSizes                         # hg/hgTracks/myVariantsTrack.c
 cancel                             # hg/hgTracks/myVariantsTrack.c
 chainSelf                          # hg/hgc/hgc.c
 chromEnd                           # hg/hgc/myVariantsClick.c
 chromStart                         # hg/hgc/myVariantsClick.c
 chromStarts                        # hg/hgTracks/myVariantsTrack.c
 clr                                # hg/lib/hui.c
 cnvType                            # hg/hgc/myVariantsClick.c
 coloring                           # hg/hgTrackUi/hgTrackUi.c
 confSet                            # hg/hgTracks/searchTracks.c
 defaults                           # hg/hgTrackUi/hgTrackUi.c
 delAll                             # hg/hgTracks/hgTracks.c
 delete                             # hg/hgTracks/myVariantsTrack.c
 description                        # hg/hgc/myVariantsClick.c
 dispFndTrk                         # hg/hgTracks/searchTracks.c
 dnovo                              # hg/hgTracks/gvfTrack.c
 drag                               # hg/lib/vcfUi.c
-excludeDbs                         # hg/lib/jksql.c
 fileSortOrder                      # hg/cgilib/fileUi.c
 first                              # hg/lib/tablesTables.c
 germ                               # hg/hgTracks/gvfTrack.c
 gold                               # hg/lib/hdb.c
 id                                 # hg/hgTracks/myVariantsTrack.c
 itemRgb                            # hg/hgc/myVariantsClick.c
 kgAlias                            # hg/lib/findKGAlias.c
 kgProtAlias                        # hg/lib/findKGProtAlias.c
 knownGene                          # hg/lib/hgFind.c
 last                               # hg/lib/tablesTables.c
 mat                                # hg/hgTracks/gvfTrack.c
 minAc                              # hg/lib/vcfUi.c
 mouseover                          # hg/hgc/myVariantsClick.c
 name                               # hg/hgc/myVariantsClick.c
 next                               # hg/lib/tablesTables.c
 pfamDesc                           # hg/hgc/hgc.c
 prev                               # hg/lib/tablesTables.c
 project                            # hg/hgc/myVariantsClick.c
 projectSelect                      # hg/hgc/myVariantsClick.c
 prot                               # hg/hgc/hgc.c
 ref                                # hg/hgc/myVariantsClick.c
 sel_id                             # hg/hgTracks/searchTracks.c
 som                                # hg/hgTracks/gvfTrack.c
 thickEnd                           # hg/hgc/myVariantsClick.c
 thickStart                         # hg/hgc/myVariantsClick.c
 unip                               # hg/hgTracks/gvfTrack.c
 unk                                # hg/hgTracks/gvfTrack.c
 wikiTrack                          # hg/hgTables/hgTables.c