Files
fusion/packages/core
gsxdsm bebb46ff41 FN-9037: add indexed recommendation task lookups
Keep recommendation task creation responsive without changing duplicate-intake semantics.

- Add project-scoped proposal claim and source-lineage persistence reads with supporting indexes.
- Use bounded lookups for recommendation replay and same-agent duplicate intake.
- Resolve terminal lanes from each candidate's workflow and cover the indexed query paths.

Files changed:
 .changeset/fn-9037-recommendation-create-perf.md   |   7 ++
 docs/storage.md                                    |   4 +
 .../intake-duplicate-terminal-lanes.test.ts        |   3 +-
 .../postgres/proposal-claim-lookup.pg.test.ts      | 106 +++++++++++++++++++++
 .../__tests__/same-agent-duplicate-intake.test.ts  |  14 ++-
 .../0059_fn_9037_tasks_source_agent_index.sql      |   3 +
 packages/core/src/postgres/schema-applier.ts       |  12 ++-
 packages/core/src/postgres/schema/project.ts       |   3 +
 packages/core/src/store.ts                         |   8 +-
 .../core/src/task-store/async/async-persistence.ts |  40 ++++++++
 packages/core/src/task-store/reads.ts              |  18 +++-
 packages/core/src/task-store/task-creation.ts      |  10 +-
 .../__tests__/task-recommendation-routes.test.ts   |  38 +++++++-
 .../src/routes/register-task-workflow-routes.ts    |  20 ++--
 14 files changed, 259 insertions(+), 27 deletions(-)

Fusion-Task-Id: FN-9037
Fusion-Task-Lineage: ea44d65c-98cc-4a5b-a116-b3c28f14c292
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-13 17:13:56 -07:00
..
2026-08-13 01:41:54 -07:00
2026-08-13 01:41:54 -07:00