feat(trace): e2e checks for the remaining Claude Code rows

Merged
JI
3d ago
+620-19

Continues spec issue-3635 (#3635): end-to-end checks for the remaining rows of the Claude Code column.

  • Hook installation and deletion: a scenario with no agent session. The check runs trace init over a hook configuration that already holds a hook of the user, runs it again, and runs trace uninstall. The Chainloop hooks are added once and then deleted, and the hook of the user stays.
  • Trace run wrapper: the agent runs through chainloop trace run --local. The hook configuration is the same after the session, and a generic session is stored.
  • Missed session start: the session-start hook is removed before the session. The session is still recorded and named in the commit trailer.
  • Partial commits: the agent commits two of four AI lines of a file, then the other two. Both commits credit the session.
  • Pasted image pointers: the image goes in a stream-json user message, the same content block as an interactive paste.
  • Media skipped by redaction: the agent reads a PNG whose base64 holds a fake secret. The stored transcript keeps the image unchanged.
  • Generated line counts: reported as "not covered", because neither the user nor the evidence can see them yet.

The suite verified the Claude Code cells of hook installation and deletion, the trace run wrapper, and the missed session start, so these cells are now "Yes". "More than one agent in one repository" needs a second harness and has no check yet.

The "Pasted image pointers" check fails for Claude Code: the inline image stays in the api-request-blob entries of the transcript. This is a product bug, tracked in #3654. The cell stays "Yes" until the fix.

AI disclosure: Claude Code helped to write this change.