(t *testing.T)
| 112 | } |
| 113 | |
| 114 | func TestExtractEngineConfigInferredWithoutAwInfo(t *testing.T) { |
| 115 | tmpDir := testutil.TempDir(t, "engine-infer-*") |
| 116 | logContent := `{"type":"result","subtype":"success","num_turns":3,"usage":{"input_tokens":100,"output_tokens":200}}` |
| 117 | require.NoError(t, os.WriteFile(filepath.Join(tmpDir, "agent-stdio.log"), []byte(logContent), 0o644)) |
| 118 | |
| 119 | _, inferredEngineID := inferFallbackLogMetrics(tmpDir) |
| 120 | result := extractEngineConfigWithInferredEngine(tmpDir, inferredEngineID) |
| 121 | require.NotNil(t, result, "Engine config should be inferred when aw_info.json is missing but agent log is available") |
| 122 | assert.NotEmpty(t, result.EngineID, "Inferred engine ID should not be empty") |
| 123 | } |
| 124 | |
| 125 | func TestInferFallbackLogMetricsFindsNestedAgentStdioLog(t *testing.T) { |
| 126 | tmpDir := testutil.TempDir(t, "engine-infer-nested-*") |
nothing calls this directly
no test coverage detected