b712b918c9fdf2aac65b5f6ceb076e4af584231c
braney
  Tue Sep 1 12:29:36 2026 -0700
trackDbConditions: scan the whole library, and check the scanner against known cases, refs #37908

Four refinements, one of which fixes wrong output rather than noisy output.

The scanned file list was hand-kept, and it had silently missed netCart.c,
chainCart.c, pgSnp.c, hgMaf.c and a dozen more that read track settings on the
drawing path.  An unscanned read site is worse than an unclassified one: the
every-path analysis was claiming a condition holds at every read of a setting
while never having seen one of the reads.  Three settings were carrying false
claims because of it, barChartBars, barChartCategoryUrl and bigDataUrl.  So scan
hg/lib and hg/cgilib whole and let reachability decide which side of the browser
each read belongs to.  Coverage goes from 325 settings to 347.

An early return is treated as a precondition only near the top of a function.
The same shape four hundred lines down is sound but says nothing about the
setting, and it was how the jsonp output check at the tail of doTrackForm came
to look like a condition on filterBy.

A negated disjunction is a conjunction, so NOT (A || B) now splits into NOT A
and NOT B.  The squishyPack guard was one unsplittable string that was neither a
visibility condition nor a coverage one; it is now correctly both.

--self-test checks the harvest against ten cases read out of the C by hand.
Every one of them broke at least once while this was being built, usually
silently, so they are checked rather than trusted, and --check runs them first
and refuses to report anything if the scanner itself has moved.  It earned its
place immediately by catching two misclassifications in the same commit that
added it.

Also caches the harvest in a temp file keyed on the newest source mtime, since
scanning takes forty seconds and reading the output takes several runs.  Warm
runs are now instant.

diff --git src/hg/utils/trackDbConditions/conditionBaseline.txt src/hg/utils/trackDbConditions/conditionBaseline.txt
index eb47808293a..750d400c0f5 100644
--- src/hg/utils/trackDbConditions/conditionBaseline.txt
+++ src/hg/utils/trackDbConditions/conditionBaseline.txt
@@ -1,59 +1,57 @@
 # Documented settings whose reads all sit behind a condition.
 # Accepted state for trackDbConditions.py --check.  One scope:name per line.
 render:bamColorTag
-render:barChartBars
-render:barChartCategoryUrl
 render:barChartColors
 render:barChartMerge
 render:baseColorTickColor
 render:baseColorUseCds
 render:bigDataIndex
-render:bigDataUrl
 render:centerLabelsDense
 render:chainNormScoreAvailable
 render:colorFields
+render:compositeTrack
 render:configurable
 render:configureByPopup
 render:dataVersion
 render:detailsBoxesEnabled
 render:drawMode
 render:exonNumbers
 render:filterBy
 render:frames
+render:genome
 render:hapClusterHeight
 render:hapClusterTreeAngle
 render:hicArcLimit
 render:hideEmptySubtracks
 render:hideEmptySubtracksMultiBedUrl
 render:hideEmptySubtracksSourcesUrl
 render:highlightColor
 render:irows
+render:itemRgb
 render:labelOnFeature
 render:linkDataUrl
 render:logoMaf
 render:lollyMaxSize
 render:lollyNoStems
 render:maxLimit
 render:metadata
 render:minGrayLevel
 render:minQual
 render:negateValues
-render:nextExonText
 render:noInherit
 render:normalization
 render:otherTwoBitUrl
 render:pairSearchRange
 render:pennantIcon
 render:resolution
 render:saturationScore
+render:searchIndex
 render:showCdsMaxZoom
-render:showSnpWidth
 render:smoothingWindow
+render:sortOrder
 render:speciesCodonDefault
-render:speciesDefaultOff
-render:speciesGroups
-render:speciesOrder
 render:subGroups
+render:superTrack
 render:thickDrawItem
 render:viewLimits
 render:windowingFunction