fix: address review + green CI for trail context injection

main

Commit

dipree3mo ago
  • Track once-per-session injection on session.State (ContextInjectionDecided) instead of a separate .injected marker file. The marker lived in .git/entire-sessions/ and broke integration tests that count dir entries and read stateFiles[0] (it sorted before .json). Removes ClaimContextInjection.
  • Bound NewAuthenticatedAPIClient under the same probe timeout as the HTTP call (it can do /.well-known discovery + token exchange) — Copilot review.
  • Drain the TrailsEnabled response body before close for connection reuse — Copilot review.
  • gofmt inject_test.go (lint).

Entire-Checkpoint: 2df0d7859de4

Checkpoints

Inject Trail Context into Agent Model

PiOpus 4.8
View session
Checkpoint 1