Skip to content

filterChangedPages doesn't detect when pages move sections #113

@luandro

Description

@luandro

Problem

The function filterChangedPages in pageMetadataCache.ts:234 only checks:

  • Is the page new?
  • Are outputs missing?
  • Is the timestamp newer?

It does not detect when a page has moved sections (e.g., /docs/intro.md/docs/getting-started/intro.md).

Current Behavior

Pages that move sections might be skipped by filterChangedPages but then correctly re-processed anyway due to the generateBlocks.ts check that verifies !cachedPage.outputPaths?.includes(normalizedFilePath). This is inefficient but not incorrect.

Impact

  • Pages that move sections are re-processed anyway, causing unnecessary computational overhead
  • The filtering logic doesn't match the actual detection logic at processing time

Potential Fix

filterChangedPages would need to accept expected output paths to compare against cached paths. This requires architectural changes to pass path information to the filtering stage.

Related

Related to recent cache normalization fixes (commit fae5a9f)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions