You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(wiki): plug slug/title leaks producing .md.md, timestamp-slugs, path-titles
Audit of the methodology wiki (7,883 pages) on 2026-05-12 found:
- 58 pages with .md.md double extension
- 10 ADRs slugged "decision-created-2026-04-15t09-29-10z" from YAML
frontmatter timestamps leaking through as titles
- 11+ pages with embedded filesystem paths in slugs, e.g.
"specs/2026-04-17-also-on-users-cdeust-documents-developments-..."
- All polluted pages written 2026-04-21 — *after* v3.10.1 (2026-04-15)
shipped the audit-artefact filter, so these are live bugs not history.
Root causes and fixes:
1. .md.md (slugify preserves '.') — wiki_layout.slugify now strips a
trailing chain of ".md" before returning. Single-point repair
benefits all six filename builders (adr_filename, domain_page_path,
wiki_sync, draft_compiler, ingest_prd, ingest_codebase_pages).
2. Timestamp-as-title (YAML "created:" line accepted by derive_title) —
new _YAML_KV_TITLE_PATTERNS reject lines matching
"(created|updated|date|...): <value>" and bare ISO-8601 timestamps.
3. Path-embedded-mid-sentence titles (existing _PATH_OR_URL_TITLE_PATTERNS
only matched paths at line start) — added two patterns that match
/Users/, /home/, /opt/, /var/, /etc/, /tmp/, /root/ anywhere in the
line, plus Windows drive paths anywhere.
4. derive_title fallback leaked raw content[:80] when no clean line
existed, defeating wiki_sync's deterministic memory-<hash> fallback.
derive_title now returns "" when every candidate line is rejected
(path, URL, YAML, JSON, too-short); callers route to the hash.
Regression tests in test_wiki_layout.py (4 new) and test_wiki_classifier.py
(6 new). 1720 core tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* style: ruff format test_wiki_classifier (CI fix)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments