d6c5f9d4c46a1be9fc24bc548052232560710faf
hiram
  Fri Sep 25 18:58:33 2026 -0700
claude found and error in the code and added a test for the bug refs #34360

diff --git src/utils/pafToPsl/tests/makefile src/utils/pafToPsl/tests/makefile
index 51daaa6fc08..102cce84f74 100644
--- src/utils/pafToPsl/tests/makefile
+++ src/utils/pafToPsl/tests/makefile
@@ -1,15 +1,25 @@
 kentSrc = ../../..
 A = ${DESTBINDIR}/pafToPsl
 include ../../../inc/common.mk
 
-test: hg38ChrMt 
+test: hg38ChrMt indelEdges
 
 hg38ChrMt: outputDir
 	${A} input/$@.paf output/$@.psl
-	diff expected/$@.psl output/$@.psl
+	@diff expected/$@.psl output/$@.psl
+
+# Synthetic records whose CIGAR begins and/or ends with an I or D operator
+# (leading/trailing indel), on both + and - strand.  Real minimap2/FASTGA
+# output routinely has this shape; cigarToPsl() has a dedicated code path
+# to trim these off the ends of the alignment, and it's easy to get the
+# block-shifting arithmetic wrong there without it showing up in a
+# same-species whole-genome test like hg38ChrMt.
+indelEdges: outputDir
+	${A} input/$@.paf output/$@.psl
+	@diff expected/$@.psl output/$@.psl
 
 outputDir:
 	@${MKDIR} -p output
 
 clean:
 	rm -fr output