Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/trace/cli/checkpoint/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ type InitialAttribution struct {
TotalLinesChanged int `json:"total_lines_changed"` // Total committed line changes (adds + modifies + removes)
AgentPercentage float64 `json:"agent_percentage"` // (agent_lines + agent_removed) / total_lines_changed * 100
MetricVersion int `json:"metric_version,omitempty"` // 0/absent = legacy (additions-only %), 2 = changed-lines %
BinaryFilesChanged int `json:"binary_files_changed"` // Number of binary files modified
}

// Info provides summary information for listing checkpoints.
Expand Down
9 changes: 8 additions & 1 deletion cmd/trace/cli/investigate/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ func validateFlags(args []string, f runFlags) error {

// newFixSubcommand wires `trace investigate fix [run-id]` to RunFix.
func newFixSubcommand(deps Deps) *cobra.Command {
return &cobra.Command{
var agentName string

cmd := &cobra.Command{
Use: "fix [run-id]",
Short: "Launch a coding agent with a saved investigation as grounded context",
Args: func(_ *cobra.Command, args []string) error {
Expand Down Expand Up @@ -221,6 +223,7 @@ func newFixSubcommand(deps Deps) *cobra.Command {
ErrOut: cmd.ErrOrStderr(),
}, FixDeps{
ManifestStore: store,
FixAgent: agentName,
Launch: launch,
})
// Ctrl+C in the spawned fix agent surfaces as a wrapped
Expand All @@ -233,6 +236,10 @@ func newFixSubcommand(deps Deps) *cobra.Command {
return err
},
}

cmd.Flags().StringVar(&agentName, "agent", "", "Agent to use for fix (default: claude-code)")

return cmd
}

// newShowSubcommand wires `trace investigate show [run-id]` to RunShow.
Expand Down
2 changes: 0 additions & 2 deletions cmd/trace/cli/investigate/fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
// defaultFixAgent is the agent registry name used when FixDeps.FixAgent is
// empty.
//
// TODO: layer on `trace investigate fix --agent <name>` and a settings
// override.
const defaultFixAgent = "claude-code"

// FixDeps collects what RunFix needs that's injectable for tests.
Expand Down
4 changes: 1 addition & 3 deletions cmd/trace/cli/strategy/manual_commit_attribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ func getAllChangedFilesBetweenTreesSlow(ctx context.Context, tree1, tree2 *objec
// which only makes sense for text files.
//
// Uses go-git's IsBinary() which implements git's binary detection algorithm.
//
// TODO: Consider tracking binary file counts separately (e.g., BinaryFilesChanged field)
// to provide visibility into non-text file modifications.
// Binary files are tracked via BinaryFilesChanged in the attribution result.
func getFileContent(tree *object.Tree, path string) string {
if tree == nil {
return ""
Expand Down
Loading