Skip to content

feat(session): persist review and investigation provenance#43

Merged
Patel230 merged 1 commit into
mainfrom
feat/session-provenance
Jun 24, 2026
Merged

feat(session): persist review and investigation provenance#43
Patel230 merged 1 commit into
mainfrom
feat/session-provenance

Conversation

@Patel230

@Patel230 Patel230 commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds Kind, ReviewSkills, ReviewPrompt, InvestigateRunID, and InvestigateTopic fields to WriteCommittedOptions and CommittedMetadata, so committed checkpoints carry session-purpose context
  • Wires provenance fields through both GitStore (v1) and V2GitStore write paths, and through ManualCommitStrategy.CondenseSession
  • Adds KindAgentInvestigate session kind and Kind.IsInvestigation() alongside the existing KindAgentReview
  • Adds applyProvenanceEnvToState in manual_commit_hooks_3.go to read env vars set by trace investigate and stamp the running session state
  • Test helpers: SimulateUserPromptSubmitWithReviewEnvVars, TestEnv.WriteSettings, composeReviewPromptForTest; GitCheckoutBranch hardened with Force: true

Test plan

  • go test ./cli/checkpoint/... ./cli/strategy/... ./cli/session/... passes
  • go test ./cli/integration_test/... -race passes
  • Commit a session with TRACE_REVIEW_SESSION=1 set and confirm CommittedMetadata.Kind == "agent_review" in the written JSON
  • Commit a session with TRACE_INVESTIGATE_SESSION=1 set and confirm Kind == "agent_investigate" and InvestigateTopic is populated

@Patel230 Patel230 force-pushed the feat/session-provenance branch from ab0d17c to 3bb1566 Compare June 24, 2026 13:09
@Patel230 Patel230 merged commit 458ae77 into main Jun 24, 2026
12 checks passed
@Patel230 Patel230 deleted the feat/session-provenance branch June 24, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant