4697bbddd881c72cccb85b9ff0aacd769396b9d0
braney
  Thu Sep 10 07:34:35 2026 -0700
docent: record what evidence each regression test has, and count it

A regression test written after the fix asserts the right answer, but nobody
has watched it fail for the reason it exists, and a loose assertion in that
state is indistinguishable from no test at all. Four of the 37 scripts here
have actually been watched to flip. That was recorded only as prose in each
script's header, so answering "how many of these are real regression tests"
meant a grep and a read, and the number could not be quoted.

Every script now carries a top-level `proof:` key, one quoted line per piece
of evidence, `<level> <YYYY-MM-DD> -- <what was seen>`. docent.js reads only
the keys it names off the parsed document, so this costs a run nothing.

tests/proof.js reads them and tallies, wired up as `make proof` in the shared
docentTest.mk. It exits 1 on a malformed line, an unknown level, or a line
left unquoted -- that last one because nearly every note names a ticket and a
bare # in an unquoted YAML scalar silently truncates the sentence at the
ticket number, which is how the first pass of this change lost half its text.

The levels, weakest first: assertion-only, xfail, sandbox-ab, server-flip,
caught-regression. Today that reads 31 / 2 / 0 / 3 / 1.

nightly.sh now records the flips it finds. An xfail that PASSES is the best
evidence this suite produces -- the same server, the same fixtures, the same
script, one real build apart -- and until now it arrived as a red mail and was
thrown away with the log 60 days later. It is appended to
/hive/users/braney/docentNightly/flips.log, one line per script ever, outside
the checkout because --update resets the tree. The mail says what to do with
it. The three flips that already happened (rm38272 2026-09-06, rm36212
2026-09-09, rm38310 2026-09-10) were recovered from the old logs and seeded
there by hand.

Full suite run after the change: 37 scripts, all ok. refs #38252

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

diff --git src/hg/utils/docent/tests/regress/rm36335.docent.yaml src/hg/utils/docent/tests/regress/rm36335.docent.yaml
index 53278e8fe39..7259de1ea3c 100644
--- src/hg/utils/docent/tests/regress/rm36335.docent.yaml
+++ src/hg/utils/docent/tests/regress/rm36335.docent.yaml
@@ -9,30 +9,33 @@
 # It also fired far too often: with bedSize 3 there is no name filter, so every interval
 # quickLiftGetIntervals returned went through the remap and a single unmappable item
 # aborted the whole page. Fixed in c13d7b1af23 by skipping a NULL remap, then 01badfbaa97
 # for the stacked <BR>s that fix exposed.
 #
 # Brian's own repro from the ticket, which is one subtrack in pack rather than the whole
 # composite: hg38, hide all, alldifficultregions to pack, QuickLift to hs1, go to
 # chr7:156,982,676-156,996,015, click an item.
 #
 # The two halves of the assertion are the error string the ticket quoted and the details
 # the fixed page prints. noText: on its own would pass on the buggy page, because that page
 # renders perfectly well -- it just carries a garbled warning. text: on the position is
 # what says the item was really found and remapped, and 233 bases at
 # chr7:156,983,823-156,984,055 is the value recorded in the ticket when the fix was
 # verified.
+proof:
+  - "assertion-only 2026-09-05 -- written from the ticket after the fix had shipped"
+
 target: genome-test
 db: hg38
 position: chr7:156982676-156996015
 reset: true
 fast: true
 steps:
   - go: chr7:156982676-156996015
   - hide: all
   - track: {alldifficultregions: pack}
 
   # Assert the source view first: with nothing drawn here the convert would have nothing to
   # lift and the real assertion below could pass for the wrong reason.
   - expect: {rows: [alldifficultregions], noText: "Warning/Error"}
 
   - convert: {to: hs1, quicklift: true}