openclaw - ✅(Solved) Fix Wiki lint should resolve title, slug, fragment, and source-path Obsidian link variants [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73574Fetched 2026-04-29 06:18:02
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
0
Timeline (top)
commented ×2cross-referenced ×1

openclaw wiki lint reports broken-wikilink warnings for imported wiki pages that use title-style Obsidian links, slug variants, fragment variants, or original source-path suffixes. These links can resolve to existing pages, but the lint resolver does not currently normalize all of the same lookup keys that the imported evidence uses.

Root Cause

It should not require rewriting imported source evidence just to satisfy lint, because that damages provenance.

Fix Action

Fix / Workaround

  1. Compile an isolated wiki vault containing imported source evidence with links such as title-style Obsidian page names, slugified variants, fragments, and source-path suffix references.
  2. Run openclaw wiki lint --json.
  3. Existing pages are reported as broken-wikilink even though they can be resolved by title/slug/source-path-derived keys.

Lint reports many broken-wikilink warnings until the resolver is patched to normalize those variants.

Local workaround

PR fix notes

PR #73722: fix: normalise wiki lint links

Description (problem / solution / changelog)

Summary

  • Problem: openclaw wiki lint can report existing imported wiki pages as broken-wikilink when links use page titles, slug variants, fragments, or original source-path suffixes.
  • Why it matters: imported evidence should not need provenance-damaging rewrites just to satisfy lint.
  • What changed: memory-wiki lint now indexes pages by normalised path, basename, title, slug variants, and imported source-path suffixes, and strips fragments/query strings before checking link targets.
  • What did NOT change (scope boundary): wiki compile, ingest, page rendering, and markdown link extraction remain unchanged.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #73574
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: memory-wiki lint compared raw link targets against only exact extensionless relative paths and basenames.
  • Missing detection / guardrail: lint coverage did not include title-style, slug-style, fragment, or imported source-path link variants.
  • Contributing context (if known): imported evidence can preserve source-authored link forms that differ from generated wiki filenames.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: extensions/memory-wiki/src/lint.test.ts
  • Scenario the test should lock in: existing pages linked by title, slug, fragment-bearing path, and imported source-path suffix do not produce broken-wikilink issues.
  • Why this is the smallest reliable guardrail: the bug is isolated to lint target normalisation.
  • Existing test that already covers this (if any): none.
  • If no new test is added, why not: N/A.

User-visible / Behavior Changes

openclaw wiki lint should produce fewer false-positive broken-wikilink warnings for imported wiki pages whose links already resolve by title, slug, fragment-stripped path, or imported source-path suffix.

Diagram (if applicable)

Before:
[[Alpha Database#Evidence]] -> raw target check -> false broken-wikilink

After:
[[Alpha Database#Evidence]] -> normalised lookup -> existing page match

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local source checkout
  • Model/provider: N/A
  • Integration/channel (if any): memory-wiki
  • Relevant config (redacted): N/A

Steps

  1. Compile or create memory-wiki pages containing links such as [[Alpha Database#Evidence]], [[alpha-database]], and source-path suffix links.
  2. Run memory-wiki lint.
  3. Inspect broken-wikilink results.

Expected

  • Existing pages are not reported as broken links when referenced by title, slug, fragment-stripped path, or imported source-path suffix.

Actual

  • Current main only compares raw targets against exact extensionless relative paths and basenames, so valid imported links can be reported as broken.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Local command evidence:

  • git diff --check HEAD~1..HEAD passed.
  • Added-line scan for unwanted tool-name references returned no matches.
  • pnpm exec oxfmt --write --threads=1 extensions/memory-wiki/src/lint.ts extensions/memory-wiki/src/lint.test.ts was attempted locally and with elevated permissions, but Corepack timed out downloading pnpm 10.33.0 from the registry.
  • pnpm test extensions/memory-wiki/src/lint.test.ts was attempted locally and with elevated permissions, but Corepack timed out downloading pnpm 10.33.0 from the registry.

Human Verification (required)

  • Verified scenarios: source-level resolver now strips fragments/query suffixes and indexes title, slug, relative-path, basename, and imported source-path suffix keys.
  • Edge cases checked: missing targets still flow through the existing warning path; source-path suffixes do not require changing stored provenance.
  • What you did not verify: local formatter or Vitest execution, because this machine cannot download the required pnpm version through Corepack. CI should run the focused regression.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: lint could accept links that are ambiguous across multiple pages.
    • Mitigation: this only suppresses broken-link warnings when a normalised target matches an existing page key; it does not change compile output or page routing.

Changed files

  • extensions/memory-wiki/src/lint.test.ts (modified, +58/-0)
  • extensions/memory-wiki/src/lint.ts (modified, +51/-5)
RAW_BUFFERClick to expand / collapse

Summary

openclaw wiki lint reports broken-wikilink warnings for imported wiki pages that use title-style Obsidian links, slug variants, fragment variants, or original source-path suffixes. These links can resolve to existing pages, but the lint resolver does not currently normalize all of the same lookup keys that the imported evidence uses.

Environment

  • OpenClaw: 2026.4.26
  • Install type: Homebrew/global package
  • Command surface: openclaw wiki compile, openclaw wiki lint, openclaw wiki doctor

Reproduction shape

  1. Compile an isolated wiki vault containing imported source evidence with links such as title-style Obsidian page names, slugified variants, fragments, and source-path suffix references.
  2. Run openclaw wiki lint --json.
  3. Existing pages are reported as broken-wikilink even though they can be resolved by title/slug/source-path-derived keys.

Expected behavior

The wiki lint resolver should build lookup keys for:

  • page titles
  • slugified title variants
  • path and basename variants
  • fragment-stripped links
  • original source-path suffixes for imported evidence

It should not require rewriting imported source evidence just to satisfy lint, because that damages provenance.

Actual behavior

Lint reports many broken-wikilink warnings until the resolver is patched to normalize those variants.

Local workaround

A local symbol-anchored codemod against the bundled dist/cli-*.js resolver fixes the issue by expanding page lookup keys and normalizing link targets. After applying it locally, the same vault reports:

  • openclaw wiki lint: 0 issues
  • openclaw wiki doctor: healthy
  • openclaw wiki compile: expected page counts retained

Request

Please upstream the resolver normalization so Homebrew/package updates do not require a local hotpatch.

extent analysis

TL;DR

The openclaw wiki lint resolver needs to be updated to normalize various link variants to fix the broken-wikilink warnings.

Guidance

  • The issue is caused by the lint resolver not normalizing title-style Obsidian links, slug variants, fragment variants, or original source-path suffixes.
  • To verify the issue, run openclaw wiki lint --json on a compiled wiki vault with imported source evidence containing these link types.
  • A local workaround is to apply a symbol-anchored codemod to the dist/cli-*.js resolver to expand page lookup keys and normalize link targets.
  • The long-term solution is to upstream the resolver normalization to the Homebrew/package updates.

Example

No code snippet is provided as the issue does not contain specific code examples.

Notes

The current workaround requires a local hotpatch, which may not be ideal for all users. Upstreaming the resolver normalization would provide a more permanent solution.

Recommendation

Apply the local workaround by using a symbol-anchored codemod to patch the dist/cli-*.js resolver, as this provides a temporary fix until the upstream update is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The wiki lint resolver should build lookup keys for:

  • page titles
  • slugified title variants
  • path and basename variants
  • fragment-stripped links
  • original source-path suffixes for imported evidence

It should not require rewriting imported source evidence just to satisfy lint, because that damages provenance.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix Wiki lint should resolve title, slug, fragment, and source-path Obsidian link variants [1 pull requests, 2 comments, 3 participants]