Skip to content

Correct documentation link parsing and make checker coverage explicit #90

Closed

Description

@BinaryOutlook

The documentation gate rejects some valid Markdown links and lets some broken references pass. Make link/anchor parsing accurate and the scanned file set explicit so contributors can trust what a passing check establishes.

Priority: P3 / Low — validation hardening. No actual credential leak was observed. These findings came from isolated synthetic mutations, not edits to the tested product checkout.

Reproduction and findings

Start with the clean audited revision and run node scripts/check-docs.cjs; its baseline passed 61 text files and 462 local links. In a disposable copy, apply one mutation at a time and restore it before the next:

Mutation Observed result Expected boundary
Add a link to a nonexistent Markdown file or heading Fails Correct negative controls
Create docs/audit-target.md containing a Setext heading Audit heading with an equals-sign underline; link to #audit-heading Incorrect missing-anchor failure Valid heading anchor should pass
Create docs/audit-target(1).md; link with [Target](docs/audit-target(1).md) Incorrect missing-target failure Valid balanced filename should pass
Link to docs/index.html#definitely-missing-audit Passes Included HTML fragments should be checked or explicitly outside the contract
Add a broken Markdown link to root AGENTS.md Passes The maintained-file inclusion policy must make this omission explicit or include the file

A synthetic credential-shaped string in the same excluded file also bypassed that scan; no real secret was used or found. An unclosed code fence passed too, but layout review is currently a separate manual requirement rather than a claimed guarantee of this script.

Scope and acceptance criteria

  • Use syntax-aware link and heading extraction, covering Setext headings and balanced/encoded destinations without regressing valid current links.
  • Define the included/excluded maintained-file set explicitly; test that the chosen policy is enforced.
  • Check supported HTML fragments or clearly disclose their exclusion.
  • Add positive and negative fixtures, including duplicate-heading slug collisions and code examples that must not be mistaken for live links.
  • Preserve privacy reporting by location/category without echoing suspected values; retain manual prose, layout, screenshot and metadata review.

A documentation website migration or an exhaustive secrets scanner is outside this slice.

Source evidence

See the hardcoded scan set, heading extraction, and link/fragment checks.

Build identity and verification boundary

Recorded during the 2026-09-27 audit of #80 at ffbdad524d393aa783760f4829cb995d8b9d6405 (package version 0.4.0), using Node 24.21.0 on macOS ARM64. The tested product source was unmodified. This is an unreleased development snapshot.

Findings are from repository inspection and the specific checks described above. They are scoped to the recorded revision; a passing broader suite does not resolve these findings.

Reproduce and validate changes using the checkout's build guide and testing guide. Keep evidence synthetic and sanitized.

Activity

  1. added
    bug
    documentation
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions