Skip to content

fix: match GitHub heading anchor hyphens and Unicode - #20

Merged
schickling-assistant merged 3 commits into
mainfrom
schickling-assistant/2026-10-18-github-anchor-hyphens
Oct 18, 2026
Merged

schickling-assistant merged 3 commits into
mainfrom
schickling-assistant/2026-10-18-github-anchor-hyphens

Conversation

@schickling-assistant

@schickling-assistant schickling-assistant commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes a factory bottleneck: valid GitHub heading anchors produce false unresolved documentation references.

Problem

Phase C — molty retirement previously reduced to phase-c-molty-retirement; GitHub uses phase-c--molty-retirement. Graph extraction and intent check also had duplicate, inconsistent reducers.

Goal

Use one GitHub-compatible character-reduction function for graph extraction and Markdown link checking.

Decisions

Keep existing ASCII fast paths. A lazy Unicode-category regex retains Alphabetic characters, decimal/letter numbers, marks and connector punctuation. Other_Number characters such as ², ½ and ① are removed; alphabetic Other_Symbol characters such as ⓐ survive. Every ASCII space becomes a hyphen; hyphens are not collapsed or trimmed. Remove the duplicate reducer from lib.rs.

Character policy and representative Other_Number/Other_Symbol fixtures follow https://github.com/Flet/github-slugger/blob/3461c435/script/generate-regex.js and its test/fixtures.json.

Verification

At 161d9bc:

gate-slot --class heavy -- nix develop --command env -u DIRSTACK RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo test --manifest-path crates/intent/Cargo.toml
12 unit tests passed; 11 gateway integration tests passed; 16 CLI integration tests passed.
Doc tests: 0 tests. Exit 0.

Includes Unicode-category regressions, spacing and collision fixtures, and strict intent check accepting both local and cross-file #phase-c--molty-retirement destinations. One new review-fix commit, no amend.

Complexity

Adds regex as a direct dependency (already transitive). Sharing the reducer removes duplicate implementation rather than adding an abstraction.

Concerns

This remains raw-heading reduction, not full Markdown inline parsing. Link destinations and underscore emphasis are not parsed, so these cases can still diverge from rendered GitHub headings. Unicode properties follow the regex crate's Unicode version rather than pinning github-slugger's Unicode 13 tables.

Friction & bottlenecks

Earlier Cargo attempts encountered an agent-command-shell guard refusal. The compiler-wrapper-disabled test command above succeeds without bypassing the guard. A requested destructive reset was refused; used the prescribed keyed-stash alternative to preserve identical edits before fast-forwarding the test checkout.

Follow-ups

Rendered inline-Markdown parsing is outside this character-reduction fix.

References

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/st3-cleanup
session 01a18060
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.10.2
agent_runtime OMP 18.10.2
agent_model anthropic/claude-opus-5-5
worktree intent/2026-10-18-github-anchor-hyphens

agent-identity: agent/dotfiles/st3-cleanup
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.9.1
agent-runtime: OMP 18.9.1
agent-model: anthropic/claude-opus-5-5
agent-identity: agent/dotfiles/st3-cleanup
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.10.2
agent-runtime: OMP 18.10.2
agent-model: anthropic/claude-opus-5-5
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

Review record at exact head 161d9bc:

  • Independent review (ReviewIntent20, reviewer subagent): NO-GO at f608aa7 (Other_Number was kept, the Alphabetic exception was missing, and lib.rs had a duplicate collapsing reducer). The delta re-review at 161d9bc gives GO with no findings.
  • cargo test on dev5: 12 unit + 11 gateway + 16 CLI integration tests pass.
  • Consumer proof: dotfiles #6604 repins to this head. The axe build passes, and check:docs:vrs-links goes from 18 to 5 known-broken with 0 new findings.
Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/st3-cleanup
session 01a18060
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.10.2
agent_runtime OMP 18.10.2
agent_model anthropic/claude-opus-5-5
worktree unknown

@schickling-assistant
schickling-assistant marked this pull request as ready for review October 18, 2026 09:24
agent-identity: agent/dotfiles/st3-cleanup
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: unknown
agent-runtime: unknown
agent-model: unknown
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

Merge record (Johannes q304, one-time exception; message/523f8c1e6d75983c):

  • Head: ac1a9f7
  • CI at this exact head: all 6 checks pass (nix check, Private names check, ci crate, corpus-strict, materialises, semantic-review-fixtures; runs 39132582804, 39132582809, 39132582824).
  • Independent review: GO at this exact head (ReviewIntent20, reviewer subagent). It is a delta review of the rustfmt-only commit, building on the GO at 161d9bc.
  • Merge with --match-head-commit ac1a9f7, no --auto.
Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/st3-cleanup
session 01a18060
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.10.2
agent_runtime OMP 18.10.2
agent_model anthropic/claude-opus-5-5
worktree unknown

@schickling-assistant
schickling-assistant merged commit 638478a into main Oct 18, 2026
6 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.

1 participant