{ "baseline_comparison": { "profiled_serial": { "baseline_median_seconds": 32.891, "candidate_median_seconds": 30.864, "median_change_pct": -6.162780091818424, "method": "paired-by-repetition", "paired": { "common_language_effect": 1.0, "losses": 0, "lower_is_better": true, "median_delta": -2.026500000000002, "median_relative_change_pct": -6.162836142112277, "pairs": 2, "ties": 0, "two_sided_sign_test_p": 0.5, "wins": 2 } } }, "change_time": { "alert_density_per_kloc": 2.139, "baseline_revision": "c9a5e7390d3ed49f1a3dae9ec4b9fa73f2697707", "by_disposition": { "accepted-risk": 7, "false-positive": 2 }, "changed_files": [], "changed_scope": "selected-and-finding-files", "counts": { "current": 9, "current_in_scope": 9, "new": 0, "new_in_changed_files": 0, "new_in_scope": 0, "persisting": 9, "resolved": 0, "reviewed": 9 }, "current_revision": "2a730e3a0e67b43fc065f1941af304812e8e9a02", "identity_mismatches": [], "moved": [ { "current": { "line": 230, "uri": "src/detect/clone.cpp" }, "id": "clone:literal-insensitive:10138039283310510298:12477560306888341856", "reviewed": { "line": 230, "uri": "../../src/detect/clone.cpp" } }, { "current": { "line": 212, "uri": "include/fold/symbolic/safety_observer.hpp" }, "id": "clone:rename-insensitive:13361867859135477372:17649162313195398762", "reviewed": { "line": 212, "uri": "../../include/fold/symbolic/safety_observer.hpp" } }, { "current": { "line": 404, "uri": "include/fold/symbolic/safety_observer.hpp" }, "id": "clone:rename-insensitive:15745723344193243199:16674436903562707115", "reviewed": { "line": 404, "uri": "../../include/fold/symbolic/safety_observer.hpp" } }, { "current": { "line": 461, "uri": "src/symbolic/loop_inventory.cpp" }, "id": "clone:rename-insensitive:324236430974758491:9286134498998717419", "reviewed": { "line": 461, "uri": "../../src/symbolic/loop_inventory.cpp" } }, { "current": { "line": 513, "uri": "include/fold/symbolic/safety_observer.hpp" }, "id": "clone:rename-insensitive:4558689582042308424:14264348671237487597", "reviewed": { "line": 513, "uri": "../../include/fold/symbolic/safety_observer.hpp" } }, { "current": { "line": 309, "uri": "include/fold/symbolic/safety_observer.hpp" }, "id": "clone:rename-insensitive:8251885775062776239:9259506914319175523", "reviewed": { "line": 309, "uri": "../../include/fold/symbolic/safety_observer.hpp" } }, { "current": { "line": 482, "uri": "include/fold/symbolic/safety_observer.hpp" }, "id": "clone:rename-insensitive:8895693976960389638:6190416392363411806", "reviewed": { "line": 482, "uri": "../../include/fold/symbolic/safety_observer.hpp" } }, { "current": { "line": 22, "uri": "src/index/store.cpp" }, "id": "sql-injection:../../src/index/store.cpp:22:9:sqlite3_prepare_v2", "reviewed": { "line": 22, "uri": "../../src/index/store.cpp" } }, { "current": { "line": 251, "uri": "src/index/store.cpp" }, "id": "sql-injection:../../src/index/store.cpp:251:24:sqlite3_exec", "reviewed": { "line": 251, "uri": "../../src/index/store.cpp" } } ], "new": [], "new_alert_density_per_kloc": 0.0, "new_by_rule": {}, "new_in_changed_files": [], "persisting": [ "clone:literal-insensitive:10138039283310510298:12477560306888341856", "clone:rename-insensitive:13361867859135477372:17649162313195398762", "clone:rename-insensitive:15745723344193243199:16674436903562707115", "clone:rename-insensitive:324236430974758491:9286134498998717419", "clone:rename-insensitive:4558689582042308424:14264348671237487597", "clone:rename-insensitive:8251885775062776239:9259506914319175523", "clone:rename-insensitive:8895693976960389638:6190416392363411806", "sql-injection:../../src/index/store.cpp:22:9:sqlite3_prepare_v2", "sql-injection:../../src/index/store.cpp:251:24:sqlite3_exec" ], "resolved": [], "resolved_by_disposition": {}, "review_coverage": 1.0, "reviewed_at": "2026-07-31T02:15:00Z", "reviewer": "opencode-optimization-loop (fold optimization workflow iteration 2; re-baselined after line drift; each finding verified against source)", "scope_kloc": 4.208 }, "configuration": { "analysis_fingerprint": "ba7ff7ac13d18a6fa127cd6db775e83691a428cdf22c4bab419c452ac7a6c426", "budget_seconds": 60, "detectors": [ "clone", "hardcoded-credential", "sql-injection", "uninit-read", "unused-function", "use-after-move" ], "exclude_regex": "/(third_party|subprojects|generated)/", "extra_args": [], "lane": "source", "max_tus": 0, "path_regex": "/src/(cli/tu_security_prefilter|detect/clone|detect/hardcoded_credential|detect/sql_injection|frontend/subprocess|index/store|symbolic/function_effects|symbolic/loop_inventory)\\.cpp$", "per_query_ms": 2000, "per_tu_timeout": 60, "processes": 1, "repeats": 2, "rust_toolchain": "", "scopes": [], "source_settings": { "budget_seconds": 60, "class_similarity_threshold": 0.7, "clone_min_score": 0.0, "clone_similarity": 0.7, "clone_type": 2, "complexity_threshold": 20, "min_body_stmts": 4, "per_query_ms": 2000, "per_tu_timeout": 60 }, "throughput_processes": 1 }, "gold": { "f1": 1.0, "false_negative": 0, "false_positive": 0, "finding_groups": 9, "gold_total": 9, "matched_findings": 9, "matched_gold_indices": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "metric_defined": { "f1": true, "precision": true, "recall": true }, "missed_gold_indices": [], "per_rule": { "clone": { "f1": 1.0, "false_negative": 0, "false_positive": 0, "finding_groups": 7, "gold_total": 7, "matched_findings": 7, "matched_gold_indices": [ 0, 1, 2, 3, 4, 5, 6 ], "metric_defined": { "f1": true, "precision": true, "recall": true }, "missed_gold_indices": [], "precision": 1.0, "recall": 1.0, "true_positive": 7, "unmatched_finding_ids": [] }, "sql-injection": { "f1": 1.0, "false_negative": 0, "false_positive": 0, "finding_groups": 2, "gold_total": 2, "matched_findings": 2, "matched_gold_indices": [ 0, 1 ], "metric_defined": { "f1": true, "precision": true, "recall": true }, "missed_gold_indices": [], "precision": 1.0, "recall": 1.0, "true_positive": 2, "unmatched_finding_ids": [] } }, "precision": 1.0, "recall": 1.0, "true_positive": 9, "unmatched_finding_ids": [] }, "manifest": { "configuration": { "budget_seconds": 60, "detectors": [ "clone", "hardcoded-credential", "sql-injection", "uninit-read", "unused-function", "use-after-move" ], "exclude_regex": "/(third_party|subprojects|generated)/", "extra_args": [], "lane": "source", "max_tus": 0, "path_regex": "/src/(cli/tu_security_prefilter|detect/clone|detect/hardcoded_credential|detect/sql_injection|frontend/subprocess|index/store|symbolic/function_effects|symbolic/loop_inventory)\\.cpp$", "per_query_ms": 2000, "per_tu_timeout": 60, "processes": 1, "rust_toolchain": "", "scopes": [], "source_settings": { "budget_seconds": 60, "class_similarity_threshold": 0.7, "clone_min_score": 0.0, "clone_similarity": 0.7, "clone_type": 2, "complexity_threshold": 20, "min_body_stmts": 4, "per_query_ms": 2000, "per_tu_timeout": 60 } }, "configuration_fingerprint": "ba7ff7ac13d18a6fa127cd6db775e83691a428cdf22c4bab419c452ac7a6c426", "lane": "source", "path": "/Users/trevon/work/tools/fold/tests/benchmarks/projects/fold_source.json", "project": "fold" }, "optimization_surface": { "known_source_phase_ms": 0.0, "peak_rss_mb": 1135.281, "ranked_detectors": [ { "analyze_share_pct": 3.0, "detector": "use-after-move", "wall_ms": 924.0, "z3_queries": 0.0, "z3_timeouts": 0.0 }, { "analyze_share_pct": 1.46, "detector": "hardcoded-credential", "wall_ms": 448.0, "z3_queries": 0.0, "z3_timeouts": 0.0 }, { "analyze_share_pct": 1.39, "detector": "sql-injection", "wall_ms": 427.0, "z3_queries": 0.0, "z3_timeouts": 0.0 }, { "analyze_share_pct": 0.56, "detector": "unused-function", "wall_ms": 173.5, "z3_queries": 0.0, "z3_timeouts": 0.0 }, { "analyze_share_pct": 0.38, "detector": "clone", "wall_ms": 117.5, "z3_queries": 0.0, "z3_timeouts": 0.0 }, { "analyze_share_pct": 0.33, "detector": "uninit-read", "wall_ms": 102.0, "z3_queries": 0.0, "z3_timeouts": 0.0 } ], "ranked_graph_subphases": [ { "phase": "project_graph_collect", "wall_ms": 0.0 }, { "phase": "project_graph_fallback", "wall_ms": 0.0 }, { "phase": "project_graph_merge", "wall_ms": 0.0 }, { "phase": "project_index_contribution_update", "wall_ms": 0.0 }, { "phase": "project_index_load", "wall_ms": 0.0 }, { "phase": "project_index_snapshot_update", "wall_ms": 0.0 }, { "phase": "security_candidate", "wall_ms": 0.0 } ], "ranked_source_phases": [ { "analyze_share_pct": 0.0, "phase": "call_graph", "wall_ms": 0.0 }, { "analyze_share_pct": 0.0, "phase": "cross_tu_property", "wall_ms": 0.0 }, { "analyze_share_pct": 0.0, "phase": "function_fingerprint", "wall_ms": 0.0 }, { "analyze_share_pct": 0.0, "phase": "security_candidate", "wall_ms": 0.0 }, { "analyze_share_pct": 0.0, "phase": "symbolic_summary", "wall_ms": 0.0 } ], "shared_frontend_and_orchestration_ms": 28593.5, "unattributed_frontend_and_orchestration_ms": 28593.5 }, "performance": { "profiled_serial": { "profile": { "detectors": { "clone": { "findings_emitted": { "iqr": 0.0, "max": 32.0, "median": 32.0, "min": 32.0, "n": 2 }, "functions_analyzed": { "iqr": 0.0, "max": 2106.0, "median": 2106.0, "min": 2106.0, "n": 2 }, "functions_skipped": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "wall_ms": { "iqr": 1.0, "max": 118.0, "median": 117.5, "min": 117.0, "n": 2 }, "z3_queries": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "z3_timeouts": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 } }, "hardcoded-credential": { "findings_emitted": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "functions_analyzed": { "iqr": 0.0, "max": 2106.0, "median": 2106.0, "min": 2106.0, "n": 2 }, "functions_skipped": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "wall_ms": { "iqr": 4.0, "max": 450.0, "median": 448.0, "min": 446.0, "n": 2 }, "z3_queries": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "z3_timeouts": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 } }, "sql-injection": { "findings_emitted": { "iqr": 0.0, "max": 2.0, "median": 2.0, "min": 2.0, "n": 2 }, "functions_analyzed": { "iqr": 0.0, "max": 2106.0, "median": 2106.0, "min": 2106.0, "n": 2 }, "functions_skipped": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "wall_ms": { "iqr": 12.0, "max": 433.0, "median": 427.0, "min": 421.0, "n": 2 }, "z3_queries": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "z3_timeouts": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 } }, "uninit-read": { "findings_emitted": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "functions_analyzed": { "iqr": 0.0, "max": 2106.0, "median": 2106.0, "min": 2106.0, "n": 2 }, "functions_skipped": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "wall_ms": { "iqr": 4.0, "max": 104.0, "median": 102.0, "min": 100.0, "n": 2 }, "z3_queries": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "z3_timeouts": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 } }, "unused-function": { "findings_emitted": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "functions_analyzed": { "iqr": 0.0, "max": 2106.0, "median": 2106.0, "min": 2106.0, "n": 2 }, "functions_skipped": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "wall_ms": { "iqr": 3.0, "max": 175.0, "median": 173.5, "min": 172.0, "n": 2 }, "z3_queries": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "z3_timeouts": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 } }, "use-after-move": { "findings_emitted": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "functions_analyzed": { "iqr": 0.0, "max": 2106.0, "median": 2106.0, "min": 2106.0, "n": 2 }, "functions_skipped": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "wall_ms": { "iqr": 6.0, "max": 927.0, "median": 924.0, "min": 921.0, "n": 2 }, "z3_queries": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "z3_timeouts": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 } } }, "scan": { "analyze_ms": { "iqr": 679.0, "max": 31125.0, "median": 30785.5, "min": 30446.0, "n": 2 }, "call_graph_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "compile_db_load_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "cross_tu_property_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "findings_before_filter": { "iqr": 0.0, "max": 34.0, "median": 34.0, "min": 34.0, "n": 2 }, "findings_report_visible": { "iqr": 0.0, "max": 9.0, "median": 9.0, "min": 9.0, "n": 2 }, "frontend_extraction_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "function_fingerprint_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "num_functions": { "iqr": 0.0, "max": 2106.0, "median": 2106.0, "min": 2106.0, "n": 2 }, "num_tus": { "iqr": 0.0, "max": 8.0, "median": 8.0, "min": 8.0, "n": 2 }, "peak_rss_kb": { "iqr": 512.0, "max": 1162784.0, "median": 1162528.0, "min": 1162272.0, "n": 2 }, "project_graph_collect_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "project_graph_fallback_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "project_graph_merge_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "project_index_contribution_update_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "project_index_load_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "project_index_snapshot_update_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "project_index_update_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "report_ms": { "iqr": 0.0, "max": 1.0, "median": 1.0, "min": 1.0, "n": 2 }, "security_candidate_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "serial_dispatch_ms": { "iqr": 679.0, "max": 31125.0, "median": 30785.5, "min": 30446.0, "n": 2 }, "source_tus_attempted": { "iqr": 0.0, "max": 8.0, "median": 8.0, "min": 8.0, "n": 2 }, "source_tus_completed": { "iqr": 0.0, "max": 8.0, "median": 8.0, "min": 8.0, "n": 2 }, "source_tus_excluded": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "source_tus_frontend_failed": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "source_tus_selected": { "iqr": 0.0, "max": 8.0, "median": 8.0, "min": 8.0, "n": 2 }, "source_tus_timed_out": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "symbolic_summary_ms": { "iqr": 0.0, "max": 0.0, "median": 0.0, "min": 0.0, "n": 2 }, "total_wall_ms": { "iqr": 679.0, "max": 31126.0, "median": 30786.5, "min": 30447.0, "n": 2 } } }, "wall_samples_seconds": [ 31.205, 30.524 ], "wall_seconds": { "iqr": 0.681, "max": 31.205, "median": 30.864, "min": 30.524, "n": 2 } } }, "reliability": { "by_rule": { "fold.clone": 7, "fold.sql-injection": 2 }, "failures": [], "finding_count": 9, "finding_fingerprint": "6fe221a00977f19632ea447a76d72fa7afbede728db03f48f7437a555e782541", "missing_location": 0, "operational_coverage": { "by_run": [ { "frontend_failures": { "affected_tus": [], "count": 0, "event_count": 0, "examples": [] }, "iteration": 1, "lane": "profiled-serial", "missing_dependencies": { "affected_tus": [], "count": 0, "event_count": 0, "examples": [] }, "reconciliation": { "affected_tus": [], "attempted_tus": 8, "completed_tus": 8, "frontend_failed_tus": 0, "selected_tus": 8, "timed_out_tus": 0 }, "tu_crashes": { "affected_tus": [], "count": 0, "event_count": 0, "examples": [] }, "tu_timeouts": { "affected_tus": [], "count": 0, "event_count": 0, "examples": [] } }, { "frontend_failures": { "affected_tus": [], "count": 0, "event_count": 0, "examples": [] }, "iteration": 2, "lane": "profiled-serial", "missing_dependencies": { "affected_tus": [], "count": 0, "event_count": 0, "examples": [] }, "reconciliation": { "affected_tus": [], "attempted_tus": 8, "completed_tus": 8, "frontend_failed_tus": 0, "selected_tus": 8, "timed_out_tus": 0 }, "tu_crashes": { "affected_tus": [], "count": 0, "event_count": 0, "examples": [] }, "tu_timeouts": { "affected_tus": [], "count": 0, "event_count": 0, "examples": [] } } ], "totals": { "frontend_failures": 0, "missing_dependencies": 0, "tu_crashes": 0, "tu_timeouts": 0 } }, "per_rule_stability": { "fold.clone": { "churn_count": 0, "exact": true, "intersection_count": 7, "pairwise_jaccard": { "iqr": 0.0, "max": 1.0, "median": 1.0, "min": 1.0, "n": 1 }, "per_run_counts": [ 7, 7 ], "run_count": 2, "union_count": 7 }, "fold.sql-injection": { "churn_count": 0, "exact": true, "intersection_count": 2, "pairwise_jaccard": { "iqr": 0.0, "max": 1.0, "median": 1.0, "min": 1.0, "n": 1 }, "per_run_counts": [ 2, 2 ], "run_count": 2, "union_count": 2 } }, "stability": { "churn_count": 0, "exact": true, "intersection_count": 9, "pairwise_jaccard": { "iqr": 0.0, "max": 1.0, "median": 1.0, "min": 1.0, "n": 1 }, "per_run_counts": [ 9, 9 ], "run_count": 2, "union_count": 9 }, "stable_findings": true, "z3_timeouts": 0 }, "run_artifacts": [ "tests/benchmarks/runs/optimization-2026-09-02-hardcoded-defer/profiled-serial-1.run.json", "tests/benchmarks/runs/optimization-2026-09-02-hardcoded-defer/profiled-serial-2.run.json" ], "schema_version": 2, "status": "ok", "target": { "binaries": [], "lane": "source", "paths": [ "src/cli/tu_security_prefilter.cpp", "src/detect/clone.cpp", "src/detect/hardcoded_credential.cpp", "src/detect/sql_injection.cpp", "src/frontend/subprocess.cpp", "src/index/store.cpp", "src/symbolic/function_effects.cpp", "src/symbolic/loop_inventory.cpp" ], "project_root": "/Users/trevon/work/tools/fold", "revision": "2a730e3a0e67b43fc065f1941af304812e8e9a02", "selected_tus": 8, "tu_set_fingerprint": "b592b05dd817103a0224445c9d7721e2f609b2c3d2be926d565908fc2ecfb212" } }