89f9ce7bc7c9333c45190074088f5bee377ca1d7
braney
  Sat Sep 19 18:30:26 2026 -0700
snapshotTypeTester: check the fast snapshotType reader against raFromString

A saved session is a snapshot when its settings carry a snapshotType line, and
the My Sessions listings hide those rows.  #38313 replaced raFromString with a
walk over the lines, because the question is asked once per row in a listing
and the hash costs about 600ns and three allocations per session against about
30ns and none.

A hand written parser that has to agree with a general one is the shape of bug
found a year later, so this is a differential test: every case is read both
ways and the two answers are printed side by side.  The claim in the code is
"same line semantics as raFromString", and that claim is what is checked rather
than a list of answers written down once.  Reading the tag wrongly is invisible
either way: a snapshot is listed as an ordinary session, or an ordinary session
disappears from the listing, and both look like something the user did.

One case does not agree, and it is recorded rather than hidden.  Given two
snapshotType lines the walk returns the first and raFromString returns the
last, because a hash overwrites.  Real settings carry the tag once, so nothing
depends on it today, but it is a difference in the semantics the code says it
copies.  It is marked as a known difference, and the test also fails if it ever
starts agreeing, so the note cannot go stale in the other direction.

Watched to fail and then pass: dropping the delimiter test after the tag makes
"snapshotTypeExtra view" read as the type "Extra view" while raFromString finds
none.  Recorded as sandbox-ab in utils/testRegistry.

refs #38313, refs #38391

diff --git src/utils/testRegistry/registry.tsv src/utils/testRegistry/registry.tsv
index 0127c134f02..95f1e2053e8 100644
--- src/utils/testRegistry/registry.tsv
+++ src/utils/testRegistry/registry.tsv
@@ -66,24 +66,24 @@
 38236	504	-	rm38236.docent.yaml	library	-	needs one: a quickLift chain with no aligned block in the window must not crash
 38248	504	-	rm38248.docent.yaml	library	-	needs one: a deprecated versioned NP_ accession has to resolve to RefSeq Historical
 38249	504	hg/lib/tests/quickLiftTester.c	rm38249.docent.yaml	library	unrecorded	the target strand of a reverse complemented protein, found in the #38349 review
 38253	504	-	-	perf	-	needs one: item coverage is built from feature runs, not one counter per base; the test has to go red if a per-base pass comes back
 38254	504	-	-	invisible	-	needs one: a composite subtrack's visibility has to settle before the parallel loaders start
 38256	504	hg/utils/hubCheck/tests/makefile::relPath	-	library	unrecorded	a local hub given by a relative path: bigDataUrl resolved once, not twice
 38260	504	hg/utils/hubCheck/tests/makefile::missingFile	-	library	unrecorded	hubCheck must say something about a bigDataUrl it cannot open
 38268	504	hg/lib/tests/dataVersionPathTester.c	rm38268.docent.yaml	invisible	sandbox-ab	a hub track's dataVersion may name a file only under /gbdb, and only by a plain path
 38272	504	-	rm38272.docent.yaml	invisible	-	needs one: a GenArk quickLift source assembly must not be looked for in MySQL
 38273	504	-	-	perf	-	needs one: a collection's hub file is copied when it is written, not on every session load; the test has to count the copies
 38283	504	hg/lib/tests/hVarSubstHtmlTester.c	rm38283.docent.yaml	library	sandbox-ab	a hub description page may not use $hgsid, and a native one may use only the braced form
 38285	504	hg/lib/tests/input/hgvs/validTerms.txt	rm38285.docent.yaml	library	unrecorded	bare codon numbers and ranges, with expected/hgvs/validTerms.txt beside it
 38302	504	-	rm38302.docent.yaml	invisible	-	needs one: an activation token that is missing, empty or older than seven days is invalid
 38303	504	hg/lib/tests/trashDirTester.c	rm38303.docent.yaml	invisible	sandbox-ab	a session file path spelled through a symlinked config directory, which broke 583 saved sessions
 38309	504	-	rm38309.docent.yaml	invisible	-	needs one: exonFrames must not be read past the end on a transcript's last exon
-38313	504	-	-	library	-	needs one: a user's own __ sessions must not be hidden from My Sessions
+38313	504	hg/lib/tests/snapshotTypeTester.c	-	library	sandbox-ab	the fast snapshotType reader agrees with raFromString, including on a longer tag that starts the same
 38317	504	-	-	invisible	-	needs one: doKnownGene must not read an uninitialised stack refLink
 38318	504	hg/lib/tests/sessionDataTester.c	-	invisible	unrecorded	the returned path must be freeable through kent's own handler stack
 38320	504	lib/tests/faSpeedReadTest.c	-	invisible	unrecorded	the buffer grower and its caller must agree on the size
 38323	504	-	-	library	-	needs one: an api key made on one geo mirror has to work on all of them
 38328	504	hg/lib/tests/genarkLiftOverTester.c	-	invisible	sandbox-ab	the accession list is escaped where the values are, and a non-accession never reaches the query
 38335	504	lib/tests/cgiParseTest.c	rm38335.docent.yaml	invisible	unrecorded	a pair with no =value must not lose the variable
 38340	504	hg/hgSession/tests/backupParseTest.c	-	invisible	unrecorded	the same pair, read back out of a session backup
 38340	504	lib/tests/cgiCookieTest.c	-	invisible	unrecorded	the same pair in a cookie header