Repository navigation
feat(effect-ai): integration, catalog sweep and release readiness (phase 8) - #99
Conversation
…nse and decisions
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc7e5f5a81
ℹ️ 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".
…type keys in exact mode only
Merge activity
|

Summary
Phase 8 of
packages/foundry-effect-ai/docs/PLAN.md: integration and release readiness, plus the reviewer's handoff items.src/internal/notImplemented.tsis deleted; no stub paths remain, andtest/matrix.tshas no todos (62 contract tests). Tree-shaking budgets are re-measured at measured size plus about 20%, and a module without a budget now fails instead of falling back to 64 kB.LIVE_MODELSfor the Effect live suite, as inpackages/foundry-ai:all, provider names or catalog IDs; an unknown token fails. Unset, the run is unchanged (50 cases on the default models). Each language cell file exportscellsFor(model), which runs the shared cells with that model's settings: adaptive thinking (withdisplay: 'summarized') or a budget for Claude, no reasoning settings for non-reasoning models, and noeffortfor Grok 4.20 reasoning. A sweep never records, andFOUNDRY_RECORDwithLIVE_MODELSfails. Vitest 5 joins suite and test with>for-t, which the docs now show.transformClientsees failures (review item 1).HttpClient.filterStatusOkruns on the authorized client beforetransformClient, as upstreamOpenAiClientdoes, so retries and taps see 429 and 5xx.sendstill checks the final status, so a transform that hands back a failed response gets the mapped error rather than a decoded body. The contract-onlytransform-clientcell covers both:HttpClient.retryover a synthetic 503 then 200 makes two requests and succeeds, and a pass-through transform's 400 failsjsonandssewithInvalidRequestError. Each half failed before its fix.transformClientasStatusCodeError, andwriteFixturesrefuses an empty recording. Re-recordingerror-mappingagainst Foundry kept all eight responses with identical bodies and added their golden requests, which the old fixture lacked.src/internal/metadata.tsaugmentseffect/ai/AiError(rate limit, quota, authentication, invalid request, internal provider, unknown),Responsepart metadata,Promptpart options andDecideResponseMetadata. Only our keys are added (foundryandfoundry-<vendor>), and each is declared once.FoundryClientimports the file, so every public module's emitted.d.tscarries it. The keys are typed underexactOptionalPropertyTypesonly: a conditional base adds nothing without the flag, because an optional key would then admitundefined, which Effect's JSON index signatures reject (TS2411).test/types.tsasserts the typed reads. The tree-shaking consumer typecheck now runs in both modes: every module alone and all eight together, plus typed reads in exact mode. Removing the conditional base fails the non-exact run with TS2411; removing the import fails the typed reads.optionalHeadersis gone;setHeadersdrops undefined values.jsonstill builds its decoder per call: callers pass the schema per call, so caching it isn't a trivial change, and the inner parser is already memoized.{ code, error: "<message>" }; the message was dropped. Regression fixture recorded from the live 400.display: 'summarized' | 'omitted'. Opus 4.7 and later, Claude 5 and 5.5 omit thinking text without it, and they reject budget thinking.effort.retryTransientcovers 408, 429, 500, 502, 503 and 504. Newdocs/README.mdwith the sweep tables, the Foundry quirks the adapters handle, and what's out of scope. PLAN.md is marked done and kept as the design record. The root README no longer says "in development".Sweep results
LIVE_MODELS=all pnpm run test:live:effect: 600 cases, 515 passed on the first run. After isolated reruns of every failure, plus a full Anthropic re-sweep and Grok 4.20 reruns on the final settings, 539 of 600 pass. All 61 remaining failures are outside the adapter:reasoning_effort: 'none'. Adding them to the'none'flag was tried, didn't help, and was reverted.grok-build-0-1on this account.helloprompt.Embeddings (3 models), decisions (GPT-6 Luna) and the transport cells all pass. Full tables are in
packages/foundry-effect-ai/docs/README.md.Checks
pnpm run verifypasses.pnpm run test:live:effecton the defaults: 48 of 50 passed. GPT-6 Lunareasoning(empty summary) and Grok 4.6json-tools(skipped the tool) are the known flakes; both passed on an isolated rerun.Notes for review
exactOptionalPropertyTypes, our metadata keys read as plain JSON; consumers need no compiler flag to build.pnpm run release foundry-effect-ai), npm and merging.