a3df9f62a5995302b5a07ce5e3dd0eadda3a7768
braney
  Sat Sep 12 09:59:01 2026 -0700
cartTrackVarCatalog: describe hgTables' own cart variables, refs #37979

With peel() fixed, 2,331 hgta_ names in the saved sessions were left honestly
uncatalogued rather than absorbed by a catch-all.  They fall into four groups,
each read at its call site before a row was written for it.

The two linked-table checkboxes, hgta_fs.linked.<db>.<table> and
hgta_fil.linked.<db>.<table>, which offer a joinable table's fields on the
Select Fields and filter pages.  extraTableList finds the checked tables by
scanning the cart for the prefix, so the set is whatever the cart holds.

The filter ops.  The catalog covered .pat alone; hgTables.h defines six, and
all six are in live sessions.  pat, dd and cmp belong to one field, while
rawLogic, rawQuery and maxOutput apply to the whole table and still carry a
field slot in the name, filled with an empty string or a bare _.

Fifty-one session-scoped variables: intersection, correlation, subtrack merge,
identifiers, user regions, output naming, MAF output, and which table the
Select Fields, filter and histogram pages are about.  The header itself
documents the convention that shapes half of them - the pages with a Cancel
button hold their state twice, hgta_<var> in force and hgta_next<Var> proposed,
copied one way on open and the other on Submit - so that is in the group's
description rather than in every note.

Renaming the .pat row to .<op> also removed an accidental cover: a row
registers its trailing component, and that "pat" had been standing in for
gvfTrack.c's %s_pat, which is an item label rather than a cart variable.  Its
seven siblings were already in the baseline, so pat joins them there.

hgta_ names matched only by a catch-all go from 4,299 to 3.  The three left are
hgta_identifierFile and hgta_userRegionsFile, described in the #37623
file-variable registry that this audit does not read, and hgta_userRegionsTable,
which nothing in the tree reads at all.

diff --git src/hg/utils/cartTrackVarCatalog/cartVarsNotCataloged.txt src/hg/utils/cartTrackVarCatalog/cartVarsNotCataloged.txt
index 8ba4646ee1d..07373da1632 100644
--- src/hg/utils/cartTrackVarCatalog/cartVarsNotCataloged.txt
+++ src/hg/utils/cartTrackVarCatalog/cartVarsNotCataloged.txt
@@ -1,70 +1,71 @@
 # 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.
 #
 # None of them is a cart variable: the scan cannot tell one from a table name
 # or an SQL fragment, so _gold comes out of it too.  See the walk below for
 # the five classes they fall into.
 #
 # 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 for a year a name being in here
 # was not evidence that anybody had looked at it.  That is no longer true: on
 # 2026-09-05 every remaining name was read at its call site, and what was left
 # falls into five classes.  Item labels that only look like variables
 # (gvfItemName appends _unk, _dnovo and six more to an item's name for
 # display).  HTML element ids, built the same way a cart name is and never
 # sent to the server, which is most of them.  Table and db.table names.  One
 # submit-button name that is read with cgiOptionalString and never from the
 # cart (snp125Defaults_coloring).  And one printf artifact, "\n".
 #
 # So a name in here now means somebody decided it is not a cart variable.  A
 # name that arrives later does not: read its call site before believing this
 # file about it.  Twenty-three names left in that walk and are described in
 # cartTrackVarCatalog.py, eighteen of them the My Variants edit form's.
 #
 # Names are stored with the leading separator stripped, which is how reconcile
 # compares them.
 \n                                 # hg/hgc/hgc.c
 add                                # hg/lib/hui.c
 bin                                # hg/cgilib/annoStreamDb.c
 bip                                # hg/hgTracks/gvfTrack.c
 chainSelf                          # hg/hgc/hgc.c
 clr                                # hg/lib/hui.c
 coloring                           # hg/hgTrackUi/hgTrackUi.c
 confSet                            # hg/hgTracks/searchTracks.c
 delAll                             # hg/hgTracks/hgTracks.c
 dispFndTrk                         # hg/hgTracks/searchTracks.c
 dnovo                              # hg/hgTracks/gvfTrack.c
 drag                               # hg/lib/vcfUi.c
 fileSortOrder                      # hg/cgilib/fileUi.c
 first                              # hg/lib/tablesTables.c
 germ                               # hg/hgTracks/gvfTrack.c
 gold                               # hg/lib/hdb.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
 next                               # hg/lib/tablesTables.c
+pat                                # hg/hgTracks/gvfTrack.c
 pfamDesc                           # hg/hgc/hgc.c
 prev                               # hg/lib/tablesTables.c
 projectSelect                      # hg/hgc/myVariantsClick.c
 prot                               # hg/hgc/hgc.c
 sel_id                             # hg/hgTracks/searchTracks.c
 som                                # hg/hgTracks/gvfTrack.c
 unip                               # hg/hgTracks/gvfTrack.c
 unk                                # hg/hgTracks/gvfTrack.c
 wikiTrack                          # hg/hgTables/hgTables.c