Skip to content

fix(wiki): exclude archived pages from render-wiki index/MOC - #697

Merged
plind-junior merged 4 commits into
vouchdev:testfrom
kurosawareiji7007-hub:fix/wiki-exclude-archived
Jul 31, 2026
Merged

fix(wiki): exclude archived pages from render-wiki index/MOC#697
plind-junior merged 4 commits into
vouchdev:testfrom
kurosawareiji7007-hub:fix/wiki-exclude-archived

Conversation

@kurosawareiji7007-hub

Copy link
Copy Markdown
Contributor

Summary

  • vouch render-wiki no longer lists archived pages in index.md / MOC.md.
  • Same live-set filter as recall / digest / search.

Fixes #695

Test plan

  • pytest tests/test_cli.py::test_render_wiki_excludes_archived_pages
  • ruff check on touched files
  • CI green + 100% diff coverage

Made with Cursor

@github-actions github-actions Bot added docs documentation, specs, examples, and repo guidance cli command line interface tests tests and fixtures size: XS less than 50 changed non-doc lines labels Jul 31, 2026
@plind-junior

Copy link
Copy Markdown
Member

checked the surface-drift question first, since that is where this class of fix usually leaks: render_index and render_moc have exactly one caller each, both in render_wiki_cmd (cli.py:3367 and :3375), and both read the same filtered pages list. so filtering at the CLI does cover every path today — no MCP or JSONL equivalent to miss. good.

that said, the filter is in the wrong layer for the same reason. wiki_render.render_index(pages) takes the page list, so "which pages belong in the wiki front door" is currently a fact the CLI knows and the renderer does not. the moment a second caller appears — a kb.render_wiki, the review-ui, an export — it re-learns the filter or it leaks. pushing it into wiki_render (or taking a pre-filtered live set from a shared helper) makes that impossible instead of merely unlikely.

which is the cross-cutting note on this cluster: context._page_is_live already exists for this predicate and its docstring says that keeping it in more than one place is what let kb.context keep serving archived pages after #581 fixed kb.search. with #710, #709, #708 and #698 all open, this is the fifth copy. longer version on #708.

the test is good — asserting on both index.md and MOC.md, plus the rendered 1 page(s) count, catches the case where the filter is applied to one render and not the other.

nothing blocking.

Fixes vouchdev#695: vouch render-wiki was listing every on-disk page, so
archived titles stayed in the wiki front door. filter to the live set
before render_index / render_moc.
@kurosawareiji7007-hub
kurosawareiji7007-hub force-pushed the fix/wiki-exclude-archived branch from 26cf20b to 4c587dc Compare July 31, 2026 07:23
kurosawareiji7007-hub and others added 3 commits July 31, 2026 00:24
Upstream imported coerce_numeric but still used bare int()/float(),
which left an unused-import ruff F401 that failed CI on vouchdev#713.
changelog union only; no source conflict.
changelog union only; no source conflict.
@plind-junior
plind-junior merged commit 4783620 into vouchdev:test Jul 31, 2026
11 checks passed
@github-actions github-actions Bot added the ci: passing ci is green label Jul 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

diff coverage: n/a — this PR changes no python under src/vouch/, so there is nothing for the gate to measure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: passing ci is green cli command line interface docs documentation, specs, examples, and repo guidance size: XS less than 50 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(wiki): render-wiki includes archived pages in index and MOC

2 participants