Skip to content

Commit 1e2ba61

Browse files
committed
Use a Git diff to scope Pandoc template changes
GitHub's compare API caps changed files at 300 even with pagination, so a large version range can omit templates from the probe. Compare release tags in a Pandoc checkout instead. Clarify the archive gate around pushing the configuration update and record an owner for downstream verification outside the current task.
1 parent 79a1d59 commit 1e2ba61

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

‎.claude/skills/updating-pandoc/SKILL.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Use when bumping the bundled Pandoc version in quarto-cli (the `exp
55

66
# Updating the Bundled Pandoc
77

8-
`dev-docs/update-pandoc-checklist.md` is the procedure for the mechanical part of a bump. It covers the two phases (prep with `--skip-archive`, then S3 archival by the credential holder), the reference-copy vs Quarto-template file map, schema and Lua type updates, the `create-release.yml` signing dry-run, and the quarto-dev/quarto snapshot check. Read it first. This skill sequences the bump around it and adds the steps that previous bumps missed: writer changes that shipped unnoticed, tests rewritten to match a regression, a merge before S3 archival, and downstream breakage found only after release.
8+
Read `dev-docs/update-pandoc-checklist.md` first for the two-phase procedure, template file map, schema and Lua type updates, release dry-run, and visual-editor snapshot check. Use this skill to scope the bump, classify output changes, and sequence verification around that procedure.
99

1010
## Stages
1111

@@ -16,7 +16,7 @@ description: Use when bumping the bundled Pandoc version in quarto-cli (the `exp
1616
| 3 | Prep (Phase 1) | Regenerate the reference copies, port the templates, update schemas and Lua types. | `dev-docs/update-pandoc-checklist.md`; `llm-docs/pandoc-quarto-latex-templates.md`; `llm-docs/pandoc-quarto-typst-templates.md` |
1717
| 4 | CLI options | For each Pandoc CLI option added, renamed or deprecated in the range, check how `quarto render` handles it in `parseRenderFlags` (`src/command/render/flags.ts`). An option Quarto does not detect still reaches Pandoc, but Quarto's own handling (math method, output detection) then works from the wrong value. | `version-probes.md`, "CLI options" |
1818
| 5 | Test triage | Classify every failure as drift or regression **against the old Pandoc** before touching any expected output. | Skill `triage-ci-failures`, plus "Drift or regression" below |
19-
| 6 | Merge gates | In this order: Phase 2 archival by the credential holder, and its commit pushed to the PR; the S3 archives confirmed by URL; all PR CI green on the archived version, including the packaged-bundle job (`test-bundle.yml`, the only job that catches the 200-local Lua limit after filter ports, see `llm-docs/lua-filter-bundle-local-limit.md`) and the feature-format matrix on Windows (`test-ff-matrix.yml`); then the `create-release.yml` dry-run. The release jobs run `configure`, so the dry-run only tests the new binary once it is archived. | "Merge gates" below |
19+
| 6 | Merge gates | In this order: Phase 2 archival by the credential holder; the S3 archives confirmed by URL; the Phase 2 commit pushed to the PR; all PR CI green on the archived version, including the packaged-bundle job (`test-bundle.yml`, the only job that catches the 200-local Lua limit after filter ports, see `llm-docs/lua-filter-bundle-local-limit.md`) and the feature-format matrix on Windows (`test-ff-matrix.yml`); then the `create-release.yml` dry-run. The release jobs run `configure`, so the dry-run only tests the new binary once it is archived. | "Merge gates" below |
2020
| 7 | Changelog and docs | Add a `news/changelog-<version>.md` entry, plus a quarto-web PR to the `prerelease` branch for `docs/prerelease/<version>/_highlights.qmd` and the format pages that changed. | `.claude/rules/changelog.md`; "Changelog entry" below |
2121
| 8 | After the prerelease ships | Check the `quarto-dev/quarto` pre-release CI leg and the extension templates. | "Downstream checks" below |
2222

@@ -37,25 +37,25 @@ Copy the old bundled binary to a scratch directory at stage 1: Phase 2's `config
3737

3838
## Merge gates
3939

40-
The S3 archive must exist before `configuration` names the version, because `configure` downloads from the archive URL whatever `QUARTO_PANDOC` did locally. Check every platform file:
40+
Confirm the S3 archives before pushing or merging the `configuration` update, because `configure` downloads from the archive URL whatever `QUARTO_PANDOC` did locally. Phase 2 stages the configuration change locally before archiving. Check every platform file:
4141

4242
```bash
4343
v=3.13
4444
for f in windows-x86_64.zip linux-amd64.tar.gz x86_64-macOS.zip linux-arm64.tar.gz arm64-macOS.zip; do
4545
printf '%s ' "$f"; curl -sI -o /dev/null -w "%{http_code}\n" \
4646
"https://s3.amazonaws.com/rstudio-buildtools/quarto/pandoc/$v/pandoc-$v-$f"
47-
done # 200 = archived; 403 = missing
47+
done # 200 = publicly accessible; any other status = archive gate unconfirmed
4848
```
4949

50-
A deadline does not move this gate. If the credential holder is unavailable, the bump waits; say so to the maintainer rather than editing `configuration`.
50+
If the credential holder is unavailable, keep the configuration update local and report the archival blocker to the maintainer.
5151

5252
## Changelog entry
5353

5454
Write one `Update pandoc to X` bullet under Dependencies. Give a Pandoc change its own sub-bullet only if it closes a Quarto issue, or if it makes a working document fail or change visibly without an error. Leave other upstream changes to the Pandoc changelog. Format-specific consequences (template ports, a theme that intentionally does not adopt an upstream feature) go under that format's section.
5555

5656
## Downstream checks
5757

58-
- **quarto-dev/quarto (visual editor).** Its `test.yaml` runs a `pre-release` matrix leg against the latest Quarto prerelease. Roundtrip snapshots under `apps/vscode/src/test/examples/generated_snapshots/` break when the Markdown writer output changes, and that leg fails on every quarto-dev/quarto PR from the day the prerelease ships. Check it that day (`gh run list -R quarto-dev/quarto -w test.yaml`, then open the latest run and look at the `Test (Quarto pre-release)` job). A plain `pandoc -t markdown` probe can miss the change, because the editor passes its own options and extensions. The companion-PR procedure is the last item of `dev-docs/update-pandoc-checklist.md`. This check is part of the bump even when the task framing says the editor is someone else's concern.
58+
- **quarto-dev/quarto (visual editor).** Its `test.yaml` runs a `pre-release` matrix leg against the latest Quarto prerelease. Markdown writer changes can make roundtrip output differ from the snapshots under `apps/vscode/src/test/examples/generated_snapshots/`, causing that leg to fail. Check it the day the prerelease ships (`gh run list -R quarto-dev/quarto -w test.yaml`, then open the latest run and look at the `Test (Quarto pre-release)` job). A plain `pandoc -t markdown` probe can miss the change, because the editor passes its own options and extensions. The companion-PR procedure is the last item of `dev-docs/update-pandoc-checklist.md`. If visual-editor verification is outside the current task, record the follow-up and its owner.
5959
- **Extension templates.** quarto-journals formats and typst templates ship their own partials, which override the Quarto partials just ported. Render a few of each (LaTeX journals, typst templates) on the new build and on the previous release, using a document that exercises the changed areas (tables with captions and footnotes, horizontal rules, definition lists, citations), and diff the `.tex`/`.typ` output.
6060

6161
## A new Pandoc release mid-cycle
@@ -66,7 +66,7 @@ When Pandoc releases again before the bump merges, either stay on the current ta
6666

6767
- On Windows, run `configure.cmd` from PowerShell or cmd, not Git Bash. Git Bash's PATH resolves `tar` to GNU tar, which cannot extract the Dart Sass `.zip`.
6868
- `quarto-bld update-pandoc` without `--skip-archive` runs `aws s3 ls` on every platform file, even for a version already archived, so it needs a live AWS session. Any error text other than `Unable to locate credentials` is read as "already archived" (`package/src/common/archive-binary-dependencies.ts`), so run the URL check above after the command.
69-
- `gh api repos/jgm/pandoc/compare/A...B` lists at most 300 files without `--paginate`. Template changes go missing silently in a multi-release range.
69+
- `gh api repos/jgm/pandoc/compare/A...B` lists at most 300 changed files, even with `--paginate`. Use the Git template diff in `references/version-probes.md` to cover the full range.
7070

7171
## Common mistakes
7272

@@ -75,5 +75,5 @@ When Pandoc releases again before the bump merges, either stay on the current ta
7575
| Scoping from the changelog alone | Run the probes too; writer changes are not always listed under the writer's changelog heading. |
7676
| One tracking item for the whole bump | One item per risk, each with an old-vs-new repro. |
7777
| Calling a failure drift because the changelog explains it | Render on old and new Pandoc and check that the new output is correct for users. |
78-
| Treating quarto-dev/quarto as out of scope | Its pre-release leg is part of the bump's fallout; check it when the prerelease ships. |
78+
| Leaving quarto-dev/quarto verification unassigned | Check its pre-release leg when the prerelease ships, or record the follow-up and its owner. |
7979
| Pointing `configuration` at an unarchived version because local configure worked | Local runs used `QUARTO_PANDOC`; CI and contributors download from S3. Check the URLs first. |

‎.claude/skills/updating-pandoc/references/version-probes.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ For every added, renamed or deprecated option, check `parseRenderFlags` in `src/
3131

3232
## Template diff
3333

34+
Use a `jgm/pandoc` source checkout containing both release tags. Set `PANDOC_SRC` to its path and `OLD_TAG` and `NEW_TAG` to the release tags matching the two binaries.
35+
3436
```bash
35-
gh api --paginate "repos/jgm/pandoc/compare/$OLD_TAG...$NEW_TAG?per_page=100" \
36-
--jq '.files[]? | select(.filename | startswith("data/templates")) | .filename' | sort -u
37+
git -C "$PANDOC_SRC" diff --name-only "$OLD_TAG" "$NEW_TAG" -- data/templates
3738
```
3839

39-
Without `--paginate`, the compare API stops at 300 files and drops templates in a multi-release range. The list says which reference copies will change and therefore which Quarto templates need a port (map in `dev-docs/update-pandoc-checklist.md`).
40+
Use this list to identify affected reference copies and Quarto template ports (map in `dev-docs/update-pandoc-checklist.md`). Inspect the changes by running the command again without `--name-only`.
4041

4142
## Writer probes
4243

0 commit comments

Comments
 (0)