feat(wiki): port upstream knowledge quality improvements
setup / install-leaves-tree-clean (push) Successful in 18s
setup / install-leaves-tree-clean (push) Successful in 18s
Selectively port source coverage and redirect lint, ignore-aware provenance, staging and trust checks from upstream 055d720. Preserve local archive metadata and adapt source-date and defuddle skill guidance. Keep the existing skills directory, file index and MCP interfaces. Record per-module upstream baselines and exclusions without migrating vault data or changing services. Validation: 625 tests passed; git diff --check passed.
This commit is contained in:
@@ -4,6 +4,7 @@ from pathlib import Path
|
||||
|
||||
from obsidian_wiki.provenance import (
|
||||
archive_wikilink_relpath,
|
||||
clip_url_index,
|
||||
expected_snapshots_for_page,
|
||||
invert_pages,
|
||||
parse_snapshots_field,
|
||||
@@ -218,3 +219,13 @@ def test_archive_wikilink_relpath_rejects_parent_traversal(tmp_path: Path) -> No
|
||||
vault = tmp_path / "vault"
|
||||
vault.mkdir()
|
||||
assert archive_wikilink_relpath(vault, "_raw/_archived/../attention") is None
|
||||
|
||||
|
||||
def test_clip_url_index_honors_okignore(tmp_path: Path) -> None:
|
||||
for rel, url in (("kept", "https://example.test/kept"), ("private/hidden", "https://example.test/hidden")):
|
||||
clip = tmp_path / "_raw" / "_archived" / f"{rel}.md"
|
||||
clip.parent.mkdir(parents=True, exist_ok=True)
|
||||
clip.write_text(f"---\nurl: {url}\n---\n\nclip\n", encoding="utf-8")
|
||||
(tmp_path / ".okignore").write_text("_raw/_archived/private\n", encoding="utf-8")
|
||||
|
||||
assert clip_url_index(tmp_path) == {"https://example.test/kept": ["_raw/_archived/kept.md"]}
|
||||
|
||||
Reference in New Issue
Block a user