cli: restore coverage that rode out with deleted dead wrappers · Entire
cli: restore coverage that rode out with deleted dead wrappers
7659dbb→main· Soph·2w ago·2 files·+399 added/-0 removed
Review feedback on the dead-code sweep: two deletions took the only tests of live logic with them.
- factoryaidroid: the six subagent-aggregation tests only exercised the dead path-based twins, but the logic lives on in CalculateTotalTokenUsageFromBytes/ExtractAllModifiedFilesFromBytes — the production path via lifecycle.go, and Droid isn't in the CI canary. Retarget them at the FromBytes entry points: per-checkpoint offset math, the APICallCount>0 subagent gate, cross-agent file dedup, and missing-transcript tolerance are asserted again.
- explain: the three default-view tests only drove the deleted runExplainDefault wrappers, leaving runExplainBranchWithFilter — the real branch soph/deslop checkpoints 114
Sessions
93a786da9959View transcript
Changes
2
- cmd/entire/cli
- agent/factoryaidroid
- Mtranscript_test.go+306
- Mexplain_test.go+93
- agent/factoryaidroid
func makeEditToolLine(t *testing.T, id, filePath string) string {
t.Helper()
return makeFileToolLine(t, "Edit", id, filePath)
}
func makeTaskToolUseLine(t *testing.T, id, toolUseID string) string {
t.Helper()
innerMsg := mustMarshal(t, map[string]interface{}{
"role": "assistant",
"content": []map[string]interface{}{
{
"type": "tool_use",
"id": toolUseID,
"name": "Task",
"input": map[string]string{"prompt": "do something"},
},
},
})
line := mustMarshal(t, map[string]interface{}{
"type": "message",
"id": id,
"message": json.RawMessage(innerMsg),
})
return string(line)
}
// Example of usage in tests
func TestCalculateTotalTokenUsageFromBytes_PerCheckpoint(t *testing.T) {
t.Parallel()
// Function body
}
// More tests follow...
// Additional test functions as written above
Multiple sub tests managing JSONL data handling and file modifications follow in the original body.