Skip to content

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

Open
Patel230 wants to merge 1 commit into
mainfrom
feat/session-provenance
Open

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

Conversation

@Patel230

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

🤖 Generated with Claude Code

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