Repository navigation
fix: harden diff cache, readiness probes, and OpenAI reasoning effort - #219
Conversation
There was a problem hiding this comment.
Codra Review
✅ Nothing to flag. Reviewed 17 files (931 changed lines) and found no issues worth raising.
Note
1 candidate did not survive the evidence and claim gates — see the dashboard for what was dropped and why.
Reviewed commit: 767f6929cb
ℹ️ About Codra in GitHub
Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:
- Open a pull request for review
- Mark a draft as ready
Every review posts a summary here. A clean pass also gets a 👍 on the pull request itself.
- core(review): deduplicate diff cache helper, cache empty diffs via != null, validate commit SHAs, and add PR-context JSDoc note (#181 / PR #203) - api/node/worker: bypass Hyperdrive SQL caching via SELECT clock_timestamp(), fail fast on disconnected Redis via PING_REDIS, coalesce in-flight probes, suppress late rejections, preserve logger requestId on health probe warnings, and add adapter wiring tests + K8s timeoutSeconds docs (#173 / PR #202) - models/schema: guard non-finite/negative thinkingBudget, exclude o1-mini/o1-preview from reasoning_effort, simplify Zod schema, and consolidate OpenAI tests with real schema parsing (#177 / PR #201)
767f692 to
a868690
Compare
There was a problem hiding this comment.
Codra Review
✅ Nothing to flag. Reviewed 17 files (937 changed lines) and found no issues worth raising.
Note
1 candidate did not survive the evidence and claim gates — see the dashboard for what was dropped and why.
Reviewed commit: a86869055e
ℹ️ About Codra in GitHub
Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:
- Open a pull request for review
- Mark a draft as ready
Every review posts a summary here. A clean pass also gets a 👍 on the pull request itself.
Summary
Follow-up hardening and review-feedback fixes for merged PRs #201 (#177), #202 (#173), and #203 (#181):
Diff Cache (#203 / #181)
getOrFetchCachedDiffhelper inpackages/core/src/review/diff-cache.tsusingcached != nullso empty diffs ("") cache properly instead of re-fetching on every call.!previousCommitSha?.trim() || !newHeadSha?.trim()) ingetIncrementalDiffFilesand document PR-level context responsibilities (PR title, description, suppressed findings) in JSDoc.skippedcount assertions intest/review/diff-cache.spec.ts.Readiness Probe & Observability (#202 / #173)
apps/worker/src/api-deps.ts(SELECT clock_timestamp()to bypass Hyperdrive SQL caching +APP_KV.get) andapps/node/src/api-deps.ts/apps/node/src/index.ts(PING_REDIScheckingredisClient.status === "ready"beforeping()to preventioredisoffline-queue buildup, withWeakMapprobe memoization).activeProbesWeakMap),ProbeTimeoutErrorclassification,.unref?.()timer cleanup, and late-rejection suppression inpackages/api/src/routes/health.ts.logger.runWithContext(...)active inpackages/api/src/middleware/observability.tswhile suppressinginfoaccess logs for exactGET/HEADrequests to/healthand/health/ready, preservingrequestIdon failure warnings.docs/docker.mdx(timeoutSeconds: 3, explicitlivenessProbevsreadinessProbe, Docker restart behavior note) anddocs/nodejs.mdx.Cache-Control: no-storetests intest/health-ready.spec.ts.OpenAI Reasoning Effort & Model Profiles (#201 / #177)
reasoningEffortForagainst non-finite/negative numeric values, excludeo1-mini/o1-previewfrom receivingreasoning_effort, and spread declaratively inpackages/models/src/providers/openai.ts.ModelSamplingConfigSchema.thinkingBudgetwithz.enum(...)inpackages/schema/src/schema-model-registry.tsand document Gemini fallback behavior inprofile-sampling.ts.packages/models/test/providers/openai.test.tsusingModelProfileSchema.parseandModelRegistryServicespies (removingtest/openai-reasoning-effort.spec.ts).