forked from Dicklesworthstone/pi_agent_rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoverage-baseline-map.json
More file actions
356 lines (356 loc) · 13.7 KB
/
coverage-baseline-map.json
File metadata and controls
356 lines (356 loc) · 13.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
{
"schema": "pi.qa.coverage_baseline.v1",
"bead_id": "bd-1f42.8.1",
"status": "complete_with_partial_branch",
"generated_at": "2026-02-14T14:00:00Z",
"workspace": "/data/projects/pi_agent_rust",
"collection": {
"status": "partial_branch_via_per_file_export",
"blockers": [
"llvm-cov export SIGSEGV when processing branch coverage for all files at once (LLVM 22.1.0, nightly-2026-02-13). Root cause: upstream LLVM bug triggered by large coverage maps with branch instrumentation.",
"44 of 107 source files individually trigger SIGSEGV during branch export; 63 files export branch data successfully."
],
"workaround": "Per-file llvm-cov export with -sources flag. Files that SIGSEGV individually are excluded from branch totals and use line/function-only fallback. Branch instrumentation is enabled via cargo llvm-cov --branch, and the profdata is generated with branch counters; only the export phase crashes for certain files.",
"deterministic_command_path": [
"Step 1: Build with branch instrumentation: CARGO_TARGET_DIR=/data/tmp/pi_agent_rust/cov cargo llvm-cov --lib --branch --ignore-run-fail --no-report",
"Step 2: For each src/*.rs file, run: llvm-cov export -format=text -instr-profile=PROFDATA -object OBJECT -sources FILE -summary-only",
"Step 3: Files that exit 0 have real branch metrics; files that exit 139 (SIGSEGV) use line/function from non-branch run",
"Step 4: Merge per-file summaries into combined baseline JSON"
],
"successful_branch_command": "Per-file: llvm-cov export -format=text -instr-profile=$PROFDATA -object $OBJECT -sources $FILE -summary-only",
"successful_nonbranch_command": "CARGO_TARGET_DIR=/data/tmp/pi_agent_rust/cov_nobranch cargo llvm-cov --lib --json --summary-only --output-path cov_nobranch_result.json --ignore-run-fail",
"artifacts": {
"branch_ok_files_json": "target/branch_coverage_ok_files.json",
"nobranch_full_json": "target/cov_nobranch_result.json",
"merged_summary_json": "target/merged_coverage.json"
},
"branch_file_compatibility": {
"ok_count": 63,
"sigsegv_count": 44,
"sigsegv_files": [
"src/agent.rs", "src/bin/*.rs", "src/buffer_shim.rs", "src/connectors/http.rs",
"src/extension_dispatcher.rs", "src/extension_tools.rs", "src/http/*.rs",
"src/http_shim.rs", "src/interactive/ext_session.rs", "src/lib.rs", "src/main.rs",
"src/providers/anthropic.rs", "src/providers/azure.rs", "src/providers/bedrock.rs",
"src/providers/cohere.rs", "src/providers/gemini.rs", "src/providers/gitlab.rs",
"src/providers/openai.rs", "src/providers/openai_responses.rs", "src/providers/vertex.rs",
"src/rpc.rs", "src/session.rs", "src/session_sqlite.rs", "src/tools.rs"
]
}
},
"summary": {
"line_pct": 79.08,
"branch_pct": 51.95,
"function_pct": 78.01,
"region_pct": 78.32,
"line_count": 121018,
"covered_line_count": 95706,
"uncovered_line_count": 25312,
"function_count": 10954,
"covered_function_count": 8545,
"uncovered_function_count": 2409,
"branch_count": 7984,
"covered_branch_count": 4148,
"branch_measurable_files": 63,
"branch_sigsegv_files": 44,
"notes": "Branch metrics are real measurements from 63 of 107 source files via per-file llvm-cov export workaround. The remaining 44 files trigger SIGSEGV in llvm-cov export and are excluded from branch totals (line/function still measured). Branch coverage of 51.95% represents a lower bound since unmeasurable files are not counted."
},
"critical_paths": [
{
"area": "agent_loop",
"paths": [
"src/agent.rs"
],
"coverage": {
"line_pct": 79.57,
"branch_pct": 0.0,
"function_pct": 74.76,
"line_count": 3094,
"covered_line_count": 2462,
"uncovered_line_count": 632,
"function_count": 317,
"covered_function_count": 237,
"uncovered_function_count": 80,
"branch_count": 0,
"covered_branch_count": 0
},
"status": "baseline_captured_branch_sigsegv",
"branch_note": "src/agent.rs triggers SIGSEGV in llvm-cov export; branch metrics unavailable (numeric fallback values emitted as 0)"
},
{
"area": "tools",
"paths": [
"src/tools.rs"
],
"coverage": {
"line_pct": 78.99,
"branch_pct": 0.0,
"function_pct": 76.90,
"line_count": 3032,
"covered_line_count": 2395,
"uncovered_line_count": 637,
"function_count": 407,
"covered_function_count": 313,
"uncovered_function_count": 94,
"branch_count": 0,
"covered_branch_count": 0
},
"status": "baseline_captured_branch_sigsegv",
"branch_note": "src/tools.rs triggers SIGSEGV in llvm-cov export; branch metrics unavailable (numeric fallback values emitted as 0)"
},
{
"area": "providers",
"paths": [
"src/provider.rs",
"src/providers/*.rs",
"src/providers/mod.rs"
],
"coverage": {
"line_pct": 86.34,
"branch_pct": 69.0,
"function_pct": 83.31,
"line_count": 8949,
"covered_line_count": 7727,
"uncovered_line_count": 1222,
"function_count": 761,
"covered_function_count": 634,
"uncovered_function_count": 127,
"branch_count": 116,
"covered_branch_count": 80
},
"status": "baseline_captured_partial_branch",
"branch_note": "Branch data from src/provider.rs, src/providers/mod.rs, src/providers/copilot.rs only. Other provider files (anthropic, openai, gemini, cohere, azure, bedrock, gitlab, vertex, openai_responses) trigger SIGSEGV."
},
{
"area": "session",
"paths": [
"src/session.rs"
],
"coverage": {
"line_pct": 80.50,
"branch_pct": 0.0,
"function_pct": 77.88,
"line_count": 2882,
"covered_line_count": 2320,
"uncovered_line_count": 562,
"function_count": 330,
"covered_function_count": 257,
"uncovered_function_count": 73,
"branch_count": 0,
"covered_branch_count": 0
},
"status": "baseline_captured_branch_sigsegv",
"branch_note": "src/session.rs triggers SIGSEGV in llvm-cov export; branch metrics unavailable (numeric fallback values emitted as 0)"
},
{
"area": "extensions",
"paths": [
"src/extensions.rs",
"src/extension_dispatcher.rs",
"src/extensions_js.rs"
],
"coverage": {
"line_pct": 82.53,
"branch_pct": 57.35,
"function_pct": 73.53,
"line_count": 38663,
"covered_line_count": 31913,
"uncovered_line_count": 6750,
"function_count": 2293,
"covered_function_count": 1686,
"uncovered_function_count": 607,
"branch_count": 2722,
"covered_branch_count": 1561
},
"status": "baseline_captured_partial_branch",
"branch_note": "Branch data from src/extensions.rs and src/extensions_js.rs. src/extension_dispatcher.rs triggers SIGSEGV."
}
],
"critical_gap_matrix": [
{
"area": "agent_loop",
"current": {
"line_pct": 79.57336780866193,
"function_pct": 74.76340694006309
},
"target": {
"line_pct": 85.0,
"function_pct": 80.0
},
"delta_to_target": {
"line_pct": 5.42663219133807,
"function_pct": 5.23659305993691
},
"blocker": "Abort/retry/interrupt control-flow paths remain under-covered; branch-depth signal is still blocked by llvm-cov branch-summary SIGSEGV.",
"owning_bead_id": "bd-1f42.8.4.1"
},
{
"area": "tools",
"current": {
"line_pct": 78.99076517150395,
"function_pct": 76.90417690417691
},
"target": {
"line_pct": 85.0,
"function_pct": 82.0
},
"delta_to_target": {
"line_pct": 6.00923482849605,
"function_pct": 5.09582309582309
},
"blocker": "Tool error-path and threshold contract cases are still incomplete; branch-depth signal is blocked by llvm-cov branch-summary SIGSEGV.",
"owning_bead_id": "bd-1f42.8.4.1"
},
{
"area": "providers",
"current": {
"line_pct": 86.34484299921779,
"function_pct": 83.311432325887
},
"target": {
"line_pct": 90.0,
"function_pct": 88.0
},
"delta_to_target": {
"line_pct": 3.6551570007822096,
"function_pct": 4.688567674113001
},
"blocker": "Provider routing and adapter coverage still misses key normalization/auth permutations across provider families.",
"owning_bead_id": "bd-1f42.8.4.2"
},
{
"area": "session",
"current": {
"line_pct": 80.49965301873699,
"function_pct": 77.87878787878788
},
"target": {
"line_pct": 85.0,
"function_pct": 82.0
},
"delta_to_target": {
"line_pct": 4.500346981263014,
"function_pct": 4.121212121212125
},
"blocker": "Interruption/replay/index recovery paths remain shallow relative to target threshold depth.",
"owning_bead_id": "bd-1f42.8.4.2"
},
{
"area": "extensions",
"current": {
"line_pct": 85.01170219495224,
"function_pct": 73.5281290885303
},
"target": {
"line_pct": 88.0,
"function_pct": 80.0
},
"delta_to_target": {
"line_pct": 2.988297805047758,
"function_pct": 6.471870911469704
},
"blocker": "Dispatcher/runtime/JS bridge has the largest remaining uncovered function surface and needs targeted non-mock expansion.",
"owning_bead_id": "bd-1f42.8.4.3"
}
],
"risk_ranked_gap_backlog": [
{
"rank": 1,
"gap": "Extensions critical-path function coverage deficit",
"severity": "critical",
"impact": "Largest uncovered surface in extension runtime increases risk of regressions in policy gating, host-call dispatch, and JS bridge behavior.",
"reproducibility": "high",
"target_test_type": "extension_fixtures+conformance+integration",
"evidence": {
"critical_path": "extensions",
"uncovered_line_count": 4739,
"uncovered_function_count": 607
},
"mapped_issue_id": "bd-1f42.8.4.3"
},
{
"rank": 2,
"gap": "Provider routing and adapter baseline gaps",
"severity": "high",
"impact": "Provider regressions can break model routing, auth handling, and tool-call normalization across integrations.",
"reproducibility": "high",
"target_test_type": "contract+conformance+smoke_e2e",
"evidence": {
"critical_path": "providers",
"uncovered_line_count": 1222,
"uncovered_function_count": 127
},
"mapped_issue_id": "bd-1f42.8.4.2"
},
{
"rank": 3,
"gap": "Agent loop orchestration uncovered branches of control flow",
"severity": "high",
"impact": "Missed abort/retry/interrupt paths can cause incorrect run termination and tool lifecycle inconsistencies.",
"reproducibility": "medium",
"target_test_type": "scenario_e2e+soak",
"evidence": {
"critical_path": "agent_loop",
"uncovered_line_count": 632,
"uncovered_function_count": 80
},
"mapped_issue_id": "bd-1f42.8.4.1"
},
{
"rank": 4,
"gap": "Tools execution/error-path threshold definition incomplete",
"severity": "high",
"impact": "Missing explicit non-mock thresholds weakens gate quality for file/shell/search tool reliability.",
"reproducibility": "high",
"target_test_type": "unit+integration_policy",
"evidence": {
"critical_path": "tools",
"uncovered_line_count": 637,
"uncovered_function_count": 94
},
"mapped_issue_id": "bd-1f42.8.4.1"
},
{
"rank": 5,
"gap": "Session persistence reliability coverage depth",
"severity": "medium",
"impact": "Uncovered persistence paths can produce replay/index drift under long-running or interrupted sessions.",
"reproducibility": "medium",
"target_test_type": "soak+recovery_e2e",
"evidence": {
"critical_path": "session",
"uncovered_line_count": 562,
"uncovered_function_count": 73
},
"mapped_issue_id": "bd-1f42.8.4.2"
},
{
"rank": 6,
"gap": "Branch metrics partially available via per-file export workaround",
"severity": "low",
"impact": "63 of 107 source files have real branch metrics (51.95%). Remaining 44 files trigger SIGSEGV in llvm-cov export and are excluded from branch totals. Full branch coverage requires upstream LLVM fix.",
"reproducibility": "high",
"target_test_type": "coverage_infrastructure",
"evidence": {
"branch_pct": 51.95,
"branch_count": 7984,
"covered_branch_count": 4148,
"measurable_files": 63,
"sigsegv_files": 44,
"failure_mode": "llvm-cov export SIGSEGV for specific files with large/complex coverage maps",
"workaround": "per_file_export_with_sources_flag"
},
"mapped_issue_id": "bd-1f42.1.5"
}
],
"handoff": {
"owner": "RusticPeak",
"resolved_by": "context-takeover-session",
"resolution_date": "2026-02-14",
"next_actions": [
"Per-file llvm-cov export workaround is now the deterministic command path for branch metrics. 63/107 files emit real branch data (51.95% coverage).",
"To improve branch coverage on SIGSEGV files: monitor upstream LLVM nightly for fix, or investigate if specific Rust codegen patterns (large match arms, complex async transforms) are the trigger.",
"Consider filing upstream LLVM bug with minimal reproduction case extracted from the SIGSEGV files."
]
}
}