feat(trace): add the Cursor harness to the end-to-end suite
Merged
JI
4d ago+515+515+012345678901234567890123456789-15-15-01234567890123456789
Adds a Cursor harness to the Chainloop Trace end-to-end suite. This is part of milestone 3 of spec issue-3635 (R-003, R-004, R-011). It refs #3635.
e2e/cursor.goruns the Cursor CLI (cursor-agent -p --output-format stream-json --force --trust).HOMEis a folder next to the workspace, so the Cursor configuration and hooks of the user do not load. The Trace hooks read the transcripts from the same folder. The CLI then has no stored login, so a run needsCURSOR_API_KEY.- Cursor runs its shell tool in a login shell. On macOS,
path_helperputs/usr/local/binfirst inPATH, so the git hooks ran an installedchainloop, not the CLI under test. The harness writes shell startup files in itsHOMEthat setPATHback. - A result event with
is_errorfails the run, also when the process exits with status 0. DisableSessionStartremoves thesessionStartentry from.cursor/hooks.json.- The headless Cursor CLI cannot attach a pasted image, so a scenario with images is an error. The pasted image cell of Cursor is No, so the suite skips that scenario.
- The Cursor output does not show the hook messages, so the hook message checks are "not covered" (R-004).
- The suite config pins Cursor
2026.10.19-6bbf2c4with theautomodel, which is the only model of a free plan. In auto mode no output names the model, so the model name check is "not covered" for anautosession. - The Cursor cells of the feature tables come from a suite run: hook installation and deletion, the Trace run wrapper, and the spec source role, title, and description are Yes. Media skipped by redaction stays Unknown: the Cursor transcript holds no tool outputs, but a pasted image stays inline in it, and the headless CLI cannot attach an image to check it. The Cursor CLI sends the shell hooks, so the "Cursor IDE only" notes are removed.
This PR was written with the help of Claude Code.