Skip to content

fix(knowledge-pages): show exact freshness in page detail - #3325

Open
Sanderhoff-alt wants to merge 1 commit into
vectorize-io:mainfrom
Sanderhoff-alt:fix/knowledge-pages-exact-freshness
Open

fix(knowledge-pages): show exact freshness in page detail#3325
Sanderhoff-alt wants to merge 1 commit into
vectorize-io:mainfrom
Sanderhoff-alt:fix/knowledge-pages-exact-freshness

Conversation

@Sanderhoff-alt

@Sanderhoff-alt Sanderhoff-alt commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Why

The Knowledge Pages tree reports freshness using a bank-wide write watermark. That is intentionally conservative: a page can be marked is_stale: true even when the new memory is outside the page's scope.

When a page is opened, the control plane already fetches its backing mental model to show provenance. That response includes the exact scope-aware is_stale value, but the page header was still reading the tree's approximate value. As a result, a page could show “May need refresh” in its detail view even when its exact freshness check reported that it was current. This makes the detail view appear inconsistent and reduces trust in the status indicator.

What changed

  • Prefer the exact backing mental model freshness result for the open page.
  • Fall back to the tree watermark result while the exact result is unavailable.
  • Keep the tree polling strategy and API behavior unchanged.

This makes the detail view use information it already retrieved, so there is no additional request or database cost. It does not attempt to change the tree's deliberately conservative semantics.

Verification

  • ./scripts/hooks/lint.sh
  • npm test (119 tests)

The page detail already fetches its backing model for provenance.
Use its exact staleness result for the page badge, falling back to
the tree's bank-wide approximation until it is available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant