Skip to content

fix: key prompt-cache affinity on git root, not cwd - #660

Closed
justrach wants to merge 1 commit into
mainfrom
cursor/cache-affinity-gitroot-280-4ffc
Closed

fix: key prompt-cache affinity on git root, not cwd#660
justrach wants to merge 1 commit into
mainfrom
cursor/cache-affinity-gitroot-280-4ffc

Conversation

@justrach

Copy link
Copy Markdown
Owner

Cherry-pick of #659 onto the 280 rematch tip.

Prompt-cache max was already on. The rematch still paid a cold ~8k on every first call because prompt_cache_key hashed the leaf cwd. Root affinity is now the git root (worktrees + sibling sandboxes share) or graff-scratch when there is no repo.

Prefix bytes still have to match. Children still use role lanes. ADR 0011 updated.

See #659 for the rematch numbers.

Open in Web Open in Cursor 

xAI partitions cache by prompt_cache_key. Hashing the leaf cwd made every
graff-evals sandbox a cold ~8k write (rematch first-call cache 0–512 vs
grok 11k–43k already warm). Seed is the git root so worktrees and sibling
sandboxes share; scratch -p uses graff-scratch. Prefix bytes still have to
match. ADR 0011.
@justrach
justrach marked this pull request as ready for review August 28, 2026 06:34
Base automatically changed from release/v0.0.280 to main August 28, 2026 09:20
@justrach

Copy link
Copy Markdown
Owner Author

280-port of git-root cache affinity already on main. Closing as superseded.

@justrach justrach closed this Aug 31, 2026
@cursor
cursor Bot deleted the cursor/cache-affinity-gitroot-280-4ffc branch August 31, 2026 01:30
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