Skip to content

fix(spec): every occurrence of a term is a link, and a term link is no escape - #78

Open
runewright[bot] wants to merge 4 commits into
mainfrom
fable/term-links-pass
Open

runewright[bot] wants to merge 4 commits into
mainfrom
fable/term-links-pass

Conversation

@runewright

@runewright runewright Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Plan

The voice review of 2026-10-18 decided that a defined term is a link to its glossary page at every occurrence in a file. The validator, the fixer, the assembler, and the bundle check learn that rule, and the gaps two opposing reviews found are closed.

Changes

  • Report spec-term-unlinked for a plain occurrence of a term the file links elsewhere, with the form to write, in rune-docs/src/spec/lint.rs; where two terms overlap, the longer wins.
  • Link every plain occurrence in rune spec fix --links in rune-docs/src/spec/fix.rs, the longer term winning at an overlap, before the first-use pass.
  • Find plain occurrences in rune-docs/src/spec/term_links.rs: whole words and s/es plurals, byte offsets kept under Unicode lower-casing, headings, code, definition lines, and inline-link destinations with balanced parentheses masked.
  • Close a code span with a backtick run of the same length in rune-docs/src/spec/prose.rs.
  • Strip a reference-style term link to its text in src/assemble/references.rs, so a deployed instance carries no dangling reference.
  • Accept a reference-style link into docs/specs/glossary/<kebab-page>.md in src/manifest/bundle.rs, the form assembly strips, and keep refusing every other escape.
  • Say so in the every-term-cites-definition change specs and in CHANGELOG.md.

Testing

  • cargo test --all-features: all pass, including the new lint, fixer, matcher, assembler, and bundle tests.
  • cargo clippy --all-features --all-targets and cargo fmt --check: clean.
  • Guarded push dry-run on head 89d9b185: exit 0; signed as 1cea8c79 with no tree change.
  • Opposing reviews by Astra (gpt-6-astra) and Grok 4.7: the confirmed findings are fixed; the open ones (an emphasized word is never linked, Setext headings, a stray [, a label split across lines) occur in no deck file.

Release Notes

  • rune spec validate reports a plain occurrence of a linked term, rune spec fix --links links it, and assembly strips term links from deployed instances.

Open-Seal-Nonce: 4507bb490572c777f347cdea904deabcfc9919605bd058a822fd21a628c06f7b

Note

Make every term occurrence a link and exempt term links from reference checks

  • Term linting now reports *-term-unlinked errors for plain occurrences of a term already linked in the same file, with different replacement hints before and after the first link; the matcher handles plurals, case-insensitive matching, and skips links, code spans, URLs, and partial words in term_links.rs and lint.rs
  • rune spec fix --links rewrites plain occurrences of already-linked terms into reference links, preferring the longer term on overlapping matches, in fix.rs
  • Assembly reference stripping removes full reference-style term-link syntax while keeping the link text, skips fenced code blocks, and matches reference tags case-insensitively in references.rs
  • Bundle reference validation no longer rejects full glossary term links; collapsed and shortcut forms still fail, in bundle.rs
  • Fixes multi-backtick inline code span handling so code content is no longer treated as prose
  • Behavioral Change: specs previously passing lint may now fail with *-term-unlinked; run rune spec fix --links to auto-fix. Only full lowercase kebab-style glossary paths are exempt from bundle checks — collapsed, shortcut, and uppercase forms still error

Macroscope summarized 1cb98f4.

…o escape

Once a file links a term, every occurrence of the term in that file is a
link: the first emphasized, the later ones plain. The validator reports a
plain occurrence of a linked term as spec-term-unlinked, and rune spec fix
--links links it with the tag the file already uses. Where two terms
overlap, the longer wins, in the fixer and in the lint. The matcher keeps
byte offsets under Unicode lower-casing, takes the es plural of a label
that ends in s, and masks an inline-link destination with balanced
parentheses; the prose view closes a code span with a backtick run of the
same length. The assembler strips a term link to its text, so a deployed
instance carries no dangling reference, and the bundle check accepts a
reference into the repository glossary only when its page name is kebab
case. The change specs say so.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
@github-actions github-actions Bot added size:large auto: changed-lines bucket area:docs auto: documentation and markdown labels Oct 19, 2026
@github-actions

Copy link
Copy Markdown

review/correctness stood down on 1cea8c79: free lanes only: deterministic check quality is pending on this head. Apply review:runeseer to force a paid round.

…ee":"28ba950e0d33d04f042963cd0f5e437988eb0ffe","nonce":"4507bb490572c777f347cdea904deabcfc9919605bd058a822fd21a628c06f7b"}
@N4M3Z
N4M3Z marked this pull request as ready for review October 19, 2026 16:01
@N4M3Z
N4M3Z self-requested a review as a code owner October 19, 2026 16:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T16:04:09.620102Z 1cea8c7 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-19T16:08:39.865510Z 1cea8c7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@runeseer

runeseer Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

review/correctness round 1 started on 1cea8c79 at ledger generation 4.

@runeseer

runeseer Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @N4M3Z's task in 3m 50s —— View job


Correctness review

  • Read the diff against origin/main
  • Judge other lanes' findings
  • Recheck the ledger
  • Write the verdict

Request changes. The escape check waves through collapsed and shortcut term links, but references::strip rewrites only the full [text][tag] form, so assembly deletes the term word.

  • src/manifest/bundle.rs:501 clears LinkType::Collapsed | LinkType::Shortcut from resolve_inside, so [validator] with [validator]: ../../../../docs/specs/glossary/validator.md passes the bundle check; src/assemble/references.rs:18 then matches it with INLINE_RE, not LINK_RE, and deletes [validator].
  • Minor: strip also needs a definition at column 0 with a word-character tag, so an indented definition or a punctuated tag leaves a dangling reference in a deployed instance.
  • The offset-preserving prose view, the longer-term-wins overlap filter, and the kebab-case page gate hold up.

No findings from other reviewers were bound to this head.
· branch fable/term-links-pass

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1cea8c7995

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/assemble/references.rs Outdated
Comment thread src/assemble/references.rs Outdated
@github-actions github-actions Bot added the issue:rune Review lane requires intervention label Oct 19, 2026
Claude Fable 5.1 (claude-fable-5-1) and others added 2 commits October 19, 2026 19:54
…ide code

Review findings on the pull request. Markdown resolves a reference label
without case, so a `[validator][validator]` link with a `[VALIDATOR]:`
definition passed the validator and survived assembly as a dangling
reference; the stripper now matches tags without case. It also rewrote
`[x][TAG]` inside a fenced block or a code span, where the term linter
deliberately looks away; the stripper now walks fences and code spans and
touches prose only. The bundle check accepted a collapsed or shortcut
reference into the glossary, which the stripper never rewrites, so a
deployed instance kept a bare `[]`; it now accepts the full `[text][TAG]`
form alone.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
…ays so in the help

Review findings on the deck pull request that apply to the cli matcher
too. A term inside a bare URL, an autolink, or an HTML tag is not prose,
so it is masked. A label that ends in a consonant and y pluralizes to
ies, so `capabilities` and `repositories` are occurrences of their
terms. The `--links` help now says it links every occurrence, which is
the sentence the deck fallback reads before it hands the check over to
an installed rune.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
@macroscopeapp

macroscopeapp Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — This PR changes specification validation and auto-fixing, assembled output, and bundle-reference validation across multiple owner-controlled components. The cross-component runtime impact and new enforcement behavior warrant human review.

Notes:

  • Macroscope's correctness review did not run, so approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

Copy link
Copy Markdown

review/correctness stood down on 1cb98f47: free lanes only: deterministic check quality is pending on this head. Apply review:runeseer to force a paid round.

@N4M3Z N4M3Z added the review:runeseer Summons the adjudicating correctness lane label Oct 19, 2026
@runeseer

runeseer Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

review/correctness round 2 started on 1cb98f47 at ledger generation 2.

@runeseer

runeseer Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Runeseer review — clean

Looks good. The head fixes both open concerns: term-link stripping now compares tags without case, and it leaves fenced blocks and code spans untouched.

  • The bundle validator's term-link exemption now covers only the full [text][TAG] form, the one form assembly strips; collapsed and shortcut links are checked, and tested, as escapes.
  • Macroscope reports this change still needs a human approval, because the author owns none of the changed files.

No open findings · Reviewed 1cb98f47 · review run · $1.28 · 3m4s · 23 turns

@github-actions github-actions Bot removed review:runeseer Summons the adjudicating correctness lane issue:rune Review lane requires intervention labels Oct 19, 2026

@runeseer runeseer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Earned approval: review/correctness returned a clean verdict for 1cb98f4 at ledger generation 2. Dismissed automatically on any new push or generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs auto: documentation and markdown size:large auto: changed-lines bucket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant