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/rm38108.docent.yaml src/hg/utils/docent/tests/regress/rm38108.docent.yaml
index 7a0fce172a3..493a218891b 100644
--- src/hg/utils/docent/tests/regress/rm38108.docent.yaml
+++ src/hg/utils/docent/tests/regress/rm38108.docent.yaml
@@ -25,30 +25,33 @@
 # hgSession is NOT here even though it shares the fix. Measured on genome-test 2026-09-06:
 # without a login it answers the crafted GET with the sign-in page, so the upload path is
 # never reached and a script that drove it would assert nothing about this bug.
 #
 # There is no server left to watch this fail on, and that is worth saying rather than
 # leaving a reader to assume it was checked. 7181c0af889 is in v503_branch, so hgwbeta has
 # it and answers all three URLs with an ordinary page. The RR was still on v502 on
 # 2026-09-06 and so is still vulnerable -- it is deliberately NOT driven here, because the
 # reproducer's whole effect is to kill the CGI process serving it.
 #
 # The assertion on each page is a POSITIVE one. A crash arrives as Apache's own 500 page,
 # which is a perfectly valid page carrying none of these strings, so a bare noText would
 # pass on it -- the same trap as the "Very Early Error" page. hgTracks gets a row check for
 # the same reason; the other two have no track image, so they name text the CGI itself
 # writes.
+proof:
+  - "assertion-only 2026-09-06 -- written from the ticket after the fix had shipped"
+
 target: genome-test
 db: hg38
 reset: true
 fast: true
 steps:
   # The custom-track upload path, reached from the browser itself.
   - goto: "/cgi-bin/hgTracks?db=hg38&hgt.customFile__filename=x.gz&hgt.customFile__binary=1%20100&pix=1100"
   - expect: {rows: [ruler], noText: "Internal Server Error"}
 
   # The same variables, reached from the custom-track page instead.
   - goto: "/cgi-bin/hgCustom?db=hg38&hgt.customFile__filename=x.gz&hgt.customFile__binary=1%20100"
   - expect: {text: "Add Custom Tracks", noText: "Internal Server Error"}
 
   # hgPhyloPlace's sequence upload, which has an upload field of its own.
   - goto: "/cgi-bin/hgPhyloPlace?db=wuhCor1&sarsCoV2File__filename=x&sarsCoV2File__binary=1%20100"