Skip to content

ums: gha consumer R-dependency asymmetry, and Quarto's per-document format override - #2137

Merged
d-morrison merged 4 commits into
mainfrom
ums/gha-consumer-r-deps
Aug 24, 2026
Merged

d-morrison merged 4 commits into
mainfrom
ums/gha-consumer-r-deps

Conversation

@d-morrison

Copy link
Copy Markdown
Collaborator

UMS pass from migrating d-morrison/macros onto gha's reusable workflows (macros#83, merged as e2e94d4; the first Quarto Publish run under the new workflow deployed clean).

memories/gha-reusable-workflows.md — three R-dependency mechanisms, opposite defaults

Workflow setup-r default How R packages arrive
claude.yml true setup-r-dependencies extra-packages:, whose default spec includes local::. (needs a DESCRIPTION)
quarto-publish.yml false r-packages reaches setup-r-dependencies as packages:, replacing the default deps::.
preview.yml n/a (unconditional) renv lockfile or R CMD INSTALL . — nothing else

A consumer migrating several of these in one PR reads them as one coherent family, and each caller stub is short enough to look obviously correct, so the divergence is invisible at exactly the moment it bites. macros needed setup-r: false on the first and setup-r: true plus explicit r-packages on the second, and cannot use the third at all — filed upstream as gha#607.

The entry also records where to look: the composite action decides packages: versus extra-packages:, so the wrapping reusable workflow's inputs: block cannot answer that question.

memories/r-quarto.md — a project's format: block is not its format set

Per-document front matter overrides the project-level format: key rather than adding to it. macros's _quarto.yml declares format: html alone while two demo documents declare their own pdf: and revealjs: blocks — demonstrating the macros reaching the LaTeX preamble being the entire point of those pages.

I dropped tinytex: true from the migrated publish.yml on the strength of the project file, which would have broken the first publish after merge on a document nobody opened. Caught in self-review before it landed. This is verify-the-right-artifact's "a neighbour for the target" shape: _quarto.yml is the file you would name if asked where a project's formats are declared, so reading it feels like checking rather than assuming, while the answer is a property of the document population.

Also filed, not fixed here

#2135memories/gha-reusable-workflows.md still names the repo d-morrison/gha in five places (two of them copy-pasteable uses: lines) and states the calling convention as @v1, which contradicts a longer passage in the same file about the v1/v2 split. Separating the load-bearing @v1 history from the stale @v1 instructions is real work, so it is out of scope for this pass rather than folded in.

Checks

check-links.py clean (2265 relative links across 552 files). semantic-line-breaks.py clean after --write. Both setup-r defaults re-read from the Morrison-Lab/gha working tree before the claim was written.

…ormat override

Two entries from migrating d-morrison/macros onto gha's reusable workflows
(macros#83, merged as e2e94d4).

gha-reusable-workflows.md: the family has three different R-dependency
mechanisms with opposite defaults. claude.yml's setup-r defaults true and
resolves local::. against a DESCRIPTION; quarto-publish.yml's defaults false
and passes r-packages as `packages:`, replacing the default deps::. spec;
preview.yml offers neither and so cannot serve a repo shape its sibling
serves fine (gha#607). A consumer migrating several at once reads them as one
coherent family, which is exactly when the differences are invisible.

r-quarto.md: a project's _quarto.yml `format:` block is the default, not the
format set. Per-document front matter replaces it, so a project declaring
`format: html` alone still renders PDF wherever a document says so. Dropping
TinyTeX on the strength of the project file passes every local check and
breaks the first publish after merge.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DzqQ9SB4Uw9ykenZ8xmPZM
Comment thread memories/r-quarto.md Outdated
Comment thread memories/r-quarto.md Outdated
Comment thread memories/r-quarto.md Outdated
Comment thread memories/r-quarto.md Outdated
Comment thread memories/gha-reusable-workflows.md Outdated
Comment thread memories/r-quarto.md Outdated
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

d-morrison and others added 3 commits August 24, 2026 09:57
…he freeze claim

Six findings from the claude-review round on 306329a.

Split memories/quarto-sites.md out of memories/r-quarto.md, which the new
entry had pushed to 1225 lines against the repo's 1200-line gate. The four
Quarto *site* sections move (build/layout gotchas, page-scoped crossref
labels, the new format-set entry, and the quarto-actions/setup + TinyTeX
signatures); R-toolchain material stays. Registered in memories/MEMORY.md
and the r-quarto.md row amended, following the r-cloud-sessions.md pattern.

The format-sweep snippet had two real bugs, both of which undercut the
section's own point about not missing documents: bash's ** does not recurse
without `shopt -s globstar`, and the sed range `/^format:/,/^[a-z]/` runs on
past the front matter into body text. Replaced with an awk extraction
terminated at the closing ---, verified on d-morrison/macros: it finds both
demo documents and correctly ignores index.qmd, whose `format:` occurrences
are inside body code fences the old grep would have matched.

The `freeze: auto` bullet was wrong. Freeze skips chunk execution, not the
pandoc/LaTeX render, so a frozen PDF document still exercises TinyTeX
locally. Rewritten to say that, which supports the section rather than
contradicting it.

Reworded the two clause-rule violations to drop their mid-line semicolons.

Verified: check-memory-file-size clean, its test suite 13/13, check-links
clean across 553 files, gha's check-new-line-breaks clean against
origin/main, markdownlint clean on all four files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DzqQ9SB4Uw9ykenZ8xmPZM
The split moves 263 lines into a new file, so check-new-line-breaks sees
every one of them as added and re-flags 23 lines written before the rule
existed. reorganize-prose.md settles what to do: bringing relocated lines
into compliance with the line-level checks is part of the move, not scope
creep.

Done by inserting breaks, never by joining. Running the repo's own
semantic-line-breaks.py --write here was tried first and made it worse: it
cleared the sentence-packing findings and created twelve mid-line-semicolon
ones, taking the gate from 23 findings to 13. That is the reformatter-
versus-gate divergence shared/writing/semantic-line-breaks.md already owns.

No wording changed; only where the lines break.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DzqQ9SB4Uw9ykenZ8xmPZM
@d-morrison

Copy link
Copy Markdown
Collaborator Author

Follow-up push 2fb5f92: a semantic-break pass over the relocated prose, plus what the round taught about the gate itself.

Why a second round was needed

Splitting a memory file moves 263 lines into a new file, so check-new-line-breaks — which is diff-scoped on added lines — sees every relocated line as new and re-flags 23 that were written before the rule existed. The split inherits a prose-compliance debt it did not create.

shared/writing/reorganize-prose.md already settles what to do: a move is authorship, and bringing the relocated lines into compliance with the line-level checks is part of it. So they are fixed rather than exempted.

Verified pure reflow — whole-file text is byte-identical after whitespace normalization, so no wording changed, only where lines break.

Three ways this gate reports clean without examining your changes

I hit two of them in one round, which is why they are worth writing down together.

  1. No NLB_BASE_REF. The checker prints Skipping the new-line-breaks check for this run (no base-ref given...) and exits 0 having looked at nothing. Documented in shared/workflow/fully-clean.md as the vacuous-pass shape.
  2. Run before committing. It diffs base...HEAD, not the working tree. I ran it after git add but before git commit, so it examined the previous commit and reported clean over 23 findings. Staging is what makes this feel checked — the changes are visibly "in git" — while HEAD has not moved.
  3. The push-versus-pull_request duplicate. Both runs attach to the same SHA under the same check name; the push run gets no base and passes vacuously. gh pr checks showed FAILURE and SUCCESS for one name here. Already documented in fully-clean.md.

The repo's own normalizer makes this worse, not better

Running scripts/semantic-line-breaks.py --write on the moved prose was my first attempt. It cleared the sentence-packing findings and created twelve mid-line-semicolon ones — 23 findings became 13. Reverted, and did the pass by inserting breaks only, never joining.

That is the reformatter-versus-gate divergence shared/writing/semantic-line-breaks.md already owns and #2085, #2081, #2020, #1933, #1737, #1797, #1705, and #826 track, so it needs no new issue. The specific interaction with a file split does look uncovered, and I have filed it separately rather than growing this PR.

Local verification at 2fb5f92

check-new-line-breaks against origin/main clean (run after committing this time). check-memory-file-size clean, its suite 13/13. check-links clean across 553 files. markdownlint-cli2 clean on the new file.

@github-actions

Copy link
Copy Markdown
Contributor

Claude finished reviewView run


All checks pass. The review is complete — every finding from the prior round has been verified fixed, and no new issues were introduced.

Verdict

Ready for merge.

This round fully addresses all six findings from the prior review (commit 306329a):

  1. Memory-file line-count ceiling — Fixed. The Quarto site material was split out of memories/r-quarto.md into a new memories/quarto-sites.md. Confirmed by running scripts/check-memory-file-size.py directly against the current checkout: No memory file exceeds 1200 lines (r-quarto.md is now 972 lines, quarto-sites.md is 293).

  2. Two check-new-line-breaks clause-rule violations (r-quarto.md:902, gha-reusable-workflows.md:171) — Fixed. Both flagged sentences were reworded to remove the mid-line semicolon (replaced with ---). I didn't just eyeball this: I pulled the actual check-new-line-breaks.py script from the cached Morrison-Lab/gha action install on this runner, imported its real prose_line_numbers/classify_line functions, reconstructed the diff's added-line-number map from the saved PR diff, and ran the check against the current file contents. Result: 0 violations across all four touched Markdown files (including the bash code block, which the checker correctly excludes via its fence detector — no false positive there either).

  3. Bash sweep bugs (chapters/**/*.qmd non-recursive glob; sed range overrunning into body text) — Fixed. The snippet now sets shopt -s globstar explicitly and uses **/*.qmd, and replaces the sed range with an awk script that terminates precisely at the front matter's closing --- (verified the logic: it only starts on a literal first-line ---, exits cleanly at the next ---, and prints only genuine front-matter lines in between — no case of running past the intended boundary).

  4. freeze: auto reasoning error — Fixed. The Don't bullet now correctly states "freeze skips chunk execution, not the pandoc/LaTeX render, so a frozen PDF document still needs TinyTeX on the runner," matching Quarto's own documented behavior.

Additional checks I ran independently (not just re-verifying prior findings): check-links.py (0 broken links across 552 files), markdownlint-cli2 (0 errors), no orphaned cross-references to the moved sections from other memory files, no duplicate headings between r-quarto.md and quarto-sites.md, the moved content is preserved essentially verbatim (word-level diff shows only the two intentional insertions — the new file's intro and the format-block section — no accidental content loss during the reflow), and no new non-ASCII punctuation was introduced (the em-dashes/ellipses present in quarto-sites.md are pre-existing, moved verbatim from r-quarto.md, confirmed by identical counts in the diff's removed vs. added text).

No new issues found.

Reviewed commit: 2fb5f92

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $3.6399 (review) — run

@d-morrison
d-morrison merged commit 8eeb527 into main Aug 24, 2026
8 checks passed
@d-morrison
d-morrison deleted the ums/gha-consumer-r-deps branch August 24, 2026 17:13
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.

1 participant