pnpm test currently fails locally in apps/gateway/src/__tests__/cross-user-isolation.test.ts because local PostgreSQL is reachable but missing the messages table during cleanup; changed query-source tests pass.
## Summary
- add QuerySourceService for `local`, `federated:<host>`, and `all` list routing
- fan out `all` to local + active outbound peers in parallel, merge rows, and tag `_source`
- return `_partial: true` for per-peer failures; mark all-source cursor responses partial/truncated
- export/register QuerySourceService in FederationModule
Refs #462
## Verification
- `pnpm typecheck` — PASS
- `pnpm lint` — PASS
- `pnpm format:check` — PASS
- `pnpm --filter @mosaicstack/gateway test -- query-source.service.spec.ts` — PASS (7 tests)
- `~/.config/mosaic/tools/codex/codex-code-review.sh --uncommitted` — PASS after remediation
- `~/.config/mosaic/tools/codex/codex-security-review.sh --uncommitted` — PASS
## Note
- `pnpm test` currently fails locally in `apps/gateway/src/__tests__/cross-user-isolation.test.ts` because local PostgreSQL is reachable but missing the `messages` table during cleanup; changed query-source tests pass.
RETROACTIVE REVIEW-OF-RECORD — APPROVE ON MERITS (#673 FED-M3-09 query-source). Verified source=all fan-out routes remote calls by peer.id, local rows are tagged _source=local, remote rows are tagged with peer commonName, per-peer failures return _partial:true without hard-failing successful sources, and cursor/truncation becomes partial/truncated rather than a misleading single cursor. Reviewer verification: query-source.service.spec 7/7 pass; gateway typecheck/lint pass; formatting check pass; PR CI was green at review time.
RETROACTIVE REVIEW-OF-RECORD — APPROVE ON MERITS (#673 FED-M3-09 query-source). Verified source=all fan-out routes remote calls by peer.id, local rows are tagged _source=local, remote rows are tagged with peer commonName, per-peer failures return _partial:true without hard-failing successful sources, and cursor/truncation becomes partial/truncated rather than a misleading single cursor. Reviewer verification: query-source.service.spec 7/7 pass; gateway typecheck/lint pass; formatting check pass; PR CI was green at review time.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
local,federated:<host>, andalllist routingallto local + active outbound peers in parallel, merge rows, and tag_source_partial: truefor per-peer failures; mark all-source cursor responses partial/truncatedRefs #462
Verification
pnpm typecheck— PASSpnpm lint— PASSpnpm format:check— PASSpnpm --filter @mosaicstack/gateway test -- query-source.service.spec.ts— PASS (7 tests)~/.config/mosaic/tools/codex/codex-code-review.sh --uncommitted— PASS after remediation~/.config/mosaic/tools/codex/codex-security-review.sh --uncommitted— PASSNote
pnpm testcurrently fails locally inapps/gateway/src/__tests__/cross-user-isolation.test.tsbecause local PostgreSQL is reachable but missing themessagestable during cleanup; changed query-source tests pass.RETROACTIVE REVIEW-OF-RECORD — APPROVE ON MERITS (#673 FED-M3-09 query-source). Verified source=all fan-out routes remote calls by peer.id, local rows are tagged _source=local, remote rows are tagged with peer commonName, per-peer failures return _partial:true without hard-failing successful sources, and cursor/truncation becomes partial/truncated rather than a misleading single cursor. Reviewer verification: query-source.service.spec 7/7 pass; gateway typecheck/lint pass; formatting check pass; PR CI was green at review time.