feat(#462): add federation query source routing #673
Reference in New Issue
Block a user
Delete Branch "feat/federation-m3-query-source"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.