Repository navigation
fix(iso): make the fastfetch OCR gate match what tesseract actually reads - #137
Conversation
…eads Post-Testing E2E failed the utah and utah-nvidia flavors on screenshots that plainly showed fastfetch. The gate required tesseract to read two exact words: 'UTAH.E2E.FASTFETCH', which OCR truncated to 'TAH-E2E-FASTFETCH' by dropping the first glyph of the line, and 'Kernel', which never appears at all because the fastfetch config draws its field labels as Nerd Font glyphs. The second condition could not match on any run, so the gate was permanently red rather than flaky. Move the decision into iso/scripts/fastfetch-ocr-match.sh so it can be tested against real transcripts without booting a VM. It still requires two independent tokens - a sentinel alone could come from scrollback - but matches the sentinel as E2E<sep>FASTFETCH and accepts the kernel version line as proof of fastfetch's body when the label is unreadable. Print the OCR transcript to the job log when the gate gives up, so the next failure can be told apart from a blank screen without downloading an artifact. Closes #135 Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "ci-maintainer" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
hanthor
left a comment
There was a problem hiding this comment.
Approving. This is a better fix than the one I have open in #162 for the same failure, and I will drop mine in favour of it.
I had diagnosed this as "the leftmost column does not OCR reliably" and reacted by reframing the sentinel so it does not start at column 0. This PR has the better root cause: Bluefin's fastfetch config draws its field labels as Nerd Font glyphs, which tesseract cannot read as text at all. That explains the part my theory did not — why every label vanished while every value read perfectly — and it means requiring the literal Kernel label could never have matched, on any run, no matter where the text sat.
Three things here I did not do and should have:
- The decision moves into
iso/scripts/fastfetch-ocr-match.sh, so it can be exercised against real transcripts without booting a VM. - The test fixture is the verbatim transcript from the run that failed, so the regression is pinned to the evidence rather than to a paraphrase of it.
- Matching
E2E[^A-Za-z0-9]?FASTFETCHtolerates the dropped first glyph without needing the sentinel itself to change, which is the more robust direction: it fixes the matcher rather than the thing being matched.
Printing the last transcript on failure is the right call too. I lost time downloading the diagnostics artifact to see exactly what this now prints inline.
Both tokens still have to be present, so the gate has not been loosened into passing on a blank screen. CI is green.
Generated by Claude Code
#137 landed the fastfetch OCR decision as iso/scripts/fastfetch-ocr-match.sh, which is a better shape than the inline greps this branch carried -- the harness now delegates instead of holding the patterns itself. So both conflicts resolve to main's side and this branch's OCR work retires with them. What is left relative to main is the part still missing, and the part today's end-to-end run proves is still needed: BTRFS_FS in the OGC kernel. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6BYLUD6KBzF8rBFXKjP7M
CI Fix
Post-Testing E2Efailed theutahandutah-nvidiaflavors at Runexisting LUKS install and desktop test on run
35374557822,
after the installed system had already booted, unlocked, started GDM and
reached a Wayland GNOME session. The screenshot it rejected shows fastfetch.
The gate in
iso/scripts/luks-e2e.shrequired tesseract to read two exactwords out of that screenshot:
UTAH.E2E.FASTFETCH— OCR read the sentinel asTAH-E2E-FASTFETCH, havingdropped the first glyph of the line.
Kernel— this word never appears in the transcript at all, because thefastfetch config renders its field labels as Nerd Font glyphs. OCR recovers
the values (
Linux 7.1.8-100.fc43.x86_64) and not the labels, so this halfof the condition could not match on any run. The gate was permanently red
for these flavors, not flaky.
What changes
iso/scripts/fastfetch-ocr-match.sh(new) — the gate decision, isolatedso it can be exercised against real transcripts without booting a VM. Still
requires two independent tokens, because a sentinel left in scrollback would
otherwise pass on its own: the sentinel matched as
E2E<sep>FASTFETCH, pluseither the
Kernellabel or the kernel version line it labels.iso/scripts/luks-e2e.sh— calls that helper instead of the two inlinegreps, and prints the last OCR transcript to the job log when the gategives up, so a blank screen can be told apart from an OCR misread without
downloading the diagnostics artifact.
tests/test_iso_ci.py— newFastfetchOcrGateTests: the verbatimtranscript from the failing run now passes, a clean labelled transcript
passes, and a bare desktop, a sentinel with no fastfetch body, a body with no
sentinel, and an empty/missing transcript are all still rejected.
python3 -m unittest discover -s tests -t tests— 88 tests, OK.Closes #135
Not in scope: the two gaming flavors in the same run fail earlier and for an
unrelated reason (
unknown filesystem type 'btrfs'during install). That is animage defect, tracked separately in #136; this PR does not touch it.
Filed by ci-maintainer agent (ACMM L4/L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=ci-maintainer backend=copilot model=claude-opus-5 copilot=1.0.78