Skip to content

test(e2e): History versioning and revert edge cases - #262

Merged
huyplb merged 1 commit into
mainfrom
cursor/lokee-version-revert-edges-847b
Aug 16, 2026
Merged

test(e2e): History versioning and revert edge cases#262
huyplb merged 1 commit into
mainfrom
cursor/lokee-version-revert-edges-847b

Conversation

@huyplb

@huyplb huyplb commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Adds SQLite e2e edge cases for Lokee versioning and revert. They are not run in this PR — Claude should execute them and fix product or selectors.

Happy path stays in schema-history.test.ts and schema-revert.test.ts. This file pins the contracts from #258 / #261.

Cases

Versioning

  • Unchanged recapture does not add a version (hash pointer reuse)
  • One version ⇒ Compare versions button hidden
  • After v2, Original/Target pickers must not hide graph version nodes
  • Original === Target ⇒ no compare button
  • Opening Compare does not write the live SQLite file
  • Migration SQL uses the real index name (idx_customers_email), not the compare key
  • Historical Target (older version) while live stays on the latest schema

Revert

  • Zero ticks is a no-op (must send objectKeys: [], not undefined / whole schema)
  • Ticking only invoices drops note and leaves customers.phone
  • Lossy plan requires Migration SQL acknowledgement; closing without it leaves v2 on disk
  • Lossy execute: phone and audit gone, Ada’s row survives, history appends v3
  • Pendulum: revert again to Version 2, schema returns, version count grows (never rewrite)

How Claude should run them

# app already on :5173 / :3210
cd apps/e2e
npx vitest run --config vitest.config.ts src/tests/schema-version-revert-edges.test.ts
# or one block:
npx vitest run --config vitest.config.ts src/tests/schema-version-revert-edges.test.ts -t "versioning"
npx vitest run --config vitest.config.ts src/tests/schema-version-revert-edges.test.ts -t "revert scope"
npx vitest run --config vitest.config.ts src/tests/schema-version-revert-edges.test.ts -t "lossy"

Also registered:

  • npm run test:schema-revert / test:schema-revert-edges in apps/e2e
  • run-all.mjs keys schema-revert and schema-revert-edges (edges budget 10 min)

Assert against the SQLite file, not the toast. If empty-tick applies a whole-schema revert, fix VersionCompareModal to pass objectKeys: [] when nothing is ticked.

Open in Web Open in Cursor 

Pin capture reuse, picker vs graph, compare-as-preview, empty-tick
no-op, scoped revert, lossy acknowledgement, and pendulum history.
Do not run these here — Claude should execute and fix product or
selectors. Also register the existing schema-revert suite in run-all.

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
@huyplb
huyplb marked this pull request as ready for review August 16, 2026 23:48
@huyplb
huyplb merged commit 99b2727 into main Aug 16, 2026
10 checks passed
@huyplb
huyplb deleted the cursor/lokee-version-revert-edges-847b branch August 16, 2026 23:48
@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_81286c68-b377-461c-809b-f887042a7984)

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