4bf8479a43a493e2899953b7358c9464abbc3959
braney
  Wed Sep 23 17:15:55 2026 -0700
docent: regression scripts load sessions from text files, not from one machine's hgcentral, refs #38252

A named session runs only on the machine whose hgcentral holds it, so hgwbeta and the RR
answered "Could not find session".  The sessions are now text files in
regress/sessionFiles, saved with hgSession's own save to file, and the scripts load them
by raw GitHub URL.  rm36805, rm35580 and rm36340 pass on genome-test and hgwbeta.

rm36340's session held its custom tracks as a customTrash table on genome-test.  The
track source is a file of its own now, loaded through hgt.customText, without two
commented-out tracks whose URLs carry a password.  Its first check now asks for a custom
track row and the hub's row, and fails when the session file does not load.

A lifted session cannot be a file: it names its quickLift hub by a path on the server
that made it, and re-pointing it does not work (#38046).  rm37388, rm37389 and rm38272
build that lift in steps instead, the GenArk GCA_018466835.2 mitochondrion lifted to hg38,
and pass on genome-test and hgwbeta.  rm38272 also fails on genome.ucsc.edu (v503) at its
settings page, with the bug's own error, so it gains a release-ab proof line.

diff --git src/hg/utils/docent/tests/regress/sessionFiles/README.txt src/hg/utils/docent/tests/regress/sessionFiles/README.txt
new file mode 100644
index 00000000000..4afd6ca7d56
--- /dev/null
+++ src/hg/utils/docent/tests/regress/sessionFiles/README.txt
@@ -0,0 +1,34 @@
+Saved sessions for the regression scripts, as text files.  refs #38252
+
+A named session lives in one machine's hgcentral, so a script that loads one with
+`loadSession: {user, name}` runs only on that machine: hgwbeta and the RR answer
+"Could not find session".  A text file loaded by URL runs anywhere, and a QA reader can
+load the same state with one link:
+
+    hgTracks?hgS_doLoadUrl=submit&hgS_loadUrlName=<raw GitHub URL of the file>
+
+Scripts load these by their raw GitHub URL,
+
+    https://raw.githubusercontent.com/ucscGenomeBrowser/kent/master/src/hg/utils/docent/tests/regress/sessionFiles/<name>.txt
+
+so a new or changed file works once it is pushed, which is also when the nightly run
+sees the script.
+
+To make one: load the saved session on genome-test in a fresh cart, then use hgSession's
+own "save to file" (hgS_doSaveLocal, compression none), and drop the hgS_ lines, which
+are the load and save requests themselves.  Name the file after the session it came from.
+
+Two kinds of session cannot become a file this way:
+
+  * A session holding a custom track stores it as a file and a customTrash table on the
+    server that made it.  Put the track's source in its own file here, and replace the
+    session's ctfile_<db> line with  hgt.customText <raw URL of that file>.  Never commit a
+    track line that carries a password in a URL, even a commented-out one.
+  * A lifted (quickLift) session names its quickLift hub by a path on the server that made
+    it, and re-pointing it at a copy of the hub does not work (#38046).  Build the lifted
+    state in the script with steps instead.
+
+RM_35326_bug.txt         Gerardo/RM_35326_bug, for rm35580
+RM_36805_TOGA_hangs.txt  Gerardo/RM_36805_TOGA_hangs, for rm36805
+quickLift_CT_hub.txt     Gerardo/quickLift_CT_hub, for rm36340
+quickLift_CT_hub.ct.txt  its 43 custom tracks, less two commented-out ones with a password