You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multi-agent review of the docs/ VFS change. Applied the behavior-preserving
fixes plus two agent-facing bugs that made real pages unreadable.
- docs read no longer hard-fails on oversized pages. Six+ live integration
references exceed the inline cap (github.mdx is 354KB, sportmonks 513KB),
so a plain read of them ALWAYS failed and cost a second fetch to recover.
Truncate to the largest whole-line prefix that fits, keep the true
totalLines, and tell the model how to page. An explicit offset/limit that
still overflows is still an error — that one is a caller mistake.
- classify docs fetch failures. Everything collapsed to null, so a permanent
404 was reported to the agent as "temporarily unavailable, retry shortly",
inviting a retry loop on a page that will never exist. 4xx (except 429) is
now permanent and says so; 5xx/429/network/timeout keep the retry wording.
- register search_documentation as a transitional alias for search_docs.
sim and mothership deploy independently and the rename deleted the old id
on both sides, so BOTH deploy orders broke docs lookup for the window
between them. Old params are a subset of the new. Remove once both ship.
- extract the index-page fold (X/index.mdx <-> X.mdx) into docs-path.ts. It
was re-derived in three places — the manifest generator, the
source_document reverse mapping, and the search scope filter — which is
the hand-synced-duplicate shape that has drifted in this repo before.
- grepDocsPage now goes through grepReadResult, the primitive files/ and
uploads/ grep already use, instead of calling grep directly.
- couldMatchDocsScope delegates to isDocsPath; the bodies were identical.
- drop the dead 'docs' member from AgentContextType.
Tests: 404-vs-5xx-vs-429 classification, network failure, and a docs-path
round-trip asserting one source candidate reproduces every manifest entry.
Verified: tsc clean, 932 copilot tests, biome clean, docs-manifest:check,
check:utils and check:api-validation:strict both pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`Docs page not found: ${path}. Use glob("docs/**") to list the docs corpus.`
145
153
)
146
154
}
147
-
constcontent=awaitfetchDocsPage(key)
148
-
if(content===null){
155
+
constresult=awaitfetchDocsPage(key)
156
+
if(result.outcome==='missing'){
157
+
thrownewDocsCorpusError(
158
+
`${key} is in the docs index but ${DOCS_BASE_URL} does not serve it — the page was likely moved or removed. Use glob("docs/**") to find the current path; retrying will not help.`
159
+
)
160
+
}
161
+
if(result.outcome==='unavailable'){
149
162
thrownewDocsCorpusError(
150
163
`Could not load ${key} from ${DOCS_BASE_URL} — the docs site is temporarily unavailable. Retry shortly.`
0 commit comments