-
Notifications
You must be signed in to change notification settings - Fork 1
feat(ask): batch cited lineage graph fetch (v2.14.0) #582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0caa44c
feat(ask): batch cited lineage graph fetch (#568)
seonghobae c38b2e9
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae f23c8eb
Merge origin/main into feat/ask-batched-lineage-graph-v2140 (wave 2)
seonghobae f062acd
Merge origin/main into feat/ask-batched-lineage-graph-v2140 (restale)
seonghobae 8930717
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae 3992302
docs: drop merged conflict tail
seonghobae b53d5d2
fix(lineage): retain visible focus with hidden neighbors
seonghobae edca49b
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae cab0406
Merge origin/main into feat/ask-batched-lineage-graph-v2140
seonghobae d7cf407
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae 63dd0d0
Merge branch 'main' into feat/ask-batched-lineage-graph-v2140
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Global Ask merges cited Event Lineage from one post/edge fetch pair | ||
| and names truncation at the landing node bound (ADR 0169 / #568). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # ADR 0169 — Global Ask merges cited lineage from one fetch pair | ||
|
|
||
| **Decision status:** Accepted | ||
| **Date:** 2026-08-24 | ||
| **Related:** [0151](0151-ask-multi-lineage-graph.md), [0090](0090-global-ask-lineage-timeline-expansion.md), issue [#568](https://github.com/ContextualWisdomLab/LineageWeave/issues/568) | ||
|
|
||
| ## Context | ||
|
|
||
| ADR 0151 merges every cited post's reconstructed thread into one | ||
| `LineageGraph` so Ask can reuse `LineageDag`. The first implementation | ||
| called `visible_lineage_graph` once per citation. Each call re-read | ||
| every eligible `source_post` row and the full `post_lineage_edge` | ||
| table. Focus mode also returned the entire connected component with | ||
| `truncated: false`, so a cited post inside a large component could | ||
| inflate the Ask payload without naming a bound. | ||
|
|
||
| ## Decision | ||
|
|
||
| 1. `lineage_graphs_for_posts` loads visible posts and lineage edges | ||
| once, partitions connected components in memory, and slices the | ||
| per-citation subgraphs from that pair of reads. | ||
| 2. The merged payload uses the same node bound as the landing | ||
| viewport (`_LINEAGE_GRAPH_NODE_LIMIT` = 500). Cited posts stay | ||
| first. Remaining component nodes follow newest-first. Nodes beyond | ||
| the bound are omitted and `truncated` is true. | ||
| 3. Isolated cited posts still appear. Analysis-run knowledge cutoff | ||
| and leftover pairs are unchanged. Do not invent a theta. | ||
|
|
||
| ## Considered alternatives | ||
|
|
||
| - Keep the per-citation refetch because the citation cap is 8: | ||
| rejected. The cost is the table scan, not the citation count, and | ||
| the uncapped component is independent of that cap. | ||
| - Depth-from-citation hop limit instead of a node cap: deferred. A | ||
| hop limit can hide a cited thread's own branch point; the node cap | ||
| keeps cited posts visible and names the bound. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - N citations issue one `source_post` query and one | ||
| `post_lineage_edge` query. | ||
| - A large connected component no longer ships unbounded into Ask. | ||
| Open a cited post to read the full focused thread. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.