e497eccfb431be6af38d22c5bc2bb0e745c89b2d
braney
  Sat Sep 5 09:22:17 2026 -0700
docent: eight more regression scripts, one per fixed bug

rm35580  "Show <alt> placed on its chromosome" errored on the window
rm36061  DECIPHER SNVs details missing after a quickLift
rm36335  a quickLifted GIAB item click printed a garbled "can't port"
rm36340  a search-result click carried the source coordinate
rm37491  hgConvert named subtracks the user never showed as not liftable
rm37562  a stale lastPosition banner on the lifted search-results page
rm37615  a quickLifted bigBed tooltip reported pre-lift coordinates
rm37785  a squishyPack track stole a neighbouring track's center label

Each asserts the behavior its ticket says is correct, on genome-test, and names
in noText:/noUrl: the exact string the buggy build produced rather than a generic
"Error". Where the last page has no track image the noText: is paired with a
positive text: or url: check, because a bare noText: passes just as happily on a
blank page or an early error.

Four things found writing these, all of them recorded in the scripts:

A ticket's stated position and its stated item can disagree. #36061 says to go to
chr7:156,982,676-156,996,015 and click item 517898; that item is at
chr7:155,803,191, and decipherSnvs draws nothing at all in the ticket's window.

hideKids cannot express "the user deselected this subtrack". It writes a
<track>=hide cart variable, and isSubtrackVisible() (hg/lib/trackHub.c) begins
with overrideComposite = (NULL != cartOptionalString(cart, tdb->track)) and then
forces enabled = TRUE, so the sibling counts as visible to hgConvert and lands
back in the "failed to lift" warning. A first rm37491 failed on exactly that and
looked like the bug being back. A deselected subtrack is <track>_sel=0 with no
visibility variable, which is what hgTrackUi's checkbox writes and what the goto:
in that script sets.

#37615's fix is not the one the plan for this suite described. The first commit
appended a note saying the coordinates came from the source assembly; the second
replaced it with the real fix, which puts the TARGET coordinates in the tooltip.
A test for the note would fail.

decipherSnvs (SNVs) and decipher (CNVs) are two different members of the
superTrack decipherContainer, and the row that turns up when the SNVs track draws
nothing is the CNVs one, which reads like the same track under a shorter id.

refs #38252

diff --git src/hg/utils/docent/tests/regress/rm37562.docent.yaml src/hg/utils/docent/tests/regress/rm37562.docent.yaml
new file mode 100644
index 00000000000..e86fc7195d5
--- /dev/null
+++ src/hg/utils/docent/tests/regress/rm37562.docent.yaml
@@ -0,0 +1,46 @@
+# #37562 -- a stale lastPosition warning on the search-results page after a quickLift.
+#
+# After a QuickLift hop the cart's lastPosition still held the SOURCE assembly's coordinate,
+# which cannot be resolved on the destination hub assembly, so hgFind put a banner on the
+# search-results page:
+#
+#     Unable to resolve lastPosition '...'
+#
+# (hg/lib/hgFind.c:2270.) A side observation from #36340 -- it never affected the results or
+# the click-through, only the banner.
+#
+# So the recipe has to reach the SEARCH-RESULTS page on the lifted assembly, not the track
+# view: a term that resolves to one place goes straight to the image and never prints this.
+# "brca" is ambiguous on hs1, so goShow submits it and lands on the results list.
+#
+# One track is turned on and lifted so the assertions before the search can tell a drawn
+# view from an error page. mane is deliberately not used: it draws nothing at the window
+# two other quickLift tickets use, and a row check on it would fail for that reason.
+target: genome-test
+db: hg38
+position: chr7:155799529-155812871
+reset: true
+fast: true
+steps:
+  - go: chr7:155799529-155812871
+  - hide: all
+  - track: {knownGeneArchive: show, knownGeneV49: pack}
+  - expect: {rows: [knownGeneV49], noText: "Warning/Error"}
+
+  - convert: {to: hs1, quicklift: true}
+  - open: lift
+  - expect: {rows: [knownGeneV49], noText: "Unable to resolve lastPosition"}
+
+  # A search from the lifted view. This is where the banner appeared.
+  - goShow: "brca"
+
+  # The url: and text: halves are not optional. This page has no track image, so `rows:`
+  # reports none and a bare noText: would pass just as happily on a blank page or an early
+  # error -- which is the failure mode this whole suite has to guard against. Both checks
+  # confirm we really are on hgSearch, and on the LIFTED assembly (db=hub_<n>_hs1) rather
+  # than back on hg38, since the banner only ever appeared on the destination.
+  - expect:
+      url: "/hgSearch"
+      text: "Search across the Genome Browser site"
+      noText: "Unable to resolve lastPosition"
+  - expect: {url: "db=hub_"}