Skip to content

memory-wiki: Stale Pages report flags intentionally durable references (concepts, syntheses) as aging #93485

Description

@A1fred-AI

memory-wiki: Stale Pages report flags intentionally durable references (concepts, syntheses) as aging

Plugin: memory-wiki
Affected versions: 2026.6.1 (and likely all versions where the report was introduced)

Description

The Stale Pages report flags any page with page.kind !== "report" whose updatedAt is older than 30 days as "aging" and 90+ days as "stale". In bridge-mode vaults, concept and synthesis pages are intentionally durable reference material and should not be subject to the same staleness threshold as event-driven sources.

In our 853-source / 5-concept / 7-synthesis vault, every concept and synthesis page is currently flagged as "aging" — so the report's signal-to-noise ratio is 0 for the most valuable references.

page.kind is directory-derived (sources/source, concepts/concept, etc.) and the lint check at cli-BC1g2VJh.js:3127 enforces that pageType frontmatter matches the expected type, so pages cannot be relabeled as reports without breaking the structure validator.

The relevant filter at cli-BC1g2VJh.js:653:

const matches = pages.filter((page) => page.kind !== "report").flatMap(...)

The WIKI_STALE_DAYS = 90 constant and the implicit 30-day aging threshold are at lines 39 and 71 of the same file.

Reproduction

  1. Initialize a bridge-mode vault with at least one concept and one synthesis page.
  2. Wait 31 days.
  3. Run openclaw wiki compile.
  4. Read reports/stale-pages.md — observe all concept and synthesis pages listed as "aging" with the message last touched <14-day-old timestamp>.

Proposed fix

Add a user-configurable exclude list to the staleness check. Suggested shape:

{
  "plugins": {
    "memory-wiki": {
      "reports": {
        "stalePages": {
          "excludeKinds": ["concept", "synthesis"],
          "excludePathPatterns": ["^/concepts/", "^/syntheses/"],
          "durableFrontmatterKey": "durable",
          "staleAfterDays": 90,
          "agingAfterDays": 30
        }
      }
    }
  }
}

Defaults: empty arrays (current behavior), durableFrontmatterKey defaults to "durable" and is treated as opt-in when the value is true, staleAfterDays defaults to 90, agingAfterDays defaults to 30.

Additional request

The hardcoded WIKI_STALE_DAYS = 90 and the implicit 30-day aging threshold should be exposed as configurable thresholds (staleAfterDays, agingAfterDays) so operators can tune to their own vault activity cadence.

Workarounds attempted (none viable)

Attempt Why it doesn't work
Set pageType: report in concept/synthesis frontmatter Fails lint with code: page-type-mismatch because the validator expects the directory-derived type (cli-BC1g2VJh.js:3127)
Bump updatedAt to a recent timestamp Lies about content freshness; ages out again in 30 days; corrupts the freshness signal for genuine audit purposes
Add durable: true frontmatter field No code path reads such a field for the staleness check
Patch cli-BC1g2VJh.js directly Breaks on the next npm update; not a routine fix path

Impact

High noise in a high-value report. Operationally, the report is currently unusable for spotting genuinely stale source pages because durable references drown out real signal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions