Skip to content

[WRONG BRANCH] fix(cursor): bind ref-less prefix checkpoints to conversation id - #325

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-cursor-checkpoint-vulnerability
Draft

[WRONG BRANCH] fix(cursor): bind ref-less prefix checkpoints to conversation id#325
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-cursor-checkpoint-vulnerability

Conversation

@luvs01

@luvs01 luvs01 commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Prevent ref-less checkpoint reuse from importing prior ConversationStateStructure into an unrelated chat when a unique message prefix exists, which could leak or influence model-visible prior assistant state across conversations.

Description

  • Require the checkpoint's recorded conversationId to match the active request before accepting a ref-less prefix match by adding a conversationId parameter to getCursorCheckpointForPrefix and checking it during lookup (src/adapters/cursor/checkpoint-store.ts).
  • Pass the active request.conversationId into the prefix lookup path and keep the conversation-lineage gate after resolution (src/adapters/cursor/request-builder.ts).
  • Tighten the conversation-change invalidation so ref-less and explicit-ref paths both enforce conversation affinity where appropriate (src/adapters/cursor/request-builder.ts).
  • Update tests to reflect isolation semantics (isolated helper turns must not inherit parent checkpoints) and add a regression that proves a unique covered-prefix cannot be reused across distinct Cursor conversations (tests/cursor-request-builder.test.ts).

Testing

  • Ran focused unit tests: bun test tests/cursor-request-builder.test.ts — all tests passed (44 passed, 0 failed).
  • Ran static checks: bun run typecheck — success; bun run privacy:scan — success.
  • Ran the full repository test suite: bun run test — the changed Cursor-focused tests passed within the full run, but the complete suite reported unrelated failures in other subsystems (environment/service/timing-sensitive tests); these failures are outside the Cursor changes and were not caused by this fix.

Codex Task

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1e5b0b4d-c989-4718-95c4-714645fe9a59


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 23, 2026
@github-actions github-actions Bot changed the title fix(cursor): bind ref-less prefix checkpoints to conversation id [WRONG BRANCH] fix(cursor): bind ref-less prefix checkpoints to conversation id Aug 23, 2026
@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft August 23, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant