8000 Run cache can return a stale result when a Connection is reconfigured in place by kiran-brahma · Pull Request #74 · kiran-brahma/writing-tool · GitHub
[go: up one dir, main page]

Skip to content

Run cache can return a stale result when a Connection is reconfigured in place - #74

Merged
kiran-brahma merged 1 commit into
v1.3from
v1.3-45
Sep 26, 2026
Merged

kiran-brahma merged 1 commit into
v1.3from
v1.3-45

Conversation

@kiran-brahma
Copy link
Copy Markdown
Owner

Closes #45.

A Connection's output ceiling, reasoning effort and extra headers now join the Run cache key alongside Protocol and base URL. The extra headers are hashed as entries sorted by code unit, so the same headers in a different insertion order still hit. Hashing also keeps any header value, which could be a credential, out of the stored key. RunCacheRecord is unchanged, so there is no Dexie migration.

Acceptance criteria

  • maxOutputTokens added to RunCacheKeyInput and to the key array. Verified by src/core/runCache.test.ts ("misses when the output ceiling changes").
  • reasoningEffort added to RunCacheKeyInput and to the key array. Verified by "misses when reasoning effort changes".
  • extraHeaders added and hashed in a stable order rather than by JSON.stringify key order. Verified by "misses when an extra header is added, changed or removed" and "hits for the same extra headers in a different insertion order".
  • runModelPassNow passes the Connection's three settings through. Verified at the seam in src/storage/modelRuns.test.ts, where a Connection reconfigured in place makes a fresh Provider request.
  • The doc comment on RunCacheKeyInput and runCacheKey now matches what the code does.
  • pnpm test (1002 passed), pnpm typecheck, pnpm run gates and pnpm build all pass.

No visual criteria.

🤖 Generated with Claude Code


Generated by Claude Code

A Connection's output ceiling, reasoning effort and extra headers are
edited in place under the same id and all reach the wire, but none was
in the Run cache key, so a re-run after changing one returned the
previous Findings without a Provider call. All three now join the key;
the extra headers are hashed as sorted entries so insertion order
cannot cause a miss and no header value is stored in the key.

Closes #45.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Sep 26, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-26T09:37:00.646812Z fe2c006 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0