feat(trace): e2e adapter for Pi

Merged
JI
19h ago
+229-52

Part of #3635 (spec issue-3635). Adds a Pi column to the Chainloop Trace end-to-end suite, ahead of Pi support (spec issue-3520).

  • A Pi adapter runs pi -p --mode json --approve with the scenario prompt. The Pi configuration folder (PI_CODING_AGENT_DIR) and the session folder (--session-dir) are next to the workspace, so the extensions, skills, and settings of the user who runs the suite do not load. Skills go in .agents/skills. The Chainloop extension is expected at .pi/extensions/chainloop-trace.ts (D-002 of spec issue-3520).
  • Pi is pinned to 1.3.0 with openrouter/anthropic/claude-haiku-5.5, which needs OPENROUTER_API_KEY.
  • The feature tables get a Pi column. A run against #3547 (the Pi parser) gave an error for each testable cell: chainloop trace init --pi fails with "unknown flag: --pi", because Pi is not registered yet. So each Pi cell is No, the README tells why, and the suite skips the column. When Pi support is added, set the cells to Unknown and run the suite to fill them.
  • Until the suite reads the hidden model context of the Pi extension from the session file, the adapter reports no hook messages, and those checks are "not covered". The adapter cannot remove the session-start hook yet, so the missed-session-start scenario reports an error for Pi.
  • The missed-session-start check now reports "not covered" for a harness that reports no hook messages. Before, it passed.
  • The shared --model flag and the user hook marker are constants.

AI disclosure: Claude Code helped to write this change.