Route GET /api/search and prove the harvest end-to-end#102
Merged
jpr5 merged 2 commits intoJun 10, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /api/searchon the server (registered with the atlas ratification routes, behind the sameANALYTICS_TOKENbearer auth): lexical search over the indexed corpus viatextSearchChunks, response shape exactly matching the pinnedAtlasHttpClientSearchHitcontract ({hits:[{id,content,sourceUrl,title,sourceName,score}]},hitsalways present).textrequired (400atlas_search_text_required),limitviaparseLimitOrError(default 50, max 200), emptysourcetreated as absent, and array-shapedtext/sourcerejected with the analytics 400 envelope instead of silently dropping the filter.AtlasHttpClient. Red (pre-route):rag-dedup probe failed 5 consecutive times … HTTP 404: Cannot GET /api/search. Green: 5 fragments → 5 candidates → 5 pending upserts, liverag-corpus-overlap:annotation invalidated_against+fused_from, zero swallowed probe failures.type: atlassource block is a Step-6 prerequisite (reindex 400sunknown_sourceotherwise); stale "unrouted endpoint" caveats swept now that the route is live.Test plan
tsc --noEmit+tsc -p tsconfig.scripts.json --noEmitcleanCR record
7-agent review round → 1 fix round (array-param hardening, README ordering, test pins) → 7-agent byte-identical confirmation round → triage: CONVERGED, zero new behavioral findings; review rulings pinned in comments.
Follow-ups (pre-existing, out of scope)
shutdown()exits 0 on fatal server errors (e.g. EADDRINUSE) — defeats supervisor restart policies (triple-flagged)AtlasHttpClienthas no request timeout/AbortSignalerror/analytics+/api/analytics/auth-modecall config readers unguarded