fix(memory-wiki): honor durable: true frontmatter in stale pages report#94509
fix(memory-wiki): honor durable: true frontmatter in stale pages report#94509chenweicong736 wants to merge 3 commits into
Conversation
The Stale Pages report previously flagged every non-report page whose updatedAt was older than 30 days, including intentionally durable references such as concept and synthesis pages. Bridge-mode vaults typically have many such pages, drowning out real staleness signal. This change adds a strict boolean `durable` frontmatter marker. Pages with `durable: true` are excluded from the stale-pages filter at compile time. The marker is strict (asBoolean only accepts real booleans, not string literals), is opt-in, and does not touch updatedAt, so other freshness signals remain accurate. Lint and agent-digest callers are unaffected; the change is scoped to the dashboard report filter. Fixes openclaw#93485 Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed June 22, 2026, 4:02 AM ET / 08:02 UTC. Summary PR surface: Source +4, Tests +129, Docs +18. Total +151 across 5 files. Reproducibility: yes. Current main source sends old concept and synthesis pages through Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Choose one durable-page freshness policy, align docs/tests and any lint follow-through, and land one PR with generated Stale Pages output proof. Do we have a high-confidence way to reproduce the issue? Yes. Current main source sends old concept and synthesis pages through Is this the best way to solve the issue? Unclear. The code path is narrow, but maintainers need to choose opt-in durable markers versus default concept/synthesis exclusions and decide whether lint should align. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d3f7f7d1fc91. Label changesLabel justifications:
Evidence reviewedPR surface: Source +4, Tests +129, Docs +18. Total +151 across 5 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Summary
The memory-wiki Stale Pages report flags intentionally durable reference pages (concepts, syntheses) as aging or stale, drowning out real staleness signal in bridge-mode vaults. This PR introduces an opt-in
durable: truefrontmatter marker so authors can flag pages whose value comes from durability rather than recency.reports/stale-pages.mdbecause the report only excludedreportkind, not the durable kinds. Signal-to-noise drops to zero.durablefrontmatter field at the stale-pages filter step. Pages withdurable: trueare excluded regardless ofupdatedAt.extensions/memory-wiki/src/markdown.ts—WikiPageSummary.durablefield + parser usingasBoolean.extensions/memory-wiki/src/compile.ts— One-line filter additionpage.durable !== true.extensions/memory-wiki/src/markdown.test.ts— Strict parser coverage (true/false/string/missing/no-frontmatter).extensions/memory-wiki/src/compile.test.ts— End-to-end compile coverage (durable concept + durable synthesis + control).docs/plugins/memory-wiki.md— NewOpting pages out of the Stale Pages reportsection."true"is intentionally ignored to avoid accidental activation) and entirely opt-in.Linked Issue
Fixes #93485
Changes
extensions/memory-wiki/src/markdown.ts— Addsdurable?: booleantoWikiPageSummaryand parses it viaasBoolean(parsed.frontmatter.durable)intoWikiPageSummary; strict boolean only, so sloppydurable: "true"YAML is silently ignored. Honors the user's explicit request in memory-wiki: Stale Pages report flags intentionally durable references (concepts, syntheses) as aging #93485 to makedurablea recognized frontmatter field.extensions/memory-wiki/src/compile.ts— Addspage.durable !== trueto the Stale Pages dashboard filter; a single-line addition that scopes the opt-in to the one report the issue describes.extensions/memory-wiki/src/markdown.test.ts— Newparses the durable opt-in flag from frontmatter strictlytest covering true, false, string literal, missing field, and no-frontmatter cases.extensions/memory-wiki/src/compile.test.ts— Newexcludes durable pages from the Stale Pages reporttest that writes three vault pages (durable concept + durable synthesis + non-durable concept), runscompileMemoryWikiVault, and asserts the report excludes durable pages but includes the control.docs/plugins/memory-wiki.md— New subsectionOpting pages out of the Stale Pages reportunderDashboards and health reportsso operators discover the marker.Real behavior proof
Behavior addressed: Pages with
durable: truefrontmatter are excluded fromreports/stale-pages.mdregardless ofupdatedAt. Pages without the marker behave exactly as before.Real environment tested: Linux 4.19.112 (x86_64), Node v24.13.1, branch
fix/wiki-stale-pages-durable-frontmatter-93485rebased onorigin/main(commit6d640a6556).Exact steps or command run after this patch:
Evidence after fix:
The new compile test writes three vault pages:
concepts/alpha-concept.md(durable: true),syntheses/alpha-synthesis.md(durable: true), andconcepts/beta-concept.md(no marker). All three carryupdatedAt: 2024-01-01(>2 years old, well past the 90-day stale threshold). AftercompileMemoryWikiVault, the test asserts that Alpha Concept and Alpha Synthesis are absent fromreports/stale-pages.mdwhile Beta Concept is present.Observed result after fix:
durable: truefrontmatter are skipped at the stale-pages filter step regardless ofupdatedAt.durable: "true"are deliberately not honored — only real booleans activate the marker.stale-pagewarning code and theagent-digest.jsoncache shape are unchanged.What was not tested: Live
openclaw wiki compileagainst a real bridge-mode vault (the existing test harness covers the same path throughcompileMemoryWikiVault); multi-vault compile;durable: trueinteraction with non-concept/synthesis kinds beyond entity.AI-Assisted
This PR was prepared with assistance from Claude Code.
Co-Authored-By: Claude Opus 4.8 [email protected]
Fixes #93485