fix(gbrain): cap fallback enrichment graph size (BLO-21635) - #1251
Conversation
|
🔗 Paperclip issue: BLO-21635 |
1 similar comment
|
🔗 Paperclip issue: BLO-21635 |
|
Hey @kkroo! Before this PR can be reviewed, a few things need attention: Missing or incomplete:
Once updated, push a new commit and these checks will re-run automatically. — commitperclip |
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2c3dc28 to
cf739a2
Compare
|
Hey @kkroo! Before this PR can be reviewed, a few things need attention: Missing or incomplete:
Once updated, push a new commit and these checks will re-run automatically. — commitperclip |
|
Closing as superseded: this exact change is already on Commit // BLO-21635: the fallback candidates are agent/project hub nodes, which can be
// linked to thousands of unrelated fact-* nodes (observed up to ~23k, ~5.8MB
// decoded JSON, on a single "ok" recall). The issue traversal is scoped and
// safe to attach whole; the hub fallback is not, so cap only the fallback's
// contribution before merging rather than letting it dominate the cached
// graph. This bounds payload size regardless of how big the server-side hub
// neighborhood is.
export const MAX_ENRICHMENT_NODES = 50;
export const MAX_ENRICHMENT_EDGES = 100;
export const MAX_ENRICHMENT_SERIALIZED_BYTES = 64 * 1024;
function mergeGraphs(primary: unknown | null, fallback: unknown): unknown {
const cappedFallback = capEnrichmentGraph(fallback);
...…along with Verification against The only two lines this branch would contribute are the pre-BLO-23403 forms of those statements — i.e. Note: this closes the PR only. It was not verified whether BLO-21635 is fully resolved in production — only that the code and tests this branch proposed are already merged. |
Supersedes #1070, whose mixed history is rejected by the App-attributed-commit policy.
Reapplies the same final two-file gbrain fallback cap onto current
masteras onekkroo-authored commit.pnpm-lock.yamlis unchanged.Validation:
pnpm install --frozen-lockfileon the original fix(gbrain): cap fallback enrichment graph size (BLO-21635) #1070 headgit diff --checkpassedThe full local gbrain suite had one pre-existing
recall-packdecompression test timeout; the changedrecall.test.tssuite passed. GitHub CI remains the merge signal.