Repository navigation
fix(check-docs): ignore link-shaped text in inline code spans without hiding real links - #99
Merged
Merged
Conversation
bketelsen
approved these changes
Nov 6, 2026
5 tasks done
bketelsen
pushed a commit
to frostyard/core
that referenced
this pull request
Nov 6, 2026
The docs gates of core, updex and std now ignore link-shaped text inside an inline code span (#216, frostyard/updex#493, frostyard/std#99), so the vendored Go skills no longer need the split `X[T]`(`v`) form. Restore upstream's single code span in golang-error-handling, golang-safety and golang-modernize/references/versions.md, drop the 3 marked override comments, and drop the Code spans entry from the overrides list. Closes #201. Co-authored-by: frostyard-machines <[email protected]>
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
scripts/check-docs.mjschecks the links of every Markdown file, the skills that frostyard/core syncs into.agents/skills/too. It read link-shaped text inside inline code as a link: a Go generic call in a code span, such aserrors.AsType[T](err), failed the gate. Because of this, core splits 3 such calls in the synced Go skills (golang-error-handling,golang-safety,golang-modernize/references/versions.md) and cannot remove the split until every consumer gate reads code spans (frostyard/core#201).This PR copies core's code-span rule (frostyard/core#216) verbatim: the functions
codeSpanRanges,consumedBacktickMarkerEnd,isInCodeSpanandstripWithMap, and the same change to the link loop. A link-shaped match is skipped only when its whole original range is inside a code span of a safe run of non-blank lines. A run with a|, an escaped backtick, a<with a later>, a line with an unpaired backtick run, or a](,][,www.,://or$outside every span with a later backtick keeps every link checked, so the rule never hides a real link. Fence stripping, the index check, the symlink, release-config and cross-arch checks are unchanged.std had no self-test for its docs gate.
scripts/test-check-docs.mjs(modeled on updex's) builds fixture repositories and runs 27 cases: a valid fixture passes, a plain dead link fails, and every link-integrity case of core's tests (each must-fail case must report-> missing.md does not resolve). The CIdocs-gatejob runs it before the gate.AGENTS.mdnames the new command.Risk tier
Rationale:
risk:high. Matched paths in.github/risk-paths.json, and why each change is safe:scripts/**matchesscripts/check-docs.mjsand the newscripts/test-check-docs.mjs. The gate change only skips a match that is fully inside a code span of a safe run; every other match is checked as before, and the real tree gives the same counts. The self-test is read-only: it writes fixtures under a temporary directory and deletes them..github/workflows/**matches.github/workflows/ci.yml. The change adds 1run:step (node scripts/test-check-docs.mjs) to the existingdocs-gatejob. No new action, no permission change, no secret, no trigger change.Checks
make cigo.modunchangedDocs housekeeping
AGENTS.mdupdated for the new self-test commandProtected boundaries
.github/workflows/ci.ymlchange is called out above as high risk (no new action; permissions unchanged)Verification
node scripts/test-check-docs.mjs: 27 cases passnode scripts/check-docs.mjsgreen:checked: 9 docs, 369 links, 9 symlinks(same as before)err,vandvaluescripts/check-docs.mjsfrom the base and the new cases kept, 5 must-pass cases fail (Go generic calls, run-length span,<without>, CRLF, markers inside spans). The must-fail cases pass there, because the base gate checks every match.Cross-review
Reviewer: openai/gpt-6.1-sol. Coder: github-copilot/mai-code-2-flash (the
AGENTS.mdlines by the author agent).run:step (actions SHA-pinned; permissions, triggers and secrets unchanged); therisk:highpaths were read first.