fix(ci): repair link-check workflow + bump deps to zod 4#5
Merged
Conversation
Fixes textrefs#3. Three buckets of false-positive errors: - grep regex truncated URLs at `)`, mangling Wikipedia disambiguation titles. Allow `)` in URLs and strip only unbalanced trailing `)`. - resolver templates with `{placeholder}` reached lychee verbatim. Filter them out. - `data/package-lock.json` contributed bot-blocked opencollective URLs. Restrict grep to YAML/MD and add opencollective to lychee excludes. Also bump the registry submodule for the Perseus license_url fix, and mirror that URL change in the how-it-works example. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- npm update: astro 6.4.3 → 6.4.4 (patch) - zod 3.25.76 → 4.4.3 (was already pulled in by astro/starlight as transitive at v4; align top-level so there's one resolved copy) Zod 4 migration in schema + validator: - z.string().url() → z.url() (Iri) - z.ZodIssueCode.custom → 'custom' string literal (superRefine calls) - validate-data reportIssue path type widened to PropertyKey[] to match zod 4's $ZodIssue['path'] GH Actions are already on current majors; no bumps needed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR repairs the external link-checking workflow by improving URL extraction and lychee exclusions, and updates the codebase to use Zod v4 (plus a small documentation fix for a dead Perseus license URL).
Changes:
- Fix link-check URL extraction to avoid truncation at
)(e.g., Wikipedia disambiguation titles), drop{}template URLs, and avoid scanning non-doc filetypes like lockfiles. - Bump dependencies (notably
zodv3 → v4.4.3 and an Astro patch update) and apply the corresponding Zod v4 API/type adjustments in schemas and validation tooling. - Update docs example to use Perseus’s new
license_urlendpoint.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
standard/schema/work.ts |
Updates Zod issue code usage to Zod v4’s 'custom' literal. |
standard/schema/common.ts |
Migrates IRI validation from z.string().url() to z.url() for Zod v4. |
standard/schema/citation-system.ts |
Updates multiple custom issues to use 'custom' for Zod v4. |
src/content/docs/get-started/how-it-works.md |
Fixes Perseus license_url example to the new working path. |
scripts/validate-data.ts |
Updates issue path typing for Zod v4 and avoids symbol-to-string join errors by stringifying path segments. |
package.json |
Bumps top-level zod dependency to ^4.4.3. |
package-lock.json |
Locks updated dependency graph consistent with npm update and Zod v4. |
lychee.toml |
Excludes opencollective.com as a known bot-blocking host. |
.github/workflows/links.yml |
Refines URL extraction to allow ) within URLs, trim only unbalanced trailing ), drop {} URLs, and restrict scanning to YAML/MD sources. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ssier Vorstand minimum reduced from three to two persons (Statuten Art. 11) in DE and EN; align contributing guides to frame all three review tracks (technical, expert, board reservation) as first-class, matching the governance regulation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…refs#7) §1 previously said a conforming registry MAY record dereferenceable locations. A bare identifier with no resolution path is of limited practical use, so tighten to SHOULD to nudge implementers toward providing a resolvable URL per reference. Closes textrefs#7. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace §13's compound JSON-shaped wrapper with a single JSON-LD document under @context + @graph. Each record carries full id, type, and administrative metadata so a reader can copy the example out and validate it directly against the published context and Zod schemas. The CanonicalReference id is the deterministic UUID v5 produced by the seed for `new-testament / bible-book-chapter-verse / John.3.16 / 1.0.0`, verified locally against standard/schema/. Closes textrefs#8. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…works Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
target_kind was an OPTIONAL human-readable scheme hint with no normative weight; maintaining Appendix B's enumerated label list was upkeep without payoff. Replace it with optional target.conforms_to — an IRI (or array of IRIs) typed as dcterms:conformsTo in the v1 JSON-LD context — mirroring Linked Art's conforms_to pattern. Spec, Appendix B, JSON-LD context, Zod schema, compile pipeline, in-tree fixture, registry detail pages, and get-started prose all migrated. The Astro mapping/work pages drop the scheme-label badge: the identifier IRI is authoritative and self-describing. The data/ submodule pointer moves to the matching textrefs/registry commit (target_kind→conforms_to in every data/works/*.yaml). See decisions/ADR-0001 for the rationale and alternatives considered. BREAKING CHANGE: target.target_kind is removed; downstream consumers that read it MUST migrate to target.conforms_to. Acceptable pre-v1.0.0. Closes textrefs#6. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
textrefs/registry#1 merged via squash; advance data/ pointer from the feature branch tip to the merge commit on main so the Validate workflow's "pin is on registry main" guard passes. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Starlight reads docs/404 via getEntry() for its dedicated /404 route
AND enumerates the same entry through the [...slug] catch-all,
producing a benign but noisy build warning ("Could not render /404
from route /[...slug] as it conflicts with higher priority route
/404"). draft: true excludes the entry from the catch-all in
production builds while leaving Starlight's direct-by-id lookup
intact, so dist/404.html still ships our custom hero.
The localised dist/de/404/index.html is dropped (the fallback-route
pass uses the same draft-filtered docs list); Cloudflare Pages serves
/404.html for missing pages across all locales anyway.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Originally a CI / dependency repair; expanded into the carrier PR for three v1 spec issues raised by @julsraemy. All five threads share the
stagingbranch so thedata/submodule bump on textrefs/registry#1 stays coordinated with the spec changes that depend on it.CI / dependency fixes
.github/workflows/links.ymlwas truncating URLs at)(mangling Wikipedia disambiguation titles), feeding{placeholder}resolver templates to lychee, and scanningdata/package-lock.json(bot-blocked opencollective URLs). Allow)in URLs with an unbalanced-paren trim, drop{}-bearing URLs, restrict grep to YAML/MD, and add opencollective to lychee excludes as defense-in-depth. Local replay drops error count 17 → 0.license_urlis dead./hopper/about/copyright404s; updated via the registry submodule bump (depends on fix(perseus): replace dead license_url with /hopper/opensource registry#1) and mirrored in thehow-it-worksdoc example.npm update(astro 6.4.3 → 6.4.4 patch) and top-level zod 3 → 4.4.3. Migratedz.string().url()→z.url(),z.ZodIssueCode.custom→'custom', and widenedreportIssuepath type toPropertyKey[]for zod 4's$ZodIssue.Spec fixes (this round)
docs(spec): tighten dereferenceable-location guidance to should(6b0f0e8). §1 MAY → SHOULD for recording dereferenceable locations: an opaque identifier without a resolution path is of limited interoperability value.@context#8 —docs(spec): self-contained §13 example with @context(da48c31). Rewrite §13's worked example as a single JSON-LD document under@context+@graph, with fullid,type, and admin metadata on each record. Verified locally against the canonical Zod schemas.target_kind: prefer a dereferenceable IRI +dct:conformsToover an enumerated scheme list #6 —feat(spec)!: replace target_kind with dcterms:conformsTo(e9b09d4). Retire the informativetarget_kindhint and Appendix B's enumerated label list. Introduce optionaltarget.conforms_to(IRI or array of IRIs) mapped todcterms:conformsToin the v1 JSON-LD context, mirroring Linked Art. Spec, Appendix B, JSON-LD context, Zod schema, compile pipeline, in-tree fixture, registry detail pages, and get-started prose all migrated. Coordinated with fix(perseus): replace dead license_url with /hopper/opensource registry#1 which renames the field across alldata/works/*.yaml. Rationale indecisions/ADR-0001-conforms-to-replaces-target-kind.md.Submodule bookkeeping
chore(data): bump submodule with second resolvers on single-resolver works(56eb064) advancesdata/to pick up the pre-existing "second resolvers" registry commit.data/pointer in this PR isbe413a09ontextrefs/registry@fix/perseus-license-url, including thetarget_kind→conforms_torename.Test plan
Linksworkflow run reports 0 errors (or much closer to 0)npm run verifypasses (locally: ✓, 0 errors / 0 warnings / 0 hints)npm run build:datavalidates all 39250 records (locally: ✓)main🤖 Generated with Claude Code