Skip to content

fix(iso): make the fastfetch OCR gate match what tesseract actually reads - #137

Merged
hanthor merged 1 commit into
mainfrom
ci/fastfetch-ocr-gate
Sep 19, 2026
Merged

hanthor merged 1 commit into
mainfrom
ci/fastfetch-ocr-gate

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

CI Fix

Post-Testing E2E failed the utah and utah-nvidia flavors at Run
existing 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.sh required tesseract to read two exact
words out of that screenshot:

  • UTAH.E2E.FASTFETCH — OCR read the sentinel as TAH-E2E-FASTFETCH, having
    dropped the first glyph of the line.
  • Kernel — this word never appears in the transcript at all, because the
    fastfetch 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 half
    of 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, isolated
    so 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, plus
    either the Kernel label or the kernel version line it labels.
  • iso/scripts/luks-e2e.sh — calls that helper instead of the two inline
    greps, and prints the last OCR transcript to the job log when the gate
    gives up, so a blank screen can be told apart from an OCR misread without
    downloading the diagnostics artifact.
  • tests/test_iso_ci.py — new FastfetchOcrGateTests: the verbatim
    transcript 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 an
image 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

…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>
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 18, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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 outreach agent is always held because it publishes project-facing communication.

Hive will automatically remove the hold label once current policy no longer requires a level hold for "ci-maintainer". If this is an outreach PR, a human must review it and remove the label.

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]?FASTFETCH tolerates 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

@hanthor
hanthor merged commit fefc733 into main Sep 19, 2026
14 checks passed
@hanthor
hanthor deleted the ci/fastfetch-ocr-gate branch September 19, 2026 06:30
hanthor added a commit that referenced this pull request Sep 19, 2026
#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ci-maintainer] Post-Testing E2E: fastfetch OCR gate in iso/scripts/luks-e2e.sh fails on a screenshot that shows fastfetch

1 participant