Skip to content

Fill memory reads after lifecycle filtering - #30

Draft
jordan-hivemind wants to merge 2 commits into
flippyhead:mainfrom
jordan-hivemind:agent/paginate-fact-lifecycle-filtering
Draft

Fill memory reads after lifecycle filtering#30
jordan-hivemind wants to merge 2 commits into
flippyhead:mainfrom
jordan-hivemind:agent/paginate-fact-lifecycle-filtering

Conversation

@jordan-hivemind

@jordan-hivemind jordan-hivemind commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Replace fixed candidate windows in structured fact and narrative memory reads.
  • Add status-aware database indexes and a status filter field to full-text fact search.
  • Apply lifecycle and business-time validity filters inside the Convex query before take(limit).
  • Remove a helper that attempted multiple .paginate() calls inside one Convex function execution, which Convex rejects at runtime.
  • Cover recent, core, historical, typed, and full-text reads with regression corpora that exhaust the previous candidate windows.

Why

The previous implementations fetched fixed candidate windows and filtered lifecycle state afterward. An account with enough retracted, superseded, scheduled, or expired records could therefore receive fewer results than requested even when additional retrievable records existed.

Convex also permits only one paginated query per function execution, so looping over .paginate() inside the existing query functions is not a valid repair. Query-level filtering makes take(limit) count retrievable rows while status-aware indexes keep the common current-only path efficient.

Validation

  • pnpm test:once — 117 tests passed
  • pnpm check-types
  • pnpm lint — zero errors; ten pre-existing warnings
  • pnpm build
  • pnpm eval:recall — R@5 1.0, R@10 1.0, no blocking failures
  • convex dev --once — schema/index backfill and function deployment succeeded

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@jordan-hivemind is attempting to deploy a commit to the Pro Team on Vercel.

A member of the Team first needs to authorize it.

@jordan-hivemind jordan-hivemind changed the title Fill fact reads after lifecycle filtering Fill memory reads after lifecycle filtering Aug 12, 2026
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