Repository navigation
fix: link-check extraction, deprecated tombstones, orphaned component, docs label (#3, #99, #48) - #101
Conversation
The extractor trimmed trailing markup in a fixed order: strip one
unbalanced `)`, then strip trailing punctuation. A URL that ends a
markdown link inside a sentence or a bold run carries both at once, so
the `)` survived and lychee checked a truncated URL. Twelve of the
seventeen errors in the report were this, not a broken link.
Trim in a loop instead. Each pass strips trailing punctuation, then one
unbalanced `)`, until the string stops changing. Backticks join the
punctuation set, so a URL inside an inline code span is trimmed too.
Also drop percent-encoded resolver templates (`%7B`/`%7D`), which the
literal `{}` filter missed, and skip `node_modules` so a local
`data/node_modules` cannot pull dependency READMEs into the list.
Exclude `iso.org` and `loc.gov` in lychee.toml: both answer a bot with
403 and neither link is broken.
The report drops from 17 errors to 3. The remaining three are
`blob/main` links to ADR-0001, ADR-0002 and ADR-0006, which `main` does
not carry yet. Merging staging into main for v0.1.0 resolves them.
Closes textrefs#3
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0148cB4MGy2zPeuhemebM38h
`deprecated` is one of the three tombstone statuses in the model, but no record template treated it as one. ADR-0004, `specification.md:284` and the `Status` enum all say so, and `RETIRED_STATUSES` in the compiler agrees, yet both derivation sites tested `withdrawn` and `blocked` only. A `deprecated` record therefore rendered with no banner and dropped its `superseded_by` link, while the `.json` sibling published it. Decision: the three statuses stay one tombstone category with one presentation. They differ in reach, not in kind — a `deprecated` record is retained and still resolves, while a `withdrawn` or `blocked` record is additionally excluded from `Work` mapping projections — so the user-facing copy distinguishes them and the markup does not. The `superseded_by` treatment is the normal one. This is latent, not live: no record in the registry is `deprecated` today. The cost lands the first time a promoted record is corrected. The copy still lives in two templates. textrefs#100 single-sources it, and this decision is what its shared status module has to encode. Closes textrefs#99 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148cB4MGy2zPeuhemebM38h
`src/components/CitationBox.astro` has no consumers. The reference page was the only one, and textrefs#30 replaced it with inlined Chicago and COinS rendering against `src/lib/citation.ts`. `git grep CitationBox` now returns nothing, and `npm run build:fast` produces identical `dist/` output. Closes textrefs#48 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148cB4MGy2zPeuhemebM38h
There was a problem hiding this comment.
Pull request overview
This PR addresses three pre-release triage items for the TextRefs Astro/Starlight site: it fixes CI link-check URL extraction to eliminate false failures, aligns site rendering with the standard’s definition of deprecated as a tombstone status, and removes an unused Astro component.
Changes:
- Fixes the URL collection/trimming logic used by the CI link checker to correctly handle layered trailing markup and percent-encoded
{}templates. - Updates tombstone rendering to include
deprecatedalongsidewithdrawnandblocked, with status-specific banner copy and consistent supersession handling. - Deletes the orphaned
CitationBox.astrocomponent and adds bot-403 exclusions foriso.organdloc.govinlychee.toml.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/links.yml |
Reworks external-URL extraction/trimming (looped trimming, drops %7B/%7D templates, skips node_modules). |
lychee.toml |
Excludes iso.org and loc.gov from link checking to avoid persistent bot 403s. |
src/pages/id/ref/[uuid]/index.astro |
Treats deprecated references as tombstones and renders deprecated-specific copy while preserving successor links. |
src/components/Tombstone.astro |
Extends the shared tombstone banner component to handle deprecated consistently. |
src/components/CitationBox.astro |
Removes an unused component file (no remaining references found). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
CI confirms the numbers in the description. All three are the Run 33080241993. Both required checks are green and the PR is |
`docs.yml` asked for `docs`. The repository has no such label; it has `documentation`, which is what textrefs#68, textrefs#79 and textrefs#81 already carry. GitHub applies the labels an issue form names only when they exist, and it does not create the missing one, so every issue filed through this template would arrive with `triage` alone and miss a `label:documentation` query. Every other template in the directory names a label that exists. This is the one that does not. Latent so far: no issue in the repository carries `triage`, so no docs issue has been filed through the form yet. The tag freezes `.github/`, which makes a one-line fix cheaper now than after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148cB4MGy2zPeuhemebM38h
Four pre-release items from the v0.1.0 triage in #68. Each commit is self-contained.
fix(ci): repair the link-check URL extraction — closes #3The 17 errors in the Link Checker Report were mostly not broken links.
The extractor trimmed trailing markup in a fixed order: strip one unbalanced
), then strip trailing punctuation. A URL that ends a markdown link inside a sentence or a bold run carries both at once, so the)survived and lychee checked a truncated URL —…/Republic_(Plato,…/Bible_(King_James,…/4.0/),…/arks.org/)**,…/rfc3987)).The trim now runs as a loop. Each pass strips trailing punctuation, then one unbalanced
), until the string stops changing. Backticks join the punctuation set, so a URL inside an inline code span is trimmed too. Wikipedia and Wikisource disambiguation titles keep their balanced parentheses.Three smaller changes:
%7B/%7D). The literal{}filter missed them, which is whysefaria.org/%7Bbook%7D…andwikidata.org/…/Q%7Bn%7D.jsonwere checked as real URLs.node_modules, so a localdata/node_modulescannot pull dependency READMEs into the list. CI never installs there; this keeps a local reproduction honest.iso.organdloc.govinlychee.toml. Both answer a bot with 403 and neither link is broken.Verified
The step was extracted verbatim from the workflow YAML and run against the tree, then checked with the repo's own
lychee.toml:17 errors → 3. No URL in the list carries unbalanced parentheses any more.
The three that remain, and why they are not fixed here
git ls-tree upstream/main decisions/returnsADR-TEMPLATE.mdandREADME.mdonly.mainstill sits at the bootstrap commit, so it carries no ADRs. The links name the right target on the right branch; merging #4 resolves all three, andmainis the branch a citable baseline should point at. Repointing them atstagingwould be wrong. Verify after the tag — this is now a line in #68 §5.The stale entries in the report are already gone from the sources: no
perseus.tufts.edu/hopper/about/copyright, no%7Btemplates. Open Collective was excluded earlier.fix(site): render adeprecatedrecord as a tombstone — closes #99Decision.
deprecatedrenders the existing tombstone presentation withdeprecated-specific copy and the normalsuperseded_bytreatment.deprecated,withdrawnandblockedstay one tombstone category; their user-facing messages distinguish their different semantics.This is option 2 in #99. The three statuses differ in reach, not in kind — a
deprecatedrecord is retained and still resolves, while awithdrawnorblockedrecord is additionally excluded fromWorkmapping projections — so the copy carries that difference and the markup does not.The gap it closes: both derivation sites tested
withdrawnandblockedonly, while ADR-0004,specification.md:284, theStatusenum comment andRETIRED_STATUSESinscripts/compile.tsall calldeprecateda tombstone. Adeprecatedrecord rendered with no banner at all, and dropped itssuperseded_bylink even though the.jsonsibling published it.The copy, by status:
deprecatedwithdrawnblockedEach then carries the successor link, or "No successor record exists."
Latent, not live: no record in the registry is
deprecatedtoday, so nothing was mis-rendered. The cost lands the first time a promoted record is corrected.No spec change is needed.
specification.mdandversioning.mdalready say what this implements; the templates were the half that disagreed.#100 is now unblocked. The copy still lives in two templates, and this decision is what its shared status module has to encode. A comment in
[uuid]/index.astronames the pairing until then.refactor(site): delete the orphanedCitationBox.astro— closes #48No consumers. The reference page was the only one, and #30 replaced it with inlined Chicago and COinS rendering against
src/lib/citation.ts.git grep CitationBoxnow returns nothing, andnpm run build:fastproduces identicaldist/output.fix(github): label the docs issue template with a label that existsUnrelated to the three above, and folded in because the tag freezes
.github/..github/ISSUE_TEMPLATE/docs.ymlasked for adocslabel. The repository has no such label — it hasdocumentation, which is what #68, #79 and #81 already carry. GitHub applies the labels an issue form names only when they exist, and does not create a missing one, so an issue filed through this template would arrive withtriagealone and miss alabel:documentationquery. Every other template in the directory names a label that exists; this is the one that did not.Latent so far: no issue in the repository carries
triage, so nothing has been filed through the form yet.Gate
npm run verify:fast— 0 errors, 0 warnings, 99 tests pass, all internal links valid, build complete. CI on this branch reports 354 URLs collected and 3 link errors, all three the ADR links above.Commits are signed. This targets
staging, per the release workflow in #68.