Skip to content

fix(ci): repair link-check workflow + bump deps to zod 4#5

Merged
maehr merged 9 commits into
textrefs:stagingfrom
maehr:staging
Jun 9, 2026
Merged

fix(ci): repair link-check workflow + bump deps to zod 4#5
maehr merged 9 commits into
textrefs:stagingfrom
maehr:staging

Conversation

@maehr

@maehr maehr commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Originally a CI / dependency repair; expanded into the carrier PR for three v1 spec issues raised by @julsraemy. All five threads share the staging branch so the data/ submodule bump on textrefs/registry#1 stays coordinated with the spec changes that depend on it.

CI / dependency fixes

  • Fix Link Checker Report #3. URL extraction in .github/workflows/links.yml was truncating URLs at ) (mangling Wikipedia disambiguation titles), feeding {placeholder} resolver templates to lychee, and scanning data/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.
  • Perseus license_url is dead. /hopper/about/copyright 404s; updated via the registry submodule bump (depends on fix(perseus): replace dead license_url with /hopper/opensource registry#1) and mirrored in the how-it-works doc example.
  • Deps: npm update (astro 6.4.3 → 6.4.4 patch) and top-level zod 3 → 4.4.3. Migrated z.string().url()z.url(), z.ZodIssueCode.custom'custom', and widened reportIssue path type to PropertyKey[] for zod 4's $ZodIssue.

Spec fixes (this round)

  • Closes Dereferenceable locations: change MAY to SHOULD #7docs(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.
  • Closes Add a complete worked example including @context #8docs(spec): self-contained §13 example with @context (da48c31). Rewrite §13's worked example as a single JSON-LD document under @context + @graph, with full id, type, and admin metadata on each record. Verified locally against the canonical Zod schemas.
  • Closes target_kind: prefer a dereferenceable IRI + dct:conformsTo over an enumerated scheme list #6feat(spec)!: replace target_kind with dcterms:conformsTo (e9b09d4). Retire the informative target_kind hint and Appendix B's enumerated label list. Introduce optional target.conforms_to (IRI or array of IRIs) mapped to dcterms:conformsTo in 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 all data/works/*.yaml. Rationale in decisions/ADR-0001-conforms-to-replaces-target-kind.md.

Submodule bookkeeping

  • chore(data): bump submodule with second resolvers on single-resolver works (56eb064) advances data/ to pick up the pre-existing "second resolvers" registry commit.
  • The final data/ pointer in this PR is be413a09 on textrefs/registry@fix/perseus-license-url, including the target_kindconforms_to rename.

Test plan

🤖 Generated with Claude Code

maehr and others added 2 commits June 7, 2026 16:14
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>
Copilot AI review requested due to automatic review settings June 7, 2026 14:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 zod v3 → 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_url endpoint.

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.

maehr and others added 7 commits June 9, 2026 18:51
…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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 27 out of 28 changed files in this pull request and generated 1 comment.

Comment thread src/content/docs/404.mdx
@maehr maehr merged commit d3ae0d7 into textrefs:staging Jun 9, 2026
2 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