Skip to content

Follow links to ids that moved to another page - #192

Merged
d-morrison merged 1 commit into
mainfrom
claude/anchor-redirect
Nov 21, 2026
Merged

d-morrison merged 1 commit into
mainfrom
claude/anchor-redirect

Conversation

@d-morrison

Copy link
Copy Markdown
Contributor

When a definition moves to another page, every link to its old URL lands at the top of the old page. mds alone had 114 such moved ids, linked 1,062 times from lds.

This vendors qwt's anchor-index.py (Morrison-Lab/qwt#223, #224) and its updated anchor-landing.html. It also adds anchor-index.py to the scaffolding sync and registers it as a post-render step.

  • The step writes _site/anchor-index.json, which records the page that holds each id.
  • When a link's id is missing from its page, anchor-landing.html sends the reader on to the page that holds it now.
  • With no index, it does nothing.

mds, sds and macros already run this (mds#878, sds#650, macros#441). This is an infrastructure change, so no content changes.


Generated by Claude Code

When a definition moves to another page, every link to its old URL lands
at the top of the old page. mds alone had 114 such moved ids, linked
1,062 times from lds.

Vendor qwt's anchor-index.py (Morrison-Lab/qwt#223, #224) and its updated
anchor-landing.html, add anchor-index.py to the scaffolding sync, and
register it as a post-render step. It writes _site/anchor-index.json
(which page holds each id), and anchor-landing.html sends a link to an
id missing from its page on to the page that holds it now. mds, sds and
macros already run it (mds#878, sds#650, macros#441).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VDkNzouPjECg79btvrUxmv
@github-actions

Copy link
Copy Markdown
Contributor

Claude finished review — View run


No findings. I checked the PR at b4d5fd56422d1e3b6c12c05293e4f2090a50350f.

  • Manifest: the commit, sha256 and source_url entries for anchor-landing.html and the new anchor-index.py in .github/site-scaffolding.json match the files in the PR. sha256sum on both files gives the manifest values.
  • Workflow: .github/workflows/sync-site-scaffolding.yml adds anchor-index.py=anchor-index.py to the sync list, next to anchor-landing.html. A later sync will keep the new file in step with qwt.
  • Build wiring: _quarto-website.yml gains a post-render: entry for anchor-index.py.
  • Script: anchor-index.py is self-contained and uses only the Python standard library, so it adds no dependencies. It skips site_libs, reveal.js decks, ids that appear on more than one page, and ids that only number a position on the page. It exits with an error if the site directory is missing.
  • Landing page: the new block in anchor-landing.html guards for a missing fetch, a missing index file, an id that is not listed, and an id that maps back to the current page, and it leaves the reader in place in each case. It also keeps a text-fragment hash across the redirect.
  • Not run: I didn't run a Quarto render, so I haven't confirmed that the post-render step executes in CI. Python 3 is normally on the runner's PATH, so I'd expect it to run, but that is untested.
  • Other checks: the PR adds no math and no notes content, so the macro check and the notes-content rules have nothing to apply to.
  • Prior reviews: I found no earlier review comment to reference.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "b4d5fd56422d1e3b6c12c05293e4f2090a50350f",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "Checked anchor-index.py, the anchor-landing.html redirect block, the manifest sha256 values and the post-render config; hashes match and edge cases are guarded.",
  "holistic_assessment": "Vendored scaffolding sync from qwt is scoped, adds no dependencies, and the post-render wiring and sync workflow entry are consistent; Quarto render was not run."
}

Reviewed commit: b4d5fd5

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $0.1971 (review) — run

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.2
🚀 Preview available at: https://Morrison-Lab.github.io/psc/pr-preview/pr-192/

Built to branch gh-pages at 2026-11-21 21:33 UTC.

Copy link
Copy Markdown
Contributor Author

Merging under the standing infra merge grant.

  • check-pr-fully-clean.py exits 0 on head b4d5fd5.
  • The preview serves anchor-index.json.
  • The same change was verified in Chromium on the psw#700 preview.
  • The cross-model review gate is waived, because no reviewer with a different model and harness can run from this cloud session. The Claude review is clean.

Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

@d-morrison
d-morrison merged commit eb8c5d4 into main Nov 21, 2026
24 checks passed
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