fix(search): preserve query attribution on fused results
Merged
WA
3d ago+53+53+01234567890123456789-6-6-0123456789
Summary
- Preserve original native-query indexes on fused Search results so callers can attribute a document to the searches or folders that returned it.
- Keep the optional metadata in the Search MCP response and generated Assistant contract. Ranking, permissions, pagination and provider requests are unchanged.
Type of Change
- Bug fix
Testing
- Regression assertions failed before each production fix and pass afterward.
- 38 real MCP/DB integration checks and 100 focused application/MCP tests pass.
- Root lint, type-check, all 63 audits, test-type ratchet and full test suite pass.
- Model evaluation and harness corrections are tracked in the companion worker PR. The final evaluation retains one model input/retry failure; no zero-error model claim.
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing (new tests pass the test-audit authoring gate)
- No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Companion: simstudioai/mothership#930