feat(trace): check net contribution, session updates and rewrites end to end

Merged
JI
1d ago
+469-14

Closes three suite gaps of the Chainloop Trace end-to-end suite (spec issue-3635, R-002, R-005, R-011). The Net contribution, Session updates, and Renames and rewrites rows now have registered checks. It refs #3635.

  • A scenario can run the git commands of a human after the agent session (FollowUp), then push again. The runner reads the session that the last push stored.
  • A scenario can work on a branch (Branch), which the workspace creates from main and pushes before the session. The push reads only the commits that are not on the default branch of the remote, so a second push finds the session commits only on another branch.
  • human-update: a human commit replaces one of the three AI lines. Net contribution checks 2 AI lines, 1 human line, and the file still created. Session updates checks that the human commit is in the commit list of the session and that the replacing line is human.
  • amend: a human adds a line to the pushed session commit and force-pushes. The session follows the amended commit, with 3 AI lines and 1 human line.
  • rename: the agent commits with no push, and a human renames the file in a second commit, then pushes both. The 3 lines stay AI lines.
  • The README documents two limits that the suite found:
    • A session commit that is already on the default branch of the remote is not read again, so a later commit does not update the session.
    • A rename inside an amend or a squash of the session commit loses the AI lines. This goes against spec issue-3639 R-007, which says that attribution must survive a rename and an amend. This PR documents the gap and does not change Trace.

No cell value changes.

This PR was written with the help of Claude Code.