Include generated docs in local circuit prompt#60
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 578024bac8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const generatedDocs = await fetchFileContent( | ||
| "https://docs.tscircuit.com/ai.txt", | ||
| ) |
There was a problem hiding this comment.
Avoid hard-failing when generated docs fetch is unavailable
createLocalCircuitPrompt now unconditionally awaits fetchFileContent("https://docs.tscircuit.com/ai.txt"), and fetchFileContent throws on any non-2xx/network error. This makes every local-circuit prompt generation fail whenever that host is transiently down, blocked, or rate-limited, which directly breaks tscircuitCoder and benchmark flows that call this function. Because this is newly introduced external I/O, it should be treated as best-effort (e.g., fallback to empty/cached docs) rather than a hard requirement.
Useful? React with 👍 / 👎.
578024b to
e72d912
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e72d912ac2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const generatedDocs = await fetchFileContent( | ||
| "https://docs.tscircuit.com/ai.txt", | ||
| ) |
There was a problem hiding this comment.
Make generated-docs fetch non-blocking
This new await fetchFileContent("https://docs.tscircuit.com/ai.txt") introduces an additional hard dependency on external network availability, and any timeout/non-2xx now throws and aborts prompt creation instead of falling back; in environments with intermittent egress or docs host outages, user requests fail before model execution. Fresh evidence that this is on the hot path: submitPrompt calls createLocalCircuitPrompt for every prompt (lib/tscircuit-coder/tscircuitCoder.ts:48), so this failure mode impacts normal runtime, not just tests.
Useful? React with 👍 / 👎.
e72d912 to
0cf798e
Compare
|
Addressed the Codex review feedback by making the generated-docs fetch best-effort instead of a hard dependency, with coverage for the unavailable-docs path. CI is green again: test and type-check both pass. |
|
Closing this because the bounty path no longer looks actionable enough to justify maintainer review time. Thanks for the project and previous feedback. |
Summary
/claim #45
Tests