Skip to content

Speed up assistant reads for leaf document sources - #250

Merged
kinqsradio merged 1 commit into
mainfrom
fix/source-graph-leaf-documents
Oct 30, 2026
Merged

kinqsradio merged 1 commit into
mainfrom
fix/source-graph-leaf-documents

Conversation

@kinqsradio

Copy link
Copy Markdown
Member

Assistant profiles and chat lists repeatedly initialized the full source graph for documents without dependency edges. Check current document access first, then return the one-node result when the canonical document-edge set is empty. Documents with dependencies continue through the existing recursive guard.

A shared edge builder drives both traversal and the leaf check. Migration 306 replaces the generated function while preserving its signature, STABLE snapshot behavior, security-invoker mode and jit=off. Complete source/migration/installed-body parity and the unchanged historical general predicate are checked.

Validation: 87 focused provenance, scope, profile, origin, conversation, delivery and notification checks passed, including NULL arguments, membership/deletion/AI-off changes, edge addition/removal, retained entries and cycles. Backend build/types, formatting, source organization and diff checks passed; independent source review found no actionable issues.

Three alternating synthetic comparisons using 221 chats, 228 jobs, roughly 9,000 dependency edges and 181 documents preserved complete responses: profiles 13,707→1,574ms median; chat list 1,855→312ms. These are local measurements; production verification follows rollout through update.bat. Hosted CI is not awaited per maintainer instruction.

@kinqsradio
kinqsradio merged commit d7209bc into main Oct 30, 2026
1 check passed
@kinqsradio
kinqsradio deleted the fix/source-graph-leaf-documents branch November 2, 2026 07:56
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