Skip to content

scripts/beamer-qa.py: Beamer page screenshots, page-to-frame map, log digest, opt-in footline check - #185

Merged
pedrohcgs merged 3 commits into
mainfrom
feat/beamer-qa
Nov 7, 2026
Merged

pedrohcgs merged 3 commits into
mainfrom
feat/beamer-qa

Conversation

@pedrohcgs

@pedrohcgs pedrohcgs commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

A Beamer counterpart to scripts/slide-qa.py, run by /visual-audit for .tex decks. Step 6 of the 2026-11-06 adoption plan.

  • Per page: a screenshot, plus the frame and overlay step the page belongs to (read from Beamer's .nav, with appendix frames labelled A1, A2, …) and the page's first line of text.
  • From the .log beside the PDF: errors with their context line, overfull boxes, undefined references and missing characters. Wrapped (package) continuation lines are joined, "Rerun" notices are dropped, and duplicates are removed.
  • --band-mm FROM TO (opt-in): flags every page with ink in a strip above the bottom edge. A frame whose content runs into the footline often compiles with no warning. On a Madrid test deck, LaTeX logged nothing for the overflowing frame and the band check named it. The strip depends on the theme, so there is no default. --band-x-max skips a page number or navigation symbols on the right.
  • Exit 0 means nothing was found, 1 means a log message or a flagged page, 2 means it could not run (no PDF, or no poppler).
  • Needs poppler and no Python packages. README and guide list poppler as optional.

Adapted, with its MIT notice, from shoot.py in claesbackman/AI-research-feedback. Changes from that file:

  • a PDF path argument instead of a fixed _build/deck.pdf
  • the page size read from the PDF instead of assuming 16:9
  • the band made an option rather than one theme's geometry
  • output under quality_reports/audits/beamer-qa/
  • exit codes

Verification

  • BeamerQa in tests/portability/test_scripts.py adds six cases:
    • the .nav map, with steps and the appendix
    • the log digest, including -file-line-error errors and rerunfilecheck's two-line notice (Codex's second P2, fixed in 69b3e0b)
    • the could-not-run exit when the PDF or poppler is missing
    • the band and --band-x-max, on a PDF the test builds itself (skipped without poppler)
    • a full run deletes the page screenshots an earlier, longer build left and nothing else; a --pages run keeps them (Codex's P2, fixed in 9d1ce2c; skipped without poppler)
  • Eleven mutants each fail only their own case: band measured from the top edge, appendix numbered as main frames, a wrapped continuation dropped, --band-x-max ignored, no cleanup, cleanup of every file in the folder, cleanup on a --pages run, the "Error" requirement restored, drive letters missed, any :digits read as an error, the Rerun filter before the join. Recorded in the LEDGER.
  • Run on the compiled HelloWorld deck. It reported the undefined citation from a build without bibtex.
  • ./scripts/backtest.sh passes: 322 battery cases, 245 portability cases.

…s to frames, and digests the log

/visual-audit runs it for Beamer decks. For each page: a PNG, the frame and overlay step from
the .nav file, and the first line of text; then the errors and the warnings that matter from the
.log beside the PDF. --band-mm FROM TO flags pages with ink in a strip above the footline, which
a frame running over often produces without any LaTeX warning; the strip is theme-dependent, so
it is opt-in, and --band-x-max skips a page number or navigation symbols on the right.

Adapted, with its MIT notice, from shoot.py in claesbackman/AI-research-feedback: a PDF path
argument, page size read from the PDF, the band made an option, output under quality_reports/,
exit codes 0/1/2.

Four portability cases (the band case builds its own PDF and skips without poppler); four
mutants each fail their own case (LEDGER). Also run on a compiled Madrid deck. README and guide
list poppler as optional; guide re-rendered and restamped.
Copilot AI balanced review requested due to automatic review settings November 7, 2026 02:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T03:13:55.502226Z 69b3e0b Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f2e13c9ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/beamer-qa.py Resolved
…, and nothing else

Codex review on PR #185 (P2): rerun into the same folder after a deck lost pages, the old
NN.png files stayed beside the new ones, and /visual-audit reads that folder as the current
deck. A full run now removes files named NN.png (and leftover NN_g.pgm) before rendering, as
slide-qa.py removes only its own files; any other file in an --out folder is kept, and a
--pages run replaces only the pages it renders.

New portability case; three mutants (no cleanup, cleanup of every file, cleanup on a --pages
run) each fail it. LEDGER and CHANGELOG updated; 244 portability cases.
@pedrohcgs

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d1ce2c30d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/beamer-qa.py Resolved
…notice

Codex review on PR #185 (P2): under -file-line-error TeX writes an error as
"./deck.tex:42: Undefined control sequence.", with no "!" and no "Error", and the digest
required one or the other, so a broken build could read as clean and exit 0. A line that
starts "file.ext:line: " (with an optional drive letter) is now an error.

Found while checking that fix against a real XeLaTeX log: rerunfilecheck's notice says
"Rerun" only on its "(rerunfilecheck)" continuation line, and the Rerun filter ran before the
continuation was joined, so the notice was reported as a warning. The filter now runs after.

One new portability case and one extended; four new mutants each fail their own case (LEDGER).
245 portability cases.
@pedrohcgs

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 69b3e0b0c6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pedrohcgs
pedrohcgs merged commit 4c6280e into main Nov 7, 2026
2 checks passed
@pedrohcgs
pedrohcgs deleted the feat/beamer-qa branch November 7, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants