From a05980e8af4fd0a61b4d00f731f8cfef22769fdd Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Wed, 2 Dec 2026 20:33:19 -0800 Subject: [PATCH] Retire routing archives and consolidate documentation tooling Generate the guide, walkthrough, and gallery figures from one command. Keep benchmark fixtures and attribution with the tests and fold the durable findings from completed plans into the guides. --- archive/routing/README.md | 32 - archive/routing/conflict_trace.json | 2664 ------------ archive/routing/conflict_trace.md | 57 - .../routing/documentation-improvement-plan.md | 60 - archive/routing/frontier_trace.json | 122 - archive/routing/frontier_trace.md | 23 - archive/routing/iteration_trace.json | 1520 ------- archive/routing/iteration_trace.md | 82 - archive/routing/optimization_pass_01_log.md | 3741 ----------------- .../routing/pair_local_characterization.json | 2108 ---------- .../routing/pair_local_characterization.md | 30 - archive/routing/performance.md | 27 - archive/routing/performance_baseline.json | 1032 ----- archive/routing/pre_pair_frontier_trace.json | 1458 ------- archive/routing/pre_pair_frontier_trace.md | 48 - archive/routing/routing-policy-goal.md | 33 - archive/routing/routing-refactor-plan.md | 51 - archive/routing/simplification-results.md | 66 - docs/architecture.md | 2 +- docs/benchmark-fixtures.md | 50 +- docs/benchmark-results.md | 34 - docs/benchmarks.md | 101 +- docs/complex-routing-example-1.md | 13 +- docs/development.md | 21 +- docs/routing-diagnostics.md | 44 +- docs/topological-routing.md | 23 +- examples/advanced.md | 2 +- examples/advanced_layouts.py | 35 +- inire/tests/data/README.md | 8 + inire/tests/direct_routing_policies.py | 111 - inire/tests/example_scenarios.py | 72 - inire/tests/routing_benchmark_case.py | 8 - inire/tests/routing_corpus.py | 19 +- inire/tests/test_performance_reporting.py | 187 - inire/tests/test_routing_benchmark_parity.py | 54 - inire/tests/trace_recording.py | 79 - plans/documentation-improvements.md | 48 - plans/full-project-review.md | 319 -- plans/routing-follow-up-review.md | 228 - plans/routing-simplification.md | 96 - scripts/benchmark_retry_order.py | 268 -- scripts/characterize_pair_local_search.py | 177 - scripts/compare_topological_routing.py | 434 -- scripts/diff_performance_baseline.py | 232 - scripts/export_advanced_examples.py | 52 - scripts/import_external_routing_benchmarks.py | 327 -- scripts/record_conflict_trace.py | 139 - scripts/record_frontier_trace.py | 119 - scripts/record_iteration_trace.py | 92 - scripts/record_performance_baseline.py | 125 - scripts/record_pre_pair_frontier_trace.py | 95 - scripts/render_complex_routing_example.py | 291 -- scripts/render_documentation_figures.py | 277 +- scripts/route_complex_routing_example.py | 52 - scripts/route_terminal_bench.py | 7 - scripts/routing_benchmark_parity.py | 199 - 56 files changed, 382 insertions(+), 17212 deletions(-) delete mode 100644 archive/routing/README.md delete mode 100644 archive/routing/conflict_trace.json delete mode 100644 archive/routing/conflict_trace.md delete mode 100644 archive/routing/documentation-improvement-plan.md delete mode 100644 archive/routing/frontier_trace.json delete mode 100644 archive/routing/frontier_trace.md delete mode 100644 archive/routing/iteration_trace.json delete mode 100644 archive/routing/iteration_trace.md delete mode 100644 archive/routing/optimization_pass_01_log.md delete mode 100644 archive/routing/pair_local_characterization.json delete mode 100644 archive/routing/pair_local_characterization.md delete mode 100644 archive/routing/performance.md delete mode 100644 archive/routing/performance_baseline.json delete mode 100644 archive/routing/pre_pair_frontier_trace.json delete mode 100644 archive/routing/pre_pair_frontier_trace.md delete mode 100644 archive/routing/routing-policy-goal.md delete mode 100644 archive/routing/routing-refactor-plan.md delete mode 100644 archive/routing/simplification-results.md delete mode 100644 docs/benchmark-results.md create mode 100644 inire/tests/data/README.md delete mode 100644 inire/tests/direct_routing_policies.py delete mode 100644 inire/tests/test_performance_reporting.py delete mode 100644 inire/tests/test_routing_benchmark_parity.py delete mode 100644 inire/tests/trace_recording.py delete mode 100644 plans/documentation-improvements.md delete mode 100644 plans/full-project-review.md delete mode 100644 plans/routing-follow-up-review.md delete mode 100644 plans/routing-simplification.md delete mode 100644 scripts/benchmark_retry_order.py delete mode 100644 scripts/characterize_pair_local_search.py delete mode 100644 scripts/compare_topological_routing.py delete mode 100644 scripts/diff_performance_baseline.py delete mode 100644 scripts/export_advanced_examples.py delete mode 100644 scripts/import_external_routing_benchmarks.py delete mode 100644 scripts/record_conflict_trace.py delete mode 100644 scripts/record_frontier_trace.py delete mode 100644 scripts/record_iteration_trace.py delete mode 100644 scripts/record_performance_baseline.py delete mode 100644 scripts/record_pre_pair_frontier_trace.py delete mode 100644 scripts/render_complex_routing_example.py delete mode 100644 scripts/route_complex_routing_example.py delete mode 100644 scripts/route_terminal_bench.py delete mode 100644 scripts/routing_benchmark_parity.py diff --git a/archive/routing/README.md b/archive/routing/README.md deleted file mode 100644 index 9d3009d..0000000 --- a/archive/routing/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Routing development archive - -Use these records to recover the rationale for a routing decision or compare a fresh capture with an earlier run. - -## Recover earlier decisions - -- For the original coverage target and retry priorities, read the [routing policy goal](routing-policy-goal.md). -- For the reason a responsibility lives in a particular module, consult the [routing refactor plan](routing-refactor-plan.md). -- For the work removed by the routing cleanups and the prototypes that changed search behavior, read the [simplification results](simplification-results.md). -- For the original audience and page split, see the [first documentation reorganization plan](documentation-improvement-plan.md). - -## Reproduce probe and retry experiments - -- To recover the measured probe and holdout tables from November 26, 2026, run `git show 2b02c6e:docs/topological-routing.md`. -- For the original retry triggers, budget sweeps, and authored Terminal-Bench lane comparisons, run `git show ea5cfe7:docs/topological-routing.md`. To rerun a retired policy, use that revision's driver in a separate worktree. -- To see how these experiments inform the current probe and retry policy, read the [measurement summary](../../docs/benchmark-results.md). - -## Compare performance or diagnose a trace - -| What to recover | Archive record | -| --- | --- | -| Example coverage and timings | [Baseline report](performance.md) with a [machine-readable snapshot](performance_baseline.json) for comparisons. | -| Work measured during the earlier optimization pass | [Optimization log](optimization_pass_01_log.md). | -| Conditions under which repair succeeds in the fan-out fixture | [Pair-local characterization](pair_local_characterization.md) with [per-case measurements](pair_local_characterization.json). | -| Work by net and iteration | [Iteration trace](iteration_trace.md). | -| Overlapping components before and after repair | [Conflict trace](conflict_trace.md). | -| Sampled prune reasons near remaining overlaps | [Frontier trace](frontier_trace.md). | -| Reroute order and work immediately before repair | [Pre-pair frontier trace](pre_pair_frontier_trace.md). | - -Each trace report has a companion JSON file with the same basename. The baseline comparison tool reads `performance_baseline.json` from this directory by default. For a fresh trace, set `--output-dir` to keep the capture separate from the archived record. See the [fan-out capture command](../../docs/routing-diagnostics.md#follow-a-late-conflict-into-pair-local-repair). - -In the archived traces and pair-local characterization, `nodes_expanded` excludes pair-local search. The archived `pair_local_search_nodes_expanded` counts only attempts that produced a locally valid pair. Neither convention affects the nine scenarios in the saved performance baseline, which used no pair-local search. Fresh captures count every pair-local search in both counters. diff --git a/archive/routing/conflict_trace.json b/archive/routing/conflict_trace.json deleted file mode 100644 index 93454cc..0000000 --- a/archive/routing/conflict_trace.json +++ /dev/null @@ -1,2664 +0,0 @@ -{ - "generated_at": "2026-11-26T21:47:32-08:00", - "generator": "scripts/record_conflict_trace.py", - "scenarios": [ - { - "conflict_trace": [ - { - "completed_net_ids": [ - "net_04" - ], - "conflict_edges": [ - [ - "net_00", - "net_01" - ], - [ - "net_00", - "net_02" - ], - [ - "net_00", - "net_03" - ], - [ - "net_00", - "net_04" - ], - [ - "net_01", - "net_02" - ], - [ - "net_01", - "net_03" - ], - [ - "net_02", - "net_03" - ], - [ - "net_03", - "net_04" - ], - [ - "net_05", - "net_06" - ], - [ - "net_05", - "net_09" - ], - [ - "net_06", - "net_07" - ], - [ - "net_06", - "net_08" - ], - [ - "net_06", - "net_09" - ], - [ - "net_07", - "net_08" - ], - [ - "net_07", - "net_09" - ], - [ - "net_08", - "net_09" - ] - ], - "iteration": 0, - "nets": [ - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_06", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 1 - }, - { - "other_component_index": 0, - "other_net_id": "net_09", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_06", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_09", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_06", - "net_07", - "net_09" - ], - "net_id": "net_08", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 6, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1138.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_05", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_08", - "self_component_index": 1 - }, - { - "other_component_index": 0, - "other_net_id": "net_09", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_08", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 3 - }, - { - "other_component_index": 2, - "other_net_id": "net_08", - "self_component_index": 3 - }, - { - "other_component_index": 2, - "other_net_id": "net_09", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_05", - "net_07", - "net_08", - "net_09" - ], - "net_id": "net_06", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 9, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 980.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 0, - "other_net_id": "net_00", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_01", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_04", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_00", - "self_component_index": 3 - }, - { - "other_component_index": 2, - "other_net_id": "net_01", - "self_component_index": 3 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_00", - "net_01", - "net_02", - "net_04" - ], - "net_id": "net_03", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 8, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 970.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_01", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_03", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_04", - "self_component_index": 1 - } - ], - "conflicting_net_ids": [ - "net_01", - "net_02", - "net_03", - "net_04" - ], - "net_id": "net_00", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 4, - "out_of_bounds": false, - "self_collision_count": 1, - "static_collision_count": 0, - "total_length": 1621.236812357892 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_06", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_08", - "self_component_index": 1 - }, - { - "other_component_index": 0, - "other_net_id": "net_09", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_06", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_08", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_08", - "self_component_index": 3 - }, - { - "other_component_index": 2, - "other_net_id": "net_09", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_06", - "net_08", - "net_09" - ], - "net_id": "net_07", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 7, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1059.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 0, - "other_net_id": "net_00", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_03", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_00", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_00", - "net_02", - "net_03" - ], - "net_id": "net_01", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 5, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1128.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_06", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_08", - "self_component_index": 0 - } - ], - "conflicting_net_ids": [ - "net_06", - "net_07", - "net_08" - ], - "net_id": "net_09", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 1, - "static_collision_count": 0, - "total_length": 1631.236812357892 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 0, - "other_net_id": "net_00", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_01", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_03", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_01", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_03", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_00", - "self_component_index": 3 - }, - { - "other_component_index": 2, - "other_net_id": "net_01", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_00", - "net_01", - "net_03" - ], - "net_id": "net_02", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 7, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1049.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_04", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 909.9977565924808 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_09", - "self_component_index": 1 - } - ], - "conflicting_net_ids": [ - "net_09" - ], - "net_id": "net_05", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 1, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 914.6410526793834 - } - } - ], - "stage": "iteration" - }, - { - "completed_net_ids": [ - "net_04", - "net_05" - ], - "conflict_edges": [ - [ - "net_00", - "net_01" - ], - [ - "net_00", - "net_02" - ], - [ - "net_00", - "net_03" - ], - [ - "net_01", - "net_02" - ], - [ - "net_01", - "net_03" - ], - [ - "net_02", - "net_03" - ], - [ - "net_06", - "net_07" - ], - [ - "net_06", - "net_08" - ], - [ - "net_06", - "net_09" - ], - [ - "net_07", - "net_08" - ], - [ - "net_07", - "net_09" - ], - [ - "net_08", - "net_09" - ] - ], - "iteration": 1, - "nets": [ - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_04", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 909.9977565924808 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 0, - "other_net_id": "net_07", - "self_component_index": 2 - }, - { - "other_component_index": 0, - "other_net_id": "net_08", - "self_component_index": 2 - }, - { - "other_component_index": 0, - "other_net_id": "net_09", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 5 - }, - { - "other_component_index": 2, - "other_net_id": "net_08", - "self_component_index": 5 - }, - { - "other_component_index": 2, - "other_net_id": "net_09", - "self_component_index": 5 - } - ], - "conflicting_net_ids": [ - "net_07", - "net_08", - "net_09" - ], - "net_id": "net_06", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 6, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 980.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_03", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_00", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_00", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 5, - "other_net_id": "net_03", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_00", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_00", - "net_02", - "net_03" - ], - "net_id": "net_01", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 7, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1128.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_06", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_08", - "self_component_index": 1 - }, - { - "other_component_index": 5, - "other_net_id": "net_06", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_08", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_06", - "net_07", - "net_08" - ], - "net_id": "net_09", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 6, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1217.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_05", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 914.6410526793834 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_03", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_00", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_01", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_00", - "self_component_index": 2 - }, - { - "other_component_index": 1, - "other_net_id": "net_01", - "self_component_index": 2 - }, - { - "other_component_index": 5, - "other_net_id": "net_03", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_00", - "self_component_index": 3 - }, - { - "other_component_index": 2, - "other_net_id": "net_01", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_00", - "net_01", - "net_03" - ], - "net_id": "net_02", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 8, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1049.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_03", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_01", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_01", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 5, - "other_net_id": "net_03", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_01", - "net_02", - "net_03" - ], - "net_id": "net_00", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 6, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1207.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 0, - "other_net_id": "net_00", - "self_component_index": 2 - }, - { - "other_component_index": 0, - "other_net_id": "net_01", - "self_component_index": 2 - }, - { - "other_component_index": 0, - "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_00", - "self_component_index": 5 - }, - { - "other_component_index": 2, - "other_net_id": "net_01", - "self_component_index": 5 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 5 - } - ], - "conflicting_net_ids": [ - "net_00", - "net_01", - "net_02" - ], - "net_id": "net_03", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 6, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 970.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_06", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_08", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_09", - "self_component_index": 1 - }, - { - "other_component_index": 5, - "other_net_id": "net_06", - "self_component_index": 2 - }, - { - "other_component_index": 1, - "other_net_id": "net_08", - "self_component_index": 2 - }, - { - "other_component_index": 1, - "other_net_id": "net_09", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_08", - "self_component_index": 3 - }, - { - "other_component_index": 2, - "other_net_id": "net_09", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_06", - "net_08", - "net_09" - ], - "net_id": "net_07", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 8, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1059.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_06", - "self_component_index": 0 - }, - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_09", - "self_component_index": 1 - }, - { - "other_component_index": 5, - "other_net_id": "net_06", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 2 - }, - { - "other_component_index": 1, - "other_net_id": "net_09", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_09", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_06", - "net_07", - "net_09" - ], - "net_id": "net_08", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 7, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1138.0796326794896 - } - } - ], - "stage": "iteration" - }, - { - "completed_net_ids": [ - "net_03", - "net_04", - "net_05", - "net_08", - "net_09" - ], - "conflict_edges": [ - [ - "net_00", - "net_01" - ], - [ - "net_00", - "net_02" - ], - [ - "net_01", - "net_02" - ], - [ - "net_06", - "net_07" - ] - ], - "iteration": 2, - "nets": [ - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_05", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 914.6410526793834 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_00", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_01", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_01", - "self_component_index": 3 - }, - { - "other_component_index": 3, - "other_net_id": "net_01", - "self_component_index": 4 - }, - { - "other_component_index": 3, - "other_net_id": "net_00", - "self_component_index": 5 - } - ], - "conflicting_net_ids": [ - "net_00", - "net_01" - ], - "net_id": "net_02", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 5, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1049.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_04", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 909.9977565924808 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_00", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 3, - "other_net_id": "net_02", - "self_component_index": 3 - }, - { - "other_component_index": 3, - "other_net_id": "net_00", - "self_component_index": 5 - } - ], - "conflicting_net_ids": [ - "net_00", - "net_02" - ], - "net_id": "net_01", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 4, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1128.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_08", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1138.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_09", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1217.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_03", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 970.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_07" - ], - "net_id": "net_06", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 980.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_06", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_06", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_06" - ], - "net_id": "net_07", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1059.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_01", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 1 - }, - { - "other_component_index": 5, - "other_net_id": "net_01", - "self_component_index": 3 - }, - { - "other_component_index": 5, - "other_net_id": "net_02", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_01", - "net_02" - ], - "net_id": "net_00", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 4, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1207.0796326794896 - } - } - ], - "stage": "iteration" - }, - { - "completed_net_ids": [ - "net_04", - "net_05" - ], - "conflict_edges": [ - [ - "net_00", - "net_01" - ], - [ - "net_02", - "net_03" - ], - [ - "net_06", - "net_07" - ], - [ - "net_08", - "net_09" - ] - ], - "iteration": 3, - "nets": [ - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_03", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_03", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_03" - ], - "net_id": "net_02", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1049.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 2, - "other_net_id": "net_00", - "self_component_index": 3 - }, - { - "other_component_index": 2, - "other_net_id": "net_00", - "self_component_index": 4 - }, - { - "other_component_index": 3, - "other_net_id": "net_00", - "self_component_index": 5 - } - ], - "conflicting_net_ids": [ - "net_00" - ], - "net_id": "net_01", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1128.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 3, - "other_net_id": "net_08", - "self_component_index": 3 - }, - { - "other_component_index": 4, - "other_net_id": "net_08", - "self_component_index": 4 - } - ], - "conflicting_net_ids": [ - "net_08" - ], - "net_id": "net_09", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1217.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 3, - "other_net_id": "net_01", - "self_component_index": 2 - }, - { - "other_component_index": 4, - "other_net_id": "net_01", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_01" - ], - "net_id": "net_00", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1207.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_06", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_06", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_06" - ], - "net_id": "net_07", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1059.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_05", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 914.6410526793834 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_04", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 909.9977565924808 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_07" - ], - "net_id": "net_06", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 980.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_02" - ], - "net_id": "net_03", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 970.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 3, - "other_net_id": "net_09", - "self_component_index": 3 - }, - { - "other_component_index": 3, - "other_net_id": "net_09", - "self_component_index": 4 - }, - { - "other_component_index": 4, - "other_net_id": "net_09", - "self_component_index": 5 - } - ], - "conflicting_net_ids": [ - "net_09" - ], - "net_id": "net_08", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1138.0796326794896 - } - } - ], - "stage": "iteration" - }, - { - "completed_net_ids": [ - "net_00", - "net_01", - "net_04", - "net_05", - "net_08", - "net_09" - ], - "conflict_edges": [ - [ - "net_02", - "net_03" - ], - [ - "net_06", - "net_07" - ] - ], - "iteration": 4, - "nets": [ - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_00", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1207.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_07" - ], - "net_id": "net_06", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 980.0796326794897 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_09", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1217.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_05", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 914.6410526793834 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_08", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1138.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_02" - ], - "net_id": "net_03", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 970.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_06", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_06", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_06" - ], - "net_id": "net_07", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1059.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_03", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_03", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_03" - ], - "net_id": "net_02", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1049.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_04", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 909.9977565924808 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_01", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1128.0796326794896 - } - } - ], - "stage": "iteration" - }, - { - "completed_net_ids": [ - "net_00", - "net_01", - "net_04", - "net_05", - "net_08", - "net_09" - ], - "conflict_edges": [ - [ - "net_02", - "net_03" - ], - [ - "net_06", - "net_07" - ] - ], - "iteration": 5, - "nets": [ - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_00", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1207.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_01", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1128.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_04", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 909.9977565924808 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_09", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1217.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_03", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_03", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_03" - ], - "net_id": "net_02", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1049.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_05", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 914.6410526793834 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_08", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1138.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_06", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_06", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_06" - ], - "net_id": "net_07", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1059.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_07" - ], - "net_id": "net_06", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 980.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_02" - ], - "net_id": "net_03", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 970.0796326794897 - } - } - ], - "stage": "iteration" - }, - { - "completed_net_ids": [ - "net_00", - "net_01", - "net_04", - "net_05", - "net_08", - "net_09" - ], - "conflict_edges": [ - [ - "net_02", - "net_03" - ], - [ - "net_06", - "net_07" - ] - ], - "iteration": null, - "nets": [ - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_00", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1207.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_01", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1128.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_04", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 909.9977565924808 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_09", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1217.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_03", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_03", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_03" - ], - "net_id": "net_02", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1049.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_05", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 914.6410526793834 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_08", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1138.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_06", - "self_component_index": 1 - }, - { - "other_component_index": 2, - "other_net_id": "net_06", - "self_component_index": 2 - } - ], - "conflicting_net_ids": [ - "net_06" - ], - "net_id": "net_07", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 2, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1059.0796326794896 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_07", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_07", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_07" - ], - "net_id": "net_06", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 980.0796326794897 - } - }, - { - "component_conflicts": [ - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 1 - }, - { - "other_component_index": 1, - "other_net_id": "net_02", - "self_component_index": 2 - }, - { - "other_component_index": 2, - "other_net_id": "net_02", - "self_component_index": 3 - } - ], - "conflicting_net_ids": [ - "net_02" - ], - "net_id": "net_03", - "outcome": "colliding", - "reached_target": true, - "report": { - "dynamic_collision_count": 3, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 970.0796326794897 - } - } - ], - "stage": "restored_best" - }, - { - "completed_net_ids": [ - "net_00", - "net_01", - "net_02", - "net_03", - "net_04", - "net_05", - "net_06", - "net_07", - "net_08", - "net_09" - ], - "conflict_edges": [], - "iteration": null, - "nets": [ - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_00", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1207.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_01", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1128.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_04", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 909.9977565924808 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_09", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1217.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_02", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1049.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_05", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 914.6410526793834 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_08", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1138.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_07", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1059.0796326794896 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_06", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 980.0796326794897 - } - }, - { - "component_conflicts": [], - "conflicting_net_ids": [], - "net_id": "net_03", - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 970.0796326794897 - } - } - ], - "stage": "final" - } - ], - "metrics": { - "congestion_cache_hits": 24, - "congestion_cache_misses": 3411, - "congestion_candidate_ids": 7213, - "congestion_candidate_nets": 7410, - "congestion_candidate_precheck_hits": 1677, - "congestion_candidate_precheck_misses": 1795, - "congestion_candidate_precheck_skips": 37, - "congestion_check_calls": 3411, - "congestion_exact_pair_checks": 5860, - "congestion_grid_net_cache_hits": 1676, - "congestion_grid_net_cache_misses": 3276, - "congestion_grid_span_cache_hits": 1517, - "congestion_grid_span_cache_misses": 1637, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1801, - "congestion_net_envelope_cache_misses": 3433, - "congestion_presence_cache_hits": 1857, - "congestion_presence_cache_misses": 2075, - "congestion_presence_skips": 460, - "danger_map_cache_hits": 13605, - "danger_map_cache_misses": 6252, - "danger_map_lookup_calls": 19857, - "danger_map_query_calls": 6252, - "danger_map_total_ns": 184537291, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 430, - "dynamic_path_objects_removed": 384, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3275.0, - "guidance_bonus_applied_bend90": 1075.0, - "guidance_bonus_applied_sbend": 200.0, - "guidance_bonus_applied_straight": 2000.0, - "guidance_match_moves": 131, - "guidance_match_moves_bend90": 43, - "guidance_match_moves_sbend": 8, - "guidance_match_moves_straight": 80, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 40, - "iteration_conflicting_nets": 39, - "iteration_reverified_nets": 60, - "iteration_reverify_calls": 6, - "late_phase_capped_fallbacks": 2, - "late_phase_capped_nets": 2, - "move_cache_abs_hits": 1831, - "move_cache_abs_misses": 5516, - "move_cache_rel_hits": 4926, - "move_cache_rel_misses": 590, - "moves_added": 6594, - "moves_generated": 7347, - "nets_carried_forward": 6, - "nets_reached_target": 52, - "nets_routed": 54, - "nodes_expanded": 1408, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 42, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 414, - "pruned_cost": 339, - "pruned_hard_collision": 0, - "ray_cast_calls": 4577, - "ray_cast_calls_expand_forward": 1356, - "ray_cast_calls_expand_snap": 36, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3179, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 162, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 6, - "score_component_calls": 6958, - "score_component_total_ns": 208990676, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1778, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1638, - "verify_dynamic_exact_pair_checks": 507, - "verify_path_report_calls": 152, - "verify_static_buffer_ops": 699, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1356, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "name": "example_07_large_scale_routing_no_warm_start", - "summary": { - "reached_targets": 10, - "results_by_net": { - "net_00": { - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1207.0796326794896 - } - }, - "net_01": { - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1128.0796326794896 - } - }, - "net_02": { - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1049.0796326794896 - } - }, - "net_03": { - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 970.0796326794897 - } - }, - "net_04": { - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 909.9977565924808 - } - }, - "net_05": { - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 914.6410526793834 - } - }, - "net_06": { - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 980.0796326794897 - } - }, - "net_07": { - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1059.0796326794896 - } - }, - "net_08": { - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1138.0796326794896 - } - }, - "net_09": { - "outcome": "completed", - "reached_target": true, - "report": { - "dynamic_collision_count": 0, - "out_of_bounds": false, - "self_collision_count": 0, - "static_collision_count": 0, - "total_length": 1217.0796326794896 - } - } - }, - "total_results": 10, - "valid_results": 10 - } - } - ] -} diff --git a/archive/routing/conflict_trace.md b/archive/routing/conflict_trace.md deleted file mode 100644 index 01d43db..0000000 --- a/archive/routing/conflict_trace.md +++ /dev/null @@ -1,57 +0,0 @@ -# Conflict Trace - -Generated at 2026-11-26T21:47:32-08:00 by `scripts/record_conflict_trace.py`. - -## example_07_large_scale_routing_no_warm_start - -Results: 10 valid / 10 reached / 10 total. - -| Stage | Iteration | Conflicting Nets | Conflict Edges | Completed Nets | -| :-- | --: | --: | --: | --: | -| iteration | 0 | 9 | 16 | 1 | -| iteration | 1 | 8 | 12 | 2 | -| iteration | 2 | 5 | 4 | 5 | -| iteration | 3 | 8 | 4 | 2 | -| iteration | 4 | 4 | 2 | 6 | -| iteration | 5 | 4 | 2 | 6 | -| restored_best | | 4 | 2 | 6 | -| final | | 0 | 0 | 10 | - -Top nets by traced dynamic-collision stages: - -- `net_06`: 7 -- `net_07`: 7 -- `net_02`: 7 -- `net_03`: 6 -- `net_00`: 4 -- `net_01`: 4 -- `net_08`: 3 -- `net_09`: 3 -- `net_05`: 1 - -Top net pairs by frequency: - -- `net_06` <-> `net_07`: 7 -- `net_02` <-> `net_03`: 6 -- `net_00` <-> `net_01`: 4 -- `net_00` <-> `net_02`: 3 -- `net_01` <-> `net_02`: 3 -- `net_08` <-> `net_09`: 3 -- `net_00` <-> `net_03`: 2 -- `net_01` <-> `net_03`: 2 -- `net_06` <-> `net_08`: 2 -- `net_06` <-> `net_09`: 2 - -Top component pairs by frequency: - -- `net_06[3]` <-> `net_07[2]`: 6 -- `net_06[2]` <-> `net_07[2]`: 6 -- `net_06[1]` <-> `net_07[1]`: 6 -- `net_02[2]` <-> `net_03[3]`: 5 -- `net_02[1]` <-> `net_03[1]`: 5 -- `net_02[2]` <-> `net_03[2]`: 5 -- `net_06[2]` <-> `net_07[1]`: 5 -- `net_02[1]` <-> `net_03[2]`: 4 -- `net_01[2]` <-> `net_02[2]`: 3 -- `net_01[2]` <-> `net_02[3]`: 3 - diff --git a/archive/routing/documentation-improvement-plan.md b/archive/routing/documentation-improvement-plan.md deleted file mode 100644 index d3d0f39..0000000 --- a/archive/routing/documentation-improvement-plan.md +++ /dev/null @@ -1,60 +0,0 @@ -# Documentation improvement plan - -Give readers a direct path to their task. A new user should be able to route a layout and diagnose a failure. A developer should be able to run a benchmark, explain a routing decision, or find the right diagnostic. Before the reorganization, the benchmark link opened on corridor algorithms and several pages buried steps and choices in long paragraphs. The original combined page is available with `git show 24559bb:docs/topological-routing.md`. - -## Proposed navigation - -- **`README.md`** gives the project purpose, installation, and one runnable route with an inline result plot. Link directly to **User guide**, **Developer guide**, and **Benchmarks**. -- **`DOCS.md`** is the user landing page. - - **Route a layout** in `docs/user/route-a-layout.md`. Define ports, headings, widths, and keepouts. Show preplaced crossings, movable seeds, and fixed routes where each matters in the workflow. - - **Tune and troubleshoot** in `docs/user/tune-and-troubleshoot.md`. Read a result, distinguish a geometric bound from an unfinished search or a collision, and choose the next setting to test. - - **API reference** in `docs/user/api-reference.md`. Look up public signatures, fields, units, and defaults. Link back to a worked example when an option's effect needs explanation. - - **Examples** in `examples/README.md`. Show a small visual gallery grouped by task, with links to runnable scripts and advanced examples. -- **`docs/development.md`** is the developer landing page. - - **Benchmarks** in `docs/benchmarks.md`. Choose a case and profile, run a command, and compare the results. - - **Architecture** in `docs/architecture.md`. Explain the automatic stage sequence, what gets locked or retried, and what must be verified before selection. Link to `docs/topological-routing.md` for corridor and lane algorithms. - - **Diagnostics** in `docs/routing-diagnostics.md`. Start from a symptom and select a report, counter, or trace. Use a worked trace to show what the evidence can establish. - - **Design and experiment records** link to prior goals, refactor plans, measured results, and generated traces with their original context. - -## Split benchmarks from topological routing - -1. Make the README's **Benchmarks** link lead directly to `docs/benchmarks.md`. Open with `overloaded-gate` under `corpus-regression`, where three of four nets route at the three-track bound. Use the output to explain how to judge coverage. Follow with choices for the full regression corpus, mode comparisons, and holdout validation. -2. Move case groups, profile definitions, coverage and cost interpretation, and comparison commands to the benchmark guide. Put fixture provenance, import commands, and Terminal-Bench reproduction in `docs/benchmark-fixtures.md`. Put probe and retry findings in `docs/benchmark-results.md`, with the decision, the conditions, and the evidence needed to reproduce it. -3. Keep `docs/topological-routing.md` focused on free-space triangulation, portals, lane assignment, and how guide and seed modes use them. Use a contextual link to the benchmark guide when a reader wants to measure the algorithms. -4. Update inbound links as part of the move. Map old section links to their new destinations and keep brief forwarding links for useful bookmarks. Preserve the source pins, licenses, and historical commands with the fixture and experiment records. - -## Write for scanning and use - -- Open each page with the task it supports and put the first action or decision near the top. Name headings after what readers are looking for, such as **Run a benchmark** or **Why a net stopped short**. -- Use numbered lists for procedures, bullets for independent checks and options, and tables for lookup or comparison. Use short paragraphs to explain why a decision follows from the evidence. -- Keep the public workflows and option reference separate. Explain an option at the point where a user needs to choose it, then link to its canonical default or field definition. -- Pair an example with its expected result and the next action it demonstrates. Put implementation names and detailed counters beside the developer decisions that use them. -- Lead benchmark findings with their implication. Include the profile, comparison baseline, and relevant metric. Link to the full measurements when readers need the raw evidence. - -## Illustrations to add - -| Place | Show | Reader takeaway | -| --- | --- | --- | -| README quick start | A compact plot generated from the exact quick-start snippet, with start and target arrows | See what a finished path looks like and how to read arrival direction. | -| Route a layout | A preplaced crossing with the keepout, port access, and the external nets labeled | See which geometry belongs to the placed device and which connections to give Inire. | -| Troubleshooting | Two panels of the same best-effort layout showing a partial path and a completed path after increasing the budget | See why a partial path can indicate unfinished search. | -| Examples gallery | Inline previews of selected existing plots, including locked paths and S-bends | Pick the example that resembles the layout at hand. | -| Architecture | A small flow diagram of construct, probe, widen, recover, verify, and refine | See where the router stops, retries, or rejects a candidate. | -| Topological routing | A single fixture shown as free space and portals, a chosen lane, and the verified physical route | See where the corridor ends and the detailed router's work begins. | - -Use the existing plots where they read clearly at page width. Regenerate focused figures from the documented inputs with the existing plotting tools. Give each figure a caption that explains what to notice and alt text that conveys the takeaway. Distinguish states with labels or line styles as well as color. Use a checked-in image for diagrams when the repository renderer needs one. [Example plots](../../examples/README.md) · [Plotting helpers](../../inire/utils/visualization.py) - -## Order of work - -1. **Fix navigation.** Split the benchmark and topology pages, add the developer landing page, and update links. This is the first reviewable change. -2. **Rebuild the user path.** Turn `DOCS.md` into a guide index, move the field tables into the reference, and write the layout and troubleshooting pages as steps and decisions. Add the quick-start, crossing, and partial-route figures. -3. **Finish the developer path.** Rework the architecture and diagnostics headings, add the flow and corridor figures, and connect the benchmark guide to fixtures and dated results. Embed the selected existing plots in the examples gallery. -4. **Check the paths as a reader.** Preview the rendered docs at normal and narrow widths. Check links, old anchors, image paths, and command output. Run the quick start, a benchmark smoke case, and a diagnostic capture from the published instructions. - -## Acceptance checks - -- From the README, a new user can install, run the first route, see the expected result inline, and find what to check if a real layout returns a partial path. -- From the README, a developer can click **Benchmarks** and immediately find how to run a case. The landing page gives enough context to compare verified IDs, path cost, and work under a chosen profile. -- A developer looking for corridor internals reaches the topology page through **Architecture** and can follow the stages in an annotated figure. -- Each main page has one clear job. The headings alone make the path through it apparent, and procedural sections can be followed from their lists. -- Figures match the current snippets or fixtures, remain legible at ordinary page width, and have descriptive captions. Historical measurements and fixture attributions remain findable from the relevant guide. diff --git a/archive/routing/frontier_trace.json b/archive/routing/frontier_trace.json deleted file mode 100644 index ae89d71..0000000 --- a/archive/routing/frontier_trace.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "generated_at": "2026-11-26T21:47:35-08:00", - "generator": "scripts/record_frontier_trace.py", - "scenarios": [ - { - "frontier_trace": [], - "metrics": { - "congestion_cache_hits": 24, - "congestion_cache_misses": 3411, - "congestion_candidate_ids": 7213, - "congestion_candidate_nets": 7410, - "congestion_candidate_precheck_hits": 1677, - "congestion_candidate_precheck_misses": 1795, - "congestion_candidate_precheck_skips": 37, - "congestion_check_calls": 3411, - "congestion_exact_pair_checks": 5860, - "congestion_grid_net_cache_hits": 1676, - "congestion_grid_net_cache_misses": 3276, - "congestion_grid_span_cache_hits": 1517, - "congestion_grid_span_cache_misses": 1637, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1801, - "congestion_net_envelope_cache_misses": 3433, - "congestion_presence_cache_hits": 1857, - "congestion_presence_cache_misses": 2075, - "congestion_presence_skips": 460, - "danger_map_cache_hits": 13605, - "danger_map_cache_misses": 6252, - "danger_map_lookup_calls": 19857, - "danger_map_query_calls": 6252, - "danger_map_total_ns": 180793966, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 430, - "dynamic_path_objects_removed": 384, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3275.0, - "guidance_bonus_applied_bend90": 1075.0, - "guidance_bonus_applied_sbend": 200.0, - "guidance_bonus_applied_straight": 2000.0, - "guidance_match_moves": 131, - "guidance_match_moves_bend90": 43, - "guidance_match_moves_sbend": 8, - "guidance_match_moves_straight": 80, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 40, - "iteration_conflicting_nets": 39, - "iteration_reverified_nets": 60, - "iteration_reverify_calls": 6, - "late_phase_capped_fallbacks": 2, - "late_phase_capped_nets": 2, - "move_cache_abs_hits": 1831, - "move_cache_abs_misses": 5516, - "move_cache_rel_hits": 4926, - "move_cache_rel_misses": 590, - "moves_added": 6594, - "moves_generated": 7347, - "nets_carried_forward": 6, - "nets_reached_target": 52, - "nets_routed": 54, - "nodes_expanded": 1408, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 42, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 414, - "pruned_cost": 339, - "pruned_hard_collision": 0, - "ray_cast_calls": 4577, - "ray_cast_calls_expand_forward": 1356, - "ray_cast_calls_expand_snap": 36, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3179, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 162, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 6, - "score_component_calls": 6958, - "score_component_total_ns": 205362623, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1778, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1638, - "verify_dynamic_exact_pair_checks": 507, - "verify_path_report_calls": 152, - "verify_static_buffer_ops": 699, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1356, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "name": "example_07_large_scale_routing_no_warm_start", - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 10 - } - } - ] -} diff --git a/archive/routing/frontier_trace.md b/archive/routing/frontier_trace.md deleted file mode 100644 index 42c635b..0000000 --- a/archive/routing/frontier_trace.md +++ /dev/null @@ -1,23 +0,0 @@ -# Frontier Trace - -Generated at 2026-11-26T21:47:35-08:00 by `scripts/record_frontier_trace.py`. - -## example_07_large_scale_routing_no_warm_start - -Results: 10 valid / 10 reached / 10 total. - -| Net | Hotspots | Closed-Set | Hard Collision | Self Collision | Cost | Samples | -| :-- | --: | --: | --: | --: | --: | --: | - -Prune totals by reason: - -- None - -Top traced hotspots by sample count: - -- None - -Per-net sampled reason/move breakdown: - -- None - diff --git a/archive/routing/iteration_trace.json b/archive/routing/iteration_trace.json deleted file mode 100644 index 9954a8e..0000000 --- a/archive/routing/iteration_trace.json +++ /dev/null @@ -1,1520 +0,0 @@ -{ - "generated_at": "2026-11-26T21:47:40-08:00", - "generator": "scripts/record_iteration_trace.py", - "scenarios": [ - { - "iteration_trace": [ - { - "completed_nets": 1, - "conflict_edges": 16, - "congestion_candidate_ids": 0, - "congestion_check_calls": 0, - "congestion_exact_pair_checks": 0, - "congestion_penalty": 100.0, - "iteration": 0, - "net_attempts": [ - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_08", - "nodes_expanded": 106, - "pruned_closed_set": 58, - "pruned_cost": 2, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_06", - "nodes_expanded": 12, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_03", - "nodes_expanded": 12, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_00", - "nodes_expanded": 158, - "pruned_closed_set": 72, - "pruned_cost": 74, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_07", - "nodes_expanded": 14, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_01", - "nodes_expanded": 38, - "pruned_closed_set": 14, - "pruned_cost": 2, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_09", - "nodes_expanded": 209, - "pruned_closed_set": 93, - "pruned_cost": 99, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_02", - "nodes_expanded": 14, - "pruned_closed_set": 3, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_04", - "nodes_expanded": 4, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_05", - "nodes_expanded": 4, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 571, - "routed_net_ids": [ - "net_08", - "net_06", - "net_03", - "net_00", - "net_07", - "net_01", - "net_09", - "net_02", - "net_04", - "net_05" - ], - "total_dynamic_collisions": 50 - }, - { - "completed_nets": 2, - "conflict_edges": 12, - "congestion_candidate_ids": 2581, - "congestion_check_calls": 1074, - "congestion_exact_pair_checks": 2150, - "congestion_penalty": 140.0, - "iteration": 1, - "net_attempts": [ - { - "congestion_check_calls": 27, - "guidance_seed_present": true, - "net_id": "net_04", - "nodes_expanded": 4, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 283, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 72, - "pruned_closed_set": 13, - "pruned_cost": 18, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 45, - "guidance_seed_present": true, - "net_id": "net_01", - "nodes_expanded": 8, - "pruned_closed_set": 2, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 31, - "guidance_seed_present": true, - "net_id": "net_09", - "nodes_expanded": 6, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 26, - "guidance_seed_present": true, - "net_id": "net_05", - "nodes_expanded": 4, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 36, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 8, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 33, - "guidance_seed_present": true, - "net_id": "net_00", - "nodes_expanded": 7, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 363, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 110, - "pruned_closed_set": 19, - "pruned_cost": 42, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 184, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 41, - "pruned_closed_set": 7, - "pruned_cost": 8, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 46, - "guidance_seed_present": true, - "net_id": "net_08", - "nodes_expanded": 9, - "pruned_closed_set": 2, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 269, - "routed_net_ids": [ - "net_04", - "net_06", - "net_01", - "net_09", - "net_05", - "net_02", - "net_00", - "net_03", - "net_07", - "net_08" - ], - "total_dynamic_collisions": 54 - }, - { - "completed_nets": 5, - "conflict_edges": 4, - "congestion_candidate_ids": 1868, - "congestion_check_calls": 980, - "congestion_exact_pair_checks": 1539, - "congestion_penalty": 196.0, - "iteration": 2, - "net_attempts": [ - { - "congestion_check_calls": 26, - "guidance_seed_present": true, - "net_id": "net_05", - "nodes_expanded": 4, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 356, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 104, - "pruned_closed_set": 32, - "pruned_cost": 36, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 27, - "guidance_seed_present": true, - "net_id": "net_04", - "nodes_expanded": 4, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 236, - "guidance_seed_present": true, - "net_id": "net_01", - "nodes_expanded": 54, - "pruned_closed_set": 15, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 69, - "guidance_seed_present": true, - "net_id": "net_08", - "nodes_expanded": 16, - "pruned_closed_set": 6, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 59, - "guidance_seed_present": true, - "net_id": "net_09", - "nodes_expanded": 14, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 31, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 6, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 38, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 8, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 29, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 6, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 109, - "guidance_seed_present": true, - "net_id": "net_00", - "nodes_expanded": 28, - "pruned_closed_set": 6, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 244, - "routed_net_ids": [ - "net_05", - "net_02", - "net_04", - "net_01", - "net_08", - "net_09", - "net_03", - "net_06", - "net_07", - "net_00" - ], - "total_dynamic_collisions": 18 - }, - { - "completed_nets": 2, - "conflict_edges": 4, - "congestion_candidate_ids": 977, - "congestion_check_calls": 483, - "congestion_exact_pair_checks": 749, - "congestion_penalty": 274.4, - "iteration": 3, - "net_attempts": [ - { - "congestion_check_calls": 28, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 7, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 104, - "guidance_seed_present": true, - "net_id": "net_01", - "nodes_expanded": 17, - "pruned_closed_set": 6, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 49, - "guidance_seed_present": true, - "net_id": "net_09", - "nodes_expanded": 11, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 51, - "guidance_seed_present": true, - "net_id": "net_00", - "nodes_expanded": 11, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 30, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 7, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 26, - "guidance_seed_present": true, - "net_id": "net_05", - "nodes_expanded": 4, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 27, - "guidance_seed_present": true, - "net_id": "net_04", - "nodes_expanded": 4, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 37, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 9, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 38, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 9, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 93, - "guidance_seed_present": true, - "net_id": "net_08", - "nodes_expanded": 16, - "pruned_closed_set": 5, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 95, - "routed_net_ids": [ - "net_02", - "net_01", - "net_09", - "net_00", - "net_07", - "net_05", - "net_04", - "net_06", - "net_03", - "net_08" - ], - "total_dynamic_collisions": 20 - }, - { - "completed_nets": 6, - "conflict_edges": 2, - "congestion_candidate_ids": 1370, - "congestion_check_calls": 703, - "congestion_exact_pair_checks": 1137, - "congestion_penalty": 384.15999999999997, - "iteration": 4, - "net_attempts": [ - { - "congestion_check_calls": 26, - "guidance_seed_present": true, - "net_id": "net_00", - "nodes_expanded": 9, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 187, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 50, - "pruned_closed_set": 8, - "pruned_cost": 18, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 26, - "guidance_seed_present": true, - "net_id": "net_09", - "nodes_expanded": 9, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 26, - "guidance_seed_present": true, - "net_id": "net_05", - "nodes_expanded": 4, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 46, - "guidance_seed_present": true, - "net_id": "net_08", - "nodes_expanded": 12, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 255, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 80, - "pruned_closed_set": 10, - "pruned_cost": 40, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 30, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 7, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 32, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 8, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 27, - "guidance_seed_present": true, - "net_id": "net_04", - "nodes_expanded": 5, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 48, - "guidance_seed_present": true, - "net_id": "net_01", - "nodes_expanded": 12, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 196, - "routed_net_ids": [ - "net_00", - "net_06", - "net_09", - "net_05", - "net_08", - "net_03", - "net_07", - "net_02", - "net_04", - "net_01" - ], - "total_dynamic_collisions": 10 - }, - { - "completed_nets": 6, - "conflict_edges": 2, - "congestion_candidate_ids": 417, - "congestion_check_calls": 171, - "congestion_exact_pair_checks": 285, - "congestion_penalty": 537.824, - "iteration": 5, - "net_attempts": [ - { - "congestion_check_calls": 85, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 16, - "pruned_closed_set": 3, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 86, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 17, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 0, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 0, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 33, - "routed_net_ids": [ - "net_07", - "net_02", - "net_06", - "net_03" - ], - "total_dynamic_collisions": 10 - } - ], - "metrics": { - "congestion_cache_hits": 24, - "congestion_cache_misses": 3411, - "congestion_candidate_ids": 7213, - "congestion_candidate_nets": 7410, - "congestion_candidate_precheck_hits": 1677, - "congestion_candidate_precheck_misses": 1795, - "congestion_candidate_precheck_skips": 37, - "congestion_check_calls": 3411, - "congestion_exact_pair_checks": 5860, - "congestion_grid_net_cache_hits": 1676, - "congestion_grid_net_cache_misses": 3276, - "congestion_grid_span_cache_hits": 1517, - "congestion_grid_span_cache_misses": 1637, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1801, - "congestion_net_envelope_cache_misses": 3433, - "congestion_presence_cache_hits": 1857, - "congestion_presence_cache_misses": 2075, - "congestion_presence_skips": 460, - "danger_map_cache_hits": 13605, - "danger_map_cache_misses": 6252, - "danger_map_lookup_calls": 19857, - "danger_map_query_calls": 6252, - "danger_map_total_ns": 182546071, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 430, - "dynamic_path_objects_removed": 384, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3275.0, - "guidance_bonus_applied_bend90": 1075.0, - "guidance_bonus_applied_sbend": 200.0, - "guidance_bonus_applied_straight": 2000.0, - "guidance_match_moves": 131, - "guidance_match_moves_bend90": 43, - "guidance_match_moves_sbend": 8, - "guidance_match_moves_straight": 80, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 40, - "iteration_conflicting_nets": 39, - "iteration_reverified_nets": 60, - "iteration_reverify_calls": 6, - "late_phase_capped_fallbacks": 2, - "late_phase_capped_nets": 2, - "move_cache_abs_hits": 1831, - "move_cache_abs_misses": 5516, - "move_cache_rel_hits": 4926, - "move_cache_rel_misses": 590, - "moves_added": 6594, - "moves_generated": 7347, - "nets_carried_forward": 6, - "nets_reached_target": 52, - "nets_routed": 54, - "nodes_expanded": 1408, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 42, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 414, - "pruned_cost": 339, - "pruned_hard_collision": 0, - "ray_cast_calls": 4577, - "ray_cast_calls_expand_forward": 1356, - "ray_cast_calls_expand_snap": 36, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3179, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 162, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 6, - "score_component_calls": 6958, - "score_component_total_ns": 206527340, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1778, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1638, - "verify_dynamic_exact_pair_checks": 507, - "verify_path_report_calls": 152, - "verify_static_buffer_ops": 699, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1356, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "name": "example_07_large_scale_routing_no_warm_start", - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 10 - } - }, - { - "iteration_trace": [ - { - "completed_nets": 1, - "conflict_edges": 16, - "congestion_candidate_ids": 0, - "congestion_check_calls": 0, - "congestion_exact_pair_checks": 0, - "congestion_penalty": 100.0, - "iteration": 0, - "net_attempts": [ - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_00", - "nodes_expanded": 158, - "pruned_closed_set": 72, - "pruned_cost": 74, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_05", - "nodes_expanded": 4, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_07", - "nodes_expanded": 14, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_01", - "nodes_expanded": 38, - "pruned_closed_set": 14, - "pruned_cost": 2, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_09", - "nodes_expanded": 209, - "pruned_closed_set": 93, - "pruned_cost": 99, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_08", - "nodes_expanded": 106, - "pruned_closed_set": 58, - "pruned_cost": 2, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_06", - "nodes_expanded": 12, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_03", - "nodes_expanded": 12, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_02", - "nodes_expanded": 14, - "pruned_closed_set": 3, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": false, - "net_id": "net_04", - "nodes_expanded": 4, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 571, - "routed_net_ids": [ - "net_00", - "net_05", - "net_07", - "net_01", - "net_09", - "net_08", - "net_06", - "net_03", - "net_02", - "net_04" - ], - "total_dynamic_collisions": 50 - }, - { - "completed_nets": 1, - "conflict_edges": 13, - "congestion_candidate_ids": 2807, - "congestion_check_calls": 1037, - "congestion_exact_pair_checks": 2205, - "congestion_penalty": 140.0, - "iteration": 1, - "net_attempts": [ - { - "congestion_check_calls": 31, - "guidance_seed_present": true, - "net_id": "net_09", - "nodes_expanded": 6, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 46, - "guidance_seed_present": true, - "net_id": "net_08", - "nodes_expanded": 9, - "pruned_closed_set": 2, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 32, - "guidance_seed_present": true, - "net_id": "net_00", - "nodes_expanded": 6, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 259, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 86, - "pruned_closed_set": 19, - "pruned_cost": 44, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 27, - "guidance_seed_present": true, - "net_id": "net_04", - "nodes_expanded": 4, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 43, - "guidance_seed_present": true, - "net_id": "net_01", - "nodes_expanded": 7, - "pruned_closed_set": 2, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 363, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 110, - "pruned_closed_set": 19, - "pruned_cost": 42, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 29, - "guidance_seed_present": true, - "net_id": "net_05", - "nodes_expanded": 5, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 160, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 38, - "pruned_closed_set": 5, - "pruned_cost": 8, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 47, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 10, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 281, - "routed_net_ids": [ - "net_09", - "net_08", - "net_00", - "net_07", - "net_04", - "net_01", - "net_03", - "net_05", - "net_02", - "net_06" - ], - "total_dynamic_collisions": 53 - }, - { - "completed_nets": 4, - "conflict_edges": 3, - "congestion_candidate_ids": 1678, - "congestion_check_calls": 697, - "congestion_exact_pair_checks": 1289, - "congestion_penalty": 196.0, - "iteration": 2, - "net_attempts": [ - { - "congestion_check_calls": 117, - "guidance_seed_present": true, - "net_id": "net_08", - "nodes_expanded": 25, - "pruned_closed_set": 8, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 50, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 10, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 93, - "guidance_seed_present": true, - "net_id": "net_01", - "nodes_expanded": 20, - "pruned_closed_set": 7, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 170, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 48, - "pruned_closed_set": 2, - "pruned_cost": 17, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 60, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 13, - "pruned_closed_set": 2, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 72, - "guidance_seed_present": true, - "net_id": "net_09", - "nodes_expanded": 13, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 43, - "guidance_seed_present": true, - "net_id": "net_00", - "nodes_expanded": 12, - "pruned_closed_set": 3, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 26, - "guidance_seed_present": true, - "net_id": "net_05", - "nodes_expanded": 4, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 39, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 8, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 27, - "guidance_seed_present": true, - "net_id": "net_04", - "nodes_expanded": 4, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 157, - "routed_net_ids": [ - "net_08", - "net_07", - "net_01", - "net_06", - "net_02", - "net_09", - "net_00", - "net_05", - "net_03", - "net_04" - ], - "total_dynamic_collisions": 15 - }, - { - "completed_nets": 4, - "conflict_edges": 3, - "congestion_candidate_ids": 610, - "congestion_check_calls": 277, - "congestion_exact_pair_checks": 455, - "congestion_penalty": 274.4, - "iteration": 3, - "net_attempts": [ - { - "congestion_check_calls": 38, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 9, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 30, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 7, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 30, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 7, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 49, - "guidance_seed_present": true, - "net_id": "net_09", - "nodes_expanded": 11, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 93, - "guidance_seed_present": true, - "net_id": "net_08", - "nodes_expanded": 16, - "pruned_closed_set": 5, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 37, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 9, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 59, - "routed_net_ids": [ - "net_03", - "net_07", - "net_02", - "net_09", - "net_08", - "net_06" - ], - "total_dynamic_collisions": 15 - }, - { - "completed_nets": 6, - "conflict_edges": 2, - "congestion_candidate_ids": 1201, - "congestion_check_calls": 584, - "congestion_exact_pair_checks": 958, - "congestion_penalty": 384.15999999999997, - "iteration": 4, - "net_attempts": [ - { - "congestion_check_calls": 30, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 7, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 32, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 8, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 195, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 51, - "pruned_closed_set": 8, - "pruned_cost": 18, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 255, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 80, - "pruned_closed_set": 10, - "pruned_cost": 40, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 26, - "guidance_seed_present": true, - "net_id": "net_09", - "nodes_expanded": 9, - "pruned_closed_set": 1, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 46, - "guidance_seed_present": true, - "net_id": "net_08", - "nodes_expanded": 12, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 167, - "routed_net_ids": [ - "net_07", - "net_02", - "net_06", - "net_03", - "net_09", - "net_08" - ], - "total_dynamic_collisions": 10 - }, - { - "completed_nets": 6, - "conflict_edges": 2, - "congestion_candidate_ids": 419, - "congestion_check_calls": 171, - "congestion_exact_pair_checks": 287, - "congestion_penalty": 537.824, - "iteration": 5, - "net_attempts": [ - { - "congestion_check_calls": 85, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 16, - "pruned_closed_set": 3, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 86, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 17, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 0, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - }, - { - "congestion_check_calls": 0, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 0, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "reached_target": true - } - ], - "nodes_expanded": 33, - "routed_net_ids": [ - "net_07", - "net_02", - "net_06", - "net_03" - ], - "total_dynamic_collisions": 10 - } - ], - "metrics": { - "congestion_cache_hits": 8, - "congestion_cache_misses": 2766, - "congestion_candidate_ids": 6715, - "congestion_candidate_nets": 6315, - "congestion_candidate_precheck_hits": 1342, - "congestion_candidate_precheck_misses": 1509, - "congestion_candidate_precheck_skips": 77, - "congestion_check_calls": 2766, - "congestion_exact_pair_checks": 5194, - "congestion_grid_net_cache_hits": 1366, - "congestion_grid_net_cache_misses": 2753, - "congestion_grid_span_cache_hits": 1230, - "congestion_grid_span_cache_misses": 1404, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1435, - "congestion_net_envelope_cache_misses": 2856, - "congestion_presence_cache_hits": 1498, - "congestion_presence_cache_misses": 1717, - "congestion_presence_skips": 364, - "danger_map_cache_hits": 12083, - "danger_map_cache_misses": 5623, - "danger_map_lookup_calls": 17706, - "danger_map_query_calls": 5623, - "danger_map_total_ns": 154640823, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 397, - "dynamic_path_objects_removed": 350, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3000.0, - "guidance_bonus_applied_bend90": 1150.0, - "guidance_bonus_applied_sbend": 100.0, - "guidance_bonus_applied_straight": 1750.0, - "guidance_match_moves": 120, - "guidance_match_moves_bend90": 46, - "guidance_match_moves_sbend": 4, - "guidance_match_moves_straight": 70, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 39, - "iteration_conflicting_nets": 39, - "iteration_reverified_nets": 60, - "iteration_reverify_calls": 6, - "late_phase_capped_fallbacks": 2, - "late_phase_capped_nets": 2, - "move_cache_abs_hits": 1479, - "move_cache_abs_misses": 5117, - "move_cache_rel_hits": 4529, - "move_cache_rel_misses": 588, - "moves_added": 5884, - "moves_generated": 6596, - "nets_carried_forward": 14, - "nets_reached_target": 44, - "nets_routed": 46, - "nodes_expanded": 1268, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 42, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 366, - "pruned_cost": 346, - "pruned_hard_collision": 0, - "ray_cast_calls": 4200, - "ray_cast_calls_expand_forward": 1224, - "ray_cast_calls_expand_snap": 13, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 2957, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 167, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 6, - "score_component_calls": 6248, - "score_component_total_ns": 176194432, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1444, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1543, - "verify_dynamic_exact_pair_checks": 511, - "verify_path_report_calls": 144, - "verify_static_buffer_ops": 666, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1224, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "name": "example_07_large_scale_routing_no_warm_start_seed43", - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 10 - } - } - ] -} diff --git a/archive/routing/iteration_trace.md b/archive/routing/iteration_trace.md deleted file mode 100644 index a546383..0000000 --- a/archive/routing/iteration_trace.md +++ /dev/null @@ -1,82 +0,0 @@ -# Iteration Trace - -Generated at 2026-11-26T21:47:40-08:00 by `scripts/record_iteration_trace.py`. - -## example_07_large_scale_routing_no_warm_start - -Results: 10 valid / 10 reached / 10 total. - -| Iteration | Penalty | Routed Nets | Completed | Conflict Edges | Dynamic Collisions | Nodes | Congestion Checks | Candidate Ids | Exact Pairs | -| --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | -| 0 | 100.0 | 10 | 1 | 16 | 50 | 571 | 0 | 0 | 0 | -| 1 | 140.0 | 10 | 2 | 12 | 54 | 269 | 1074 | 2581 | 2150 | -| 2 | 196.0 | 10 | 5 | 4 | 18 | 244 | 980 | 1868 | 1539 | -| 3 | 274.4 | 10 | 2 | 4 | 20 | 95 | 483 | 977 | 749 | -| 4 | 384.2 | 10 | 6 | 2 | 10 | 196 | 703 | 1370 | 1137 | -| 5 | 537.8 | 4 | 6 | 2 | 10 | 33 | 171 | 417 | 285 | - -Top nets by iteration-attributed nodes expanded: - -- `net_09`: 249 -- `net_03`: 217 -- `net_00`: 213 -- `net_08`: 159 -- `net_02`: 158 -- `net_06`: 151 -- `net_01`: 129 -- `net_07`: 91 -- `net_04`: 21 -- `net_05`: 20 - -Top nets by iteration-attributed congestion checks: - -- `net_03`: 687 -- `net_06`: 545 -- `net_02`: 538 -- `net_01`: 433 -- `net_07`: 358 -- `net_08`: 254 -- `net_00`: 219 -- `net_09`: 165 -- `net_04`: 108 -- `net_05`: 104 - -## example_07_large_scale_routing_no_warm_start_seed43 - -Results: 10 valid / 10 reached / 10 total. - -| Iteration | Penalty | Routed Nets | Completed | Conflict Edges | Dynamic Collisions | Nodes | Congestion Checks | Candidate Ids | Exact Pairs | -| --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | -| 0 | 100.0 | 10 | 1 | 16 | 50 | 571 | 0 | 0 | 0 | -| 1 | 140.0 | 10 | 1 | 13 | 53 | 281 | 1037 | 2807 | 2205 | -| 2 | 196.0 | 10 | 4 | 3 | 15 | 157 | 697 | 1678 | 1289 | -| 3 | 274.4 | 6 | 4 | 3 | 15 | 59 | 277 | 610 | 455 | -| 4 | 384.2 | 6 | 6 | 2 | 10 | 167 | 584 | 1201 | 958 | -| 5 | 537.8 | 4 | 6 | 2 | 10 | 33 | 171 | 419 | 287 | - -Top nets by iteration-attributed nodes expanded: - -- `net_09`: 248 -- `net_03`: 219 -- `net_00`: 176 -- `net_08`: 168 -- `net_07`: 140 -- `net_06`: 130 -- `net_02`: 97 -- `net_01`: 65 -- `net_05`: 13 -- `net_04`: 12 - -Top nets by iteration-attributed congestion checks: - -- `net_03`: 695 -- `net_07`: 454 -- `net_06`: 449 -- `net_02`: 368 -- `net_08`: 302 -- `net_09`: 178 -- `net_01`: 136 -- `net_00`: 75 -- `net_05`: 55 -- `net_04`: 54 - diff --git a/archive/routing/optimization_pass_01_log.md b/archive/routing/optimization_pass_01_log.md deleted file mode 100644 index 47e0989..0000000 --- a/archive/routing/optimization_pass_01_log.md +++ /dev/null @@ -1,3741 +0,0 @@ -# Optimization Pass 01 Log - -Use this historical log to trace why a visibility, congestion, or pair-local optimization was adopted or dropped. Paths in the entries reflect the repository at the time of measurement. The [baseline snapshot](performance_baseline.json) now lives alongside the log. [Current diagnostics guide](../../docs/routing-diagnostics.md#route-metrics) - -## Step 0 - Pre-optimization baseline - -Measured on 2026-03-31T18:02:56-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Current default tangent-corner routing still pays for eager exact visibility-graph construction. -- Visibility-build ray casts dominate all three hotspot scenarios before any routing changes. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_04_sbends_and_radii | duration_s | 1.9938 | 2.0940 | +0.1002 | -| example_04_sbends_and_radii | nodes_expanded | 15.0000 | 15.0000 | +0.0000 | -| example_04_sbends_and_radii | visibility_builds | 3.0000 | 3.0000 | +0.0000 | -| example_04_sbends_and_radii | visibility_corner_pairs_checked | 18148.0000 | 18148.0000 | +0.0000 | -| example_04_sbends_and_radii | ray_cast_calls | 18218.0000 | 18218.0000 | +0.0000 | -| example_04_sbends_and_radii | ray_cast_calls_visibility_build | 18148.0000 | 18148.0000 | +0.0000 | -| example_04_sbends_and_radii | ray_cast_exact_geometry_checks | 21265.0000 | 21265.0000 | +0.0000 | -| example_04_sbends_and_radii | ray_cast_candidate_bounds | 50717.0000 | 50717.0000 | +0.0000 | -| example_06_bend_collision_models | duration_s | 4.1186 | 4.2483 | +0.1297 | -| example_06_bend_collision_models | nodes_expanded | 240.0000 | 240.0000 | +0.0000 | -| example_06_bend_collision_models | visibility_builds | 6.0000 | 6.0000 | +0.0000 | -| example_06_bend_collision_models | visibility_corner_pairs_checked | 39848.0000 | 39848.0000 | +0.0000 | -| example_06_bend_collision_models | ray_cast_calls | 40530.0000 | 40530.0000 | +0.0000 | -| example_06_bend_collision_models | ray_cast_calls_visibility_build | 39848.0000 | 39848.0000 | +0.0000 | -| example_06_bend_collision_models | ray_cast_exact_geometry_checks | 36858.0000 | 36858.0000 | +0.0000 | -| example_06_bend_collision_models | ray_cast_candidate_bounds | 121732.0000 | 121732.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 1.3734 | 1.4031 | +0.0297 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | visibility_builds | 11.0000 | 11.0000 | +0.0000 | -| example_07_large_scale_routing | visibility_corner_pairs_checked | 10768.0000 | 10768.0000 | +0.0000 | -| example_07_large_scale_routing | ray_cast_calls | 11151.0000 | 11151.0000 | +0.0000 | -| example_07_large_scale_routing | ray_cast_calls_visibility_build | 10768.0000 | 10768.0000 | +0.0000 | -| example_07_large_scale_routing | ray_cast_exact_geometry_checks | 11651.0000 | 11651.0000 | +0.0000 | -| example_07_large_scale_routing | ray_cast_candidate_bounds | 21198.0000 | 21198.0000 | +0.0000 | -## Step 1 - Lazy visibility state split - -Measured on 2026-03-31T18:05:49-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Corner-index rebuilds are now measured separately from exact visibility-graph builds. -- Default tangent-corner routing still triggers exact graph work at query time, so visibility-build counters remain hot in this step. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_04_sbends_and_radii | duration_s | 1.9938 | 0.2543 | -1.7395 | -| example_04_sbends_and_radii | nodes_expanded | 15.0000 | 15.0000 | +0.0000 | -| example_04_sbends_and_radii | visibility_corner_index_builds | - | 2.0000 | - | -| example_04_sbends_and_radii | visibility_builds | 3.0000 | 2.0000 | -1.0000 | -| example_04_sbends_and_radii | visibility_corner_pairs_checked | 18148.0000 | 1892.0000 | -16256.0000 | -| example_04_sbends_and_radii | ray_cast_calls | 18218.0000 | 1962.0000 | -16256.0000 | -| example_04_sbends_and_radii | ray_cast_calls_visibility_build | 18148.0000 | 1892.0000 | -16256.0000 | -| example_04_sbends_and_radii | ray_cast_exact_geometry_checks | 21265.0000 | 2445.0000 | -18820.0000 | -| example_04_sbends_and_radii | ray_cast_candidate_bounds | 50717.0000 | 3864.0000 | -46853.0000 | -| example_06_bend_collision_models | duration_s | 4.1186 | 0.2055 | -3.9131 | -| example_06_bend_collision_models | nodes_expanded | 240.0000 | 240.0000 | +0.0000 | -| example_06_bend_collision_models | visibility_corner_index_builds | - | 3.0000 | - | -| example_06_bend_collision_models | visibility_builds | 6.0000 | 3.0000 | -3.0000 | -| example_06_bend_collision_models | visibility_corner_pairs_checked | 39848.0000 | 396.0000 | -39452.0000 | -| example_06_bend_collision_models | ray_cast_calls | 40530.0000 | 1078.0000 | -39452.0000 | -| example_06_bend_collision_models | ray_cast_calls_visibility_build | 39848.0000 | 396.0000 | -39452.0000 | -| example_06_bend_collision_models | ray_cast_exact_geometry_checks | 36858.0000 | 0.0000 | -36858.0000 | -| example_06_bend_collision_models | ray_cast_candidate_bounds | 121732.0000 | 877.0000 | -120855.0000 | -| example_07_large_scale_routing | duration_s | 1.3734 | 1.3958 | +0.0224 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | visibility_corner_index_builds | - | 10.0000 | - | -| example_07_large_scale_routing | visibility_builds | 11.0000 | 10.0000 | -1.0000 | -| example_07_large_scale_routing | visibility_corner_pairs_checked | 10768.0000 | 10768.0000 | +0.0000 | -| example_07_large_scale_routing | ray_cast_calls | 11151.0000 | 11151.0000 | +0.0000 | -| example_07_large_scale_routing | ray_cast_calls_visibility_build | 10768.0000 | 10768.0000 | +0.0000 | -| example_07_large_scale_routing | ray_cast_exact_geometry_checks | 11651.0000 | 11651.0000 | +0.0000 | -| example_07_large_scale_routing | ray_cast_candidate_bounds | 21198.0000 | 21198.0000 | +0.0000 | -## Step 2 - Tangent-corner cheap path - -Measured on 2026-03-31T18:06:53-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Default tangent-corner expansion now uses only the corner index and never requests the exact corner graph. -- The expected win is zero visibility-build ray casts in the hotspot trio while keeping node counts stable. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_04_sbends_and_radii | duration_s | 1.9938 | 0.0280 | -1.9659 | -| example_04_sbends_and_radii | nodes_expanded | 15.0000 | 15.0000 | +0.0000 | -| example_04_sbends_and_radii | visibility_corner_index_builds | - | 2.0000 | - | -| example_04_sbends_and_radii | visibility_builds | 3.0000 | 0.0000 | -3.0000 | -| example_04_sbends_and_radii | visibility_corner_pairs_checked | 18148.0000 | 0.0000 | -18148.0000 | -| example_04_sbends_and_radii | ray_cast_calls | 18218.0000 | 70.0000 | -18148.0000 | -| example_04_sbends_and_radii | ray_cast_calls_visibility_build | 18148.0000 | 0.0000 | -18148.0000 | -| example_04_sbends_and_radii | ray_cast_exact_geometry_checks | 21265.0000 | 0.0000 | -21265.0000 | -| example_04_sbends_and_radii | ray_cast_candidate_bounds | 50717.0000 | 4.0000 | -50713.0000 | -| example_06_bend_collision_models | duration_s | 4.1186 | 0.1900 | -3.9286 | -| example_06_bend_collision_models | nodes_expanded | 240.0000 | 240.0000 | +0.0000 | -| example_06_bend_collision_models | visibility_corner_index_builds | - | 3.0000 | - | -| example_06_bend_collision_models | visibility_builds | 6.0000 | 0.0000 | -6.0000 | -| example_06_bend_collision_models | visibility_corner_pairs_checked | 39848.0000 | 0.0000 | -39848.0000 | -| example_06_bend_collision_models | ray_cast_calls | 40530.0000 | 682.0000 | -39848.0000 | -| example_06_bend_collision_models | ray_cast_calls_visibility_build | 39848.0000 | 0.0000 | -39848.0000 | -| example_06_bend_collision_models | ray_cast_exact_geometry_checks | 36858.0000 | 0.0000 | -36858.0000 | -| example_06_bend_collision_models | ray_cast_candidate_bounds | 121732.0000 | 97.0000 | -121635.0000 | -| example_07_large_scale_routing | duration_s | 1.3734 | 0.2042 | -1.1693 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | visibility_corner_index_builds | - | 10.0000 | - | -| example_07_large_scale_routing | visibility_builds | 11.0000 | 0.0000 | -11.0000 | -| example_07_large_scale_routing | visibility_corner_pairs_checked | 10768.0000 | 0.0000 | -10768.0000 | -| example_07_large_scale_routing | ray_cast_calls | 11151.0000 | 383.0000 | -10768.0000 | -| example_07_large_scale_routing | ray_cast_calls_visibility_build | 10768.0000 | 0.0000 | -10768.0000 | -| example_07_large_scale_routing | ray_cast_exact_geometry_checks | 11651.0000 | 150.0000 | -11501.0000 | -| example_07_large_scale_routing | ray_cast_candidate_bounds | 21198.0000 | 683.0000 | -20515.0000 | -## Step 3 - Final optimized baseline - -Measured on 2026-03-31T18:08:19-07:00. -Baseline: `/tmp/inire_pre_optimization_baseline.json`. - -Findings: - -- Committed baseline artifacts were regenerated from the optimized router after the tangent-corner change landed. -- The hotspot trio now reaches the same node counts with zero exact visibility-graph builds in default tangent-corner mode. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_04_sbends_and_radii | duration_s | 1.9938 | 0.0279 | -1.9659 | -| example_04_sbends_and_radii | nodes_expanded | 15.0000 | 15.0000 | +0.0000 | -| example_04_sbends_and_radii | visibility_corner_index_builds | - | 2.0000 | - | -| example_04_sbends_and_radii | visibility_builds | 3.0000 | 0.0000 | -3.0000 | -| example_04_sbends_and_radii | visibility_corner_pairs_checked | 18148.0000 | 0.0000 | -18148.0000 | -| example_04_sbends_and_radii | ray_cast_calls | 18218.0000 | 70.0000 | -18148.0000 | -| example_04_sbends_and_radii | ray_cast_calls_visibility_build | 18148.0000 | 0.0000 | -18148.0000 | -| example_04_sbends_and_radii | ray_cast_exact_geometry_checks | 21265.0000 | 0.0000 | -21265.0000 | -| example_04_sbends_and_radii | ray_cast_candidate_bounds | 50717.0000 | 4.0000 | -50713.0000 | -| example_06_bend_collision_models | duration_s | 4.1186 | 0.1900 | -3.9286 | -| example_06_bend_collision_models | nodes_expanded | 240.0000 | 240.0000 | +0.0000 | -| example_06_bend_collision_models | visibility_corner_index_builds | - | 3.0000 | - | -| example_06_bend_collision_models | visibility_builds | 6.0000 | 0.0000 | -6.0000 | -| example_06_bend_collision_models | visibility_corner_pairs_checked | 39848.0000 | 0.0000 | -39848.0000 | -| example_06_bend_collision_models | ray_cast_calls | 40530.0000 | 682.0000 | -39848.0000 | -| example_06_bend_collision_models | ray_cast_calls_visibility_build | 39848.0000 | 0.0000 | -39848.0000 | -| example_06_bend_collision_models | ray_cast_exact_geometry_checks | 36858.0000 | 0.0000 | -36858.0000 | -| example_06_bend_collision_models | ray_cast_candidate_bounds | 121732.0000 | 97.0000 | -121635.0000 | -| example_07_large_scale_routing | duration_s | 1.3734 | 0.2004 | -1.1730 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | visibility_corner_index_builds | - | 10.0000 | - | -| example_07_large_scale_routing | visibility_builds | 11.0000 | 0.0000 | -11.0000 | -| example_07_large_scale_routing | visibility_corner_pairs_checked | 10768.0000 | 0.0000 | -10768.0000 | -| example_07_large_scale_routing | ray_cast_calls | 11151.0000 | 383.0000 | -10768.0000 | -| example_07_large_scale_routing | ray_cast_calls_visibility_build | 10768.0000 | 0.0000 | -10768.0000 | -| example_07_large_scale_routing | ray_cast_exact_geometry_checks | 11651.0000 | 150.0000 | -11501.0000 | -| example_07_large_scale_routing | ray_cast_candidate_bounds | 21198.0000 | 683.0000 | -20515.0000 | -## Step 4 - Tangent candidate scan baseline - -Measured on 2026-03-31T18:33:15-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- The next hotspot is tangent-corner candidate scanning, especially example_02 and example_07. -- This baseline captures current candidate-check volume before narrowing the corner-index query window. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3365 | 0.3321 | -0.0044 | -| example_02_congestion_resolution | nodes_expanded | 366.0000 | 366.0000 | +0.0000 | -| example_02_congestion_resolution | visibility_tangent_candidate_scans | 363.0000 | 363.0000 | +0.0000 | -| example_02_congestion_resolution | visibility_tangent_candidate_corner_checks | 18991.0000 | 18991.0000 | +0.0000 | -| example_02_congestion_resolution | visibility_tangent_candidate_ray_tests | 253.0000 | 253.0000 | +0.0000 | -| example_02_congestion_resolution | ray_cast_calls | 1164.0000 | 1164.0000 | +0.0000 | -| example_02_congestion_resolution | danger_map_lookup_calls | 2208.0000 | 2208.0000 | +0.0000 | -| example_02_congestion_resolution | score_component_calls | 976.0000 | 976.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2503 | 0.2404 | -0.0099 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | visibility_tangent_candidate_scans | 280.0000 | 280.0000 | +0.0000 | -| example_05_orientation_stress | visibility_tangent_candidate_corner_checks | 1483.0000 | 1483.0000 | +0.0000 | -| example_05_orientation_stress | visibility_tangent_candidate_ray_tests | 9.0000 | 9.0000 | +0.0000 | -| example_05_orientation_stress | ray_cast_calls | 1243.0000 | 1243.0000 | +0.0000 | -| example_05_orientation_stress | danger_map_lookup_calls | 2079.0000 | 2079.0000 | +0.0000 | -| example_05_orientation_stress | score_component_calls | 1198.0000 | 1198.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.2034 | 0.1962 | -0.0072 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | visibility_tangent_candidate_scans | 68.0000 | 68.0000 | +0.0000 | -| example_07_large_scale_routing | visibility_tangent_candidate_corner_checks | 34735.0000 | 34735.0000 | +0.0000 | -| example_07_large_scale_routing | visibility_tangent_candidate_ray_tests | 77.0000 | 77.0000 | +0.0000 | -| example_07_large_scale_routing | ray_cast_calls | 383.0000 | 383.0000 | +0.0000 | -| example_07_large_scale_routing | danger_map_lookup_calls | 681.0000 | 681.0000 | +0.0000 | -| example_07_large_scale_routing | score_component_calls | 291.0000 | 291.0000 | +0.0000 | -## Step 5 - Tangent candidate strip query - -Measured on 2026-03-31T18:34:10-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Tangent-corner candidate collection now queries orientation-aware radius strips instead of scanning a full square around each search state. -- The main acceptance signal is lower tangent corner checks with unchanged node counts and route outcomes. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3365 | 0.3361 | -0.0004 | -| example_02_congestion_resolution | nodes_expanded | 366.0000 | 366.0000 | +0.0000 | -| example_02_congestion_resolution | visibility_tangent_candidate_scans | 363.0000 | 363.0000 | +0.0000 | -| example_02_congestion_resolution | visibility_tangent_candidate_corner_checks | 18991.0000 | 873.0000 | -18118.0000 | -| example_02_congestion_resolution | visibility_tangent_candidate_ray_tests | 253.0000 | 253.0000 | +0.0000 | -| example_02_congestion_resolution | ray_cast_calls | 1164.0000 | 1164.0000 | +0.0000 | -| example_02_congestion_resolution | danger_map_lookup_calls | 2208.0000 | 2208.0000 | +0.0000 | -| example_02_congestion_resolution | score_component_calls | 976.0000 | 976.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2503 | 0.2500 | -0.0003 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | visibility_tangent_candidate_scans | 280.0000 | 280.0000 | +0.0000 | -| example_05_orientation_stress | visibility_tangent_candidate_corner_checks | 1483.0000 | 70.0000 | -1413.0000 | -| example_05_orientation_stress | visibility_tangent_candidate_ray_tests | 9.0000 | 9.0000 | +0.0000 | -| example_05_orientation_stress | ray_cast_calls | 1243.0000 | 1243.0000 | +0.0000 | -| example_05_orientation_stress | danger_map_lookup_calls | 2079.0000 | 2079.0000 | +0.0000 | -| example_05_orientation_stress | score_component_calls | 1198.0000 | 1198.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.2034 | 0.1874 | -0.0160 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | visibility_tangent_candidate_scans | 68.0000 | 68.0000 | +0.0000 | -| example_07_large_scale_routing | visibility_tangent_candidate_corner_checks | 34735.0000 | 321.0000 | -34414.0000 | -| example_07_large_scale_routing | visibility_tangent_candidate_ray_tests | 77.0000 | 77.0000 | +0.0000 | -| example_07_large_scale_routing | ray_cast_calls | 383.0000 | 383.0000 | +0.0000 | -| example_07_large_scale_routing | danger_map_lookup_calls | 681.0000 | 681.0000 | +0.0000 | -| example_07_large_scale_routing | score_component_calls | 291.0000 | 291.0000 | +0.0000 | -## Step 6 - Empty danger-map fast path - -Measured on 2026-03-31T18:50:25-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Scoring now skips danger-map sampling when the KD-tree is empty, which should primarily help obstacle-free scenarios. -- The no-warm-start example_07 variant is included as a canary; it is not part of the default baseline corpus, so baseline values may be absent on first measurement. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3325 | 0.3260 | -0.0065 | -| example_02_congestion_resolution | nodes_expanded | 366.0000 | 366.0000 | +0.0000 | -| example_02_congestion_resolution | score_component_calls | 976.0000 | 976.0000 | +0.0000 | -| example_02_congestion_resolution | danger_map_lookup_calls | 2208.0000 | 0.0000 | -2208.0000 | -| example_02_congestion_resolution | danger_map_cache_hits | 1433.0000 | 0.0000 | -1433.0000 | -| example_02_congestion_resolution | danger_map_cache_misses | 775.0000 | 0.0000 | -775.0000 | -| example_02_congestion_resolution | warm_start_paths_built | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | warm_start_paths_used | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2404 | 0.2375 | -0.0029 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | score_component_calls | 1198.0000 | 1198.0000 | +0.0000 | -| example_05_orientation_stress | danger_map_lookup_calls | 2079.0000 | 0.0000 | -2079.0000 | -| example_05_orientation_stress | danger_map_cache_hits | 1386.0000 | 0.0000 | -1386.0000 | -| example_05_orientation_stress | danger_map_cache_misses | 693.0000 | 0.0000 | -693.0000 | -| example_05_orientation_stress | warm_start_paths_built | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | warm_start_paths_used | 2.0000 | 2.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | added | - | - | - | -## Step 7 - Verification baseline - -Measured on 2026-03-31T19:00:03-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- The next low-risk optimization target is redundant verification during refinement, especially in example_02. -- The no-warm-start example_07 canary stays in the measurement set even though it is not part of the default baseline corpus. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3220 | 0.3304 | +0.0084 | -| example_02_congestion_resolution | verify_path_report_calls | 35.0000 | 35.0000 | +0.0000 | -| example_02_congestion_resolution | refine_path_calls | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | refinement_candidates_verified | 26.0000 | 26.0000 | +0.0000 | -| example_02_congestion_resolution | refinement_candidates_accepted | 2.0000 | 2.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | warm_start_paths_built | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | warm_start_paths_used | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2340 | 0.2348 | +0.0008 | -| example_05_orientation_stress | verify_path_report_calls | 12.0000 | 12.0000 | +0.0000 | -| example_05_orientation_stress | refine_path_calls | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | refinement_candidates_verified | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | refinement_candidates_accepted | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | warm_start_paths_built | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | warm_start_paths_used | 2.0000 | 2.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | added | - | - | - | -## Step 8 - Deferred refinement verification - -Measured on 2026-03-31T19:02:46-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Per-net verification inside _refine_results() is now deferred to the final verification pass to avoid verifying the same refined path twice. -- The main expected signal is fewer verify_path_report_calls with unchanged route outcomes. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3220 | 0.3273 | +0.0052 | -| example_02_congestion_resolution | verify_path_report_calls | 35.0000 | 32.0000 | -3.0000 | -| example_02_congestion_resolution | refine_path_calls | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | refinement_candidates_verified | 26.0000 | 26.0000 | +0.0000 | -| example_02_congestion_resolution | refinement_candidates_accepted | 2.0000 | 2.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | warm_start_paths_built | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | warm_start_paths_used | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2340 | 0.2350 | +0.0011 | -| example_05_orientation_stress | verify_path_report_calls | 12.0000 | 9.0000 | -3.0000 | -| example_05_orientation_stress | refine_path_calls | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | refinement_candidates_verified | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | refinement_candidates_accepted | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | warm_start_paths_built | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | warm_start_paths_used | 2.0000 | 2.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | added | - | - | - | -## Step 9 - Dynamic rtree for congestion and verification - -Measured on 2026-03-31T20:12:56-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Dynamic congestion confirmation and dynamic-path verification now use the mutable rtree index instead of rebuilding a transient STRtree. -- The expected signal is dynamic_tree_rebuilds dropping to zero on the normal corpus while route outcomes stay unchanged. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3211 | 0.3273 | +0.0062 | -| example_02_congestion_resolution | dynamic_tree_rebuilds | 6.0000 | 0.0000 | -6.0000 | -| example_02_congestion_resolution | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | verify_path_report_calls | 32.0000 | 32.0000 | +0.0000 | -| example_02_congestion_resolution | verify_dynamic_exact_pair_checks | 90.0000 | 130.0000 | +40.0000 | -| example_05_orientation_stress | duration_s | 0.2351 | 0.2324 | -0.0028 | -| example_05_orientation_stress | dynamic_tree_rebuilds | 10.0000 | 0.0000 | -10.0000 | -| example_05_orientation_stress | congestion_check_calls | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 66.0000 | 68.0000 | +2.0000 | -| example_05_orientation_stress | verify_path_report_calls | 9.0000 | 9.0000 | +0.0000 | -| example_05_orientation_stress | verify_dynamic_exact_pair_checks | 2.0000 | 4.0000 | +2.0000 | -| example_07_large_scale_routing_no_warm_start | added | - | - | - | -## Step 10 - Incremental dynamic congestion grid - -Measured on 2026-03-31T20:29:38-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Dynamic path removal is now net-owned and the congestion grid is updated incrementally instead of being invalidated and rebuilt. -- The expected signal is dynamic_grid_rebuilds dropping to zero and better performance on congestion-heavy or no-warm-start routing. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2394 | 0.2605 | +0.0211 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 68.0000 | 68.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_hits | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_grid_rebuilds | 3.0000 | 0.0000 | -3.0000 | -| example_05_orientation_stress | dynamic_path_objects_added | 37.0000 | 37.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_removed | 25.0000 | 25.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | added | - | - | - | -## Step 11 - Per-polygon congestion broad phase - -Measured on 2026-03-31T20:36:35-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Congestion candidate collection now scans per dilated polygon bounds instead of the move-wide union bounds. -- The main expected signal is fewer broad-phase candidate ids, especially on large dynamic-path states such as example_07 without warm start. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2541 | 0.2488 | -0.0053 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | - | 83.0000 | - | -| example_05_orientation_stress | congestion_exact_pair_checks | 68.0000 | 70.0000 | +2.0000 | -| example_05_orientation_stress | congestion_cache_hits | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_grid_rebuilds | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_added | 37.0000 | 37.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_removed | 25.0000 | 25.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1984 | 0.1867 | -0.0118 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | dynamic_grid_rebuilds | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | dynamic_path_objects_added | 88.0000 | 88.0000 | +0.0000 | -| example_07_large_scale_routing | dynamic_path_objects_removed | 44.0000 | 44.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | added | - | - | - | -## Step 12 - Cheap exact congestion predicates - -Measured on 2026-03-31T20:47:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Congestion and dynamic verification now use non-constructive overlap predicates instead of building intersection geometries for every exact pair check. -- The no-warm-start example_07 canary now reports its current metrics directly in the log, which makes the congestion hot path measurable even though it is not part of the committed baseline corpus. -- The canary runtime dropped materially with unchanged node and congestion counts, which confirms that exact confirmation cost was a major part of the remaining congestion overhead. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2541 | 0.2682 | +0.0141 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | - | 83.0000 | - | -| example_05_orientation_stress | congestion_exact_pair_checks | 68.0000 | 70.0000 | +2.0000 | -| example_05_orientation_stress | congestion_cache_hits | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_grid_rebuilds | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_added | 37.0000 | 37.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_removed | 25.0000 | 25.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 109.2839 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 173498.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 641300.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 1737551.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 1192907.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_hits | - | 5379.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 641300.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_grid_rebuilds | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_path_objects_added | - | 1601.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_path_objects_removed | - | 1462.0000 | - | -## Step 13 - Relevant-polygon exact congestion checks - -Measured on 2026-03-31T21:03:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Congestion candidate tracking now remembers which dilated move polygons produced each candidate object, so exact confirmation no longer retests candidates against unrelated polygons. -- This slice was largely neutral in aggregate counters: the no-warm-start canary still spent most of its time in congestion, which means the next win had to come from reducing how often congestion is queried at all. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2523 | 0.2753 | +0.0230 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 83.0000 | 83.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 70.0000 | 70.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_hits | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_grid_rebuilds | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_added | 37.0000 | 37.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_removed | 25.0000 | 25.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 104.0661 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 173498.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 641300.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 1737551.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 1208409.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_hits | - | 5379.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 641300.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_grid_rebuilds | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_path_objects_added | - | 1601.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_path_objects_removed | - | 1462.0000 | - | -## Step 14 - Self-collision before congestion - -Measured on 2026-03-31T21:08:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Moves that self-intersect the ancestor chain are now rejected before congestion scoring, so the search no longer spends congestion work on moves that will be discarded anyway. -- This is the first slice that materially cut congestion volume on the no-warm-start example_07 canary. -- Relative to Step 13, the canary dropped from `641300` to `529038` congestion checks, from `1737551` to `1164421` candidate ids, and from `1208409` to `838008` exact pair checks while runtime improved from `104.07s` to `102.02s`. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2523 | 0.2662 | +0.0139 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 83.0000 | 83.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 70.0000 | 70.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_hits | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 412.0000 | 412.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_grid_rebuilds | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_added | 37.0000 | 37.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_removed | 25.0000 | 25.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 102.0202 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 173498.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 529038.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 1164421.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 838008.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_hits | - | 3933.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 529038.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_grid_rebuilds | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_path_objects_added | - | 1601.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_path_objects_removed | - | 1462.0000 | - | -## Step 15 - Uncongested dominance before congestion - -Measured on 2026-03-31T21:18:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Admission now computes the uncongested component score before congestion and prunes moves that are already closed-set-dominated even with zero congestion penalty. -- This slice materially reduced congestion misses without increasing `score_component_calls`, so it removed congestion work instead of shifting it into scoring. -- Relative to Step 14, the no-warm-start example_07 canary dropped from `529038` to `344747` congestion checks, from `1164421` to `375624` candidate ids, and from `838008` to `314367` exact pair checks while runtime improved from `102.02s` to `88.86s`. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2494 | 0.2619 | +0.0125 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 412.0000 | 213.0000 | -199.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 83.0000 | 19.0000 | -64.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 70.0000 | 18.0000 | -52.0000 | -| example_05_orientation_stress | congestion_cache_hits | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 412.0000 | 213.0000 | -199.0000 | -| example_05_orientation_stress | dynamic_grid_rebuilds | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_added | 37.0000 | 37.0000 | +0.0000 | -| example_05_orientation_stress | dynamic_path_objects_removed | 25.0000 | 25.0000 | +0.0000 | -| example_05_orientation_stress | score_component_calls | 1198.0000 | 1198.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 88.8639 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 173498.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 344747.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 375624.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 314367.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_hits | - | 3300.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 344747.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_grid_rebuilds | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_path_objects_added | - | 1601.0000 | - | -| example_07_large_scale_routing_no_warm_start | dynamic_path_objects_removed | - | 1462.0000 | - | -| example_07_large_scale_routing_no_warm_start | score_component_calls | - | 534994.0000 | - | -## Step 16 - Lazy congestion on pop (rejected) - -Measured on 2026-03-31T23:55:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Congestion resolution was moved from move generation to node pop, with penalized nodes requeued after their overlap count was resolved. -- The first cut reduced raw congestion misses on the no-warm-start example_07 canary from `344747` to `331308`, but runtime still regressed to about `99.00s` and nodes expanded rose to `184853`. -- Tightening lazy-requeue bookkeeping did not recover the search-order penalty. A later measurement pushed the same canary to `153.63s`, `247887` expanded nodes, `427874` congestion misses, and `166395` lazy requeues. -- This pass was rejected and reverted. The remaining congestion misses appear structural, but optimistic unresolved nodes created too much extra search churn. -## Step 17 - Grid-span congestion broad-phase cache - -Measured on 2026-03-31T22:44:31-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Congestion broad-phase candidate unions are now cached by queried grid-cell span within a single A* run. -- The exact overlap cache still misses at the previous rate, but the new grid-span cache hits heavily on repeated local congestion probes. -- Relative to the reverted Step 15 state, the no-warm-start example_07 canary improved from about 87.20s to 84.71s with unchanged nodes expanded and congestion check calls. -- The canary's broad-phase work also dropped modestly, from 375624 to 364731 candidate ids and from 314367 to 305397 exact pair checks. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2386 | 0.2380 | -0.0007 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | moves_generated | 1624.0000 | 1624.0000 | +0.0000 | -| example_05_orientation_stress | moves_added | 681.0000 | 681.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_hits | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | congestion_grid_span_cache_hits | - | 133.0000 | - | -| example_05_orientation_stress | congestion_grid_span_cache_misses | - | 22.0000 | - | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1885 | 0.1841 | -0.0044 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | moves_generated | 372.0000 | 372.0000 | +0.0000 | -| example_07_large_scale_routing | moves_added | 227.0000 | 227.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_grid_span_cache_hits | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_grid_span_cache_misses | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 84.8404 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 173498.0000 | - | -| example_07_large_scale_routing_no_warm_start | moves_generated | - | 857732.0000 | - | -| example_07_large_scale_routing_no_warm_start | moves_added | - | 348559.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 344747.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_hits | - | 3300.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 344747.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_span_cache_hits | - | 199762.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_span_cache_misses | - | 26740.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 364731.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 305397.0000 | - | -## Step 18 - Net-envelope maintenance and counters - -Measured on 2026-03-31T23:05:08-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Added per-net dynamic envelope state and public counters without changing congestion or verification query behavior yet. -- The expected result for this slice is unchanged routing behavior; the new envelope counters should stay at zero until the broad phase starts using them. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2312 | 0.2343 | +0.0031 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | - | 0.0000 | - | -| example_05_orientation_stress | congestion_net_envelope_cache_hits | - | 0.0000 | - | -| example_05_orientation_stress | congestion_net_envelope_cache_misses | - | 0.0000 | - | -| example_05_orientation_stress | congestion_grid_span_cache_hits | 133.0000 | 133.0000 | +0.0000 | -| example_05_orientation_stress | congestion_grid_span_cache_misses | 22.0000 | 22.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_05_orientation_stress | verify_dynamic_candidate_nets | - | 0.0000 | - | -| example_07_large_scale_routing | duration_s | 0.1858 | 0.1833 | -0.0026 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_net_envelope_cache_hits | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_net_envelope_cache_misses | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_grid_span_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_grid_span_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | verify_dynamic_candidate_nets | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 84.6663 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 173498.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 344747.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_net_envelope_cache_hits | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_net_envelope_cache_misses | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_span_cache_hits | - | 199762.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_span_cache_misses | - | 26740.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 364731.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 305397.0000 | - | -| example_07_large_scale_routing_no_warm_start | verify_dynamic_candidate_nets | - | 0.0000 | - | -## Step 19 - Route-time net-envelope broad phase - -Measured on 2026-03-31T23:10:12-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Congestion checks now query per-net dynamic envelopes before descending into cached per-object candidate sets. -- Search order is unchanged in this slice; the acceptance signal is lower candidate-net and exact-pair work at the same node count. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2312 | 0.2443 | +0.0131 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | - | 15.0000 | - | -| example_05_orientation_stress | congestion_net_envelope_cache_hits | - | 133.0000 | - | -| example_05_orientation_stress | congestion_net_envelope_cache_misses | - | 22.0000 | - | -| example_05_orientation_stress | congestion_grid_span_cache_hits | 133.0000 | 11.0000 | -122.0000 | -| example_05_orientation_stress | congestion_grid_span_cache_misses | 22.0000 | 4.0000 | -18.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_05_orientation_stress | verify_dynamic_candidate_nets | - | 0.0000 | - | -| example_07_large_scale_routing | duration_s | 0.1858 | 0.1940 | +0.0081 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_net_envelope_cache_hits | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_net_envelope_cache_misses | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_grid_span_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_grid_span_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | verify_dynamic_candidate_nets | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 85.7274 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 173498.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 344747.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 557244.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_net_envelope_cache_hits | - | 199762.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_net_envelope_cache_misses | - | 26740.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_span_cache_hits | - | 193229.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_span_cache_misses | - | 25872.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 364731.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 305397.0000 | - | -| example_07_large_scale_routing_no_warm_start | verify_dynamic_candidate_nets | - | 0.0000 | - | -## Step 20 - Verification net-envelope broad phase - -Measured on 2026-03-31T23:14:19-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Final verification now queries dynamic net envelopes before descending into per-object overlap checks. -- This slice should leave routing search metrics stable and reduce dynamic verification scans when non-overlapping nets are present. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2312 | 0.2370 | +0.0058 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | - | 15.0000 | - | -| example_05_orientation_stress | congestion_net_envelope_cache_hits | - | 133.0000 | - | -| example_05_orientation_stress | congestion_net_envelope_cache_misses | - | 22.0000 | - | -| example_05_orientation_stress | congestion_grid_span_cache_hits | 133.0000 | 11.0000 | -122.0000 | -| example_05_orientation_stress | congestion_grid_span_cache_misses | 22.0000 | 4.0000 | -18.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_05_orientation_stress | verify_dynamic_candidate_nets | - | 3.0000 | - | -| example_05_orientation_stress | verify_dynamic_exact_pair_checks | 4.0000 | 4.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1858 | 0.1843 | -0.0016 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_net_envelope_cache_hits | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_net_envelope_cache_misses | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_grid_span_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_grid_span_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | verify_dynamic_candidate_nets | - | 158.0000 | - | -| example_07_large_scale_routing | verify_dynamic_exact_pair_checks | 27.0000 | 24.0000 | -3.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 85.5035 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 173498.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 344747.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 557244.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_net_envelope_cache_hits | - | 199762.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_net_envelope_cache_misses | - | 26740.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_span_cache_hits | - | 193229.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_span_cache_misses | - | 25872.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 364731.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 305397.0000 | - | -| example_07_large_scale_routing_no_warm_start | verify_dynamic_candidate_nets | - | 3723.0000 | - | -| example_07_large_scale_routing_no_warm_start | verify_dynamic_exact_pair_checks | - | 1428.0000 | - | -## Step 21 - Per-net grid occupancy before object descent - -Measured on 2026-03-31T23:45:12-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Congestion checks now cache candidate net ids from dynamic grid occupancy before building the heavier per-span object unions. -- On the no-warm-start example_07 canary, candidate nets fell materially from the prior net-envelope pass while nodes expanded and congestion check calls stayed flat. -- Object-level candidate ids and exact pair checks stayed essentially unchanged, so the next likely win is a finer-grained dynamic structure per long net rather than more cache layering. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2327 | 0.2399 | +0.0072 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_net_envelope_cache_hits | 133.0000 | 133.0000 | +0.0000 | -| example_05_orientation_stress | congestion_net_envelope_cache_misses | 22.0000 | 22.0000 | +0.0000 | -| example_05_orientation_stress | congestion_grid_net_cache_hits | - | 11.0000 | - | -| example_05_orientation_stress | congestion_grid_net_cache_misses | - | 4.0000 | - | -| example_05_orientation_stress | congestion_grid_span_cache_hits | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | congestion_grid_span_cache_misses | 4.0000 | 4.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_05_orientation_stress | verify_dynamic_candidate_nets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | verify_dynamic_exact_pair_checks | 4.0000 | 4.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1865 | 0.1881 | +0.0015 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_net_envelope_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_net_envelope_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_grid_net_cache_hits | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_grid_net_cache_misses | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_grid_span_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_grid_span_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | verify_dynamic_candidate_nets | 158.0000 | 158.0000 | +0.0000 | -| example_07_large_scale_routing | verify_dynamic_exact_pair_checks | 24.0000 | 24.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 85.4211 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 173498.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 344747.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 386147.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_net_envelope_cache_hits | - | 199762.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_net_envelope_cache_misses | - | 26740.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_net_cache_hits | - | 193229.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_net_cache_misses | - | 25872.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_span_cache_hits | - | 189741.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_grid_span_cache_misses | - | 25579.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 364731.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 305397.0000 | - | -| example_07_large_scale_routing_no_warm_start | verify_dynamic_candidate_nets | - | 3723.0000 | - | -| example_07_large_scale_routing_no_warm_start | verify_dynamic_exact_pair_checks | - | 1436.0000 | - | -## Step 22 - Segmented per-net dynamic envelopes (rejected) - -Measured on 2026-04-01T00:02:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Dynamic objects were grouped into small per-net segment envelopes and congestion/verification descended through those groups before raw object checks. -- This was the first pass aimed at reducing object-level confirmation work directly, but it regressed the no-warm-start example_07 canary instead of helping it. -- Relative to the accepted per-net grid-occupancy state, the canary worsened from about `85.36s` to `99.81s`, from `173498` to `187339` expanded nodes, from `344747` to `378630` congestion checks, and from `364731` to `392058` candidate ids. -- The segment layer appears to have increased search churn and broad-phase overhead enough to outweigh any local pruning benefit, so this pass was rejected and reverted. -## Step 23 - End-of-iteration reverify only - -Measured on 2026-04-01T19:00:59-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Added full end-of-iteration reverify using final installed geometry before deciding whether negotiated congestion should continue. -- This slice still reroutes every net every iteration; it only changes conflict truth and iteration metrics. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3241 | 0.3359 | +0.0118 | -| example_02_congestion_resolution | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_02_congestion_resolution | nets_routed | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | nets_carried_forward | - | 0.0000 | - | -| example_02_congestion_resolution | nodes_expanded | 366.0000 | 366.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | iteration_reverify_calls | - | 1.0000 | - | -| example_02_congestion_resolution | iteration_reverified_nets | - | 3.0000 | - | -| example_02_congestion_resolution | iteration_conflicting_nets | - | 0.0000 | - | -| example_02_congestion_resolution | iteration_conflict_edges | - | 0.0000 | - | -| example_02_congestion_resolution | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2283 | 0.2312 | +0.0029 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nets_carried_forward | - | 0.0000 | - | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | iteration_reverify_calls | - | 2.0000 | - | -| example_05_orientation_stress | iteration_reverified_nets | - | 6.0000 | - | -| example_05_orientation_stress | iteration_conflicting_nets | - | 2.0000 | - | -| example_05_orientation_stress | iteration_conflict_edges | - | 1.0000 | - | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1888 | 0.1921 | +0.0032 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nets_carried_forward | - | 0.0000 | - | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_reverify_calls | - | 1.0000 | - | -| example_07_large_scale_routing | iteration_reverified_nets | - | 10.0000 | - | -| example_07_large_scale_routing | iteration_conflicting_nets | - | 0.0000 | - | -| example_07_large_scale_routing | iteration_conflict_edges | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 85.3822 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 15.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 150.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_carried_forward | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 173498.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 344747.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 344747.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_reverify_calls | - | 15.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_reverified_nets | - | 150.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflicting_nets | - | 145.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflict_edges | - | 165.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 386147.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 364731.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 305397.0000 | - | -## Step 24 - Early stop on stalled conflict graph - -Measured on 2026-04-01T19:16:22-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Rejected selective reroute working-set policies after they made the no-warm-start canary dramatically slower. -- Kept end-of-iteration reverify and now stop negotiated-congestion once the final conflict graph repeats twice with no structural change. -- On the no-warm-start canary this cut runtime from about 85.9s to 5.45s, with route iterations dropping from 15 to 4 and congestion checks from 344747 to 12096. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3241 | 0.3460 | +0.0219 | -| example_02_congestion_resolution | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_02_congestion_resolution | nets_routed | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | nets_carried_forward | - | 0.0000 | - | -| example_02_congestion_resolution | nodes_expanded | 366.0000 | 366.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | iteration_reverify_calls | - | 1.0000 | - | -| example_02_congestion_resolution | iteration_reverified_nets | - | 3.0000 | - | -| example_02_congestion_resolution | iteration_conflicting_nets | - | 0.0000 | - | -| example_02_congestion_resolution | iteration_conflict_edges | - | 0.0000 | - | -| example_02_congestion_resolution | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2283 | 0.3251 | +0.0968 | -| example_05_orientation_stress | route_iterations | 2.0000 | 3.0000 | +1.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 9.0000 | +3.0000 | -| example_05_orientation_stress | nets_carried_forward | - | 0.0000 | - | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 571.0000 | +285.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 306.0000 | +93.0000 | -| example_05_orientation_stress | congestion_cache_misses | 213.0000 | 306.0000 | +93.0000 | -| example_05_orientation_stress | iteration_reverify_calls | - | 3.0000 | - | -| example_05_orientation_stress | iteration_reverified_nets | - | 9.0000 | - | -| example_05_orientation_stress | iteration_conflicting_nets | - | 6.0000 | - | -| example_05_orientation_stress | iteration_conflict_edges | - | 3.0000 | - | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 92.0000 | +77.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 80.0000 | +61.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 68.0000 | +50.0000 | -| example_07_large_scale_routing | duration_s | 0.1888 | 0.1998 | +0.0110 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nets_carried_forward | - | 0.0000 | - | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_reverify_calls | - | 1.0000 | - | -| example_07_large_scale_routing | iteration_reverified_nets | - | 10.0000 | - | -| example_07_large_scale_routing | iteration_conflicting_nets | - | 0.0000 | - | -| example_07_large_scale_routing | iteration_conflict_edges | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.4956 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_carried_forward | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4580.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 12096.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 12096.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_reverify_calls | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_reverified_nets | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflicting_nets | - | 34.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflict_edges | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 24413.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 21820.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 18030.0000 | - | -## Step 25 - Finalize stalled conflict stop - -Measured on 2026-04-01T19:17:59-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Removed the leftover full-reroute pre-eviction from the rejected working-set experiment so normal multi-net cases keep their previous search behavior. -- Accepted state: end-of-iteration reverify plus early termination when the conflict graph repeats twice without structural change. -- The no-warm-start example_07 canary now runs in about 5.8s with 4 iterations and 9865 congestion checks, while example_05 returns to 2 iterations and 213 congestion checks. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3241 | 0.3451 | +0.0209 | -| example_02_congestion_resolution | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_02_congestion_resolution | nets_routed | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | nets_carried_forward | - | 0.0000 | - | -| example_02_congestion_resolution | nodes_expanded | 366.0000 | 366.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | iteration_reverify_calls | - | 1.0000 | - | -| example_02_congestion_resolution | iteration_reverified_nets | - | 3.0000 | - | -| example_02_congestion_resolution | iteration_conflicting_nets | - | 0.0000 | - | -| example_02_congestion_resolution | iteration_conflict_edges | - | 0.0000 | - | -| example_02_congestion_resolution | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2283 | 0.2433 | +0.0150 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nets_carried_forward | - | 0.0000 | - | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | iteration_reverify_calls | - | 2.0000 | - | -| example_05_orientation_stress | iteration_reverified_nets | - | 6.0000 | - | -| example_05_orientation_stress | iteration_conflicting_nets | - | 2.0000 | - | -| example_05_orientation_stress | iteration_conflict_edges | - | 1.0000 | - | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1888 | 0.1982 | +0.0094 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nets_carried_forward | - | 0.0000 | - | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_reverify_calls | - | 1.0000 | - | -| example_07_large_scale_routing | iteration_reverified_nets | - | 10.0000 | - | -| example_07_large_scale_routing | iteration_conflicting_nets | - | 0.0000 | - | -| example_07_large_scale_routing | iteration_conflict_edges | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.7283 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_carried_forward | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 6567.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 9865.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 9865.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_reverify_calls | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_reverified_nets | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflicting_nets | - | 35.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflict_edges | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 12879.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 13342.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 11116.0000 | - | -## Step 24 - Conflict-directed reroute working set - -Measured on 2026-04-01T19:30:43-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Later iterations now reroute only unresolved nets plus a deterministic greedy cover of the end-of-iteration conflict graph. -- Repeated conflict signatures widen the working set to all conflicting nets and then all nets once if the graph keeps stalling. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3241 | 0.3261 | +0.0020 | -| example_02_congestion_resolution | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_02_congestion_resolution | nets_routed | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | nets_carried_forward | - | 0.0000 | - | -| example_02_congestion_resolution | nodes_expanded | 366.0000 | 366.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | iteration_reverify_calls | - | 1.0000 | - | -| example_02_congestion_resolution | iteration_reverified_nets | - | 3.0000 | - | -| example_02_congestion_resolution | iteration_conflicting_nets | - | 0.0000 | - | -| example_02_congestion_resolution | iteration_conflict_edges | - | 0.0000 | - | -| example_02_congestion_resolution | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2283 | 0.2246 | -0.0037 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 5.0000 | -1.0000 | -| example_05_orientation_stress | nets_carried_forward | - | 1.0000 | - | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 284.0000 | -2.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 207.0000 | -6.0000 | -| example_05_orientation_stress | congestion_cache_misses | 213.0000 | 207.0000 | -6.0000 | -| example_05_orientation_stress | iteration_reverify_calls | - | 2.0000 | - | -| example_05_orientation_stress | iteration_reverified_nets | - | 6.0000 | - | -| example_05_orientation_stress | iteration_conflicting_nets | - | 2.0000 | - | -| example_05_orientation_stress | iteration_conflict_edges | - | 1.0000 | - | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1888 | 0.1884 | -0.0004 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nets_carried_forward | - | 0.0000 | - | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_reverify_calls | - | 1.0000 | - | -| example_07_large_scale_routing | iteration_reverified_nets | - | 10.0000 | - | -| example_07_large_scale_routing | iteration_conflicting_nets | - | 0.0000 | - | -| example_07_large_scale_routing | iteration_conflict_edges | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 1626.2304 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 13.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 108.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_carried_forward | - | 13.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 1559998.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3699692.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 3699692.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_reverify_calls | - | 12.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_reverified_nets | - | 120.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflicting_nets | - | 113.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflict_edges | - | 138.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 3444090.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 2987961.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 2440828.0000 | - | -## Step 26 rejected - Progressive freezing reverted - -Measured on 2026-04-01T20:20:32-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- The progressive-freezing experiment was reverted after bounded no-warm-start probes reached only 2 valid routes after 4 iterations and consumed the one-shot thaw without restoring correctness. -- The tree below is the restored pre-freezing state so later passes can continue from the last accepted congestion baseline. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3384 | 0.3500 | +0.0115 | -| example_02_congestion_resolution | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_02_congestion_resolution | nets_routed | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | nets_carried_forward | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | nodes_expanded | 366.0000 | 366.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | iteration_reverify_calls | 1.0000 | 1.0000 | +0.0000 | -| example_02_congestion_resolution | iteration_conflicting_nets | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | iteration_conflict_edges | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2366 | 0.2547 | +0.0180 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nets_carried_forward | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 213.0000 | +0.0000 | -| example_05_orientation_stress | iteration_reverify_calls | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | iteration_conflicting_nets | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | iteration_conflict_edges | 1.0000 | 1.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1994 | 0.2061 | +0.0067 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nets_carried_forward | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_reverify_calls | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_conflicting_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_conflict_edges | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.9146 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_carried_forward | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 6567.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 9865.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_reverify_calls | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflicting_nets | - | 35.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflict_edges | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 12879.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 13342.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 11116.0000 | - | -## Step 26 - Progressive freezing and frozen hard prunes - -Measured on 2026-04-01T20:33:10-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Completed nets are now frozen after end-of-iteration reverify, later iterations reroute only the remaining unlocked nets, and overlaps with frozen nets are rejected as hard collisions. -- This slice also tracks best-so-far iteration quality so later slices can safely restore the strongest partial solution. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3384 | 0.3202 | -0.0182 | -| example_02_congestion_resolution | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_02_congestion_resolution | nets_routed | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | nets_carried_forward | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | frozen_nets_promoted | - | 3.0000 | - | -| example_02_congestion_resolution | frozen_nets_thawed | - | 0.0000 | - | -| example_02_congestion_resolution | frozen_net_hard_prunes | - | 0.0000 | - | -| example_02_congestion_resolution | best_iteration_completed_nets | - | 3.0000 | - | -| example_02_congestion_resolution | best_iteration_conflict_edges | - | 0.0000 | - | -| example_02_congestion_resolution | best_iteration_dynamic_collisions | - | 0.0000 | - | -| example_02_congestion_resolution | nodes_expanded | 366.0000 | 366.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2366 | 11.5966 | +11.3600 | -| example_05_orientation_stress | route_iterations | 2.0000 | 6.0000 | +4.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 14.0000 | +8.0000 | -| example_05_orientation_stress | nets_carried_forward | 0.0000 | 4.0000 | +4.0000 | -| example_05_orientation_stress | frozen_nets_promoted | - | 2.0000 | - | -| example_05_orientation_stress | frozen_nets_thawed | - | 1.0000 | - | -| example_05_orientation_stress | frozen_net_hard_prunes | - | 865.0000 | - | -| example_05_orientation_stress | best_iteration_completed_nets | - | 1.0000 | - | -| example_05_orientation_stress | best_iteration_conflict_edges | - | 1.0000 | - | -| example_05_orientation_stress | best_iteration_dynamic_collisions | - | 2.0000 | - | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 14395.0000 | +14109.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 24765.0000 | +24552.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 8658.0000 | +8643.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 10770.0000 | +10751.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 8579.0000 | +8561.0000 | -| example_07_large_scale_routing | duration_s | 0.1994 | 0.1901 | -0.0092 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nets_carried_forward | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | frozen_nets_promoted | - | 10.0000 | - | -| example_07_large_scale_routing | frozen_nets_thawed | - | 0.0000 | - | -| example_07_large_scale_routing | frozen_net_hard_prunes | - | 0.0000 | - | -| example_07_large_scale_routing | best_iteration_completed_nets | - | 10.0000 | - | -| example_07_large_scale_routing | best_iteration_conflict_edges | - | 0.0000 | - | -| example_07_large_scale_routing | best_iteration_dynamic_collisions | - | 0.0000 | - | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 2136.7523 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 8.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 62.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_carried_forward | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | frozen_nets_promoted | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | frozen_nets_thawed | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | frozen_net_hard_prunes | - | 76321.0000 | - | -| example_07_large_scale_routing_no_warm_start | best_iteration_completed_nets | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | best_iteration_conflict_edges | - | 12.0000 | - | -| example_07_large_scale_routing_no_warm_start | best_iteration_dynamic_collisions | - | 50.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 1849024.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4049028.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 4889029.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 4032868.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 3215112.0000 | - | -## Step 26 - Progressive freezing and frozen hard prunes - -Measured on 2026-04-01T20:36:40-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Completed nets are frozen after end-of-iteration reverify, later iterations reroute only the remaining unlocked nets, and overlaps with frozen nets are rejected as hard collisions. -- The router also restores the strongest reverified iteration snapshot before final refinement and verification. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_02_congestion_resolution | duration_s | 0.3384 | 0.3401 | +0.0017 | -| example_02_congestion_resolution | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_02_congestion_resolution | nets_routed | 3.0000 | 3.0000 | +0.0000 | -| example_02_congestion_resolution | nets_carried_forward | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | frozen_nets_promoted | - | 3.0000 | - | -| example_02_congestion_resolution | frozen_nets_thawed | - | 0.0000 | - | -| example_02_congestion_resolution | frozen_net_hard_prunes | - | 0.0000 | - | -| example_02_congestion_resolution | best_iteration_completed_nets | - | 3.0000 | - | -| example_02_congestion_resolution | best_iteration_conflict_edges | - | 0.0000 | - | -| example_02_congestion_resolution | best_iteration_dynamic_collisions | - | 0.0000 | - | -| example_02_congestion_resolution | nodes_expanded | 366.0000 | 366.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | iteration_reverify_calls | 1.0000 | 1.0000 | +0.0000 | -| example_02_congestion_resolution | iteration_conflicting_nets | 0.0000 | 0.0000 | +0.0000 | -| example_02_congestion_resolution | iteration_conflict_edges | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | duration_s | 0.2366 | 12.3369 | +12.1002 | -| example_05_orientation_stress | route_iterations | 2.0000 | 6.0000 | +4.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 14.0000 | +8.0000 | -| example_05_orientation_stress | nets_carried_forward | 0.0000 | 4.0000 | +4.0000 | -| example_05_orientation_stress | frozen_nets_promoted | - | 2.0000 | - | -| example_05_orientation_stress | frozen_nets_thawed | - | 1.0000 | - | -| example_05_orientation_stress | frozen_net_hard_prunes | - | 865.0000 | - | -| example_05_orientation_stress | best_iteration_completed_nets | - | 1.0000 | - | -| example_05_orientation_stress | best_iteration_conflict_edges | - | 1.0000 | - | -| example_05_orientation_stress | best_iteration_dynamic_collisions | - | 2.0000 | - | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 14395.0000 | +14109.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 24765.0000 | +24552.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 8658.0000 | +8643.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 10770.0000 | +10751.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 8579.0000 | +8561.0000 | -| example_05_orientation_stress | iteration_reverify_calls | 2.0000 | 6.0000 | +4.0000 | -| example_05_orientation_stress | iteration_conflicting_nets | 2.0000 | 12.0000 | +10.0000 | -| example_05_orientation_stress | iteration_conflict_edges | 1.0000 | 6.0000 | +5.0000 | -| example_07_large_scale_routing | duration_s | 0.1994 | 0.1978 | -0.0016 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nets_carried_forward | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | frozen_nets_promoted | - | 10.0000 | - | -| example_07_large_scale_routing | frozen_nets_thawed | - | 0.0000 | - | -| example_07_large_scale_routing | frozen_net_hard_prunes | - | 0.0000 | - | -| example_07_large_scale_routing | best_iteration_completed_nets | - | 10.0000 | - | -| example_07_large_scale_routing | best_iteration_conflict_edges | - | 0.0000 | - | -| example_07_large_scale_routing | best_iteration_dynamic_collisions | - | 0.0000 | - | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_reverify_calls | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_conflicting_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_conflict_edges | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 1500.4410 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 7.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 60.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_carried_forward | - | 8.0000 | - | -| example_07_large_scale_routing_no_warm_start | frozen_nets_promoted | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | frozen_nets_thawed | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | frozen_net_hard_prunes | - | 37879.0000 | - | -| example_07_large_scale_routing_no_warm_start | best_iteration_completed_nets | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | best_iteration_conflict_edges | - | 12.0000 | - | -| example_07_large_scale_routing_no_warm_start | best_iteration_dynamic_collisions | - | 50.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 1282078.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 2860073.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 3432589.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 2740129.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 2266598.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_reverify_calls | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflicting_nets | - | 51.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_conflict_edges | - | 77.0000 | - | -## Step 27 - Congestion presence precheck - -Measured on 2026-04-01T20:49:16-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- A cached per-span presence precheck now skips full congestion evaluation when a move's dilated polygons only cover dynamic-grid cells with no other routed nets. -- The goal of this slice is to reduce congestion_check_calls without changing search outcomes or the dynamic exact-check path. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2366 | 0.2573 | +0.0206 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 213.0000 | 155.0000 | -58.0000 | -| example_05_orientation_stress | congestion_presence_cache_hits | - | 185.0000 | - | -| example_05_orientation_stress | congestion_presence_cache_misses | - | 30.0000 | - | -| example_05_orientation_stress | congestion_presence_skips | - | 58.0000 | - | -| example_05_orientation_stress | congestion_cache_hits | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 213.0000 | 155.0000 | -58.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1994 | 0.1977 | -0.0017 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_presence_cache_hits | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_presence_cache_misses | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_presence_skips | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.6221 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 6567.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4549.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_presence_cache_hits | - | 7568.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_presence_cache_misses | - | 2480.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_presence_skips | - | 5482.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_hits | - | 16.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 4549.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 12879.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 13342.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 11116.0000 | - | -## Step 28 - Candidate-net congestion precheck - -Measured on 2026-04-01T20:59:46-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- After the dynamic-grid occupancy precheck passes, search now asks whether any candidate nets survive the existing envelope and grid-net filters before paying for full congestion evaluation. -- This slice should reduce congestion_check_calls further if many occupied spans still have no candidate nets after the broad phases. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2491 | 0.2500 | +0.0009 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 18.0000 | -137.0000 | -| example_05_orientation_stress | congestion_presence_cache_hits | 185.0000 | 185.0000 | +0.0000 | -| example_05_orientation_stress | congestion_presence_cache_misses | 30.0000 | 30.0000 | +0.0000 | -| example_05_orientation_stress | congestion_presence_skips | 58.0000 | 58.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_precheck_hits | - | 135.0000 | - | -| example_05_orientation_stress | congestion_candidate_precheck_misses | - | 22.0000 | - | -| example_05_orientation_stress | congestion_candidate_precheck_skips | - | 139.0000 | - | -| example_05_orientation_stress | congestion_cache_hits | 2.0000 | 0.0000 | -2.0000 | -| example_05_orientation_stress | congestion_cache_misses | 155.0000 | 18.0000 | -137.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 14.0000 | -1.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 18.0000 | -1.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 17.0000 | -1.0000 | -| example_07_large_scale_routing | duration_s | 0.1978 | 0.1941 | -0.0037 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_presence_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_presence_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_presence_skips | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_precheck_hits | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_candidate_precheck_misses | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_candidate_precheck_skips | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 89.2302 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 9.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 90.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 113735.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 136225.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_presence_cache_hits | - | 217089.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_presence_cache_misses | - | 18365.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_presence_skips | - | 86782.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_precheck_hits | - | 135690.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_precheck_misses | - | 12826.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_precheck_skips | - | 10244.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_hits | - | 1893.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 136225.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 243951.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 228721.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 190301.0000 | - | -## Step 28b - Candidate-net congestion precheck (corrected) - -Measured on 2026-04-01T21:00:54-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- The first candidate-net precheck attempt cached exact-bounds results by span and was not safe; this corrected slice uses a conservative span-based precheck. -- Acceptance requires the no-warm-start canary to stay near the current 4-iteration / 40-net routed shape while still reducing congestion_check_calls. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2491 | 0.2461 | -0.0030 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 155.0000 | +0.0000 | -| example_05_orientation_stress | congestion_presence_cache_hits | 185.0000 | 185.0000 | +0.0000 | -| example_05_orientation_stress | congestion_presence_cache_misses | 30.0000 | 30.0000 | +0.0000 | -| example_05_orientation_stress | congestion_presence_skips | 58.0000 | 58.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_precheck_hits | - | 135.0000 | - | -| example_05_orientation_stress | congestion_candidate_precheck_misses | - | 22.0000 | - | -| example_05_orientation_stress | congestion_candidate_precheck_skips | - | 0.0000 | - | -| example_05_orientation_stress | congestion_cache_hits | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | congestion_cache_misses | 155.0000 | 155.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1978 | 0.1979 | +0.0001 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_presence_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_presence_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_presence_skips | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_precheck_hits | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_candidate_precheck_misses | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_candidate_precheck_skips | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_cache_hits | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_cache_misses | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.6758 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 6567.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4420.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_presence_cache_hits | - | 7568.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_presence_cache_misses | - | 2480.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_presence_skips | - | 5482.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_precheck_hits | - | 2828.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_precheck_misses | - | 1737.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_precheck_skips | - | 129.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_hits | - | 16.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_cache_misses | - | 4420.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 12879.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 13342.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 11116.0000 | - | -## Step 29 - Correctness-aware measurement logging - -Measured on 2026-04-01T21:18:56-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- The diff script now logs top-level outcome counts so future routing-loop changes can be judged on returned result quality as well as runtime and congestion counters. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2370 | 0.2507 | +0.0137 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 155.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1950 | 0.1992 | +0.0042 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.7234 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 1.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 6567.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4420.0000 | - | -## Step 30 - Best iteration snapshot restoration - -Measured on 2026-04-01T21:20:51-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- The routing loop now snapshots the strongest reverified intermediate result set and restores it before final refinement/final verification, including timeout exits. -- This slice keeps the old repeated-conflict stop rule so any quality change can be attributed to snapshot restoration alone. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2370 | 0.2437 | +0.0067 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 155.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1950 | 0.1937 | -0.0013 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.5246 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 6567.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4420.0000 | - | -## Step 31 - Improvement-based stagnation stop - -Measured on 2026-04-01T21:23:19-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- The negotiated-congestion loop now stops after two consecutive iterations with no improvement in the best-so-far reverified snapshot instead of using repeated conflict signatures. -- Best-snapshot restoration remains enabled, so the returned results should reflect the strongest intermediate iteration even if later iterations stall. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2370 | 0.2393 | +0.0023 | -| example_05_orientation_stress | valid_results | 3.0000 | 1.0000 | -2.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 155.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1950 | 0.1884 | -0.0066 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.4360 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 6567.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4420.0000 | - | -## Step 31 rejected - Improvement-based stagnation reverted - -Measured on 2026-04-01T21:25:17-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- The no-improvement stop rule was reverted because it regressed example_05 from 3 valid routes to 1 even though the no-warm-start canary stayed flat. -- The tree below is the restored best-snapshot state with the older repeated-conflict stop rule still in place. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2370 | 0.2425 | +0.0055 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 155.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1950 | 0.1936 | -0.0014 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.5321 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 6567.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4420.0000 | - | -## Step 32 tiered-iteration dynamic hard blocks - -Measured on 2026-04-01T21:42:45-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Treat already-routed dynamic paths as hard blockers only during iteration 0 when warm-start is disabled. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2348 | 0.2466 | +0.0118 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 226.0000 | +71.0000 | -| example_05_orientation_stress | tiered_dynamic_hard_prunes | - | 0.0000 | - | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 51.0000 | +36.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 67.0000 | +48.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 56.0000 | +38.0000 | -| example_07_large_scale_routing | duration_s | 0.1945 | 0.1931 | -0.0014 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | tiered_dynamic_hard_prunes | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 8.7624 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 11200.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 5355.0000 | - | -| example_07_large_scale_routing_no_warm_start | tiered_dynamic_hard_prunes | - | 632.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 13623.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 13469.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 11346.0000 | - | -## Step 32 reverted - -Measured on 2026-04-01T21:44:47-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Reverted tiered-iteration dynamic hard blockers after regressions in example_05 and the no-warm-start example_07 canary. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2348 | 0.2462 | +0.0114 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 155.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1945 | 0.1940 | -0.0005 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.5497 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 6567.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4420.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 12879.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 13342.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 11116.0000 | - | - -## Step 34 rejected - -Measured on 2026-04-01T22:08:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Explored order/seed and reroute-heuristic sensitivity before the slice. One-iteration no-warm-start probes were flat at `1` valid route across `user`, `shortest`, `longest`, and seeds `41`-`44`; two-iteration probes were flat at `2` valid routes across the same variants. -- Implemented a conflict-weighted congestion objective that weighted overlapping nets by prior completed status, conflict degree, and dynamic collision count. -- Rejected the slice after the no-warm-start canary failed to finish within a reasonable window and ran far longer than the accepted `~5.6s` state. The code was reverted before accepting any documentation or baseline changes. -## Step 33 carry forward completed nets - -Measured on 2026-04-01T21:58:50-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- After each reverify, reroute only nets that are still colliding, partial, or unroutable; keep completed nets installed as ordinary soft blockers. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2348 | 0.2528 | +0.0179 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 5.0000 | -1.0000 | -| example_05_orientation_stress | nets_carried_forward | 0.0000 | 1.0000 | +1.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 284.0000 | -2.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 152.0000 | -3.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1945 | 0.1960 | +0.0015 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nets_carried_forward | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 49.8770 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 8.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 70.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_carried_forward | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 71162.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 80342.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 152845.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 136026.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 116066.0000 | - | -## Step 33 reverted - -Measured on 2026-04-01T21:59:33-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Reverted completed-net carry-forward after the no-warm-start canary exploded in iterations, nodes, and congestion checks without improving validity. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2348 | 0.2572 | +0.0224 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nets_carried_forward | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 286.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 155.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1945 | 0.2024 | +0.0079 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nets_carried_forward | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 5.6270 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_carried_forward | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 6567.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4420.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 12879.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 13342.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 11116.0000 | - | -## Step 35 reroute seed guidance - -Measured on 2026-04-01T22:22:54-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Guide post-tiered reroutes with the previous reached-target path seed by giving matching path-prefix moves a small cost bonus. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2348 | 0.2313 | -0.0036 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 299.0000 | +13.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 149.0000 | -6.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 23.0000 | +8.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 32.0000 | +13.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 30.0000 | +12.0000 | -| example_07_large_scale_routing | duration_s | 0.1945 | 0.1881 | -0.0064 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5099 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | - -## Step 39 rejected - -Measured on 2026-04-01T22:58:58-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Tried adding a reroute-only uncongested `max_cost` ceiling derived from the previous reached-target path cost plus slack for two extra bends. -- Rejected the slice before running the standard performance probe because it broke the stalled-conflict guardrail: the simple crossing case in `test_reverify_iterations_stop_early_on_stalled_conflict_graph` ran all `10` iterations instead of stopping early. -- Reverted the slice and restored the accepted Step 35 full-seed guidance state. - -## Step 36 rejected - -Measured on 2026-04-01T22:31:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Explored adding the longest still-valid prefix of the prior reached-target path as an additional seeded start node for later reroutes. -- Rejected the slice on runtime: the no-warm-start `example_07` measurement ran far beyond the accepted Step 35 `~3.5s` state before completion, indicating the extra seeded branch was expanding too much search. -- Reverted the slice and kept only the lighter Step 35 reroute-seed-guidance behavior. -## Step 34 conflict-weighted congestion objective - -Measured on 2026-04-01T22:38:11-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Weight congestion overlap cost by prior-iteration completed status, conflict degree, and dynamic collision count instead of counting every overlapping net equally. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2348 | 0.2390 | +0.0041 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 282.0000 | -4.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 145.0000 | -10.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 15.0000 | 15.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 19.0000 | 19.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 18.0000 | 18.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1945 | 0.1918 | -0.0027 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 1795.1890 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 1.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 16.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 1501303.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 1622620.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 5074171.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 4556689.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 4129698.0000 | - | -## Step 36 reusable prefix start nodes - -Measured on 2026-04-01T22:49:16-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- On later reroutes, add the longest still-valid prefix of the previous reached-target path as an additional seeded start node while keeping the original start branch available. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2239 | 0.2249 | +0.0010 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | reroute_prefix_paths_used | - | 3.0000 | - | -| example_05_orientation_stress | reroute_prefix_components_reused | - | 8.0000 | - | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 292.0000 | -7.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 125.0000 | -24.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 22.0000 | -1.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 31.0000 | -1.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 29.0000 | -1.0000 | -| example_07_large_scale_routing | duration_s | 0.1912 | 0.1916 | +0.0004 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reroute_prefix_paths_used | - | 0.0000 | - | -| example_07_large_scale_routing | reroute_prefix_components_reused | - | 0.0000 | - | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 229.2009 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 9.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 90.0000 | - | -| example_07_large_scale_routing_no_warm_start | reroute_prefix_paths_used | - | 65.0000 | - | -| example_07_large_scale_routing_no_warm_start | reroute_prefix_components_reused | - | 172.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 350958.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 470234.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 929523.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 853594.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 712783.0000 | - | -## Step 37 capped guidance rejected - -Measured on 2026-04-01T22:53:55-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Exploratory probe showed a mild runtime win when reroute guidance was capped to 4 segments, but the code/test slice did not land cleanly and was reverted before acceptance. -- Restored the accepted Step 35 full-seed guidance state and remeasured the standard probe set. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2239 | 0.2304 | +0.0065 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1912 | 0.1862 | -0.0050 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.4899 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 38 capped reroute guidance - -Measured on 2026-04-01T22:55:29-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Cap reroute guidance seeds to the first 4 segments on later iterations; keep the existing prefix-match bonus unchanged. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2239 | 0.2388 | +0.0150 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1912 | 0.1924 | +0.0012 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.6174 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 38 reverted - -Measured on 2026-04-01T22:56:22-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Reverted the 4-segment reroute-guidance cap after the standard probe set showed no counter improvement and only runtime noise. -- Restored the accepted Step 35 full-seed guidance state. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2239 | 0.2463 | +0.0224 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1912 | 0.1912 | -0.0000 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5580 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 40 partial straight guidance - -Measured on 2026-04-01T23:01:12-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Allow reroute guidance to consume straight seeds incrementally so split straight moves can continue following a prior reached-target path. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2239 | 0.2329 | +0.0090 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1912 | 0.1879 | -0.0033 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5305 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 40 reverted - -Measured on 2026-04-01T23:02:26-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Reverted partial straight-seed guidance after the standard probe set showed no counter deltas and no correctness gain. -- Restored the accepted Step 35 full-seed exact-match guidance state. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2239 | 0.2353 | +0.0115 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1912 | 0.1897 | -0.0015 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5522 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 41 guidance counters - -Measured on 2026-04-01T23:04:31-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Add public counters for reroute guidance matches and total guidance bonus applied so later guidance changes can be measured directly. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2239 | 0.2544 | +0.0306 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | - | 11.0000 | - | -| example_05_orientation_stress | guidance_bonus_applied | - | 687.5000 | - | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1912 | 0.1940 | +0.0027 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.7438 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 6312.5000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 42 scaled guidance bonus - -Measured on 2026-04-02T00:18:11-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Scale reroute guidance bonus by matched move cost, capped at 50% of the move's own cost, so matched straights no longer become nearly free. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2300 | 0.2276 | -0.0024 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 275.0000 | -24.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 10.0000 | -1.0000 | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 368.6994 | -318.8006 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 120.0000 | -29.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 15.0000 | -8.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 19.0000 | -13.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 18.0000 | -12.0000 | -| example_07_large_scale_routing | duration_s | 0.2043 | 0.1861 | -0.0182 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 4.0027 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4747.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 2854.9698 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 11537.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 12027.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 9988.0000 | - | -## Step 42 reverted - -Measured on 2026-04-02T00:19:47-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Reverted the scaled guidance bonus after the no-warm-start example_07 canary regressed in runtime, nodes, and congestion work without any validity gain. -- Restored the accepted fixed-bonus Step 35 guidance behavior. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2300 | 0.2339 | +0.0039 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 687.5000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.2043 | 0.1895 | -0.0148 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5410 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 6312.5000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 43 guidance counters by move type - -Measured on 2026-04-02T00:24:23-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Split guidance matches and total applied bonus by move type so the next selective-guidance slice can target the dominant match class on the no-warm-start canary. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2300 | 0.2329 | +0.0030 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | - | 3.0000 | - | -| example_05_orientation_stress | guidance_match_moves_bend90 | - | 8.0000 | - | -| example_05_orientation_stress | guidance_match_moves_sbend | - | 0.0000 | - | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 687.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_straight | - | 187.5000 | - | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | - | 500.0000 | - | -| example_05_orientation_stress | guidance_bonus_applied_sbend | - | 0.0000 | - | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.2043 | 0.1899 | -0.0143 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_match_moves_bend90 | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_match_moves_sbend | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5484 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 43.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 6312.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 3250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 2687.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 375.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 50 terminal repair rejected - -Measured on 2026-04-02T10:18:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Added a bounded terminal repair phase for reached-but-colliding nets after best-snapshot restoration, with up to two sequential repair sweeps and completed nets treated as hard blockers during repair reroutes. -- The slice stayed within the node and congestion guardrails, but it did not improve the only important outcome: the no-warm-start `example_07` canary remained at `2/10/10`. -- Rejected the slice and reverted the code. The tree was restored to the accepted fixed-guidance branch without refreshing `docs/performance.md` or `docs/performance_baseline.json`. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2400 | +0.0125 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | terminal_repair_sweeps | - | 0.0000 | - | -| example_05_orientation_stress | terminal_repair_nets_considered | - | 0.0000 | - | -| example_05_orientation_stress | terminal_repair_nets_accepted | - | 0.0000 | - | -| example_05_orientation_stress | terminal_repair_nets_rejected | - | 0.0000 | - | -| example_05_orientation_stress | terminal_repair_completed_promotions | - | 0.0000 | - | -| example_05_orientation_stress | repair_frozen_net_prunes | - | 0.0000 | - | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1969 | +0.0062 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | terminal_repair_sweeps | - | 0.0000 | - | -| example_07_large_scale_routing | terminal_repair_nets_considered | - | 0.0000 | - | -| example_07_large_scale_routing | terminal_repair_nets_accepted | - | 0.0000 | - | -| example_07_large_scale_routing | terminal_repair_nets_rejected | - | 0.0000 | - | -| example_07_large_scale_routing | terminal_repair_completed_promotions | - | 0.0000 | - | -| example_07_large_scale_routing | repair_frozen_net_prunes | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 6.5413 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 56.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 10691.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4805.0000 | - | -| example_07_large_scale_routing_no_warm_start | terminal_repair_sweeps | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | terminal_repair_nets_considered | - | 16.0000 | - | -| example_07_large_scale_routing_no_warm_start | terminal_repair_nets_accepted | - | 8.0000 | - | -| example_07_large_scale_routing_no_warm_start | terminal_repair_nets_rejected | - | 8.0000 | - | -| example_07_large_scale_routing_no_warm_start | terminal_repair_completed_promotions | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | repair_frozen_net_prunes | - | 300.0000 | - | -## Step 50 rejected - -Measured on 2026-04-02T10:02:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Tried per-net incumbent acceptance with a second accepted-state reverify after each full candidate iteration. -- Rejected the slice immediately: the no-warm-start `example_07` canary stayed at `2/10/10` valid but regressed to `179.0440s`, `8` iterations, `80` nets routed, `234493` expanded nodes, and `255901` congestion checks. -- Reverted the code and restored the prior accepted fixed-guidance state without refreshing the committed baseline artifacts. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2406 | +0.0132 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | iteration_candidate_results_accepted | - | 5.0000 | - | -| example_05_orientation_stress | iteration_incumbent_results_kept | - | 1.0000 | - | -| example_05_orientation_stress | iteration_accept_reverify_calls | - | 2.0000 | - | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.2029 | +0.0122 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | iteration_candidate_results_accepted | - | 10.0000 | - | -| example_07_large_scale_routing | iteration_incumbent_results_kept | - | 0.0000 | - | -| example_07_large_scale_routing | iteration_accept_reverify_calls | - | 1.0000 | - | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 179.0440 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 8.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 80.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 234493.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 255901.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_candidate_results_accepted | - | 30.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_incumbent_results_kept | - | 50.0000 | - | -| example_07_large_scale_routing_no_warm_start | iteration_accept_reverify_calls | - | 8.0000 | - | -## Step 44 selective straight guidance - -Measured on 2026-04-02T00:25:53-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Keep full reroute guidance bonus for bend90 and sbend matches, but cut straight-match bonus in half. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2300 | 0.2361 | +0.0061 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | - | 3.0000 | - | -| example_05_orientation_stress | guidance_match_moves_bend90 | - | 8.0000 | - | -| example_05_orientation_stress | guidance_match_moves_sbend | - | 0.0000 | - | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 593.7500 | -93.7500 | -| example_05_orientation_stress | guidance_bonus_applied_straight | - | 93.7500 | - | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | - | 500.0000 | - | -| example_05_orientation_stress | guidance_bonus_applied_sbend | - | 0.0000 | - | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.2043 | 0.1912 | -0.0131 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_match_moves_bend90 | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_match_moves_sbend | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 4.0413 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4747.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 43.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 4687.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 1625.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 2687.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 375.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3721.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 10835.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 11093.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 9328.0000 | - | -## Step 45 selective bend guidance - -Measured on 2026-04-02T00:27:37-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Restore full straight guidance, but cut bend90-match bonus in half while keeping sbend matches at full bonus. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2300 | 0.2211 | -0.0089 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 272.0000 | -27.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 10.0000 | -1.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | - | 3.0000 | - | -| example_05_orientation_stress | guidance_match_moves_bend90 | - | 7.0000 | - | -| example_05_orientation_stress | guidance_match_moves_sbend | - | 0.0000 | - | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 406.2500 | -281.2500 | -| example_05_orientation_stress | guidance_bonus_applied_straight | - | 187.5000 | - | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | - | 218.7500 | - | -| example_05_orientation_stress | guidance_bonus_applied_sbend | - | 0.0000 | - | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 108.0000 | -41.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 15.0000 | -8.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 19.0000 | -13.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 18.0000 | -12.0000 | -| example_07_large_scale_routing | duration_s | 0.2043 | 0.1873 | -0.0170 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_match_moves_bend90 | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_match_moves_sbend | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5628 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4320.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 43.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 4968.7500 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 3250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 1343.7500 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 375.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3594.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 10245.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10859.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8944.0000 | - | -## Step 45 reverted - -Measured on 2026-04-02T00:29:03-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Reverted bend-selective guidance after the no-warm-start canary still regressed in nodes and congestion work without any validity gain. -- Restored the accepted fixed-bonus guidance state while keeping the move-type counters. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2300 | 0.2387 | +0.0088 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | - | 3.0000 | - | -| example_05_orientation_stress | guidance_match_moves_bend90 | - | 8.0000 | - | -| example_05_orientation_stress | guidance_match_moves_sbend | - | 0.0000 | - | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 687.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_straight | - | 187.5000 | - | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | - | 500.0000 | - | -| example_05_orientation_stress | guidance_bonus_applied_sbend | - | 0.0000 | - | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.2043 | 0.1906 | -0.0137 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_match_moves_bend90 | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_match_moves_sbend | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | - | 0.0000 | - | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | - | 0.0000 | - | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5968 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 43.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 6312.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 3250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 2687.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 375.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 46 later-iteration guidance decay - -Measured on 2026-04-02T00:38:26-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Keep the first reroute guidance bonus unchanged, then halve the guidance bonus on iteration 2 and later reroutes. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2316 | +0.0041 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_bend90 | 8.0000 | 8.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 687.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_straight | 187.5000 | 187.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | 500.0000 | 500.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1923 | +0.0016 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 4.1601 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4850.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 43.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 4093.7500 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 2125.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 1718.7500 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3917.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 11398.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 11839.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 9870.0000 | - | -## Step 46 reverted - -Measured on 2026-04-02T00:39:37-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Reverted later-iteration guidance decay after the no-warm-start canary regressed in runtime, nodes, and congestion work with no validity gain. -- Restored the accepted fixed-bonus guidance state while keeping the move-type counters. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2379 | +0.0105 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_bend90 | 8.0000 | 8.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 687.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_straight | 187.5000 | 187.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | 500.0000 | 500.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.2109 | +0.0202 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.6956 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 43.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 6312.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 3250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 2687.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 375.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 47 conflict-aware guidance decay - -Measured on 2026-04-02T00:44:37-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Reduce reroute guidance bonus only when the net's own prior reached-target path still had dynamic collisions; keep full bonus for already-clean prior paths. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2439 | +0.0164 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 286.0000 | -13.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 10.0000 | -1.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_bend90 | 8.0000 | 7.0000 | -1.0000 | -| example_05_orientation_stress | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 500.0000 | -187.5000 | -| example_05_orientation_stress | guidance_bonus_applied_straight | 187.5000 | 171.8750 | -15.6250 | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | 500.0000 | 328.1250 | -171.8750 | -| example_05_orientation_stress | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 130.0000 | -19.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 15.0000 | -8.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 19.0000 | -13.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 18.0000 | -12.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1986 | +0.0079 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 4.0364 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4421.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 43.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 4890.6250 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 2515.6250 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 2015.6250 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 359.3750 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3565.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 10202.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10558.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8814.0000 | - | -## Step 47 reverted - -Measured on 2026-04-02T00:45:52-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Reverted conflict-aware guidance decay after the no-warm-start canary still regressed in runtime, nodes, and congestion work without any validity gain. -- Restored the accepted fixed-bonus guidance state while keeping the move-type counters. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2330 | +0.0056 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_bend90 | 8.0000 | 8.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 687.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_straight | 187.5000 | 187.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | 500.0000 | 500.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1878 | -0.0029 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5878 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 43.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 6312.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 3250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 2687.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 375.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 48 best reverified guidance source - -Measured on 2026-04-02T08:41:26-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Prefer the best reverified per-net path snapshot as the reroute guidance seed, falling back to the most recent reached-target path only when no best snapshot exists. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2347 | +0.0073 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_bend90 | 8.0000 | 8.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 687.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_straight | 187.5000 | 187.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | 500.0000 | 500.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1934 | +0.0027 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5687 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 43.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 6312.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 3250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 2687.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 375.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 49 per-net best reverified guidance - -Measured on 2026-04-02T08:43:09-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Track the best reverified reached-target path per net, ranked by dynamic collisions, total collisions, then total length, and prefer that path as reroute guidance. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2432 | +0.0158 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_bend90 | 8.0000 | 8.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 687.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_straight | 187.5000 | 187.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | 500.0000 | 500.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1923 | +0.0016 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 4.7028 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 5664.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 95.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 49.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 5937.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 3062.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 2500.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 375.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3406.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9679.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10059.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8361.0000 | - | -## Step 49 reverted - -Measured on 2026-04-02T08:44:09-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Reverted per-net best reverified guidance after the no-warm-start canary regressed sharply in runtime and nodes without any validity gain. -- Restored the accepted fixed-bonus guidance state while keeping the move-type counters. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2367 | +0.0093 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves | 11.0000 | 11.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_straight | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_bend90 | 8.0000 | 8.0000 | +0.0000 | -| example_05_orientation_stress | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied | 687.5000 | 687.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_straight | 187.5000 | 187.5000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_bend90 | 500.0000 | 500.0000 | +0.0000 | -| example_05_orientation_stress | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_nets | 23.0000 | 23.0000 | +0.0000 | -| example_05_orientation_stress | congestion_candidate_ids | 32.0000 | 32.0000 | +0.0000 | -| example_05_orientation_stress | congestion_exact_pair_checks | 30.0000 | 30.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1904 | -0.0003 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_match_moves_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_straight | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_bend90 | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | guidance_bonus_applied_sbend | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_nets | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_candidate_ids | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_exact_pair_checks | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.6154 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves | - | 101.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_straight | - | 52.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_bend90 | - | 43.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_match_moves_sbend | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied | - | 6312.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_straight | - | 3250.0000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_bend90 | - | 2687.5000 | - | -| example_07_large_scale_routing_no_warm_start | guidance_bonus_applied_sbend | - | 375.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_nets | - | 9604.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_candidate_ids | - | 10010.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_exact_pair_checks | - | 8312.0000 | - | -## Step 51 conflict trace instrumentation - -Measured on 2026-04-02T11:20:41-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Added opt-in conflict-trace capture and a separate recorder script without changing routing policy. -- The no-warm-start canary still finishes 2/10/10 with 4 iterations; tracing shows the same conflict structure at iteration, restored-best, and final stages. -- Recurring hotspot edges cluster in two groups: net_00-net_03 and net_06-net_09. -- Recurring component pairs also repeat across all traced stages, which points to stable geometric bottlenecks rather than seed noise. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2338 | +0.0064 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1896 | -0.0011 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5423 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -## Step 52 prefix-preserving hotspot repair rejected - -Measured on 2026-04-02T11:45:37-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Tried a bounded post-loop hotspot repair that preserved clean prefixes and rerouted only conflicted suffixes. -- The no-warm-start canary stayed at 2/10/10 and the repair counters showed zero accepted repairs, so the slice did not move correctness. -- The experiment temporarily raised the canary to 4258 nodes with one repair pass, two clusters attempted, and eight nets considered before it was reverted. -- The tree is restored to the accepted fixed-guidance state: example_07_no_warm_start is back at 2 valid, 10 reached, 4250 nodes, and 3388 congestion checks. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2384 | +0.0110 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1909 | +0.0002 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5590 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -## Step 53 cluster repack repair rejected - -Measured on 2026-04-02T12:04:21-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Tried bounded post-loop clique reroute against frozen outside geometry. -- No-warm-start canary stayed 2/10/10. -- Final conflict edges improved 12 -> 10, but correctness did not improve and search cost rose materially. -- Tree restored to the accepted fixed-guidance state after revert. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2364 | +0.0089 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1915 | +0.0008 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5998 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -## Step 54 hotspot keep-out repair rejected - -Measured on 2026-04-02T12:22:14-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Tried bounded post-loop clique reroute with temporary hotspot keep-out obstacles and frozen outside geometry. -- The no-warm-start canary failed a bounded probe: a single-scenario diff run timed out at 20 seconds, far above the accepted ~3.5 second state. -- Because the slice was clearly losing on runtime before showing any correctness gain, it was reverted. -- Tree restored to the accepted fixed-guidance branch after revert. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2490 | +0.0216 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.2004 | +0.0097 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.8387 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -## Step 55 bounded portfolio rerun rejected - -Measured on 2026-04-02T12:50:58-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Tried a conservative top-level best-of-three portfolio for warm-start-disabled runs using alternate shuffle/order settings. -- The no-warm-start canary was unchanged at 2/10/10, 4250 nodes, and 3388 congestion checks. -- Because the added control-path complexity produced no correctness or cost improvement, the slice was reverted. -- Tree restored to the accepted fixed-guidance branch after revert. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2408 | +0.0133 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1953 | +0.0046 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.6741 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -## Step 56 frontier hotspot instrumentation - -Measured on 2026-04-02T13:00:47-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Added opt-in frontier_trace diagnostics and recorder tooling without changing routing behavior. -- No-warm-start canary stayed on the accepted 2/10/10, 4250-node, 3388-congestion-check shape. -- Frontier trace shows hotspot-adjacent prunes are dominated by cost (3412) and closed-set (626), with zero hard-collision prunes near the traced hotspots. -- Self-collision pruning is concentrated in net_02 (455 traced self-collision prunes); the other hotspot nets are mostly cost- and closed-set-limited. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2300 | +0.0026 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1891 | -0.0016 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.5576 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -## Step 57 frontier hotspot readout refinement - -Measured on 2026-04-02T13:11:47-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Extended frontier_trace reporting with per-net sampled reason x move_type and hotspot splits. -- net_02 samples split across hotspots 0 and 6 and include heavy straight self-collision pruning; sampled mix is 36 cost, 23 self-collision, 5 closed-set. -- net_03 and net_06 are almost entirely straight-move cost prunes at hotspot 0; their few traced bend90 samples are closed-set dominated, not geometry-blocked. -- The sampled cost prunes are overshoot moves well outside the 0..1000 board bounds, so the current cost bucket is largely boundary-rejection rather than local corridor pricing. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2275 | 0.2365 | +0.0090 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.1907 | 0.1927 | +0.0020 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 3.6435 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 4.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 40.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 4250.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 3388.0000 | - | -## Step 58 large no-warm straight-bound cap - -Measured on 2026-04-02T13:22:28-07:00. -Baseline: `/tmp/inire_pre_step58_baseline.json`. - -Findings: - -- Applied a board-boundary cap to straight candidate reach only for large warm-start-disabled multi-net runs. -- The no-warm-start example_07 canary improved from 2/10/10 to 6/10/10. -- Nodes fell from 4250 to 1764 and runtime fell to about 1.95s, while congestion checks rose modestly from 3388 to 4625 as the search converged through six lighter iterations. -- Warmed example_07 stayed 10/10/10 and example_05 kept identical routing counters and validity. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2348 | 0.2387 | +0.0038 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 286.0000 | 299.0000 | +13.0000 | -| example_05_orientation_stress | congestion_check_calls | 155.0000 | 149.0000 | -6.0000 | -| example_07_large_scale_routing | duration_s | 0.1945 | 0.1944 | -0.0000 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 1.9279 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 60.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 1764.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4625.0000 | - | -## Step 59 pair-local exact-conflict repair rejected - -Measured on 2026-04-02T13:50:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Tried a bounded post-loop two-net repair portfolio on the final conflict pairs, with ranked vs reversed reroute order and optional exact-overlap keep-outs. -- The no-warm-start canary stayed at `6/10/10`; the repair phase accepted `0` whole-set improvements across `8` attempts on `2` pairs. -- Cost regressed sharply during the failed slice to about `9.56s`, `11126` expanded nodes, and `9087` congestion checks, with `4257` frozen-net hard prunes. -- The slice was reverted and the tree restored to the accepted straight-boundary-cap branch. - -## Step 60 trimmed exploratory straight heuristics rejected - -Measured on 2026-04-02T14:00:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Tried removing the generic `max_reach / 2` and `max_reach - 5` straight candidates only for the same large no-warm runs that use the accepted straight-boundary cap. -- The no-warm-start canary regressed from `6/10/10` to `2/10/10` and runtime climbed to about `26s`. -- Search work exploded to about `27619` expanded nodes and `53804` congestion checks, so the generic exploratory straight candidates are still necessary for the accepted branch. -- The slice was reverted and the tree restored to the accepted straight-boundary-cap branch. - -## Step 61 staggered bend-anchor diversification rejected - -Measured on 2026-04-02T14:10:00-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Tried adding deterministic staggered pre-bend straight candidates for odd-indexed nets only in the large no-warm regime to separate the remaining colliding pairs. -- The no-warm-start canary regressed from `6/10/10` to `3/10/10` and runtime rose to about `8.6s`. -- The heuristic fired heavily (`1051` staggered bend-anchor candidates and `785` staggered visible candidates) but search still got worse, with about `6724` expanded nodes and `21577` congestion checks. -- The slice was reverted and the tree restored to the accepted straight-boundary-cap branch. -## Step 62 pair-local scratch reroute accepted - -Measured on 2026-04-02T14:15:04-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Built a bounded post-loop pair-local reroute that treats all outside-pair nets as frozen static blockers in a scratch routing world. The no-warm-start example_07 canary improved from 6/10/10 to 9/10/10 with two accepted pair repairs and only 33 extra search expansions. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2591 | 0.2440 | -0.0151 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | pair_local_search_pairs_considered | - | 0.0000 | - | -| example_05_orientation_stress | pair_local_search_attempts | - | 0.0000 | - | -| example_05_orientation_stress | pair_local_search_accepts | - | 0.0000 | - | -| example_05_orientation_stress | pair_local_search_nodes_expanded | - | 0.0000 | - | -| example_07_large_scale_routing | duration_s | 0.2027 | 0.2029 | +0.0002 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | pair_local_search_pairs_considered | - | 0.0000 | - | -| example_07_large_scale_routing | pair_local_search_attempts | - | 0.0000 | - | -| example_07_large_scale_routing | pair_local_search_accepts | - | 0.0000 | - | -| example_07_large_scale_routing | pair_local_search_nodes_expanded | - | 0.0000 | - | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 2.1244 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 9.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 60.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 1764.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4625.0000 | - | -| example_07_large_scale_routing_no_warm_start | pair_local_search_pairs_considered | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | pair_local_search_attempts | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | pair_local_search_accepts | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | pair_local_search_nodes_expanded | - | 33.0000 | - | -## Step 63 pair-local static obstacle cloning fix - -Measured on 2026-04-02T14:24:40-07:00. -Baseline: `docs/performance_baseline.json`. - -Findings: - -- Fixed the scratch pair-local routing world to clone static obstacles from the live collision engine instead of the RoutingProblem wrapper. That removed the false-clean net_00 reroute and lifted the no-warm-start example_07 canary from 9/10/10 to 10/10/10 with the same main search workload. - -# Performance Baseline Diff - -| Scenario | Metric | Baseline | Current | Delta | -| :-- | :-- | --: | --: | --: | -| example_05_orientation_stress | duration_s | 0.2361 | 0.2495 | +0.0134 | -| example_05_orientation_stress | valid_results | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | reached_targets | 3.0000 | 3.0000 | +0.0000 | -| example_05_orientation_stress | route_iterations | 2.0000 | 2.0000 | +0.0000 | -| example_05_orientation_stress | nets_routed | 6.0000 | 6.0000 | +0.0000 | -| example_05_orientation_stress | nodes_expanded | 299.0000 | 299.0000 | +0.0000 | -| example_05_orientation_stress | congestion_check_calls | 149.0000 | 149.0000 | +0.0000 | -| example_05_orientation_stress | pair_local_search_pairs_considered | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | pair_local_search_attempts | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | pair_local_search_accepts | 0.0000 | 0.0000 | +0.0000 | -| example_05_orientation_stress | pair_local_search_nodes_expanded | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | duration_s | 0.2025 | 0.2059 | +0.0034 | -| example_07_large_scale_routing | valid_results | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | reached_targets | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | route_iterations | 1.0000 | 1.0000 | +0.0000 | -| example_07_large_scale_routing | nets_routed | 10.0000 | 10.0000 | +0.0000 | -| example_07_large_scale_routing | nodes_expanded | 78.0000 | 78.0000 | +0.0000 | -| example_07_large_scale_routing | congestion_check_calls | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | pair_local_search_pairs_considered | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | pair_local_search_attempts | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | pair_local_search_accepts | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing | pair_local_search_nodes_expanded | 0.0000 | 0.0000 | +0.0000 | -| example_07_large_scale_routing_no_warm_start | duration_s | - | 2.1497 | - | -| example_07_large_scale_routing_no_warm_start | valid_results | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | reached_targets | - | 10.0000 | - | -| example_07_large_scale_routing_no_warm_start | route_iterations | - | 6.0000 | - | -| example_07_large_scale_routing_no_warm_start | nets_routed | - | 60.0000 | - | -| example_07_large_scale_routing_no_warm_start | nodes_expanded | - | 1764.0000 | - | -| example_07_large_scale_routing_no_warm_start | congestion_check_calls | - | 4625.0000 | - | -| example_07_large_scale_routing_no_warm_start | pair_local_search_pairs_considered | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | pair_local_search_attempts | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | pair_local_search_accepts | - | 2.0000 | - | -| example_07_large_scale_routing_no_warm_start | pair_local_search_nodes_expanded | - | 68.0000 | - | - -## Step 64 seed-43 iteration-trace diagnosis - -Measured on 2026-04-02T16:11:39-07:00. - -Findings: - -- Added `capture_iteration_trace` plus `scripts/record_iteration_trace.py` and tracked the first `seed 42` vs `seed 43` no-warm comparison in `docs/iteration_trace.json` and `docs/iteration_trace.md`. -- The pathological `seed 43` basin is not front-loaded. It matches the solved `seed 42` path through iteration `5`, then falls into three extra iterations with only `4` completed nets and `4` conflict edges. -- The late blowup is concentrated in two nets, not the whole routing set: `net_06` contributes `31604` attributed nodes and `83752` congestion checks, while `net_03` contributes `27532` nodes and `75019` congestion checks. -- This points the next optimization work at late-iteration reroute behavior for a small subset of nets rather than another global congestion or pair-local-search change. - -## Step 65 stop after fully reached two-edge plateau - -Measured on 2026-04-02T16:21:02-07:00. - -Findings: - -- Added a narrow late-iteration stop rule: once every net already reaches target and the best snapshot is down to the final `<=2` dynamic-conflict-edge basin, stop after the first no-improvement iteration and hand off to bounded pair-local repair. -- The solved seed-42 no-warm canary improved from `6` to `5` negotiated-congestion iterations and dropped from about `1764` to `1303` nodes and from `4625` to `2921` congestion checks, while staying `10/10/10`. -- The former seed-43 pathological basin collapsed from about `50s`, `61259` nodes, and `165223` congestion checks to about `2.53s`, `1691` nodes, and `4330` congestion checks, still finishing `10/10/10`. -- Guardrails held unchanged: warmed `example_07` stayed `10/10/10`, and `example_05_orientation_stress` stayed `3/3/3`. - -## Step 66 reroute only current conflict nets in late all-reached phase - -Measured on 2026-04-02T16:46:00-07:00. - -Findings: - -- Once all nets already reach target and the live conflict graph is down to `<=3` edges, the next negotiated iteration now reroutes only the currently conflicting nets instead of all nets. -- The solved seed-42 no-warm canary stayed `10/10/10` and improved from `50` routed nets / `1303` nodes / `2921` congestion checks to `44` routed nets / `1258` nodes / `2736` congestion checks. -- The seed-43 no-warm canary stayed `10/10/10` and improved from `60` routed nets / `1691` nodes / `4330` congestion checks to `46` routed nets / `1582` nodes / `3881` congestion checks. -- Guardrails held: warmed `example_07` stayed `10/10/10`, and `example_05_orientation_stress` stayed `3/3/3` while trimming slightly to `5` routed nets, `297` nodes, and `146` congestion checks. - -## Step 67 route lighter late conflict nets first - -Measured on 2026-04-02T17:16:54-07:00. - -Findings: - -- Kept the late all-reached conflict-set reroute, but now order those subset reroutes by the previous iteration's attributed work ascending so the lighter partner nets settle first and the heavier nets route later against a more stable late-phase context. -- The solved seed-42 no-warm canary stayed effectively flat at `10/10/10`, `44` routed nets, `1258` nodes, and `2736` congestion checks. -- The seed-43 no-warm canary stayed `10/10/10` and improved slightly from `1582` nodes / `3881` congestion checks to `1576` nodes / `3836` congestion checks. -- The remaining late-phase hotspot is still concentrated in `net_03` and `net_06`, especially the final 4-net iteration in the seed-43 trace. - -## Step 68 pre-pair frontier diagnostics kept, scratch reroute rejected - -Measured on 2026-04-02T17:57:48-07:00. - -Findings: - -- Kept a new opt-in `capture_pre_pair_frontier_trace` surface plus `scripts/record_pre_pair_frontier_trace.py`, and tracked the first seed-42 vs seed-43 artifacts in `docs/pre_pair_frontier_trace.json` and `docs/pre_pair_frontier_trace.md`. -- The final unresolved subset iteration is now explicit: seed `42` captures iteration `4` with routed nets `net_07`, `net_06`, `net_00`, `net_01`; seed `43` captures iteration `5` with routed nets `net_07`, `net_02`, `net_06`, `net_03`. -- The seed-43 heavy-net concentration is confirmed by the new trace: `net_03` and `net_06` account for most of the last unresolved iteration's work, and the hotspot-adjacent sampled prunes in that basin are closed-set dominated rather than hard-collision dominated. -- I also measured a bounded pre-pair scratch reroute for the two heaviest traced nets, but rejected it: it added runtime, produced `0` accepted repairs, and left the solved canaries at the same `1258 / 2736` and `1576 / 3836` node/check totals after revert. - -## Step 69 cap heavy late-phase reroutes with incumbent fallback - -Measured on 2026-04-02T18:20:00-07:00. - -Findings: - -- In the final all-reached 4-net subset iteration, the router now caps only the heavy reroute endpoints whose previous-iteration attributed work is already pathological, and falls back to their incumbent reached-target paths if the capped reroute does not finish cleanly. -- The solved seed-42 no-warm canary stays flat at `10/10/10`, `44` routed nets, `1258` nodes, and `2736` congestion checks, with `late_phase_capped_nets=0`. -- The heavier seed-43 no-warm canary stays `10/10/10` and improves from `1576` nodes / `3836` congestion checks to `1459` nodes / `3455` congestion checks, with `late_phase_capped_nets=2` and `late_phase_capped_fallbacks=2`. -- Guardrails held: warmed `example_07` stayed `10/10/10`, and `example_05_orientation_stress` stayed `3/3/3` with no late-phase capping activity. - -## Step 70 tighten late-phase cap from 128 to 64 - -Measured on 2026-04-02T18:33:00-07:00. - -Findings: - -- Tightened the bounded heavy-net late-phase reroute cap from `128` nodes to `64`, keeping the same incumbent fallback behavior and the same heavy-net selection rule. -- The solved seed-42 no-warm canary stays flat at `10/10/10`, `44` routed nets, `1258` nodes, and `2736` congestion checks, with `late_phase_capped_nets=0`. -- The heavier seed-43 no-warm canary stays `10/10/10` and improves again from `1459` nodes / `3455` congestion checks to `1331` nodes / `3012` congestion checks, still with `late_phase_capped_nets=2` and `late_phase_capped_fallbacks=2`. -- Guardrails held: warmed `example_07` stayed `10/10/10`, and `example_05_orientation_stress` stayed `3/3/3` with no late-phase capping activity. - -## Step 71 tighten late-phase cap from 64 to 32 after cap sweep - -Measured on 2026-04-02T18:43:00-07:00. - -Findings: - -- Ran a cap sweep across `32`, `48`, `64`, `96`, `128`, and uncapped behavior for the two no-warm seeds. The winner was `32`: it preserved both `10/10/10` canaries and gave the best seed-43 node/check totals while leaving seed-42 flat. -- Landed that tighter cap in the router. -- The solved seed-42 no-warm canary stays flat at `10/10/10`, `44` routed nets, `1258` nodes, and `2736` congestion checks, with `late_phase_capped_nets=0`. -- The heavier seed-43 no-warm canary stays `10/10/10` and improves again from `1331` nodes / `3012` congestion checks to `1267` nodes / `2813` congestion checks, still with `late_phase_capped_nets=2` and `late_phase_capped_fallbacks=2`. - -## Step 72 tighten late-phase cap from 32 to 1 after floor sweep - -Measured on 2026-04-02T18:45:00-07:00. - -Findings: - -- Extended the cap sweep below `32` and found the same pattern continued all the way down to `1`: seed-42 stayed flat because the cap never fires there, while seed-43 kept getting cheaper and still converged through the same incumbent-fallback path. -- Landed the tightest safe setting, `1`, so late pathological reroutes now act as a minimal probe before immediately falling back to the incumbent reached-target path if they do not finish cleanly. -- The solved seed-42 no-warm canary stays flat at `10/10/10`, `44` routed nets, `1258` nodes, and `2736` congestion checks, with `late_phase_capped_nets=0`. -- The heavier seed-43 no-warm canary stays `10/10/10` and improves again from `1267` nodes / `2813` congestion checks to `1205` nodes / `2548` congestion checks, still with `late_phase_capped_nets=2` and `late_phase_capped_fallbacks=2`. - -## Step 73 skip capped late-phase reroutes and carry the incumbent directly - -Measured on 2026-04-02T18:52:00-07:00. - -Findings: - -- Characterization showed the two capped late seed-43 reroutes were pure churn even at a `1`-node cap: they always fell back to the incumbent reached-target path and pair-local repair still resolved the final pairs. -- Moved that behavior into `_route_net_once()` directly: when a late heavy reroute is already capped and has a reached-target incumbent fallback, the router now reinstalls the incumbent immediately instead of calling `route_astar()` for a doomed probe. -- The solved seed-42 no-warm canary stays flat at `10/10/10`, `44` routed nets, `1258` nodes, and `2736` congestion checks, with `late_phase_capped_nets=0`. -- The heavier seed-43 no-warm canary stays `10/10/10` and improves again from `1205` nodes / `2548` congestion checks to `1203` nodes / `2530` congestion checks, still with `late_phase_capped_nets=2` and `late_phase_capped_fallbacks=2`. diff --git a/archive/routing/pair_local_characterization.json b/archive/routing/pair_local_characterization.json deleted file mode 100644 index 160ca48..0000000 --- a/archive/routing/pair_local_characterization.json +++ /dev/null @@ -1,2108 +0,0 @@ -{ - "cases": [ - { - "duration_s": 0.5461949198506773, - "metrics": { - "congestion_cache_hits": 8, - "congestion_cache_misses": 674, - "congestion_candidate_ids": 1105, - "congestion_candidate_nets": 1045, - "congestion_candidate_precheck_hits": 266, - "congestion_candidate_precheck_misses": 416, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 674, - "congestion_exact_pair_checks": 952, - "congestion_grid_net_cache_hits": 287, - "congestion_grid_net_cache_misses": 755, - "congestion_grid_span_cache_hits": 251, - "congestion_grid_span_cache_misses": 375, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 308, - "congestion_net_envelope_cache_misses": 807, - "congestion_presence_cache_hits": 282, - "congestion_presence_cache_misses": 475, - "congestion_presence_skips": 75, - "danger_map_cache_hits": 3159, - "danger_map_cache_misses": 1632, - "danger_map_lookup_calls": 4791, - "danger_map_query_calls": 1632, - "danger_map_total_ns": 46195989, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 131, - "dynamic_path_objects_removed": 106, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3312.5, - "guidance_bonus_applied_bend90": 1187.5, - "guidance_bonus_applied_sbend": 375.0, - "guidance_bonus_applied_straight": 1750.0, - "guidance_match_moves": 53, - "guidance_match_moves_bend90": 19, - "guidance_match_moves_sbend": 6, - "guidance_match_moves_straight": 28, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 18, - "iteration_conflicting_nets": 21, - "iteration_reverified_nets": 24, - "iteration_reverify_calls": 4, - "move_cache_abs_hits": 459, - "move_cache_abs_misses": 2216, - "move_cache_rel_hits": 2062, - "move_cache_rel_misses": 154, - "moves_added": 1597, - "moves_generated": 2675, - "nets_carried_forward": 0, - "nets_reached_target": 24, - "nets_routed": 24, - "nodes_expanded": 500, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 174, - "pruned_cost": 904, - "pruned_hard_collision": 0, - "ray_cast_calls": 1780, - "ray_cast_calls_expand_forward": 476, - "ray_cast_calls_expand_snap": 0, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 1300, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 4, - "ray_cast_candidate_bounds": 86, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 1, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 4, - "score_component_calls": 2501, - "score_component_total_ns": 52377581, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 444, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 296, - "verify_dynamic_exact_pair_checks": 320, - "verify_path_report_calls": 60, - "verify_static_buffer_ops": 256, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 4, - "visibility_tangent_candidate_ray_tests": 4, - "visibility_tangent_candidate_scans": 476, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 6, - "repeat": 0, - "seed": 41, - "summary": { - "reached_targets": 6, - "total_results": 6, - "valid_results": 1 - } - }, - { - "duration_s": 0.5255939338821918, - "metrics": { - "congestion_cache_hits": 8, - "congestion_cache_misses": 674, - "congestion_candidate_ids": 1105, - "congestion_candidate_nets": 1045, - "congestion_candidate_precheck_hits": 266, - "congestion_candidate_precheck_misses": 416, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 674, - "congestion_exact_pair_checks": 952, - "congestion_grid_net_cache_hits": 287, - "congestion_grid_net_cache_misses": 755, - "congestion_grid_span_cache_hits": 251, - "congestion_grid_span_cache_misses": 375, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 308, - "congestion_net_envelope_cache_misses": 807, - "congestion_presence_cache_hits": 282, - "congestion_presence_cache_misses": 475, - "congestion_presence_skips": 75, - "danger_map_cache_hits": 3159, - "danger_map_cache_misses": 1632, - "danger_map_lookup_calls": 4791, - "danger_map_query_calls": 1632, - "danger_map_total_ns": 42685332, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 131, - "dynamic_path_objects_removed": 106, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3312.5, - "guidance_bonus_applied_bend90": 1187.5, - "guidance_bonus_applied_sbend": 375.0, - "guidance_bonus_applied_straight": 1750.0, - "guidance_match_moves": 53, - "guidance_match_moves_bend90": 19, - "guidance_match_moves_sbend": 6, - "guidance_match_moves_straight": 28, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 18, - "iteration_conflicting_nets": 21, - "iteration_reverified_nets": 24, - "iteration_reverify_calls": 4, - "move_cache_abs_hits": 459, - "move_cache_abs_misses": 2216, - "move_cache_rel_hits": 2062, - "move_cache_rel_misses": 154, - "moves_added": 1597, - "moves_generated": 2675, - "nets_carried_forward": 0, - "nets_reached_target": 24, - "nets_routed": 24, - "nodes_expanded": 500, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 174, - "pruned_cost": 904, - "pruned_hard_collision": 0, - "ray_cast_calls": 1780, - "ray_cast_calls_expand_forward": 476, - "ray_cast_calls_expand_snap": 0, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 1300, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 4, - "ray_cast_candidate_bounds": 86, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 1, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 4, - "score_component_calls": 2501, - "score_component_total_ns": 48631281, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 444, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 296, - "verify_dynamic_exact_pair_checks": 320, - "verify_path_report_calls": 60, - "verify_static_buffer_ops": 256, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 4, - "visibility_tangent_candidate_ray_tests": 4, - "visibility_tangent_candidate_scans": 476, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 6, - "repeat": 1, - "seed": 41, - "summary": { - "reached_targets": 6, - "total_results": 6, - "valid_results": 1 - } - }, - { - "duration_s": 0.5240974249318242, - "metrics": { - "congestion_cache_hits": 8, - "congestion_cache_misses": 683, - "congestion_candidate_ids": 1119, - "congestion_candidate_nets": 1059, - "congestion_candidate_precheck_hits": 271, - "congestion_candidate_precheck_misses": 420, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 683, - "congestion_exact_pair_checks": 974, - "congestion_grid_net_cache_hits": 294, - "congestion_grid_net_cache_misses": 761, - "congestion_grid_span_cache_hits": 257, - "congestion_grid_span_cache_misses": 378, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 315, - "congestion_net_envelope_cache_misses": 813, - "congestion_presence_cache_hits": 287, - "congestion_presence_cache_misses": 479, - "congestion_presence_skips": 75, - "danger_map_cache_hits": 3186, - "danger_map_cache_misses": 1632, - "danger_map_lookup_calls": 4818, - "danger_map_query_calls": 1632, - "danger_map_total_ns": 42252659, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 131, - "dynamic_path_objects_removed": 106, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3312.5, - "guidance_bonus_applied_bend90": 1187.5, - "guidance_bonus_applied_sbend": 375.0, - "guidance_bonus_applied_straight": 1750.0, - "guidance_match_moves": 53, - "guidance_match_moves_bend90": 19, - "guidance_match_moves_sbend": 6, - "guidance_match_moves_straight": 28, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 18, - "iteration_conflicting_nets": 21, - "iteration_reverified_nets": 24, - "iteration_reverify_calls": 4, - "move_cache_abs_hits": 472, - "move_cache_abs_misses": 2216, - "move_cache_rel_hits": 2062, - "move_cache_rel_misses": 154, - "moves_added": 1606, - "moves_generated": 2688, - "nets_carried_forward": 0, - "nets_reached_target": 24, - "nets_routed": 24, - "nodes_expanded": 503, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 174, - "pruned_cost": 908, - "pruned_hard_collision": 0, - "ray_cast_calls": 1783, - "ray_cast_calls_expand_forward": 479, - "ray_cast_calls_expand_snap": 0, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 1300, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 4, - "ray_cast_candidate_bounds": 86, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 1, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 4, - "score_component_calls": 2514, - "score_component_total_ns": 48076710, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 457, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 292, - "verify_dynamic_exact_pair_checks": 324, - "verify_path_report_calls": 60, - "verify_static_buffer_ops": 256, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 4, - "visibility_tangent_candidate_ray_tests": 4, - "visibility_tangent_candidate_scans": 479, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 6, - "repeat": 0, - "seed": 42, - "summary": { - "reached_targets": 6, - "total_results": 6, - "valid_results": 1 - } - }, - { - "duration_s": 0.547705102013424, - "metrics": { - "congestion_cache_hits": 8, - "congestion_cache_misses": 683, - "congestion_candidate_ids": 1119, - "congestion_candidate_nets": 1059, - "congestion_candidate_precheck_hits": 271, - "congestion_candidate_precheck_misses": 420, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 683, - "congestion_exact_pair_checks": 974, - "congestion_grid_net_cache_hits": 294, - "congestion_grid_net_cache_misses": 761, - "congestion_grid_span_cache_hits": 257, - "congestion_grid_span_cache_misses": 378, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 315, - "congestion_net_envelope_cache_misses": 813, - "congestion_presence_cache_hits": 287, - "congestion_presence_cache_misses": 479, - "congestion_presence_skips": 75, - "danger_map_cache_hits": 3186, - "danger_map_cache_misses": 1632, - "danger_map_lookup_calls": 4818, - "danger_map_query_calls": 1632, - "danger_map_total_ns": 43365736, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 131, - "dynamic_path_objects_removed": 106, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3312.5, - "guidance_bonus_applied_bend90": 1187.5, - "guidance_bonus_applied_sbend": 375.0, - "guidance_bonus_applied_straight": 1750.0, - "guidance_match_moves": 53, - "guidance_match_moves_bend90": 19, - "guidance_match_moves_sbend": 6, - "guidance_match_moves_straight": 28, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 18, - "iteration_conflicting_nets": 21, - "iteration_reverified_nets": 24, - "iteration_reverify_calls": 4, - "move_cache_abs_hits": 472, - "move_cache_abs_misses": 2216, - "move_cache_rel_hits": 2062, - "move_cache_rel_misses": 154, - "moves_added": 1606, - "moves_generated": 2688, - "nets_carried_forward": 0, - "nets_reached_target": 24, - "nets_routed": 24, - "nodes_expanded": 503, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 174, - "pruned_cost": 908, - "pruned_hard_collision": 0, - "ray_cast_calls": 1783, - "ray_cast_calls_expand_forward": 479, - "ray_cast_calls_expand_snap": 0, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 1300, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 4, - "ray_cast_candidate_bounds": 86, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 1, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 4, - "score_component_calls": 2514, - "score_component_total_ns": 49498429, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 457, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 292, - "verify_dynamic_exact_pair_checks": 324, - "verify_path_report_calls": 60, - "verify_static_buffer_ops": 256, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 4, - "visibility_tangent_candidate_ray_tests": 4, - "visibility_tangent_candidate_scans": 479, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 6, - "repeat": 1, - "seed": 42, - "summary": { - "reached_targets": 6, - "total_results": 6, - "valid_results": 1 - } - }, - { - "duration_s": 0.5199470021761954, - "metrics": { - "congestion_cache_hits": 8, - "congestion_cache_misses": 654, - "congestion_candidate_ids": 1048, - "congestion_candidate_nets": 995, - "congestion_candidate_precheck_hits": 250, - "congestion_candidate_precheck_misses": 412, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 654, - "congestion_exact_pair_checks": 915, - "congestion_grid_net_cache_hits": 272, - "congestion_grid_net_cache_misses": 746, - "congestion_grid_span_cache_hits": 234, - "congestion_grid_span_cache_misses": 372, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 293, - "congestion_net_envelope_cache_misses": 796, - "congestion_presence_cache_hits": 261, - "congestion_presence_cache_misses": 466, - "congestion_presence_skips": 65, - "danger_map_cache_hits": 3103, - "danger_map_cache_misses": 1598, - "danger_map_lookup_calls": 4701, - "danger_map_query_calls": 1598, - "danger_map_total_ns": 41631872, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 131, - "dynamic_path_objects_removed": 106, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3312.5, - "guidance_bonus_applied_bend90": 1187.5, - "guidance_bonus_applied_sbend": 375.0, - "guidance_bonus_applied_straight": 1750.0, - "guidance_match_moves": 53, - "guidance_match_moves_bend90": 19, - "guidance_match_moves_sbend": 6, - "guidance_match_moves_straight": 28, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 18, - "iteration_conflicting_nets": 21, - "iteration_reverified_nets": 24, - "iteration_reverify_calls": 4, - "move_cache_abs_hits": 451, - "move_cache_abs_misses": 2192, - "move_cache_rel_hits": 2038, - "move_cache_rel_misses": 154, - "moves_added": 1567, - "moves_generated": 2643, - "nets_carried_forward": 0, - "nets_reached_target": 24, - "nets_routed": 24, - "nodes_expanded": 493, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 172, - "pruned_cost": 904, - "pruned_hard_collision": 0, - "ray_cast_calls": 1763, - "ray_cast_calls_expand_forward": 469, - "ray_cast_calls_expand_snap": 0, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 1290, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 4, - "ray_cast_candidate_bounds": 80, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 1, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 4, - "score_component_calls": 2471, - "score_component_total_ns": 47519774, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 436, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 293, - "verify_dynamic_exact_pair_checks": 317, - "verify_path_report_calls": 60, - "verify_static_buffer_ops": 256, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 4, - "visibility_tangent_candidate_ray_tests": 4, - "visibility_tangent_candidate_scans": 469, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 6, - "repeat": 0, - "seed": 43, - "summary": { - "reached_targets": 6, - "total_results": 6, - "valid_results": 1 - } - }, - { - "duration_s": 0.5160259250551462, - "metrics": { - "congestion_cache_hits": 8, - "congestion_cache_misses": 654, - "congestion_candidate_ids": 1048, - "congestion_candidate_nets": 995, - "congestion_candidate_precheck_hits": 250, - "congestion_candidate_precheck_misses": 412, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 654, - "congestion_exact_pair_checks": 915, - "congestion_grid_net_cache_hits": 272, - "congestion_grid_net_cache_misses": 746, - "congestion_grid_span_cache_hits": 234, - "congestion_grid_span_cache_misses": 372, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 293, - "congestion_net_envelope_cache_misses": 796, - "congestion_presence_cache_hits": 261, - "congestion_presence_cache_misses": 466, - "congestion_presence_skips": 65, - "danger_map_cache_hits": 3103, - "danger_map_cache_misses": 1598, - "danger_map_lookup_calls": 4701, - "danger_map_query_calls": 1598, - "danger_map_total_ns": 41135911, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 131, - "dynamic_path_objects_removed": 106, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3312.5, - "guidance_bonus_applied_bend90": 1187.5, - "guidance_bonus_applied_sbend": 375.0, - "guidance_bonus_applied_straight": 1750.0, - "guidance_match_moves": 53, - "guidance_match_moves_bend90": 19, - "guidance_match_moves_sbend": 6, - "guidance_match_moves_straight": 28, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 18, - "iteration_conflicting_nets": 21, - "iteration_reverified_nets": 24, - "iteration_reverify_calls": 4, - "move_cache_abs_hits": 451, - "move_cache_abs_misses": 2192, - "move_cache_rel_hits": 2038, - "move_cache_rel_misses": 154, - "moves_added": 1567, - "moves_generated": 2643, - "nets_carried_forward": 0, - "nets_reached_target": 24, - "nets_routed": 24, - "nodes_expanded": 493, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 172, - "pruned_cost": 904, - "pruned_hard_collision": 0, - "ray_cast_calls": 1763, - "ray_cast_calls_expand_forward": 469, - "ray_cast_calls_expand_snap": 0, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 1290, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 4, - "ray_cast_candidate_bounds": 80, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 1, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 4, - "score_component_calls": 2471, - "score_component_total_ns": 47047772, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 436, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 293, - "verify_dynamic_exact_pair_checks": 317, - "verify_path_report_calls": 60, - "verify_static_buffer_ops": 256, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 4, - "visibility_tangent_candidate_ray_tests": 4, - "visibility_tangent_candidate_scans": 469, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 6, - "repeat": 1, - "seed": 43, - "summary": { - "reached_targets": 6, - "total_results": 6, - "valid_results": 1 - } - }, - { - "duration_s": 1.8817617469467223, - "metrics": { - "congestion_cache_hits": 31, - "congestion_cache_misses": 4313, - "congestion_candidate_ids": 7976, - "congestion_candidate_nets": 7240, - "congestion_candidate_precheck_hits": 2327, - "congestion_candidate_precheck_misses": 2036, - "congestion_candidate_precheck_skips": 19, - "congestion_check_calls": 4313, - "congestion_exact_pair_checks": 6217, - "congestion_grid_net_cache_hits": 2369, - "congestion_grid_net_cache_misses": 3714, - "congestion_grid_span_cache_hits": 2055, - "congestion_grid_span_cache_misses": 1837, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 2527, - "congestion_net_envelope_cache_misses": 3896, - "congestion_presence_cache_hits": 2955, - "congestion_presence_cache_misses": 2536, - "congestion_presence_skips": 1126, - "danger_map_cache_hits": 16937, - "danger_map_cache_misses": 6391, - "danger_map_lookup_calls": 23328, - "danger_map_query_calls": 6391, - "danger_map_total_ns": 192446411, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 450, - "dynamic_path_objects_removed": 416, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 10812.5, - "guidance_bonus_applied_bend90": 3125.0, - "guidance_bonus_applied_sbend": 750.0, - "guidance_bonus_applied_straight": 6937.5, - "guidance_match_moves": 173, - "guidance_match_moves_bend90": 50, - "guidance_match_moves_sbend": 12, - "guidance_match_moves_straight": 111, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 33, - "iteration_conflicting_nets": 38, - "iteration_reverified_nets": 56, - "iteration_reverify_calls": 7, - "move_cache_abs_hits": 2874, - "move_cache_abs_misses": 5680, - "move_cache_rel_hits": 4979, - "move_cache_rel_misses": 701, - "moves_added": 7771, - "moves_generated": 8554, - "nets_carried_forward": 0, - "nets_reached_target": 56, - "nets_routed": 56, - "nodes_expanded": 1558, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 38, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 461, - "pruned_cost": 322, - "pruned_hard_collision": 0, - "ray_cast_calls": 4910, - "ray_cast_calls_expand_forward": 1502, - "ray_cast_calls_expand_snap": 39, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3363, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 237, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 8, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 7, - "score_component_calls": 8098, - "score_component_total_ns": 218008329, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 2788, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1244, - "verify_dynamic_exact_pair_checks": 464, - "verify_path_report_calls": 144, - "verify_static_buffer_ops": 732, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1502, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 8, - "repeat": 0, - "seed": 41, - "summary": { - "reached_targets": 8, - "total_results": 8, - "valid_results": 8 - } - }, - { - "duration_s": 1.8618457240518183, - "metrics": { - "congestion_cache_hits": 31, - "congestion_cache_misses": 4313, - "congestion_candidate_ids": 7976, - "congestion_candidate_nets": 7240, - "congestion_candidate_precheck_hits": 2327, - "congestion_candidate_precheck_misses": 2036, - "congestion_candidate_precheck_skips": 19, - "congestion_check_calls": 4313, - "congestion_exact_pair_checks": 6217, - "congestion_grid_net_cache_hits": 2369, - "congestion_grid_net_cache_misses": 3714, - "congestion_grid_span_cache_hits": 2055, - "congestion_grid_span_cache_misses": 1837, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 2527, - "congestion_net_envelope_cache_misses": 3896, - "congestion_presence_cache_hits": 2955, - "congestion_presence_cache_misses": 2536, - "congestion_presence_skips": 1126, - "danger_map_cache_hits": 16937, - "danger_map_cache_misses": 6391, - "danger_map_lookup_calls": 23328, - "danger_map_query_calls": 6391, - "danger_map_total_ns": 172147520, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 450, - "dynamic_path_objects_removed": 416, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 10812.5, - "guidance_bonus_applied_bend90": 3125.0, - "guidance_bonus_applied_sbend": 750.0, - "guidance_bonus_applied_straight": 6937.5, - "guidance_match_moves": 173, - "guidance_match_moves_bend90": 50, - "guidance_match_moves_sbend": 12, - "guidance_match_moves_straight": 111, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 33, - "iteration_conflicting_nets": 38, - "iteration_reverified_nets": 56, - "iteration_reverify_calls": 7, - "move_cache_abs_hits": 2874, - "move_cache_abs_misses": 5680, - "move_cache_rel_hits": 4979, - "move_cache_rel_misses": 701, - "moves_added": 7771, - "moves_generated": 8554, - "nets_carried_forward": 0, - "nets_reached_target": 56, - "nets_routed": 56, - "nodes_expanded": 1558, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 38, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 461, - "pruned_cost": 322, - "pruned_hard_collision": 0, - "ray_cast_calls": 4910, - "ray_cast_calls_expand_forward": 1502, - "ray_cast_calls_expand_snap": 39, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3363, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 237, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 8, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 7, - "score_component_calls": 8098, - "score_component_total_ns": 197998309, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 2788, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1244, - "verify_dynamic_exact_pair_checks": 464, - "verify_path_report_calls": 144, - "verify_static_buffer_ops": 732, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1502, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 8, - "repeat": 1, - "seed": 41, - "summary": { - "reached_targets": 8, - "total_results": 8, - "valid_results": 8 - } - }, - { - "duration_s": 1.4850338851101696, - "metrics": { - "congestion_cache_hits": 37, - "congestion_cache_misses": 3799, - "congestion_candidate_ids": 7050, - "congestion_candidate_nets": 6725, - "congestion_candidate_precheck_hits": 1823, - "congestion_candidate_precheck_misses": 2035, - "congestion_candidate_precheck_skips": 22, - "congestion_check_calls": 3799, - "congestion_exact_pair_checks": 5684, - "congestion_grid_net_cache_hits": 1836, - "congestion_grid_net_cache_misses": 3693, - "congestion_grid_span_cache_hits": 1591, - "congestion_grid_span_cache_misses": 1804, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1992, - "congestion_net_envelope_cache_misses": 3901, - "congestion_presence_cache_hits": 2321, - "congestion_presence_cache_misses": 2616, - "congestion_presence_skips": 1079, - "danger_map_cache_hits": 16398, - "danger_map_cache_misses": 5274, - "danger_map_lookup_calls": 21672, - "danger_map_query_calls": 5274, - "danger_map_total_ns": 142151688, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 435, - "dynamic_path_objects_removed": 400, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 14187.5, - "guidance_bonus_applied_bend90": 4187.5, - "guidance_bonus_applied_sbend": 875.0, - "guidance_bonus_applied_straight": 9125.0, - "guidance_match_moves": 227, - "guidance_match_moves_bend90": 67, - "guidance_match_moves_sbend": 14, - "guidance_match_moves_straight": 146, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 31, - "iteration_conflicting_nets": 35, - "iteration_reverified_nets": 64, - "iteration_reverify_calls": 8, - "move_cache_abs_hits": 3181, - "move_cache_abs_misses": 4740, - "move_cache_rel_hits": 4171, - "move_cache_rel_misses": 569, - "moves_added": 7220, - "moves_generated": 7921, - "nets_carried_forward": 0, - "nets_reached_target": 64, - "nets_routed": 64, - "nodes_expanded": 1440, - "pair_local_search_accepts": 1, - "pair_local_search_attempts": 1, - "pair_local_search_nodes_expanded": 19, - "pair_local_search_pairs_considered": 1, - "path_cost_calls": 0, - "pruned_closed_set": 407, - "pruned_cost": 294, - "pruned_hard_collision": 0, - "ray_cast_calls": 4201, - "ray_cast_calls_expand_forward": 1376, - "ray_cast_calls_expand_snap": 46, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 2773, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 187, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 8, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 8, - "score_component_calls": 7518, - "score_component_total_ns": 164933249, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 3079, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1295, - "verify_dynamic_exact_pair_checks": 415, - "verify_path_report_calls": 152, - "verify_static_buffer_ops": 755, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1376, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 8, - "repeat": 0, - "seed": 42, - "summary": { - "reached_targets": 8, - "total_results": 8, - "valid_results": 8 - } - }, - { - "duration_s": 1.4636062050703913, - "metrics": { - "congestion_cache_hits": 37, - "congestion_cache_misses": 3799, - "congestion_candidate_ids": 7050, - "congestion_candidate_nets": 6725, - "congestion_candidate_precheck_hits": 1823, - "congestion_candidate_precheck_misses": 2035, - "congestion_candidate_precheck_skips": 22, - "congestion_check_calls": 3799, - "congestion_exact_pair_checks": 5684, - "congestion_grid_net_cache_hits": 1836, - "congestion_grid_net_cache_misses": 3693, - "congestion_grid_span_cache_hits": 1591, - "congestion_grid_span_cache_misses": 1804, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1992, - "congestion_net_envelope_cache_misses": 3901, - "congestion_presence_cache_hits": 2321, - "congestion_presence_cache_misses": 2616, - "congestion_presence_skips": 1079, - "danger_map_cache_hits": 16398, - "danger_map_cache_misses": 5274, - "danger_map_lookup_calls": 21672, - "danger_map_query_calls": 5274, - "danger_map_total_ns": 142480011, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 435, - "dynamic_path_objects_removed": 400, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 14187.5, - "guidance_bonus_applied_bend90": 4187.5, - "guidance_bonus_applied_sbend": 875.0, - "guidance_bonus_applied_straight": 9125.0, - "guidance_match_moves": 227, - "guidance_match_moves_bend90": 67, - "guidance_match_moves_sbend": 14, - "guidance_match_moves_straight": 146, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 31, - "iteration_conflicting_nets": 35, - "iteration_reverified_nets": 64, - "iteration_reverify_calls": 8, - "move_cache_abs_hits": 3181, - "move_cache_abs_misses": 4740, - "move_cache_rel_hits": 4171, - "move_cache_rel_misses": 569, - "moves_added": 7220, - "moves_generated": 7921, - "nets_carried_forward": 0, - "nets_reached_target": 64, - "nets_routed": 64, - "nodes_expanded": 1440, - "pair_local_search_accepts": 1, - "pair_local_search_attempts": 1, - "pair_local_search_nodes_expanded": 19, - "pair_local_search_pairs_considered": 1, - "path_cost_calls": 0, - "pruned_closed_set": 407, - "pruned_cost": 294, - "pruned_hard_collision": 0, - "ray_cast_calls": 4201, - "ray_cast_calls_expand_forward": 1376, - "ray_cast_calls_expand_snap": 46, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 2773, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 187, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 8, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 8, - "score_component_calls": 7518, - "score_component_total_ns": 165301696, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 3079, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1295, - "verify_dynamic_exact_pair_checks": 415, - "verify_path_report_calls": 152, - "verify_static_buffer_ops": 755, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1376, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 8, - "repeat": 1, - "seed": 42, - "summary": { - "reached_targets": 8, - "total_results": 8, - "valid_results": 8 - } - }, - { - "duration_s": 1.065187250962481, - "metrics": { - "congestion_cache_hits": 10, - "congestion_cache_misses": 1844, - "congestion_candidate_ids": 3568, - "congestion_candidate_nets": 3390, - "congestion_candidate_precheck_hits": 757, - "congestion_candidate_precheck_misses": 1113, - "congestion_candidate_precheck_skips": 16, - "congestion_check_calls": 1844, - "congestion_exact_pair_checks": 2796, - "congestion_grid_net_cache_hits": 772, - "congestion_grid_net_cache_misses": 2030, - "congestion_grid_span_cache_hits": 678, - "congestion_grid_span_cache_misses": 1016, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 838, - "congestion_net_envelope_cache_misses": 2135, - "congestion_presence_cache_hits": 850, - "congestion_presence_cache_misses": 1349, - "congestion_presence_skips": 329, - "danger_map_cache_hits": 9125, - "danger_map_cache_misses": 4333, - "danger_map_lookup_calls": 13458, - "danger_map_query_calls": 4333, - "danger_map_total_ns": 126835582, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 256, - "dynamic_path_objects_removed": 218, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 5625.0, - "guidance_bonus_applied_bend90": 2000.0, - "guidance_bonus_applied_sbend": 500.0, - "guidance_bonus_applied_straight": 3125.0, - "guidance_match_moves": 90, - "guidance_match_moves_bend90": 32, - "guidance_match_moves_sbend": 8, - "guidance_match_moves_straight": 50, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 27, - "iteration_conflicting_nets": 26, - "iteration_reverified_nets": 40, - "iteration_reverify_calls": 5, - "move_cache_abs_hits": 1094, - "move_cache_abs_misses": 3955, - "move_cache_rel_hits": 3487, - "move_cache_rel_misses": 468, - "moves_added": 4475, - "moves_generated": 5049, - "nets_carried_forward": 0, - "nets_reached_target": 40, - "nets_routed": 40, - "nodes_expanded": 939, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 319, - "pruned_cost": 255, - "pruned_hard_collision": 0, - "ray_cast_calls": 3212, - "ray_cast_calls_expand_forward": 899, - "ray_cast_calls_expand_snap": 20, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 2287, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 140, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 8, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 5, - "score_component_calls": 4741, - "score_component_total_ns": 141872767, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1057, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 751, - "verify_dynamic_exact_pair_checks": 363, - "verify_path_report_calls": 96, - "verify_static_buffer_ops": 436, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 899, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 8, - "repeat": 0, - "seed": 43, - "summary": { - "reached_targets": 8, - "total_results": 8, - "valid_results": 8 - } - }, - { - "duration_s": 1.0501909658778459, - "metrics": { - "congestion_cache_hits": 10, - "congestion_cache_misses": 1844, - "congestion_candidate_ids": 3568, - "congestion_candidate_nets": 3390, - "congestion_candidate_precheck_hits": 757, - "congestion_candidate_precheck_misses": 1113, - "congestion_candidate_precheck_skips": 16, - "congestion_check_calls": 1844, - "congestion_exact_pair_checks": 2796, - "congestion_grid_net_cache_hits": 772, - "congestion_grid_net_cache_misses": 2030, - "congestion_grid_span_cache_hits": 678, - "congestion_grid_span_cache_misses": 1016, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 838, - "congestion_net_envelope_cache_misses": 2135, - "congestion_presence_cache_hits": 850, - "congestion_presence_cache_misses": 1349, - "congestion_presence_skips": 329, - "danger_map_cache_hits": 9125, - "danger_map_cache_misses": 4333, - "danger_map_lookup_calls": 13458, - "danger_map_query_calls": 4333, - "danger_map_total_ns": 112792178, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 256, - "dynamic_path_objects_removed": 218, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 5625.0, - "guidance_bonus_applied_bend90": 2000.0, - "guidance_bonus_applied_sbend": 500.0, - "guidance_bonus_applied_straight": 3125.0, - "guidance_match_moves": 90, - "guidance_match_moves_bend90": 32, - "guidance_match_moves_sbend": 8, - "guidance_match_moves_straight": 50, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 27, - "iteration_conflicting_nets": 26, - "iteration_reverified_nets": 40, - "iteration_reverify_calls": 5, - "move_cache_abs_hits": 1094, - "move_cache_abs_misses": 3955, - "move_cache_rel_hits": 3487, - "move_cache_rel_misses": 468, - "moves_added": 4475, - "moves_generated": 5049, - "nets_carried_forward": 0, - "nets_reached_target": 40, - "nets_routed": 40, - "nodes_expanded": 939, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 319, - "pruned_cost": 255, - "pruned_hard_collision": 0, - "ray_cast_calls": 3212, - "ray_cast_calls_expand_forward": 899, - "ray_cast_calls_expand_snap": 20, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 2287, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 140, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 8, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 5, - "score_component_calls": 4741, - "score_component_total_ns": 127782063, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1057, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 751, - "verify_dynamic_exact_pair_checks": 363, - "verify_path_report_calls": 96, - "verify_static_buffer_ops": 436, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 899, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 8, - "repeat": 1, - "seed": 43, - "summary": { - "reached_targets": 8, - "total_results": 8, - "valid_results": 8 - } - }, - { - "duration_s": 2.861715276958421, - "metrics": { - "congestion_cache_hits": 181, - "congestion_cache_misses": 6208, - "congestion_candidate_ids": 14969, - "congestion_candidate_nets": 14477, - "congestion_candidate_precheck_hits": 4046, - "congestion_candidate_precheck_misses": 2450, - "congestion_candidate_precheck_skips": 107, - "congestion_check_calls": 6208, - "congestion_exact_pair_checks": 12175, - "congestion_grid_net_cache_hits": 3733, - "congestion_grid_net_cache_misses": 4394, - "congestion_grid_span_cache_hits": 3484, - "congestion_grid_span_cache_misses": 2188, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 4110, - "congestion_net_envelope_cache_misses": 4614, - "congestion_presence_cache_hits": 4474, - "congestion_presence_cache_misses": 2857, - "congestion_presence_skips": 835, - "danger_map_cache_hits": 21570, - "danger_map_cache_misses": 8484, - "danger_map_lookup_calls": 30054, - "danger_map_query_calls": 8484, - "danger_map_total_ns": 229555102, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 470, - "dynamic_path_objects_removed": 422, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 12937.5, - "guidance_bonus_applied_bend90": 4187.5, - "guidance_bonus_applied_sbend": 750.0, - "guidance_bonus_applied_straight": 8000.0, - "guidance_match_moves": 207, - "guidance_match_moves_bend90": 67, - "guidance_match_moves_sbend": 12, - "guidance_match_moves_straight": 128, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 43, - "iteration_conflicting_nets": 43, - "iteration_reverified_nets": 60, - "iteration_reverify_calls": 6, - "move_cache_abs_hits": 3714, - "move_cache_abs_misses": 7526, - "move_cache_rel_hits": 6718, - "move_cache_rel_misses": 808, - "moves_added": 9950, - "moves_generated": 11240, - "nets_carried_forward": 0, - "nets_reached_target": 60, - "nets_routed": 60, - "nodes_expanded": 2223, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 41, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 566, - "pruned_cost": 724, - "pruned_hard_collision": 0, - "ray_cast_calls": 6546, - "ray_cast_calls_expand_forward": 2163, - "ray_cast_calls_expand_snap": 43, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 4334, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 438, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 8, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 6, - "score_component_calls": 10742, - "score_component_total_ns": 262906657, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 3614, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1812, - "verify_dynamic_exact_pair_checks": 590, - "verify_path_report_calls": 160, - "verify_static_buffer_ops": 771, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 2163, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 10, - "repeat": 0, - "seed": 41, - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 8 - } - }, - { - "duration_s": 2.8281878910493106, - "metrics": { - "congestion_cache_hits": 181, - "congestion_cache_misses": 6208, - "congestion_candidate_ids": 14969, - "congestion_candidate_nets": 14477, - "congestion_candidate_precheck_hits": 4046, - "congestion_candidate_precheck_misses": 2450, - "congestion_candidate_precheck_skips": 107, - "congestion_check_calls": 6208, - "congestion_exact_pair_checks": 12175, - "congestion_grid_net_cache_hits": 3733, - "congestion_grid_net_cache_misses": 4394, - "congestion_grid_span_cache_hits": 3484, - "congestion_grid_span_cache_misses": 2188, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 4110, - "congestion_net_envelope_cache_misses": 4614, - "congestion_presence_cache_hits": 4474, - "congestion_presence_cache_misses": 2857, - "congestion_presence_skips": 835, - "danger_map_cache_hits": 21570, - "danger_map_cache_misses": 8484, - "danger_map_lookup_calls": 30054, - "danger_map_query_calls": 8484, - "danger_map_total_ns": 223711146, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 470, - "dynamic_path_objects_removed": 422, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 12937.5, - "guidance_bonus_applied_bend90": 4187.5, - "guidance_bonus_applied_sbend": 750.0, - "guidance_bonus_applied_straight": 8000.0, - "guidance_match_moves": 207, - "guidance_match_moves_bend90": 67, - "guidance_match_moves_sbend": 12, - "guidance_match_moves_straight": 128, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 43, - "iteration_conflicting_nets": 43, - "iteration_reverified_nets": 60, - "iteration_reverify_calls": 6, - "move_cache_abs_hits": 3714, - "move_cache_abs_misses": 7526, - "move_cache_rel_hits": 6718, - "move_cache_rel_misses": 808, - "moves_added": 9950, - "moves_generated": 11240, - "nets_carried_forward": 0, - "nets_reached_target": 60, - "nets_routed": 60, - "nodes_expanded": 2223, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 41, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 566, - "pruned_cost": 724, - "pruned_hard_collision": 0, - "ray_cast_calls": 6546, - "ray_cast_calls_expand_forward": 2163, - "ray_cast_calls_expand_snap": 43, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 4334, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 438, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 8, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 6, - "score_component_calls": 10742, - "score_component_total_ns": 257092830, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 3614, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1812, - "verify_dynamic_exact_pair_checks": 590, - "verify_path_report_calls": 160, - "verify_static_buffer_ops": 771, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 2163, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 10, - "repeat": 1, - "seed": 41, - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 8 - } - }, - { - "duration_s": 2.035589807201177, - "metrics": { - "congestion_cache_hits": 31, - "congestion_cache_misses": 4625, - "congestion_candidate_ids": 9924, - "congestion_candidate_nets": 9979, - "congestion_candidate_precheck_hits": 2562, - "congestion_candidate_precheck_misses": 2165, - "congestion_candidate_precheck_skips": 71, - "congestion_check_calls": 4625, - "congestion_exact_pair_checks": 8122, - "congestion_grid_net_cache_hits": 2457, - "congestion_grid_net_cache_misses": 3942, - "congestion_grid_span_cache_hits": 2283, - "congestion_grid_span_cache_misses": 1948, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 2673, - "congestion_net_envelope_cache_misses": 4139, - "congestion_presence_cache_hits": 2858, - "congestion_presence_cache_misses": 2556, - "congestion_presence_skips": 687, - "danger_map_cache_hits": 16878, - "danger_map_cache_misses": 7425, - "danger_map_lookup_calls": 24303, - "danger_map_query_calls": 7425, - "danger_map_total_ns": 197092109, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 471, - "dynamic_path_objects_removed": 423, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 11000.0, - "guidance_bonus_applied_bend90": 3500.0, - "guidance_bonus_applied_sbend": 625.0, - "guidance_bonus_applied_straight": 6875.0, - "guidance_match_moves": 176, - "guidance_match_moves_bend90": 56, - "guidance_match_moves_sbend": 10, - "guidance_match_moves_straight": 110, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 39, - "iteration_conflicting_nets": 36, - "iteration_reverified_nets": 60, - "iteration_reverify_calls": 6, - "move_cache_abs_hits": 2559, - "move_cache_abs_misses": 6494, - "move_cache_rel_hits": 5872, - "move_cache_rel_misses": 622, - "moves_added": 8081, - "moves_generated": 9053, - "nets_carried_forward": 0, - "nets_reached_target": 60, - "nets_routed": 60, - "nodes_expanded": 1764, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 2, - "pair_local_search_nodes_expanded": 68, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 439, - "pruned_cost": 533, - "pruned_hard_collision": 0, - "ray_cast_calls": 5477, - "ray_cast_calls_expand_forward": 1704, - "ray_cast_calls_expand_snap": 46, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3721, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 305, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 6, - "score_component_calls": 8634, - "score_component_total_ns": 223430894, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 2482, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1756, - "verify_dynamic_exact_pair_checks": 510, - "verify_path_report_calls": 160, - "verify_static_buffer_ops": 751, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1704, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 10, - "repeat": 0, - "seed": 42, - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 10 - } - }, - { - "duration_s": 2.0052393269725144, - "metrics": { - "congestion_cache_hits": 31, - "congestion_cache_misses": 4625, - "congestion_candidate_ids": 9924, - "congestion_candidate_nets": 9979, - "congestion_candidate_precheck_hits": 2562, - "congestion_candidate_precheck_misses": 2165, - "congestion_candidate_precheck_skips": 71, - "congestion_check_calls": 4625, - "congestion_exact_pair_checks": 8122, - "congestion_grid_net_cache_hits": 2457, - "congestion_grid_net_cache_misses": 3942, - "congestion_grid_span_cache_hits": 2283, - "congestion_grid_span_cache_misses": 1948, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 2673, - "congestion_net_envelope_cache_misses": 4139, - "congestion_presence_cache_hits": 2858, - "congestion_presence_cache_misses": 2556, - "congestion_presence_skips": 687, - "danger_map_cache_hits": 16878, - "danger_map_cache_misses": 7425, - "danger_map_lookup_calls": 24303, - "danger_map_query_calls": 7425, - "danger_map_total_ns": 196041391, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 471, - "dynamic_path_objects_removed": 423, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 11000.0, - "guidance_bonus_applied_bend90": 3500.0, - "guidance_bonus_applied_sbend": 625.0, - "guidance_bonus_applied_straight": 6875.0, - "guidance_match_moves": 176, - "guidance_match_moves_bend90": 56, - "guidance_match_moves_sbend": 10, - "guidance_match_moves_straight": 110, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 39, - "iteration_conflicting_nets": 36, - "iteration_reverified_nets": 60, - "iteration_reverify_calls": 6, - "move_cache_abs_hits": 2559, - "move_cache_abs_misses": 6494, - "move_cache_rel_hits": 5872, - "move_cache_rel_misses": 622, - "moves_added": 8081, - "moves_generated": 9053, - "nets_carried_forward": 0, - "nets_reached_target": 60, - "nets_routed": 60, - "nodes_expanded": 1764, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 2, - "pair_local_search_nodes_expanded": 68, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 439, - "pruned_cost": 533, - "pruned_hard_collision": 0, - "ray_cast_calls": 5477, - "ray_cast_calls_expand_forward": 1704, - "ray_cast_calls_expand_snap": 46, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3721, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 305, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 6, - "score_component_calls": 8634, - "score_component_total_ns": 222749506, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 2482, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1756, - "verify_dynamic_exact_pair_checks": 510, - "verify_path_report_calls": 160, - "verify_static_buffer_ops": 751, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1704, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 10, - "repeat": 1, - "seed": 42, - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 10 - } - }, - { - "duration_s": 50.18633775901981, - "metrics": { - "congestion_cache_hits": 1713, - "congestion_cache_misses": 165223, - "congestion_candidate_ids": 312161, - "congestion_candidate_nets": 300960, - "congestion_candidate_precheck_hits": 159843, - "congestion_candidate_precheck_misses": 7810, - "congestion_candidate_precheck_skips": 717, - "congestion_check_calls": 165223, - "congestion_exact_pair_checks": 249697, - "congestion_grid_net_cache_hits": 152369, - "congestion_grid_net_cache_misses": 13481, - "congestion_grid_span_cache_hits": 144618, - "congestion_grid_span_cache_misses": 6885, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 160549, - "congestion_net_envelope_cache_misses": 14205, - "congestion_presence_cache_hits": 186369, - "congestion_presence_cache_misses": 9324, - "congestion_presence_skips": 27588, - "danger_map_cache_hits": 453553, - "danger_map_cache_misses": 140744, - "danger_map_lookup_calls": 594297, - "danger_map_query_calls": 140744, - "danger_map_total_ns": 4360608337, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 683, - "dynamic_path_objects_removed": 637, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 23437.5, - "guidance_bonus_applied_bend90": 8437.5, - "guidance_bonus_applied_sbend": 1000.0, - "guidance_bonus_applied_straight": 14000.0, - "guidance_match_moves": 375, - "guidance_match_moves_bend90": 135, - "guidance_match_moves_sbend": 16, - "guidance_match_moves_straight": 224, - "hard_collision_cache_hits": 859, - "iteration_conflict_edges": 51, - "iteration_conflicting_nets": 57, - "iteration_reverified_nets": 90, - "iteration_reverify_calls": 9, - "move_cache_abs_hits": 140734, - "move_cache_abs_misses": 183345, - "move_cache_rel_hits": 180943, - "move_cache_rel_misses": 2402, - "moves_added": 197062, - "moves_generated": 324079, - "nets_carried_forward": 0, - "nets_reached_target": 90, - "nets_routed": 90, - "nodes_expanded": 61259, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 38, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 49632, - "pruned_cost": 5502, - "pruned_hard_collision": 2123, - "ray_cast_calls": 166977, - "ray_cast_calls_expand_forward": 61169, - "ray_cast_calls_expand_snap": 735, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 103738, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 1335, - "ray_cast_candidate_bounds": 11494, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 9, - "score_component_calls": 203601, - "score_component_total_ns": 5065858683, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 120231, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 2653, - "verify_dynamic_exact_pair_checks": 714, - "verify_path_report_calls": 220, - "verify_static_buffer_ops": 1185, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 1405, - "visibility_tangent_candidate_ray_tests": 1335, - "visibility_tangent_candidate_scans": 61169, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 10, - "repeat": 0, - "seed": 43, - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 10 - } - }, - { - "duration_s": 50.40192667697556, - "metrics": { - "congestion_cache_hits": 1713, - "congestion_cache_misses": 165223, - "congestion_candidate_ids": 312161, - "congestion_candidate_nets": 300960, - "congestion_candidate_precheck_hits": 159843, - "congestion_candidate_precheck_misses": 7810, - "congestion_candidate_precheck_skips": 717, - "congestion_check_calls": 165223, - "congestion_exact_pair_checks": 249697, - "congestion_grid_net_cache_hits": 152369, - "congestion_grid_net_cache_misses": 13481, - "congestion_grid_span_cache_hits": 144618, - "congestion_grid_span_cache_misses": 6885, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 160549, - "congestion_net_envelope_cache_misses": 14205, - "congestion_presence_cache_hits": 186369, - "congestion_presence_cache_misses": 9324, - "congestion_presence_skips": 27588, - "danger_map_cache_hits": 453553, - "danger_map_cache_misses": 140744, - "danger_map_lookup_calls": 594297, - "danger_map_query_calls": 140744, - "danger_map_total_ns": 4932050184, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 683, - "dynamic_path_objects_removed": 637, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 23437.5, - "guidance_bonus_applied_bend90": 8437.5, - "guidance_bonus_applied_sbend": 1000.0, - "guidance_bonus_applied_straight": 14000.0, - "guidance_match_moves": 375, - "guidance_match_moves_bend90": 135, - "guidance_match_moves_sbend": 16, - "guidance_match_moves_straight": 224, - "hard_collision_cache_hits": 859, - "iteration_conflict_edges": 51, - "iteration_conflicting_nets": 57, - "iteration_reverified_nets": 90, - "iteration_reverify_calls": 9, - "move_cache_abs_hits": 140734, - "move_cache_abs_misses": 183345, - "move_cache_rel_hits": 180943, - "move_cache_rel_misses": 2402, - "moves_added": 197062, - "moves_generated": 324079, - "nets_carried_forward": 0, - "nets_reached_target": 90, - "nets_routed": 90, - "nodes_expanded": 61259, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 38, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 49632, - "pruned_cost": 5502, - "pruned_hard_collision": 2123, - "ray_cast_calls": 166977, - "ray_cast_calls_expand_forward": 61169, - "ray_cast_calls_expand_snap": 735, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 103738, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 1335, - "ray_cast_candidate_bounds": 11494, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 9, - "score_component_calls": 203601, - "score_component_total_ns": 5635427939, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 120231, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 2653, - "verify_dynamic_exact_pair_checks": 714, - "verify_path_report_calls": 220, - "verify_static_buffer_ops": 1185, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 1405, - "visibility_tangent_candidate_ray_tests": 1335, - "visibility_tangent_candidate_scans": 61169, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "num_nets": 10, - "repeat": 1, - "seed": 43, - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 10 - } - } - ], - "generated_at": "2026-04-02T15:53:29-07:00", - "generator": "scripts/characterize_pair_local_search.py", - "grid": { - "num_nets": [ - 6, - 8, - 10 - ], - "repeats": 2, - "seeds": [ - 41, - 42, - 43 - ] - }, - "recommended_smoke_scenario": null -} diff --git a/archive/routing/pair_local_characterization.md b/archive/routing/pair_local_characterization.md deleted file mode 100644 index 753cbdf..0000000 --- a/archive/routing/pair_local_characterization.md +++ /dev/null @@ -1,30 +0,0 @@ -# Pair-Local Search Characterization - -Generated at 2026-04-02T15:53:29-07:00 by `scripts/characterize_pair_local_search.py`. - -Grid: `num_nets=[6, 8, 10]`, `seed=[41, 42, 43]`, repeats=2. - -| Nets | Seed | Repeat | Duration (s) | Valid | Reached | Pair Pairs | Pair Accepts | Pair Nodes | Nodes | Checks | -| :-- | :-- | :-- | --: | --: | --: | --: | --: | --: | --: | --: | -| 6 | 41 | 0 | 0.5462 | 1 | 6 | 0 | 0 | 0 | 500 | 674 | -| 6 | 41 | 1 | 0.5256 | 1 | 6 | 0 | 0 | 0 | 500 | 674 | -| 6 | 42 | 0 | 0.5241 | 1 | 6 | 0 | 0 | 0 | 503 | 683 | -| 6 | 42 | 1 | 0.5477 | 1 | 6 | 0 | 0 | 0 | 503 | 683 | -| 6 | 43 | 0 | 0.5199 | 1 | 6 | 0 | 0 | 0 | 493 | 654 | -| 6 | 43 | 1 | 0.5160 | 1 | 6 | 0 | 0 | 0 | 493 | 654 | -| 8 | 41 | 0 | 1.8818 | 8 | 8 | 2 | 2 | 38 | 1558 | 4313 | -| 8 | 41 | 1 | 1.8618 | 8 | 8 | 2 | 2 | 38 | 1558 | 4313 | -| 8 | 42 | 0 | 1.4850 | 8 | 8 | 1 | 1 | 19 | 1440 | 3799 | -| 8 | 42 | 1 | 1.4636 | 8 | 8 | 1 | 1 | 19 | 1440 | 3799 | -| 8 | 43 | 0 | 1.0652 | 8 | 8 | 0 | 0 | 0 | 939 | 1844 | -| 8 | 43 | 1 | 1.0502 | 8 | 8 | 0 | 0 | 0 | 939 | 1844 | -| 10 | 41 | 0 | 2.8617 | 8 | 10 | 2 | 2 | 41 | 2223 | 6208 | -| 10 | 41 | 1 | 2.8282 | 8 | 10 | 2 | 2 | 41 | 2223 | 6208 | -| 10 | 42 | 0 | 2.0356 | 10 | 10 | 2 | 2 | 68 | 1764 | 4625 | -| 10 | 42 | 1 | 2.0052 | 10 | 10 | 2 | 2 | 68 | 1764 | 4625 | -| 10 | 43 | 0 | 50.1863 | 10 | 10 | 2 | 2 | 38 | 61259 | 165223 | -| 10 | 43 | 1 | 50.4019 | 10 | 10 | 2 | 2 | 38 | 61259 | 165223 | - -## Recommendation - -No smaller stable pair-local smoke scenario satisfied the rule `valid_results == total_results`, `pair_local_search_accepts >= 1`, and `duration_s <= 1.0` across all repeats. diff --git a/archive/routing/performance.md b/archive/routing/performance.md deleted file mode 100644 index c0673a0..0000000 --- a/archive/routing/performance.md +++ /dev/null @@ -1,27 +0,0 @@ -# Performance Baseline - -Generated on 2026-11-26 by `scripts/record_performance_baseline.py`. - -The full machine-readable snapshot is in [performance_baseline.json](performance_baseline.json). -Use `scripts/diff_performance_baseline.py` to compare a fresh run against that snapshot. - -| Scenario | Duration (s) | Total | Valid | Reached | Iter | Nets Routed | Nodes | Ray Casts | Moves Gen | Moves Added | Dyn Tree | Visibility Builds | Congestion Checks | Verify Calls | -| :-- | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | -| example_01_simple_route | 0.0043 | 1 | 1 | 1 | 1 | 1 | 2 | 10 | 11 | 7 | 0 | 0 | 0 | 4 | -| example_02_congestion_resolution | 0.2541 | 3 | 3 | 3 | 1 | 3 | 366 | 1164 | 1413 | 668 | 0 | 0 | 0 | 16 | -| example_03_locked_paths | 0.1476 | 2 | 2 | 2 | 2 | 2 | 191 | 657 | 904 | 307 | 0 | 0 | 0 | 10 | -| example_04_sbends_and_radii | 0.0222 | 2 | 2 | 2 | 1 | 2 | 15 | 70 | 123 | 65 | 0 | 0 | 0 | 8 | -| example_05_orientation_stress | 0.1878 | 3 | 3 | 3 | 2 | 5 | 284 | 1237 | 1617 | 673 | 0 | 0 | 151 | 17 | -| example_06_bend_collision_models | 0.1732 | 3 | 3 | 3 | 3 | 3 | 240 | 682 | 1026 | 629 | 0 | 0 | 0 | 12 | -| example_07_large_scale_routing | 0.1869 | 10 | 10 | 10 | 1 | 10 | 78 | 383 | 372 | 227 | 0 | 0 | 0 | 40 | -| example_08_custom_bend_geometry | 0.0154 | 2 | 2 | 2 | 2 | 2 | 18 | 56 | 78 | 56 | 0 | 0 | 0 | 8 | -| example_09_unroutable_best_effort | 0.0053 | 1 | 0 | 0 | 1 | 1 | 3 | 13 | 16 | 10 | 0 | 0 | 0 | 1 | - -## Full Counter Set - -Each scenario entry in the JSON records the full `RouteMetrics` snapshot, including cache, index, congestion, and verification counters. -These counters are currently observational only and are not enforced as CI regression gates. - -Tracked metric keys: - -nodes_expanded, moves_generated, moves_added, pruned_closed_set, pruned_hard_collision, pruned_cost, route_iterations, nets_routed, nets_reached_target, warm_start_paths_built, warm_start_paths_used, refine_path_calls, timeout_events, iteration_reverify_calls, iteration_reverified_nets, iteration_conflicting_nets, iteration_conflict_edges, nets_carried_forward, score_component_calls, score_component_total_ns, path_cost_calls, danger_map_lookup_calls, danger_map_cache_hits, danger_map_cache_misses, danger_map_query_calls, danger_map_total_ns, move_cache_abs_hits, move_cache_abs_misses, move_cache_rel_hits, move_cache_rel_misses, guidance_match_moves, guidance_match_moves_straight, guidance_match_moves_bend90, guidance_match_moves_sbend, guidance_bonus_applied, guidance_bonus_applied_straight, guidance_bonus_applied_bend90, guidance_bonus_applied_sbend, static_safe_cache_hits, hard_collision_cache_hits, congestion_cache_hits, congestion_cache_misses, congestion_presence_cache_hits, congestion_presence_cache_misses, congestion_presence_skips, congestion_candidate_precheck_hits, congestion_candidate_precheck_misses, congestion_candidate_precheck_skips, congestion_grid_net_cache_hits, congestion_grid_net_cache_misses, congestion_grid_span_cache_hits, congestion_grid_span_cache_misses, congestion_candidate_nets, congestion_net_envelope_cache_hits, congestion_net_envelope_cache_misses, dynamic_path_objects_added, dynamic_path_objects_removed, dynamic_tree_rebuilds, dynamic_grid_rebuilds, static_tree_rebuilds, static_raw_tree_rebuilds, static_net_tree_rebuilds, visibility_corner_index_builds, visibility_builds, visibility_corner_pairs_checked, visibility_corner_queries_exact, visibility_corner_hits_exact, visibility_point_queries, visibility_point_cache_hits, visibility_point_cache_misses, visibility_tangent_candidate_scans, visibility_tangent_candidate_corner_checks, visibility_tangent_candidate_ray_tests, ray_cast_calls, ray_cast_calls_straight_static, ray_cast_calls_expand_snap, ray_cast_calls_expand_forward, ray_cast_calls_visibility_build, ray_cast_calls_visibility_query, ray_cast_calls_visibility_tangent, ray_cast_calls_other, ray_cast_candidate_bounds, ray_cast_exact_geometry_checks, congestion_check_calls, congestion_lazy_resolutions, congestion_lazy_requeues, congestion_candidate_ids, congestion_exact_pair_checks, verify_path_report_calls, verify_static_buffer_ops, verify_dynamic_candidate_nets, verify_dynamic_exact_pair_checks, refinement_windows_considered, refinement_static_bounds_checked, refinement_dynamic_bounds_checked, refinement_candidate_side_extents, refinement_candidates_built, refinement_candidates_verified, refinement_candidates_accepted, pair_local_search_pairs_considered, pair_local_search_attempts, pair_local_search_accepts, pair_local_search_nodes_expanded, late_phase_capped_nets, late_phase_capped_fallbacks diff --git a/archive/routing/performance_baseline.json b/archive/routing/performance_baseline.json deleted file mode 100644 index 698456a..0000000 --- a/archive/routing/performance_baseline.json +++ /dev/null @@ -1,1032 +0,0 @@ -{ - "generated_on": "2026-11-26", - "generator": "scripts/record_performance_baseline.py", - "scenarios": [ - { - "duration_s": 0.004303620080463588, - "metrics": { - "congestion_cache_hits": 0, - "congestion_cache_misses": 0, - "congestion_candidate_ids": 0, - "congestion_candidate_nets": 0, - "congestion_candidate_precheck_hits": 0, - "congestion_candidate_precheck_misses": 0, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 0, - "congestion_exact_pair_checks": 0, - "congestion_grid_net_cache_hits": 0, - "congestion_grid_net_cache_misses": 0, - "congestion_grid_span_cache_hits": 0, - "congestion_grid_span_cache_misses": 0, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 0, - "congestion_net_envelope_cache_misses": 0, - "congestion_presence_cache_hits": 0, - "congestion_presence_cache_misses": 0, - "congestion_presence_skips": 0, - "danger_map_cache_hits": 0, - "danger_map_cache_misses": 0, - "danger_map_lookup_calls": 0, - "danger_map_query_calls": 0, - "danger_map_total_ns": 0, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 3, - "dynamic_path_objects_removed": 2, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 0.0, - "guidance_bonus_applied_bend90": 0.0, - "guidance_bonus_applied_sbend": 0.0, - "guidance_bonus_applied_straight": 0.0, - "guidance_match_moves": 0, - "guidance_match_moves_bend90": 0, - "guidance_match_moves_sbend": 0, - "guidance_match_moves_straight": 0, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 0, - "iteration_conflicting_nets": 0, - "iteration_reverified_nets": 1, - "iteration_reverify_calls": 1, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 1, - "move_cache_abs_misses": 10, - "move_cache_rel_hits": 0, - "move_cache_rel_misses": 10, - "moves_added": 7, - "moves_generated": 11, - "nets_carried_forward": 0, - "nets_reached_target": 1, - "nets_routed": 1, - "nodes_expanded": 2, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 0, - "pruned_cost": 4, - "pruned_hard_collision": 0, - "ray_cast_calls": 10, - "ray_cast_calls_expand_forward": 1, - "ray_cast_calls_expand_snap": 1, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 8, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 0, - "ray_cast_candidate_bounds": 0, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 1, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 1, - "score_component_calls": 11, - "score_component_total_ns": 16362, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 0, - "static_safe_cache_hits": 1, - "static_tree_rebuilds": 0, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 0, - "verify_dynamic_exact_pair_checks": 0, - "verify_path_report_calls": 4, - "verify_static_buffer_ops": 0, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 0, - "visibility_tangent_candidate_ray_tests": 0, - "visibility_tangent_candidate_scans": 1, - "warm_start_paths_built": 1, - "warm_start_paths_used": 1 - }, - "name": "example_01_simple_route", - "reached_targets": 1, - "total_results": 1, - "valid_results": 1 - }, - { - "duration_s": 0.2540899380110204, - "metrics": { - "congestion_cache_hits": 0, - "congestion_cache_misses": 0, - "congestion_candidate_ids": 0, - "congestion_candidate_nets": 0, - "congestion_candidate_precheck_hits": 0, - "congestion_candidate_precheck_misses": 0, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 0, - "congestion_exact_pair_checks": 0, - "congestion_grid_net_cache_hits": 0, - "congestion_grid_net_cache_misses": 0, - "congestion_grid_span_cache_hits": 0, - "congestion_grid_span_cache_misses": 0, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 0, - "congestion_net_envelope_cache_misses": 0, - "congestion_presence_cache_hits": 0, - "congestion_presence_cache_misses": 0, - "congestion_presence_skips": 0, - "danger_map_cache_hits": 0, - "danger_map_cache_misses": 0, - "danger_map_lookup_calls": 0, - "danger_map_query_calls": 0, - "danger_map_total_ns": 0, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 49, - "dynamic_path_objects_removed": 34, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 0.0, - "guidance_bonus_applied_bend90": 0.0, - "guidance_bonus_applied_sbend": 0.0, - "guidance_bonus_applied_straight": 0.0, - "guidance_match_moves": 0, - "guidance_match_moves_bend90": 0, - "guidance_match_moves_sbend": 0, - "guidance_match_moves_straight": 0, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 0, - "iteration_conflicting_nets": 0, - "iteration_reverified_nets": 3, - "iteration_reverify_calls": 1, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 12, - "move_cache_abs_misses": 1401, - "move_cache_rel_hits": 1293, - "move_cache_rel_misses": 108, - "moves_added": 668, - "moves_generated": 1413, - "nets_carried_forward": 0, - "nets_reached_target": 3, - "nets_routed": 3, - "nodes_expanded": 366, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 30, - "pruned_closed_set": 157, - "pruned_cost": 208, - "pruned_hard_collision": 380, - "ray_cast_calls": 1164, - "ray_cast_calls_expand_forward": 363, - "ray_cast_calls_expand_snap": 19, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 529, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 253, - "ray_cast_candidate_bounds": 913, - "ray_cast_exact_geometry_checks": 136, - "refine_path_calls": 3, - "refinement_candidate_side_extents": 26, - "refinement_candidates_accepted": 2, - "refinement_candidates_built": 2, - "refinement_candidates_verified": 2, - "refinement_dynamic_bounds_checked": 20, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 4, - "route_iterations": 1, - "score_component_calls": 1088, - "score_component_total_ns": 1136950, - "static_net_tree_rebuilds": 3, - "static_raw_tree_rebuilds": 0, - "static_safe_cache_hits": 1, - "static_tree_rebuilds": 2, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 14, - "verify_dynamic_exact_pair_checks": 12, - "verify_path_report_calls": 16, - "verify_static_buffer_ops": 0, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 3, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 873, - "visibility_tangent_candidate_ray_tests": 253, - "visibility_tangent_candidate_scans": 363, - "warm_start_paths_built": 3, - "warm_start_paths_used": 3 - }, - "name": "example_02_congestion_resolution", - "reached_targets": 3, - "total_results": 3, - "valid_results": 3 - }, - { - "duration_s": 0.14755904604680836, - "metrics": { - "congestion_cache_hits": 0, - "congestion_cache_misses": 0, - "congestion_candidate_ids": 0, - "congestion_candidate_nets": 0, - "congestion_candidate_precheck_hits": 0, - "congestion_candidate_precheck_misses": 0, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 0, - "congestion_exact_pair_checks": 0, - "congestion_grid_net_cache_hits": 0, - "congestion_grid_net_cache_misses": 0, - "congestion_grid_span_cache_hits": 0, - "congestion_grid_span_cache_misses": 0, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 0, - "congestion_net_envelope_cache_misses": 0, - "congestion_presence_cache_hits": 0, - "congestion_presence_cache_misses": 0, - "congestion_presence_skips": 0, - "danger_map_cache_hits": 0, - "danger_map_cache_misses": 0, - "danger_map_lookup_calls": 0, - "danger_map_query_calls": 0, - "danger_map_total_ns": 0, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 27, - "dynamic_path_objects_removed": 20, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 0.0, - "guidance_bonus_applied_bend90": 0.0, - "guidance_bonus_applied_sbend": 0.0, - "guidance_bonus_applied_straight": 0.0, - "guidance_match_moves": 0, - "guidance_match_moves_bend90": 0, - "guidance_match_moves_sbend": 0, - "guidance_match_moves_straight": 0, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 0, - "iteration_conflicting_nets": 0, - "iteration_reverified_nets": 2, - "iteration_reverify_calls": 2, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 1, - "move_cache_abs_misses": 903, - "move_cache_rel_hits": 821, - "move_cache_rel_misses": 82, - "moves_added": 307, - "moves_generated": 904, - "nets_carried_forward": 0, - "nets_reached_target": 2, - "nets_routed": 2, - "nodes_expanded": 191, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 10, - "pruned_closed_set": 97, - "pruned_cost": 140, - "pruned_hard_collision": 181, - "ray_cast_calls": 657, - "ray_cast_calls_expand_forward": 189, - "ray_cast_calls_expand_snap": 8, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 407, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 53, - "ray_cast_candidate_bounds": 155, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 2, - "refinement_candidate_side_extents": 8, - "refinement_candidates_accepted": 1, - "refinement_candidates_built": 1, - "refinement_candidates_verified": 1, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 2, - "refinement_windows_considered": 2, - "route_iterations": 2, - "score_component_calls": 510, - "score_component_total_ns": 550707, - "static_net_tree_rebuilds": 2, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 0, - "verify_dynamic_exact_pair_checks": 0, - "verify_path_report_calls": 10, - "verify_static_buffer_ops": 48, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 2, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 56, - "visibility_tangent_candidate_ray_tests": 53, - "visibility_tangent_candidate_scans": 189, - "warm_start_paths_built": 2, - "warm_start_paths_used": 2 - }, - "name": "example_03_locked_paths", - "reached_targets": 2, - "total_results": 2, - "valid_results": 2 - }, - { - "duration_s": 0.022167235030792654, - "metrics": { - "congestion_cache_hits": 0, - "congestion_cache_misses": 0, - "congestion_candidate_ids": 0, - "congestion_candidate_nets": 0, - "congestion_candidate_precheck_hits": 0, - "congestion_candidate_precheck_misses": 0, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 0, - "congestion_exact_pair_checks": 0, - "congestion_grid_net_cache_hits": 0, - "congestion_grid_net_cache_misses": 0, - "congestion_grid_span_cache_hits": 0, - "congestion_grid_span_cache_misses": 0, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 0, - "congestion_net_envelope_cache_misses": 0, - "congestion_presence_cache_hits": 0, - "congestion_presence_cache_misses": 0, - "congestion_presence_skips": 0, - "danger_map_cache_hits": 0, - "danger_map_cache_misses": 0, - "danger_map_lookup_calls": 0, - "danger_map_query_calls": 0, - "danger_map_total_ns": 0, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 21, - "dynamic_path_objects_removed": 14, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 0.0, - "guidance_bonus_applied_bend90": 0.0, - "guidance_bonus_applied_sbend": 0.0, - "guidance_bonus_applied_straight": 0.0, - "guidance_match_moves": 0, - "guidance_match_moves_bend90": 0, - "guidance_match_moves_sbend": 0, - "guidance_match_moves_straight": 0, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 0, - "iteration_conflicting_nets": 0, - "iteration_reverified_nets": 2, - "iteration_reverify_calls": 1, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 1, - "move_cache_abs_misses": 122, - "move_cache_rel_hits": 80, - "move_cache_rel_misses": 42, - "moves_added": 65, - "moves_generated": 123, - "nets_carried_forward": 0, - "nets_reached_target": 2, - "nets_routed": 2, - "nodes_expanded": 15, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 2, - "pruned_cost": 25, - "pruned_hard_collision": 16, - "ray_cast_calls": 70, - "ray_cast_calls_expand_forward": 13, - "ray_cast_calls_expand_snap": 1, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 56, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 0, - "ray_cast_candidate_bounds": 4, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 2, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 1, - "score_component_calls": 90, - "score_component_total_ns": 98717, - "static_net_tree_rebuilds": 2, - "static_raw_tree_rebuilds": 0, - "static_safe_cache_hits": 1, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 9, - "verify_dynamic_exact_pair_checks": 0, - "verify_path_report_calls": 8, - "verify_static_buffer_ops": 0, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 2, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 50, - "visibility_tangent_candidate_ray_tests": 0, - "visibility_tangent_candidate_scans": 13, - "warm_start_paths_built": 2, - "warm_start_paths_used": 2 - }, - "name": "example_04_sbends_and_radii", - "reached_targets": 2, - "total_results": 2, - "valid_results": 2 - }, - { - "duration_s": 0.18780142499599606, - "metrics": { - "congestion_cache_hits": 1, - "congestion_cache_misses": 151, - "congestion_candidate_ids": 19, - "congestion_candidate_nets": 15, - "congestion_candidate_precheck_hits": 133, - "congestion_candidate_precheck_misses": 19, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 151, - "congestion_exact_pair_checks": 18, - "congestion_grid_net_cache_hits": 12, - "congestion_grid_net_cache_misses": 22, - "congestion_grid_span_cache_hits": 11, - "congestion_grid_span_cache_misses": 4, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 133, - "congestion_net_envelope_cache_misses": 37, - "congestion_presence_cache_hits": 181, - "congestion_presence_cache_misses": 26, - "congestion_presence_skips": 55, - "danger_map_cache_hits": 0, - "danger_map_cache_misses": 0, - "danger_map_lookup_calls": 0, - "danger_map_query_calls": 0, - "danger_map_total_ns": 0, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 48, - "dynamic_path_objects_removed": 36, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 100.0, - "guidance_bonus_applied_bend90": 87.5, - "guidance_bonus_applied_sbend": 0.0, - "guidance_bonus_applied_straight": 12.5, - "guidance_match_moves": 8, - "guidance_match_moves_bend90": 7, - "guidance_match_moves_sbend": 0, - "guidance_match_moves_straight": 1, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 1, - "iteration_conflicting_nets": 2, - "iteration_reverified_nets": 6, - "iteration_reverify_calls": 2, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 249, - "move_cache_abs_misses": 1368, - "move_cache_rel_hits": 1266, - "move_cache_rel_misses": 102, - "moves_added": 673, - "moves_generated": 1617, - "nets_carried_forward": 1, - "nets_reached_target": 5, - "nets_routed": 5, - "nodes_expanded": 284, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 2, - "pruned_closed_set": 140, - "pruned_cost": 505, - "pruned_hard_collision": 14, - "ray_cast_calls": 1237, - "ray_cast_calls_expand_forward": 279, - "ray_cast_calls_expand_snap": 2, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 947, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 9, - "ray_cast_candidate_bounds": 45, - "ray_cast_exact_geometry_checks": 43, - "refine_path_calls": 3, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 2, - "score_component_calls": 1190, - "score_component_total_ns": 1157917, - "static_net_tree_rebuilds": 3, - "static_raw_tree_rebuilds": 0, - "static_safe_cache_hits": 2, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 8, - "verify_dynamic_exact_pair_checks": 12, - "verify_path_report_calls": 17, - "verify_static_buffer_ops": 0, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 3, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 70, - "visibility_tangent_candidate_ray_tests": 9, - "visibility_tangent_candidate_scans": 279, - "warm_start_paths_built": 2, - "warm_start_paths_used": 2 - }, - "name": "example_05_orientation_stress", - "reached_targets": 3, - "total_results": 3, - "valid_results": 3 - }, - { - "duration_s": 0.17324819299392402, - "metrics": { - "congestion_cache_hits": 0, - "congestion_cache_misses": 0, - "congestion_candidate_ids": 0, - "congestion_candidate_nets": 0, - "congestion_candidate_precheck_hits": 0, - "congestion_candidate_precheck_misses": 0, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 0, - "congestion_exact_pair_checks": 0, - "congestion_grid_net_cache_hits": 0, - "congestion_grid_net_cache_misses": 0, - "congestion_grid_span_cache_hits": 0, - "congestion_grid_span_cache_misses": 0, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 0, - "congestion_net_envelope_cache_misses": 0, - "congestion_presence_cache_hits": 0, - "congestion_presence_cache_misses": 0, - "congestion_presence_skips": 0, - "danger_map_cache_hits": 1183, - "danger_map_cache_misses": 731, - "danger_map_lookup_calls": 1914, - "danger_map_query_calls": 731, - "danger_map_total_ns": 18539700, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 54, - "dynamic_path_objects_removed": 36, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 0.0, - "guidance_bonus_applied_bend90": 0.0, - "guidance_bonus_applied_sbend": 0.0, - "guidance_bonus_applied_straight": 0.0, - "guidance_match_moves": 0, - "guidance_match_moves_bend90": 0, - "guidance_match_moves_sbend": 0, - "guidance_match_moves_straight": 0, - "hard_collision_cache_hits": 18, - "iteration_conflict_edges": 0, - "iteration_conflicting_nets": 0, - "iteration_reverified_nets": 3, - "iteration_reverify_calls": 3, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 186, - "move_cache_abs_misses": 840, - "move_cache_rel_hits": 702, - "move_cache_rel_misses": 138, - "moves_added": 629, - "moves_generated": 1026, - "nets_carried_forward": 0, - "nets_reached_target": 3, - "nets_routed": 3, - "nodes_expanded": 240, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 108, - "pruned_cost": 204, - "pruned_hard_collision": 85, - "ray_cast_calls": 682, - "ray_cast_calls_expand_forward": 237, - "ray_cast_calls_expand_snap": 3, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 408, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 34, - "ray_cast_candidate_bounds": 88, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 3, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 3, - "score_component_calls": 842, - "score_component_total_ns": 20771160, - "static_net_tree_rebuilds": 3, - "static_raw_tree_rebuilds": 3, - "static_safe_cache_hits": 141, - "static_tree_rebuilds": 3, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 0, - "verify_dynamic_exact_pair_checks": 0, - "verify_path_report_calls": 12, - "verify_static_buffer_ops": 72, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 3, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 84, - "visibility_tangent_candidate_ray_tests": 34, - "visibility_tangent_candidate_scans": 237, - "warm_start_paths_built": 3, - "warm_start_paths_used": 3 - }, - "name": "example_06_bend_collision_models", - "reached_targets": 3, - "total_results": 3, - "valid_results": 3 - }, - { - "duration_s": 0.18685018795076758, - "metrics": { - "congestion_cache_hits": 0, - "congestion_cache_misses": 0, - "congestion_candidate_ids": 0, - "congestion_candidate_nets": 0, - "congestion_candidate_precheck_hits": 0, - "congestion_candidate_precheck_misses": 0, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 0, - "congestion_exact_pair_checks": 0, - "congestion_grid_net_cache_hits": 0, - "congestion_grid_net_cache_misses": 0, - "congestion_grid_span_cache_hits": 0, - "congestion_grid_span_cache_misses": 0, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 0, - "congestion_net_envelope_cache_misses": 0, - "congestion_presence_cache_hits": 0, - "congestion_presence_cache_misses": 0, - "congestion_presence_skips": 0, - "danger_map_cache_hits": 233, - "danger_map_cache_misses": 448, - "danger_map_lookup_calls": 681, - "danger_map_query_calls": 448, - "danger_map_total_ns": 10856837, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 132, - "dynamic_path_objects_removed": 88, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 0.0, - "guidance_bonus_applied_bend90": 0.0, - "guidance_bonus_applied_sbend": 0.0, - "guidance_bonus_applied_straight": 0.0, - "guidance_match_moves": 0, - "guidance_match_moves_bend90": 0, - "guidance_match_moves_sbend": 0, - "guidance_match_moves_straight": 0, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 0, - "iteration_conflicting_nets": 0, - "iteration_reverified_nets": 10, - "iteration_reverify_calls": 1, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 6, - "move_cache_abs_misses": 366, - "move_cache_rel_hits": 275, - "move_cache_rel_misses": 91, - "moves_added": 227, - "moves_generated": 372, - "nets_carried_forward": 0, - "nets_reached_target": 10, - "nets_routed": 10, - "nodes_expanded": 78, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 20, - "pruned_cost": 64, - "pruned_hard_collision": 61, - "ray_cast_calls": 383, - "ray_cast_calls_expand_forward": 68, - "ray_cast_calls_expand_snap": 6, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 232, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 77, - "ray_cast_candidate_bounds": 683, - "ray_cast_exact_geometry_checks": 150, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 1, - "score_component_calls": 291, - "score_component_total_ns": 11698395, - "static_net_tree_rebuilds": 10, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 6, - "static_tree_rebuilds": 10, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 370, - "verify_dynamic_exact_pair_checks": 56, - "verify_path_report_calls": 40, - "verify_static_buffer_ops": 176, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 10, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 321, - "visibility_tangent_candidate_ray_tests": 77, - "visibility_tangent_candidate_scans": 68, - "warm_start_paths_built": 10, - "warm_start_paths_used": 10 - }, - "name": "example_07_large_scale_routing", - "reached_targets": 10, - "total_results": 10, - "valid_results": 10 - }, - { - "duration_s": 0.0154108009301126, - "metrics": { - "congestion_cache_hits": 0, - "congestion_cache_misses": 0, - "congestion_candidate_ids": 0, - "congestion_candidate_nets": 0, - "congestion_candidate_precheck_hits": 0, - "congestion_candidate_precheck_misses": 0, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 0, - "congestion_exact_pair_checks": 0, - "congestion_grid_net_cache_hits": 0, - "congestion_grid_net_cache_misses": 0, - "congestion_grid_span_cache_hits": 0, - "congestion_grid_span_cache_misses": 0, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 0, - "congestion_net_envelope_cache_misses": 0, - "congestion_presence_cache_hits": 0, - "congestion_presence_cache_misses": 0, - "congestion_presence_skips": 0, - "danger_map_cache_hits": 0, - "danger_map_cache_misses": 0, - "danger_map_lookup_calls": 0, - "danger_map_query_calls": 0, - "danger_map_total_ns": 0, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 18, - "dynamic_path_objects_removed": 12, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 0.0, - "guidance_bonus_applied_bend90": 0.0, - "guidance_bonus_applied_sbend": 0.0, - "guidance_bonus_applied_straight": 0.0, - "guidance_match_moves": 0, - "guidance_match_moves_bend90": 0, - "guidance_match_moves_sbend": 0, - "guidance_match_moves_straight": 0, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 0, - "iteration_conflicting_nets": 0, - "iteration_reverified_nets": 2, - "iteration_reverify_calls": 2, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 2, - "move_cache_abs_misses": 76, - "move_cache_rel_hits": 32, - "move_cache_rel_misses": 44, - "moves_added": 56, - "moves_generated": 78, - "nets_carried_forward": 0, - "nets_reached_target": 2, - "nets_routed": 2, - "nodes_expanded": 18, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 6, - "pruned_cost": 16, - "pruned_hard_collision": 0, - "ray_cast_calls": 56, - "ray_cast_calls_expand_forward": 16, - "ray_cast_calls_expand_snap": 2, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 38, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 0, - "ray_cast_candidate_bounds": 0, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 2, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 2, - "score_component_calls": 72, - "score_component_total_ns": 82036, - "static_net_tree_rebuilds": 2, - "static_raw_tree_rebuilds": 0, - "static_safe_cache_hits": 2, - "static_tree_rebuilds": 0, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 0, - "verify_dynamic_exact_pair_checks": 0, - "verify_path_report_calls": 8, - "verify_static_buffer_ops": 0, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 2, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 0, - "visibility_tangent_candidate_ray_tests": 0, - "visibility_tangent_candidate_scans": 16, - "warm_start_paths_built": 2, - "warm_start_paths_used": 2 - }, - "name": "example_08_custom_bend_geometry", - "reached_targets": 2, - "total_results": 2, - "valid_results": 2 - }, - { - "duration_s": 0.005300503107719123, - "metrics": { - "congestion_cache_hits": 0, - "congestion_cache_misses": 0, - "congestion_candidate_ids": 0, - "congestion_candidate_nets": 0, - "congestion_candidate_precheck_hits": 0, - "congestion_candidate_precheck_misses": 0, - "congestion_candidate_precheck_skips": 0, - "congestion_check_calls": 0, - "congestion_exact_pair_checks": 0, - "congestion_grid_net_cache_hits": 0, - "congestion_grid_net_cache_misses": 0, - "congestion_grid_span_cache_hits": 0, - "congestion_grid_span_cache_misses": 0, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 0, - "congestion_net_envelope_cache_misses": 0, - "congestion_presence_cache_hits": 0, - "congestion_presence_cache_misses": 0, - "congestion_presence_skips": 0, - "danger_map_cache_hits": 10, - "danger_map_cache_misses": 20, - "danger_map_lookup_calls": 30, - "danger_map_query_calls": 20, - "danger_map_total_ns": 510754, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 2, - "dynamic_path_objects_removed": 1, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 0.0, - "guidance_bonus_applied_bend90": 0.0, - "guidance_bonus_applied_sbend": 0.0, - "guidance_bonus_applied_straight": 0.0, - "guidance_match_moves": 0, - "guidance_match_moves_bend90": 0, - "guidance_match_moves_sbend": 0, - "guidance_match_moves_straight": 0, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 0, - "iteration_conflicting_nets": 0, - "iteration_reverified_nets": 0, - "iteration_reverify_calls": 1, - "late_phase_capped_fallbacks": 0, - "late_phase_capped_nets": 0, - "move_cache_abs_hits": 0, - "move_cache_abs_misses": 16, - "move_cache_rel_hits": 2, - "move_cache_rel_misses": 14, - "moves_added": 10, - "moves_generated": 16, - "nets_carried_forward": 0, - "nets_reached_target": 0, - "nets_routed": 1, - "nodes_expanded": 3, - "pair_local_search_accepts": 0, - "pair_local_search_attempts": 0, - "pair_local_search_nodes_expanded": 0, - "pair_local_search_pairs_considered": 0, - "path_cost_calls": 0, - "pruned_closed_set": 0, - "pruned_cost": 4, - "pruned_hard_collision": 2, - "ray_cast_calls": 13, - "ray_cast_calls_expand_forward": 3, - "ray_cast_calls_expand_snap": 0, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 10, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 0, - "ray_cast_candidate_bounds": 5, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 0, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 1, - "score_component_calls": 14, - "score_component_total_ns": 551521, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 0, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 0, - "verify_dynamic_exact_pair_checks": 0, - "verify_path_report_calls": 1, - "verify_static_buffer_ops": 1, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 0, - "visibility_tangent_candidate_ray_tests": 0, - "visibility_tangent_candidate_scans": 3, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "name": "example_09_unroutable_best_effort", - "reached_targets": 0, - "total_results": 1, - "valid_results": 0 - } - ] -} diff --git a/archive/routing/pre_pair_frontier_trace.json b/archive/routing/pre_pair_frontier_trace.json deleted file mode 100644 index 72db90d..0000000 --- a/archive/routing/pre_pair_frontier_trace.json +++ /dev/null @@ -1,1458 +0,0 @@ -{ - "generated_at": "2026-11-26T21:47:45-08:00", - "generator": "scripts/record_pre_pair_frontier_trace.py", - "scenarios": [ - { - "metrics": { - "congestion_cache_hits": 24, - "congestion_cache_misses": 3411, - "congestion_candidate_ids": 7213, - "congestion_candidate_nets": 7410, - "congestion_candidate_precheck_hits": 1677, - "congestion_candidate_precheck_misses": 1795, - "congestion_candidate_precheck_skips": 37, - "congestion_check_calls": 3411, - "congestion_exact_pair_checks": 5860, - "congestion_grid_net_cache_hits": 1676, - "congestion_grid_net_cache_misses": 3276, - "congestion_grid_span_cache_hits": 1517, - "congestion_grid_span_cache_misses": 1637, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1801, - "congestion_net_envelope_cache_misses": 3433, - "congestion_presence_cache_hits": 1857, - "congestion_presence_cache_misses": 2075, - "congestion_presence_skips": 460, - "danger_map_cache_hits": 13605, - "danger_map_cache_misses": 6252, - "danger_map_lookup_calls": 19857, - "danger_map_query_calls": 6252, - "danger_map_total_ns": 182509223, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 430, - "dynamic_path_objects_removed": 384, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3275.0, - "guidance_bonus_applied_bend90": 1075.0, - "guidance_bonus_applied_sbend": 200.0, - "guidance_bonus_applied_straight": 2000.0, - "guidance_match_moves": 131, - "guidance_match_moves_bend90": 43, - "guidance_match_moves_sbend": 8, - "guidance_match_moves_straight": 80, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 40, - "iteration_conflicting_nets": 39, - "iteration_reverified_nets": 60, - "iteration_reverify_calls": 6, - "late_phase_capped_fallbacks": 2, - "late_phase_capped_nets": 2, - "move_cache_abs_hits": 1831, - "move_cache_abs_misses": 5516, - "move_cache_rel_hits": 4926, - "move_cache_rel_misses": 590, - "moves_added": 6594, - "moves_generated": 7347, - "nets_carried_forward": 6, - "nets_reached_target": 52, - "nets_routed": 54, - "nodes_expanded": 1408, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 42, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 414, - "pruned_cost": 339, - "pruned_hard_collision": 0, - "ray_cast_calls": 4577, - "ray_cast_calls_expand_forward": 1356, - "ray_cast_calls_expand_snap": 36, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 3179, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 162, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 6, - "score_component_calls": 6958, - "score_component_total_ns": 206697616, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1778, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1638, - "verify_dynamic_exact_pair_checks": 507, - "verify_path_report_calls": 152, - "verify_static_buffer_ops": 699, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1356, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "name": "example_07_large_scale_routing_no_warm_start", - "pre_pair_frontier_trace": { - "conflict_edges": [ - [ - "net_02", - "net_03" - ], - [ - "net_06", - "net_07" - ] - ], - "iteration": 5, - "nets": [ - { - "congestion_check_calls": 85, - "frontier": { - "hotspot_bounds": [ - [ - 827.6047906391041, - 482.9684848604278, - 917.390687834262, - 572.0 - ], - [ - 884.0, - 555.0, - 916.0, - 598.0 - ] - ], - "net_id": "net_07", - "pruned_closed_set": 2, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "pruned_self_collision": 0, - "samples": [ - { - "end_state": [ - 850, - 520, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 525, - 520, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 850, - 520, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 763, - 520, - 0 - ], - "reason": "closed_set" - } - ] - }, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 16, - "pruned_closed_set": 3, - "pruned_cost": 0, - "pruned_hard_collision": 0 - }, - { - "congestion_check_calls": 86, - "frontier": { - "hotspot_bounds": [ - [ - 826.3396407947511, - 418.0, - 917.3906878342618, - 507.1148801363561 - ], - [ - 884.0, - 402.0, - 916.0, - 435.0 - ] - ], - "net_id": "net_02", - "pruned_closed_set": 3, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "pruned_self_collision": 0, - "samples": [ - { - "end_state": [ - 850, - 470, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 525, - 470, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 850, - 470, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 763, - 470, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 470, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 881, - 470, - 0 - ], - "reason": "closed_set" - } - ] - }, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 17, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0 - }, - { - "congestion_check_calls": 0, - "frontier": { - "hotspot_bounds": [ - [ - 826.3396407947606, - 482.8851198636423, - 917.390687834262, - 572.0 - ], - [ - 884.0, - 545.0, - 916.2379632934325, - 582.0 - ], - [ - 883.7620367065675, - 571.0, - 916.0, - 652.2850117535756 - ] - ], - "net_id": "net_06", - "pruned_closed_set": 10, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "pruned_self_collision": 0, - "samples": [ - { - "end_state": [ - 850, - 510, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 525, - 510, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 850, - 510, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 763, - 510, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 510, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 881, - 510, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 638, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 895, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 895, - 638, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 880, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 880, - 638, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 827, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 832, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 780, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 785, - 270 - ], - "reason": "closed_set" - } - ] - }, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 0, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0 - }, - { - "congestion_check_calls": 0, - "frontier": { - "hotspot_bounds": [ - [ - 826.3396407947511, - 418.0, - 917.3906878342618, - 507.1148801363561 - ], - [ - 884.0, - 408.0, - 916.2379632934325, - 445.0 - ], - [ - 883.7620367065675, - 347.71498824645397, - 916.0, - 429.0 - ] - ], - "net_id": "net_03", - "pruned_closed_set": 16, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "pruned_self_collision": 0, - "samples": [ - { - "end_state": [ - 850, - 480, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 525, - 480, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 850, - 480, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 763, - 480, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 895, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 895, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 880, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 880, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 896, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 896, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 891, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 891, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 886, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 886, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 882, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 882, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 1000, - 380, - 0 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 868, - 380, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 995, - 380, - 0 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 868, - 380, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 163, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 158, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 267, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 215, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 210, - 90 - ], - "reason": "closed_set" - } - ] - }, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 0, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0 - } - ], - "routed_net_ids": [ - "net_07", - "net_02", - "net_06", - "net_03" - ] - }, - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 10 - } - }, - { - "metrics": { - "congestion_cache_hits": 8, - "congestion_cache_misses": 2766, - "congestion_candidate_ids": 6715, - "congestion_candidate_nets": 6315, - "congestion_candidate_precheck_hits": 1342, - "congestion_candidate_precheck_misses": 1509, - "congestion_candidate_precheck_skips": 77, - "congestion_check_calls": 2766, - "congestion_exact_pair_checks": 5194, - "congestion_grid_net_cache_hits": 1366, - "congestion_grid_net_cache_misses": 2753, - "congestion_grid_span_cache_hits": 1230, - "congestion_grid_span_cache_misses": 1404, - "congestion_lazy_requeues": 0, - "congestion_lazy_resolutions": 0, - "congestion_net_envelope_cache_hits": 1435, - "congestion_net_envelope_cache_misses": 2856, - "congestion_presence_cache_hits": 1498, - "congestion_presence_cache_misses": 1717, - "congestion_presence_skips": 364, - "danger_map_cache_hits": 12083, - "danger_map_cache_misses": 5623, - "danger_map_lookup_calls": 17706, - "danger_map_query_calls": 5623, - "danger_map_total_ns": 159397726, - "dynamic_grid_rebuilds": 0, - "dynamic_path_objects_added": 397, - "dynamic_path_objects_removed": 350, - "dynamic_tree_rebuilds": 0, - "guidance_bonus_applied": 3000.0, - "guidance_bonus_applied_bend90": 1150.0, - "guidance_bonus_applied_sbend": 100.0, - "guidance_bonus_applied_straight": 1750.0, - "guidance_match_moves": 120, - "guidance_match_moves_bend90": 46, - "guidance_match_moves_sbend": 4, - "guidance_match_moves_straight": 70, - "hard_collision_cache_hits": 0, - "iteration_conflict_edges": 39, - "iteration_conflicting_nets": 39, - "iteration_reverified_nets": 60, - "iteration_reverify_calls": 6, - "late_phase_capped_fallbacks": 2, - "late_phase_capped_nets": 2, - "move_cache_abs_hits": 1479, - "move_cache_abs_misses": 5117, - "move_cache_rel_hits": 4529, - "move_cache_rel_misses": 588, - "moves_added": 5884, - "moves_generated": 6596, - "nets_carried_forward": 14, - "nets_reached_target": 44, - "nets_routed": 46, - "nodes_expanded": 1268, - "pair_local_search_accepts": 2, - "pair_local_search_attempts": 3, - "pair_local_search_nodes_expanded": 42, - "pair_local_search_pairs_considered": 2, - "path_cost_calls": 0, - "pruned_closed_set": 366, - "pruned_cost": 346, - "pruned_hard_collision": 0, - "ray_cast_calls": 4200, - "ray_cast_calls_expand_forward": 1224, - "ray_cast_calls_expand_snap": 13, - "ray_cast_calls_other": 0, - "ray_cast_calls_straight_static": 2957, - "ray_cast_calls_visibility_build": 0, - "ray_cast_calls_visibility_query": 0, - "ray_cast_calls_visibility_tangent": 6, - "ray_cast_candidate_bounds": 167, - "ray_cast_exact_geometry_checks": 0, - "refine_path_calls": 10, - "refinement_candidate_side_extents": 0, - "refinement_candidates_accepted": 0, - "refinement_candidates_built": 0, - "refinement_candidates_verified": 0, - "refinement_dynamic_bounds_checked": 0, - "refinement_static_bounds_checked": 0, - "refinement_windows_considered": 0, - "route_iterations": 6, - "score_component_calls": 6248, - "score_component_total_ns": 181369777, - "static_net_tree_rebuilds": 1, - "static_raw_tree_rebuilds": 1, - "static_safe_cache_hits": 1444, - "static_tree_rebuilds": 1, - "timeout_events": 0, - "verify_dynamic_candidate_nets": 1543, - "verify_dynamic_exact_pair_checks": 511, - "verify_path_report_calls": 144, - "verify_static_buffer_ops": 666, - "visibility_builds": 0, - "visibility_corner_hits_exact": 0, - "visibility_corner_index_builds": 1, - "visibility_corner_pairs_checked": 0, - "visibility_corner_queries_exact": 0, - "visibility_point_cache_hits": 0, - "visibility_point_cache_misses": 0, - "visibility_point_queries": 0, - "visibility_tangent_candidate_corner_checks": 6, - "visibility_tangent_candidate_ray_tests": 6, - "visibility_tangent_candidate_scans": 1224, - "warm_start_paths_built": 0, - "warm_start_paths_used": 0 - }, - "name": "example_07_large_scale_routing_no_warm_start_seed43", - "pre_pair_frontier_trace": { - "conflict_edges": [ - [ - "net_02", - "net_03" - ], - [ - "net_06", - "net_07" - ] - ], - "iteration": 5, - "nets": [ - { - "congestion_check_calls": 85, - "frontier": { - "hotspot_bounds": [ - [ - 827.6047906391041, - 482.9684848604278, - 917.390687834262, - 572.0 - ], - [ - 884.0, - 555.0, - 916.0, - 598.0 - ] - ], - "net_id": "net_07", - "pruned_closed_set": 2, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "pruned_self_collision": 0, - "samples": [ - { - "end_state": [ - 850, - 520, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 525, - 520, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 850, - 520, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 763, - 520, - 0 - ], - "reason": "closed_set" - } - ] - }, - "guidance_seed_present": true, - "net_id": "net_07", - "nodes_expanded": 16, - "pruned_closed_set": 3, - "pruned_cost": 0, - "pruned_hard_collision": 0 - }, - { - "congestion_check_calls": 86, - "frontier": { - "hotspot_bounds": [ - [ - 826.3396407947511, - 418.0, - 917.3906878342618, - 507.1148801363561 - ], - [ - 884.0, - 402.0, - 916.0, - 435.0 - ] - ], - "net_id": "net_02", - "pruned_closed_set": 3, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "pruned_self_collision": 0, - "samples": [ - { - "end_state": [ - 850, - 470, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 525, - 470, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 850, - 470, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 763, - 470, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 470, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 881, - 470, - 0 - ], - "reason": "closed_set" - } - ] - }, - "guidance_seed_present": true, - "net_id": "net_02", - "nodes_expanded": 17, - "pruned_closed_set": 4, - "pruned_cost": 0, - "pruned_hard_collision": 0 - }, - { - "congestion_check_calls": 0, - "frontier": { - "hotspot_bounds": [ - [ - 826.3396407947606, - 482.8851198636423, - 917.390687834262, - 572.0 - ], - [ - 884.0, - 545.0, - 916.2379632934325, - 582.0 - ], - [ - 883.7620367065675, - 571.0, - 916.0, - 652.2850117535756 - ] - ], - "net_id": "net_06", - "pruned_closed_set": 10, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "pruned_self_collision": 0, - "samples": [ - { - "end_state": [ - 850, - 510, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 525, - 510, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 850, - 510, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 763, - 510, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 510, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 881, - 510, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 638, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 895, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 895, - 638, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 880, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 880, - 638, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 827, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 832, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 780, - 270 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 633, - 270 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 785, - 270 - ], - "reason": "closed_set" - } - ] - }, - "guidance_seed_present": true, - "net_id": "net_06", - "nodes_expanded": 0, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0 - }, - { - "congestion_check_calls": 0, - "frontier": { - "hotspot_bounds": [ - [ - 826.3396407947511, - 418.0, - 917.3906878342618, - 507.1148801363561 - ], - [ - 884.0, - 408.0, - 916.2379632934325, - 445.0 - ], - [ - 883.7620367065675, - 347.71498824645397, - 916.0, - 429.0 - ] - ], - "net_id": "net_03", - "pruned_closed_set": 14, - "pruned_cost": 0, - "pruned_hard_collision": 0, - "pruned_self_collision": 0, - "samples": [ - { - "end_state": [ - 850, - 480, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 525, - 480, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 850, - 480, - 0 - ], - "hotspot_index": 0, - "move_type": "straight", - "parent_state": [ - 763, - 480, - 0 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 895, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 895, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 880, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 880, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 896, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 896, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 891, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 891, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 886, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 886, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 882, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 882, - 362, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 163, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 158, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 267, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 215, - 90 - ], - "reason": "closed_set" - }, - { - "end_state": [ - 900, - 367, - 90 - ], - "hotspot_index": 2, - "move_type": "straight", - "parent_state": [ - 900, - 210, - 90 - ], - "reason": "closed_set" - } - ] - }, - "guidance_seed_present": true, - "net_id": "net_03", - "nodes_expanded": 0, - "pruned_closed_set": 0, - "pruned_cost": 0, - "pruned_hard_collision": 0 - } - ], - "routed_net_ids": [ - "net_07", - "net_02", - "net_06", - "net_03" - ] - }, - "summary": { - "reached_targets": 10, - "total_results": 10, - "valid_results": 10 - } - } - ] -} diff --git a/archive/routing/pre_pair_frontier_trace.md b/archive/routing/pre_pair_frontier_trace.md deleted file mode 100644 index e07ab16..0000000 --- a/archive/routing/pre_pair_frontier_trace.md +++ /dev/null @@ -1,48 +0,0 @@ -# Pre-Pair Frontier Trace - -Generated at 2026-11-26T21:47:45-08:00 by `scripts/record_pre_pair_frontier_trace.py`. - -## example_07_large_scale_routing_no_warm_start - -Results: 10 valid / 10 reached / 10 total. - -Captured iteration: `5` - -Conflict edges: `(('net_02', 'net_03'), ('net_06', 'net_07'))` - -| Net | Nodes | Checks | Closed-Set | Cost | Hard Collision | Guidance Seed | Frontier Samples | -| :-- | --: | --: | --: | --: | --: | :--: | --: | -| net_07 | 16 | 85 | 3 | 0 | 0 | yes | 2 | -| net_02 | 17 | 86 | 4 | 0 | 0 | yes | 3 | -| net_06 | 0 | 0 | 0 | 0 | 0 | yes | 10 | -| net_03 | 0 | 0 | 0 | 0 | 0 | yes | 16 | - -Frontier prune totals by reason: - -- `closed_set`: 31 -- `hard_collision`: 0 -- `self_collision`: 0 -- `cost`: 0 - -## example_07_large_scale_routing_no_warm_start_seed43 - -Results: 10 valid / 10 reached / 10 total. - -Captured iteration: `5` - -Conflict edges: `(('net_02', 'net_03'), ('net_06', 'net_07'))` - -| Net | Nodes | Checks | Closed-Set | Cost | Hard Collision | Guidance Seed | Frontier Samples | -| :-- | --: | --: | --: | --: | --: | :--: | --: | -| net_07 | 16 | 85 | 3 | 0 | 0 | yes | 2 | -| net_02 | 17 | 86 | 4 | 0 | 0 | yes | 3 | -| net_06 | 0 | 0 | 0 | 0 | 0 | yes | 10 | -| net_03 | 0 | 0 | 0 | 0 | 0 | yes | 14 | - -Frontier prune totals by reason: - -- `closed_set`: 29 -- `hard_collision`: 0 -- `self_collision`: 0 -- `cost`: 0 - diff --git a/archive/routing/routing-policy-goal.md b/archive/routing/routing-policy-goal.md deleted file mode 100644 index 4265609..0000000 --- a/archive/routing/routing-policy-goal.md +++ /dev/null @@ -1,33 +0,0 @@ -# Automatic routing policy and route cost goals - -Use this historical milestone to understand why automatic routing combines constructive planners with search and why the project checks coverage before cost. Use the [current benchmark guide](../../docs/benchmarks.md) to evaluate a new change. - -Run one inire policy across the full benchmark corpus from empty initial paths. The first milestone is to verify **242 of 243 nets and fully route 36 of 37 boards** in one run. The overloaded gate should reach its three-track capacity. Once the policy reproduces that baseline, reduce weighted route cost while preserving coverage. - -## Benchmark baseline - -| Full corpus result | Verified nets | Fully routed boards | -| --- | ---: | ---: | -| Bundle-first at 100 nodes per attempt and two iterations | 155/243 | 15/37 | -| Best existing policy per board after targeted retries | 190/243 | 20/37 | -| Best result per board including standalone experiments | 242/243 | 36/37 | - -The clearance-checked column planner completed all 15 serial, split, and bidirectional bypass layouts with zero A* expansions. An experimental bundle turnaround routed all nine nets with the fixed Terminal-Bench headings. An automatic perimeter detour completed the two-net subset. The integrated policy should generate these routes from the input geometry and settings. Keep feasibility witnesses in the test harness for independent coverage and cost checks. [Benchmark corpus and methods](../../docs/benchmarks.md#choose-a-case) - -## Planner selection and verification - -Use geometry checks to select a candidate planner. Use column lane assignment for ordered tracks through successive openings, bundle planning for perimeter returns, and a perimeter detour when the layout leaves room for one. Preserve fixed terminal headings and infer headings only for point-terminal inputs. - -Check complete candidate layouts with inire's geometry verifier before accepting them. Retain the best verified layout across attempts. Use the existing guide, seed, and near-port probe policies for layouts outside the constructive planners' scope or for unresolved nets. Where verification identifies a failed turn, an aperture with insufficient room, or a conflict between nets, use that information to choose the next retry. Stop at a capacity limit only when the geometry proves it. - -## Weighted route cost - -At this milestone, the column planner ranked lateral movement and forward span. On `bypass-interleaved-directions`, its verified solution used 86 S-bends compared with 22 in the feasibility witness and cost 36% more. The difference motivated scoring transitions by physical component cost and considering lanes reachable in a single S-bend. A cheaper transition still needs enough forward room between obstacles and must pass the full-board check. - -## Original next steps - -1. Port the three experimental planners into the benchmark policy and run it with one configuration on all 37 boards. Record the selected planner, retries, valid net IDs, and any capacity limit. Add regression checks for the fixed-heading turnaround and the overloaded gate. -2. Set aside validation layouts with staggered terminal columns, uneven widths, and different obstacle arrangements before tuning. Keep closely related variants together so the validation set tests unfamiliar geometry. -3. Compare weighted transition scoring against the integrated baseline, starting with `bypass-interleaved-directions`, `split-moving-divider`, and `serial-terminal-jogs`. Report complete boards, weighted cost on identical net sets, A* expansions, and median and tail runtime. Use the full corpus and the held-out layouts to evaluate a default-policy change. - -The archived automatic policy validation records the completed corpus and holdout runs and the scoring comparison. [Experiment archive](../../docs/benchmark-results.md#experiment-archive) diff --git a/archive/routing/routing-refactor-plan.md b/archive/routing/routing-refactor-plan.md deleted file mode 100644 index 26c1c5b..0000000 --- a/archive/routing/routing-refactor-plan.md +++ /dev/null @@ -1,51 +0,0 @@ -# Routing refactor plan - -Use this record to recover the original refactor scope and the reason for each proposed boundary. The initial refactor landed in `ea5cfe7`. Start with the future-looking items when considering new work, and use the [architecture](../../docs/architecture.md) and [diagnostics guide](../../docs/routing-diagnostics.md) for current behavior. - -## Planned - -### Benchmark reproducibility and router state - -1. **Share the corpus and benchmark profiles.** Give the comparison CLI, pytest, and the performance snapshot tools one source for case groups and named configurations. The CLI's matched-budget defaults currently use two congestion iterations and a 600-node seed budget. The corpus test uses three iterations and a 500-node seed budget. Make those settings explicit and preserve the existing configurations when moving them. Store expected coverage with the fixtures, including the bounds for `overloaded-gate` and `lidar-clements-8x8`. [Benchmark CLI](../../scripts/compare_topological_routing.py) · [Corpus tests](../../inire/tests/test_routing_benchmarks.py) -2. **Make exact parity a reusable benchmark command.** Compare runs by case and effective profile. Check verified net IDs, path seeds, per-net costs, selected stages and stage order, stable counters, and callback payloads. Report the first differing case, stage, or net and compare elapsed time separately. Use the command when checking subsequent behavior-preserving work. -3. **Scope temporary obstacle reservations.** Greedy warm starts remove temporary obstacles on normal completion, and corridor seeding already uses `finally`. Share the cleanup rule while preserving insertion order and cache invalidation. Test that an interrupted greedy search leaves the routing world reusable. [Warm starts and corridor seeds](../../inire/router/_router.py) -4. **Consolidate routing counter definitions.** Define counter defaults, reset behavior, and snapshot aggregation once. Keep direct attribute increments in the search loop, preserve the distinction between per-search and cumulative counters, and retain the public `RouteMetrics` fields. Check that runs and reports expose the same counter values. [Mutable counters](../../inire/router/_astar_types.py) · [Public metrics](../../inire/results.py) - -### Routing decisions and diagnostics - -5. **Extract trace formatting from `PathFinder`.** Start with pure formatters for conflict and iteration entries. Keep trace capture points visible in the routing loop, including the stages around best-iteration restoration and pair-local repair. Compare the serialized traces before and after. [Trace capture](../../inire/router/_router.py) -6. **Extract negotiated-congestion decisions.** Make reroute selection, late search caps, and stop conditions testable against an iteration review and recent search work. Use small tests to exercise those rules independently of A*, with corpus parity to check their integration. [Congestion routing](../../inire/router/_router.py) -7. **Group the per-search congestion caches.** Give the six congestion cache dictionaries one owner for each A* search. Simplify the signatures between the search loop, move expansion, and admission while preserving cache keys and lifetime. Compare stable counters and runtime. [Search loop](../../inire/router/_search.py) · [Move admission](../../inire/router/_astar_admission.py) -8. **Consolidate direct-policy settings.** Define each direct policy's connectivity checks, lookahead, budget splitting, and unlocked probe in one internal table. Keep the attempt sequence and early exits explicit and preserve policies exposed by the benchmark CLI. [Direct and residual policies](../../inire/router/_routing_policy.py) -9. **Make automatic trial acceptance explicit.** Distinguish locally feasible candidates, whole-board validity, and eligibility to replace an incumbent. Preserve the rule that cost ranks alternatives with the same verified net IDs. Record when residual results are checked and when unresolved results are merged so stage metadata remains consistent. [Trial selection](../../inire/router/_routing_policy.py) · [Automatic orchestration](../../inire/router/_automatic.py) -10. **Make capacity bounds independently testable.** Extract the cut-capacity calculation and the disjoint port-conflict check. State the geometry assumptions beside each bound and test when a bound applies separately from the policy decision to stop. Preserve reported cuts, conflict pairs, and routing targets. [Capacity and port checks](../../inire/router/_capacity.py) -11. **Separate topological planning from corridor construction.** Give endpoint access, mesh paths, lane assignments, and conversion to `Corridor` explicit internal boundaries. That lets lane-allocation tests exercise choices and tie-breaking independently of the lattice router. [Topological corridors](../../inire/router/_topology.py) -12. **Separate column scheduling from seed generation.** Distinguish opening and track assignment, feasible S-bend schedules, and the conversion of a schedule to seeds. Preserve candidate order and full-board verification. Exercise individual transition failures so new passage patterns can be tested in isolation. [Column planning](../../inire/router/_columns.py) -13. **Reuse verification details in final diagnostics.** Share final verification details with conflict and frontier reporting where they cover the same net population and installed geometry. Compare exact routes and trace payloads, then measure the change in verification calls and runtime. [Final verification and frontier capture](../../inire/router/_router.py) - -### Geometry and tooling cleanup - -14. **Expose live raw static obstacles through `RoutingWorld`.** Give pair-local search and corridor setup an ordered iterator so both can use current obstacles, including obstacles added after problem creation. Keep index storage details inside the world. [Routing world](../../inire/geometry/collision.py) · [Pair-local search](../../inire/router/_pair_local.py) -15. **Centralize cardinal coordinate transforms.** Share forward and lateral projection across the refiner, perimeter planner, and direct-route planner. Cover all four headings and leave snapping at its current points. [Port primitives](../../inire/geometry/primitives.py) · [Refiner](../../inire/router/refiner.py) -16. **Move shared geometry helpers out of planner modules.** Give helpers such as exact S-bend spans a neutral home so compact routing can reuse them directly. Preserve exact integer spans for constructive routing and floating-point reach calculations for search. [Compact routing](../../inire/router/_compact.py) · [Column planning](../../inire/router/_columns.py) -17. **Share component construction between seed replay and A*.** Reuse the mapping from move parameters to straight, 90-degree bend, and S-bend geometry. Preserve A* cache keys, handling of infeasible moves, and the geometry options applied during seed replay. [Seed materialization](../../inire/router/_seed_materialization.py) · [Move admission](../../inire/router/_astar_admission.py) -18. **Name scoring objectives by purpose.** Make search cost, refinement cost, automatic trial ranking, and benchmark-weighted length clear in code and reports. Reuse the weighted-length calculation where it is identical and label native and benchmark costs explicitly. [Automatic scoring](../../inire/router/_automatic.py) · [Benchmark reporting](../../scripts/compare_topological_routing.py) -19. **Share trace recorder boilerplate.** Reuse scenario selection, result summaries, command-line arguments, and artifact writing across conflict, frontier, pre-pair, and iteration recorders. Keep each report's renderer and schema in its own script. [Frontier recorder](../../scripts/record_frontier_trace.py) · [Iteration recorder](../../scripts/record_iteration_trace.py) -20. **Keep fixtures and routing docs easy to maintain.** Organize large fixture modules by family while preserving stable case names and corpus order. Keep feasibility witnesses separate from timed inputs. Update the architecture map for pair-local search and label the original routing goal as a historical milestone. [Benchmark fixtures](../../inire/tests/routing_benchmarks.py) · [Architecture](../../docs/architecture.md) · [Original routing goal](routing-policy-goal.md) -21. **Resolve the remaining lint findings.** Review and fix the reported issues in `inire` and `scripts`, including redundant comprehensions and long lines. Review suggested fixes individually where they touch search or benchmark behavior. [Lint configuration](../../pyproject.toml) - -## Future-looking - -22. **Consider a common residual routing interface when a new recovery strategy needs it.** Identify which operations can be shared across direct locks, incumbent seeding, perimeter recovery, and pair-local search. Preserve their distinct roles for frozen obstacles, seed hints, and merge-time verification. [Residual policies](../../inire/router/_routing_policy.py) · [Pair-local search](../../inire/router/_pair_local.py) -23. **Split collision queries further when profiling or geometry work identifies a reason.** Candidate lookup, exact overlap, and ray casting are possible boundaries. Compare clearance, boundary touches, physical and proxy geometry, and cache behavior before adopting a new split. [Collision queries](../../inire/geometry/collision.py) -24. **Revisit public option grouping with a compatibility plan.** Consider grouping planner settings or bend geometry when an API change is warranted. Account for legacy custom bend polygons and separate physical and proxy geometry. Handle changes to defaults, validation, and public names as explicit API decisions. [Public options](../../inire/model.py) - -## Verification - -Use the current 67-board corpus as the regression baseline for routing changes. The `corpus-regression` and `public-defaults` profiles reach every board's routing bound and verify 433 of 437 nets each. For behavior-preserving changes, compare exact paths, per-net costs, bounds, planner stage order and metadata, and relevant callback and trace payloads. For changes that intentionally eliminate work, such as item 13, record the expected counter differences while checking route and trace parity. [Corpus reproduction](../../docs/benchmarks.md#run-the-full-benchmark-corpus) - -Capture the same cases and options at both revisions. The parity command defaults to the `corpus-regression` and `public-defaults` profiles. [Parity commands](../../docs/routing-diagnostics.md#reproduce-and-compare) - -### Refactor validation - -The refactor matched paths, costs, stage data, traces, and callbacks on the applicable parity runs. Reusing final verification details reduced repeated checks and improved timing on a diagnostic-heavy straight-route fixture. The full corpus showed little time change. Use trace-heavy cases to measure this kind of refactor, and keep the full corpus for correctness. The paired measurements are in `git show 2b02c6e:docs/routing-refactor-plan.md`. diff --git a/archive/routing/simplification-results.md b/archive/routing/simplification-results.md deleted file mode 100644 index 515b217..0000000 --- a/archive/routing/simplification-results.md +++ /dev/null @@ -1,66 +0,0 @@ -# Routing simplification results - -These checks compare the November 27, 2026 implementation with `6608e18`. The [routing simplification plan](../../plans/routing-simplification.md) defines the implementation batches and the questions each prototype tested. - -## Changes implemented - -| Plan items | Decision and verification | -| --- | --- | -| 1 | Reuse the live index when the last completed iteration is also the best. Timeout, an earlier winner, and a callback that edits results each exercised restoration. The change alone avoided 9,201 insertions and 9,201 removals on the public-default corpus. | -| 2–3 | Share the layout rank and stable Manhattan net order. Tests cover each ranking criterion, an empty first review, the pair-length tolerance, mixed headings, equal distances, and alternate lock order. | -| 4–6 | Represent pair targets directly and roll back only rejected installed candidates. Candidate selection uses net-level conflicts. Rejected local searches, reversed attempts, disjoint targets, and the two-pair limit were checked. | -| 7–8 | Share incumbent guidance in frontier replay and remove the unused visibility wrapper. Individual trace flags reproduced the same samples and component indices on the explicit worker runs. Exact and tangent visibility tests passed. | -| 10 | Replace only the pair under repair. The 27 explicit-worker comparisons avoided 740 insertions and 740 removals, from runs that include both fan-out seeds under five diagnostics settings. They matched paths and trace payloads through multiple repairs. | -| 11 | Reuse the best iteration's review when its geometry is still installed and no restored trace needs a capture. The earlier-winner test still performs the restored review. Final verification still supplies partial-path reports and frontier overlap details. The corpus saved 1,589 report calls, 15,582 static buffers, 32,877 dynamic candidate nets, and 13,352 dynamic exact pair checks. | -| 12 | Check for four bends before taking a path out of the index for refinement. Straight and S-bend tests confirm the installed paths stay in place. Bend-heavy fixtures kept their candidate counts and paths. Across both corpus profiles, this saved 416 refinement calls and 2,510 insertions and removals each. | -| 14 | Sample obstacle boundaries only when an enabled objective uses proximity. Bounds checks stay available. The mixed-weight test uses zero search danger and nonzero refinement danger. Pair workers use their search objective and the active greedy weight. Both profiles and the custom-bend cases matched exactly. | -| 17–20 | Reuse the prepared joint-lane problem and the common perimeter residual worker. Joint-lane lock order, skipped IDs, corridor counts, seeded IDs, and stage records matched. The forced perimeter check matched 61 stage records, including 22 residual searches and a verified two-net result on Terminal-Bench Pair. The shared objective constructor preserves each world's obstacle inputs. The containment check accepts flush ports and rejects a custom physical protrusion even when its proxy fits. The trace fixtures use the same result assembly as production. | -| 21–23 | Derive the ordinary scenario runs from the snapshot registry. Repeated selectors preserve registry order across recording and comparison, including a performance-only scenario against an older baseline. The public locked-path example matches both original path reports and the generated plot pixel for pixel. Fixture semantics stayed stable. | - -## Prototypes kept out of production - -| Item | Trial | Result and decision | -| --- | --- | --- | -| 9 | Explicit no-warm-start fan-out with 8 nets at seeds 41 and 44 and 10 nets at seed 43, plus mutable callbacks, caller seeds, and partial paths. | Three capped incumbents saved 15 insertions and removals each. No capped fallback ran in the two automatic corpus profiles. The hot path keeps its existing sequence. | -| 13 | Seeded alternating doglegs, return shelf, and detour under both corpus profiles, with 108 proposals near the improvement threshold. | Choices, costs, and built and accepted candidates matched. The prototype saved 1,330 component scores in six runs. Across 11 interleaved public-default repeats, the median changed from 431.2 to 430.3 ms on the doglegs, 35.1 to 34.1 ms on the return shelf, and 11.3 to 11.3 ms on the detour. Keep the simpler scoring loop. | -| 15 | A cold, bounded cache of 512 physical clearance buffers, keyed by polygon and clearance. Five interleaved public-default runs per case. | The buffer counts fell on all four cases. The largest retained geometry payload was 474 kB in WKB, before object and native memory overhead. The additional cache state has a modest end-to-end payoff. Keep the direct verification path. | -| 16 | Bypass each congestion precheck separately on offset gates, obstructed crossings, the splitter tree, and ten-net fan-out at seed 42. Five interleaved runs per case. | Skipping the grid presence check changed the fan-out expansion sequence. Skipping the candidate check added 37 congestion checks there and left the exact pair count at 5,860. The splitter tree and fan-out median gains were about 1–2%. Keep both filters. | - -### Static verification measurements - -| Public-default fixture | Buffer calls before → cache | Median before → cache | Retained input and buffer WKB | -| --- | ---: | ---: | ---: | -| PIC splitter tree | 1,255 → 145 | 5,258 → 5,167 ms | 474 kB | -| Alternating doglegs | 1,695 → 873 | 464 → 438 ms | 437 kB | -| Obstructed crossing approaches | 158 → 20 | 392 → 386 ms | 20 kB | -| Custom physical bend | 36 → 9 | 32.2 → 31.5 ms | 1.9 kB | - -The cache trial preserved the mitred-corner distance check. The clearance and collision suites passed with the cache active, including boundary touching. - -### Congestion precheck measurements - -| Fixture | Grid presence rejections | Candidate rejections after presence | Mean presence / candidate query time | -| --- | ---: | ---: | ---: | -| Offset gates | 0 | 0 | No congestion queries | -| Obstructed crossing approaches | 425 | 0 | 1.42 / 2.54 µs | -| PIC splitter tree | 2,101 | 0 | 2.78 / 11.37 µs | -| Fan-out at seed 42 | 460 | 37 | 2.34 / 14.66 µs | - -Query timings include cache hits and misses. In the fan-out run the envelope lookup averaged 11.28 µs and the grid-net lookup averaged 3.22 µs, inclusive of their own checks. Removing the presence filter moved work into the candidate filter and increased full congestion checks from 3,411 to 3,530. Exact tests still distinguish frozen conflicts, soft overlap, and boundary contact. - -## Triggers for broader changes - -**24. Residual routing.** The direct probe uses locked physical geometry and emits placeholders for disconnected IDs. A connected incumbent retry uses the same prepared residual for ordinary seeding and joint-lane recovery. The joint trial needs a seeded layout check before it can win. A disconnected incumbent instead passes movable seeds on the whole original problem. Perimeter recovery holds one local route, adds it back to the result, and verifies the whole candidate when complete. Residual dogleg generation also holds the incumbents, then checks a whole seeded layout. These flows now share preparation where their inputs match. A broader interface can wait for a recovery case that duplicates the seed merge or the whole-layout check. - -**25. Collision queries.** The candidate lookup and exact overlap are already distinct steps. Candidate collection feeds both soft counts and frozen blocking, while final verification checks physical geometry and optionally records component pairs. The precheck measurements show an expansion-order dependency, and the buffer measurements show a limited benefit from adding state. Keep the current lookup boundary around `DynamicPathIndex`. Revisit it when profiling shows that the exact-test work or cache invalidation can be isolated without changing reroute work. - -**26. Public options.** Keep the five routing modes and the six option groups. Constructors, benchmark profiles, and option serialization depend on the four bend geometry fields. A legacy polygon can define both proxy and physical geometry, and an explicit custom proxy keeps the standard arc unless a physical geometry is provided. The geometry overrides and the serialized benchmark cases are covered by tests. Revisit grouping with a caller-facing change that can document those cases and migrate existing constructors and fixture presets. - -## Combined verification - -- Both profiles verified 433 of 437 nets across 67 boards and reached each board's bound. Overloaded Gate verified 3/4 across a three-track cut. LiDAR Clements verified 3/6 with three disjoint fixed-port conflicts. The unseeded Terminal-Bench export verified 9/9 and passed the pinned upstream geometry and cost checker. -- The 134 corpus, 20 retry-holdout, and 20 focused callback and diagnostic comparisons matched their recorded paths, verified IDs, costs, stages, bounds, and trace payloads. The 27 explicit-worker comparisons also matched, including guide and seed reports and both fan-out seeds. -- The expected stable counter differences were `dynamic_path_objects_added`, `dynamic_path_objects_removed`, `verify_path_report_calls`, `verify_static_buffer_ops`, `verify_dynamic_candidate_nets`, `verify_dynamic_exact_pair_checks`, and `refine_path_calls`. The public-default corpus avoided 11,461 insertions and removals each across the combined changes. -- The complete correctness suite passed 385 tests. The separate opt-in run passed all 11 example performance tests. - -The parity capture command and counter allowance syntax are in the [verification section of the plan](../../plans/routing-simplification.md#verification-and-sequencing). diff --git a/docs/architecture.md b/docs/architecture.md index 4f3b083..797f569 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -46,4 +46,4 @@ Holding the straight trunk fixed in `stress-retry-straight-decoy` blocks both ve | Pair-local repair | Coverage and conflict edges before repair, plus the final installed geometry. | [Pair-local search](../inire/router/_pair_local.py), [pair repair trace](routing-diagnostics.md#follow-a-late-conflict-into-pair-local-repair) | | Cost or refinement | Per-net costs on equal verified ID sets and validity after the final check. | [Path refinement](../inire/router/refiner.py), [refinement handoff](../inire/router/_automatic.py#L610) | -Use [benchmark profiles](benchmarks.md#choose-a-profile) for policy comparisons and [exact parity](routing-diagnostics.md#reproduce-and-compare) for behavior-preserving changes. +Use [benchmark profiles](benchmarks.md#choose-a-profile) for policy comparisons and [route results and traces](routing-diagnostics.md#reproduce-and-compare) for behavior-preserving changes. diff --git a/docs/benchmark-fixtures.md b/docs/benchmark-fixtures.md index ed24852..b1803c7 100644 --- a/docs/benchmark-fixtures.md +++ b/docs/benchmark-fixtures.md @@ -5,7 +5,7 @@ ## Micron-scale routing cases -The `expanded` group adds 75 deterministic, unseeded boards with independently constructed reference routes. The authored grid units are 10, 100, 250, 500, and 1000 nm. Bend radii span 10–100 µm and trace widths span 1–20 µm. The comparison script records `grid_nm` for these boards and the imported fixtures. Convert benchmark-weighted lengths to microns by multiplying by `grid_nm / 1000`. +The `expanded` group adds 75 deterministic, unseeded boards with independently constructed reference routes. The authored grid units are 10, 100, 250, 500, and 1000 nm. Bend radii span 10–100 µm and trace widths span 1–20 µm. The fixtures include `grid_nm` for these boards and the imported layouts. Convert benchmark-weighted lengths to microns by multiplying by `grid_nm / 1000`. | Group | Boards | Coverage | | --- | ---: | --- | @@ -14,9 +14,7 @@ The `expanded` group adds 75 deterministic, unseeded boards with independently c | `search-challenges` | 11 | Alternating comb walls and other tight passages that require repeated turns or exercise search-budget exhaustion. | | `scaling` | 8 | Banks and crossing arrays of up to 256 nets, obstacle fields with up to 320 keepouts, and a 240-net board with 240 keepouts and four blocked approaches. | -Pytest verifies the 75 reference layouts and checks that unseeded routing reaches the known bound on every board. Use `--case search-challenges` or `--case scaling` with an explicit budget to compare routing policies on the harder boards. For scaling comparisons, use the same grid, mode, and budget and collect repeated timings with `--repeat`. - -To exercise the low-budget fallbacks on tight geometry, run `--case geometry-corners --profile corpus-regression --mode automatic --nodes 1 --seed-nodes 1 --iterations 1`. +Pytest verifies the 75 reference layouts and checks that unseeded routing reaches the known bound on every board. For a scaling comparison, use the same grid, mode, and budget across repeated runs. - [Fixture definitions](../inire/tests/routing_expanded_benchmarks.py) @@ -24,18 +22,11 @@ To exercise the low-budget fallbacks on tight geometry, run `--case geometry-cor Use `complex-routing-example-1` to test fixed eastbound arrival and `complex-routing-example-1-point-terminals` to test heading inference. -Export the bundle planner's verified waypoints for the point-terminal board. - -```sh -python -m scripts.route_complex_routing_example --output /tmp/inire-complex-routing-example-1.json -``` - -Expect nine verified routes. The unseeded export met the original checker's cost and geometry requirements. +The Terminal-Bench tests verify the unseeded point-terminal bundle and replay both reference lane plans. - [Example gallery](../examples/advanced.md#complex-routing-example-1) - [Complex-routing walkthrough](complex-routing-example-1.md) - -To replay a known layout, pass `--reference-lane-plan` for the shared bottom passage or `--single-bottom-track` for the one-track version. Use the unseeded command above for planner coverage and timing. +- [Terminal-Bench tests](../inire/tests/test_terminal_bench.py) ## Preplaced crossings @@ -57,33 +48,14 @@ The layout tests use process dimensions to exercise routing and placement replay | Coplanar waveguide | Route the conductor and gap envelope from the same seed. With a 29.5 µm envelope and 3 µm clearance, 28 and 32 µm pitches fail and 36 µm passes. | - [Layout regression tests](../inire/tests/test_layout.py) -- [Fabrication study](../plans/full-project-review.md#31-preserve-authored-lengths-when-rerouting-phase-sensitive-connections--medium) + +### Phase-sensitive routes + +In the Raymond fabrication study, the authored arms of `MZI9` measured 286.770 µm and 183.637 µm. A geometrically valid replacement for the longer arm measured 127.208 µm. It passed the EBeam design-rule check and changed the signed arm-length difference from +103.133 µm to −56.429 µm. Replaying a separate Bézier-based waveguide with circular bends changed its reported length from 156.137 µm to 154.948 µm. Compare the reported lengths against the circuit's tolerance before replacing a phase-sensitive route. [Raymond fabrication layout](https://github.com/SiEPIC/openEBL-2025-02/blob/a887476a301db2a014be007717cd1821e111f58e/submissions/EBeam_hannahraymond_MZIv21.gds) · [EBeam bend definitions](https://github.com/SiEPIC/SiEPIC_EBeam_PDK/blob/363fbb52eefa8669100499ab531d3fe7befc4867/klayout/EBeam/WAVEGUIDES.xml#L3-L15) · [Reported lengths](user/api-reference.md#results) ## Imported fixtures -The importer cuts port openings in device keepouts and snaps optical ports to a 0.1 µm grid. One layout unit is 0.1 µm. +The converted fixtures have port openings cut into device keepouts and use a 0.1 µm grid. The test suite reads the checked-in layouts. -- [Converted fixture geometry](../inire/tests/data/external_routing_benchmarks.json) - -| Cases | Pinned source | License | -| --- | --- | --- | -| Splitter tree, ring modulator, and MZM | [FLYR PIC Routing Benchmark archive](https://huggingface.co/datasets/FLYR/pic-benchmark/resolve/0c1f445792926d97fae01893c89e96b8a9393800/pic-benchmark.zip) | FLYR's bundled `LICENSE` specifies [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). | -| Toy layout and subsets of the Clements and MRR weight-bank layouts | [LiDAR benchmark inputs](https://github.com/ScopeX-ASU/LiDAR/tree/4e7004d32b0b80d959553797fb30f0737513de0c/src/picroute/benchmarks) | [ScopeX@ASU's MIT license](../inire/tests/data/LiDAR-LICENSE.txt). | - -### Regenerate the converted inputs - -The importer checks both archive hashes before converting geometry. It uses PyYAML to read the layout files. Generate a scratch copy and compare it with the checked-in fixture data. - -```sh -mkdir -p /tmp/inire-external-routing -curl -fL 'https://huggingface.co/datasets/FLYR/pic-benchmark/resolve/0c1f445792926d97fae01893c89e96b8a9393800/pic-benchmark.zip' \ - -o /tmp/inire-external-routing/pic-benchmark.zip -curl -fL 'https://codeload.github.com/ScopeX-ASU/LiDAR/tar.gz/4e7004d32b0b80d959553797fb30f0737513de0c' \ - -o /tmp/inire-external-routing/lidar.tar.gz -uv run --with 'pyyaml==6.0.3' python -m scripts.import_external_routing_benchmarks \ - --pic-archive /tmp/inire-external-routing/pic-benchmark.zip \ - --lidar-archive /tmp/inire-external-routing/lidar.tar.gz \ - --output /tmp/inire-external-routing/fixtures.json -cmp inire/tests/data/external_routing_benchmarks.json \ - /tmp/inire-external-routing/fixtures.json -``` +- [Converted geometry](../inire/tests/data/external_routing_benchmarks.json) +- [Fixture sources and licenses](../inire/tests/data/README.md) diff --git a/docs/benchmark-results.md b/docs/benchmark-results.md deleted file mode 100644 index 82225b5..0000000 --- a/docs/benchmark-results.md +++ /dev/null @@ -1,34 +0,0 @@ -# Benchmark results - -Use these comparisons to choose a probe budget or retry order. - -- [Benchmark commands and profiles](benchmarks.md) - -## Near-port probe and retry experiments - -On November 26, 2026, a two-iteration cap cut public-default corpus expansions by 23% against the full probe budget. Verified paths and costs matched on the corpus and holdouts under both tested profiles (`public-defaults` and `corpus-regression`). - -- The splitter tree still verified all six nets and used fewer expansions after shortening the probe. -- The mixed port bank used more expansions because the last net moved from the short probe to the larger retry. -- A one-iteration cap increased the cost of a crossing approach. The clipped-proxy case needed the full probe to find its cheaper route. The two-iteration cap applies to the arc proxy in the [automatic stage sequence](architecture.md#automatic-routing). - -```sh -python -m scripts.benchmark_retry_order --case corpus --case retry-holdout \ - --policy baseline --policy probe-full-budget --jobs 6 --json /tmp/inire-probe.json -``` - -### Early and late retries - -The November 26, 2026 retry experiments used the pre-cap baseline. Failed early retries added work before the ordinary fallback. In one holdout, early incumbent recovery selected a higher-cost path at the same coverage. When comparing a change to retry order, measure the cost of failed attempts as well as the successful recoveries. For the trigger conditions and older driver, see the [archived retry measurements](../archive/routing/README.md#reproduce-probe-and-retry-experiments). - -In the `public-defaults` holdout sweep, `late-residual-3000` recovered the last net on two crossing boards and a return shelf while preserving the previously verified paths. It requires room in the caller's budget and connected ports with the incumbents locked. Use the current comparison below to measure the cost of that extra attempt. - -```sh -python -m scripts.benchmark_retry_order --case retry-holdout --profile public-defaults \ - --policy baseline --policy late-residual-3000 --repeat 3 --jobs 6 \ - --json /tmp/inire-residual.json -``` - -## Experiment archive - -- [Archived expansion counts, revisions, and commands](../archive/routing/README.md#reproduce-probe-and-retry-experiments) diff --git a/docs/benchmarks.md b/docs/benchmarks.md index ab474e1..e5aaf11 100644 --- a/docs/benchmarks.md +++ b/docs/benchmarks.md @@ -2,95 +2,42 @@ ## Run a benchmark -From the repository root, run the overloaded-gate fixture with the regression profile. +From the repository root, run the overloaded-gate fixture. ```sh -python -m scripts.compare_topological_routing \ - --case overloaded-gate \ - --profile corpus-regression \ - --mode automatic +python -m pytest -m routing_corpus -k overloaded-gate ``` -Expect `3/4 valid`. All four nets need to cross a vertical cut where the openings have room for three tracks. Run the same command with `--case lidar-clements-8x8` to see `3/6 valid` with a bound set by port spacing. - -## Choose a case - -| If you are changing | Use `--case` | -| --- | --- | -| Overall coverage | `corpus` runs all benchmark boards, including the search and scaling workloads. | -| Ordered tracks, shared gates, and barrier layouts | `all` includes the fixed-heading complex-routing example 1. Use `corpus` for the full regression suite. | -| Seeds, custom bend geometry, and fallback behavior | `broad` includes caller seeds, custom bends, imported layouts, and held-out boards. | -| Ports on placed devices | `crossings` exercises external legs to preplaced crossing cells. | -| Lock ordering, tight turns, and competing passages | `stress` runs known-feasible folded returns, competing locks, and shared passages. | -| Tight geometry, complex layouts, search limits, or scaling | `expanded` runs 75 additional boards. Use `geometry-corners`, `complex-layouts`, `search-challenges`, or `scaling` to focus on one group. | -| A retry tuned on the regression corpus | `retry-holdout` tests related but separate return shelves, bypasses, and competing trunks. | - -List cases with `python -m scripts.compare_topological_routing --list`. Start with the smallest case that exhibits the behavior. - -`pytest -m routing_corpus` runs regression coverage checks for the corpus and the retry holdouts. Use `pytest -m retry_holdout` to run just the holdout coverage checks. - -`pytest -m routing_corpus -k search-low-length-cost` also checks the three low-length-cost boards with their original 80- or 130-node lattice budgets. The `low-length-cost` case group selects these boards for comparisons under the standard benchmark profiles. - -- [Fixture sources and regeneration](benchmark-fixtures.md) - -## Choose a profile - -| Profile | Use it to | -| --- | --- | -| `public-defaults` | Measure the public policy and objective on the fixture geometry. | -| `corpus-regression` | Reproduce the routing regression settings. The profile sets a 500-node search limit, a 500-node seed budget per net, and up to three congestion iterations per attempt. | -| `matched-budget` | Compare modes with the same configured search and iteration limits. Defaults to 500 nodes per search and up to two congestion iterations per attempt. | - -Both budget profiles use benchmark weights when selecting an automatic candidate. A stage can use a smaller budget, and a net can be searched more than once. Match the profile, options, and worker count when measuring a change. - -Benchmark JSON records the configured options for each strategy. Each sample's `attempt_options` lists the effective options passed to routing workers in execution order, including rejected bundle attempts and any fallback workers. `requested_mode` is null for policies that choose their own mode for each attempt. - -For explicit `guide` and `seed` runs, `selected_attempt` is the zero-based index into `attempt_options` of the worker whose routes were returned. +The test checks that three of the four nets verify. All four nets need to cross a vertical cut with room for three tracks. Use `-k lidar-clements-8x8` to check an imported board with a bound of three out of six set by port spacing. ### Run the full benchmark corpus ```sh -python -m scripts.compare_topological_routing \ - --case corpus \ - --profile corpus-regression \ - --mode automatic --repeat 3 \ - --json /tmp/inire-corpus.json +python -m pytest -m routing_corpus ``` +The default test suite includes the corpus. Run `python -m pytest -m retry_holdout` to focus on the holdouts. + +## Choose a case + +Use `pytest --collect-only -q -m routing_corpus` to list the case IDs. Start with a board that exhibits the behavior and select it with `-k`. + +- For tight corners and S-bend slots, start with the micron-scale geometry fixtures. +- For preplaced devices, choose a case such as `crossing-obstructed-approaches` or `crossing-staggered-grid`. +- For a change to retry order, include the held-out return shelves, bypasses, and competing trunks. + +The [fixture guide](benchmark-fixtures.md) describes these layouts and their known bounds. The [corpus registry](../inire/tests/routing_corpus.py) lists the groups and options. + +## Choose a profile + +The corpus uses automatic routing under `corpus-regression`, with a 500-node search limit, a 500-node seed budget per net, and up to three congestion iterations per attempt. On the three `search-low-length-cost` boards it also checks the original 80- or 130-node lattice budget. + ### Compare routing modes -```sh -python -m scripts.compare_topological_routing \ - --case offset-gates \ - --profile matched-budget \ - --mode off --mode guide \ - --mode seed --nodes 100 \ - --repeat 3 \ - --json /tmp/inire-modes.json -``` - -At 100 nodes per search, `off` verifies no routes. Guide and seed each verify one at the same cost. Guide uses 4 expansions. Seed uses 36 to build its starting path. - -- [Corridor planning and realization](topological-routing.md#corridor-planning-and-realization) - -### Test a retry on holdouts - -```sh -python -m scripts.benchmark_retry_order \ - --case retry-holdout \ - --profile public-defaults \ - --policy baseline \ - --policy late-residual-3000 \ - --repeat 3 --jobs 6 \ - --json /tmp/inire-residual.json -``` - -Omit `--json` for a console summary. The optional JSON includes effective ports and polygon hashes for verified nets, so you can compare incumbent placement as well as coverage and time spent on failed attempts. - -- [Earlier retry results](benchmark-results.md#early-and-late-retries) +For a mode comparison, use the same problem and options in each call to `route()`. Change the topology mode and compare verified IDs, route cost on matching net sets, and work counters. The [complex-routing walkthrough](complex-routing-example-1.md#compare-all-routing-modes) shows this comparison with a 100-node search budget. ## Compare the results -1. **Coverage and bounds.** Check which nets verified and whether their count reached the reported bound. A reference path shows that its exact route is feasible. Check it separately from an unseeded timing run. -2. **Cost on matching net sets.** Benchmark-weighted length weights physical straights, 90-degree bends, and S-bends by 1, 4, and 13. Native objective cost uses the run's configured objective. Compare costs on identical verified IDs, and report coverage changes separately. -3. **Search and time.** Compare expansions and repeated wall times at the same settings. Constructive stages can spend time planning and verifying even with zero expansions. To locate work that moved to a different stage, use the [automatic reports](routing-diagnostics.md#automatic-reports). +1. **Coverage and bounds.** Check which nets verified and whether their count reached the expected bound. The tests also verify known reference routes where available. +2. **Cost on matching net sets.** Benchmark-weighted length weights physical straights, 90-degree bends, and S-bends by 1, 4, and 13. Native objective cost uses the run's configured objective. +3. **Search and time.** Compare expansions and repeated wall times at the same settings. Constructive stages can spend time planning and verifying even with zero expansions. Inspect the [automatic reports](routing-diagnostics.md#automatic-reports) to find which stage performed the work. diff --git a/docs/complex-routing-example-1.md b/docs/complex-routing-example-1.md index 7fb32d3..2cabf52 100644 --- a/docs/complex-routing-example-1.md +++ b/docs/complex-routing-example-1.md @@ -50,13 +50,7 @@ Compare the solid and dashed approaches of `net_07` near the top edge. ## 5. Inspect the result -Find the two stages under `runs[0].samples[0].stages` in the benchmark JSON. Both report zero A* expansions. - -```sh -python -m scripts.compare_topological_routing \ - --case complex-routing-example-1 --profile public-defaults --mode automatic \ - --json /tmp/inire-complex-routing-example-1-stages.json -``` +Inspect `run.automatic.stages` and `run.automatic.selected_stage` after routing the fixed-heading board under the public defaults. Both stages report zero A* expansions. | Stage | Planner | Operation | Verified nets | | --- | --- | --- | --- | @@ -66,7 +60,6 @@ python -m scripts.compare_topological_routing \ The point-terminal variant accepts a westbound arrival for `net_08`, so the original bundle needs no turnaround. Rerun the gallery command with `--case complex-routing-example-1-point-terminals` to see the result. - [Example gallery](../examples/advanced.md#complex-routing-example-1) -- [Waypoint export](benchmark-fixtures.md#complex-routing-example-1) ## Compare all routing modes @@ -104,7 +97,7 @@ To see the corridor model on the same board, run `net_08` on its own in guide mo Left, the mesh, green corridor cells, and dashed guide. Right, purple expanded positions and the red partial path at the 12-node limit. ```sh -python -m scripts.render_complex_routing_example --output-dir /tmp/inire-complex-routing-example-1 +python -m scripts.render_documentation_figures --output-dir /tmp/inire-complex-routing-example-1 ``` - [Corridor planning](topological-routing.md#corridor-planning-and-realization) @@ -117,4 +110,4 @@ python -m scripts.render_complex_routing_example --output-dir /tmp/inire-complex | Lanes and seeds | [Lane assignment](../inire/router/_bundle.py#L114), [waypoint compiler](../inire/router/_waypoints.py#L33) | | Eastbound arrival | [Turnaround candidates](../inire/router/_perimeter.py#L103) | | Verification and refinement | [Seeded worker](../inire/router/_automatic.py#L173), [physical verification](../inire/geometry/collision.py#L687), [refinement handoff](../inire/router/_automatic.py#L610) | -| Figures and mode comparison | [Figure generator](../scripts/render_complex_routing_example.py) | +| Figures and mode comparison | [Figure generator](../scripts/render_documentation_figures.py) | diff --git a/docs/development.md b/docs/development.md index 78923df..2644413 100644 --- a/docs/development.md +++ b/docs/development.md @@ -10,32 +10,21 @@ - [Routing diagnostics](routing-diagnostics.md) - [Benchmarks](benchmarks.md) - [Benchmark fixtures](benchmark-fixtures.md) -- [Benchmark results](benchmark-results.md) - [Public API](user/api-reference.md) ## Check a change 1. From the repository root, run `uv sync` to install development dependencies. Activate `.venv` or prefix commands with `uv run`. 2. Run `python -m pytest` for the correctness suite and `ruff check inire scripts` for lint. Use `python -m pytest -m "not routing_corpus"` for a shorter local check. -3. For a cleanup that should preserve paths, capture both revisions and run an [exact parity comparison](routing-diagnostics.md#reproduce-and-compare). Include callbacks or traces if the change affects them. +3. For a cleanup that should preserve paths, use the same fixtures and options in both revisions. Compare the relevant [route results and traces](routing-diagnostics.md#reproduce-and-compare). 4. For a policy or budget change, start with a case that exhibits the behavior. Compare verified IDs, cost, and work under the same [benchmark profile](benchmarks.md#choose-a-profile). Check the corpus and related holdouts before adopting the change. Build release archives with `uv build`. The wheel contains the runtime. The source archive also includes tests and fixtures. Smoke-test the wheel outside the checkout on Python 3.11 with Shapely 2.1.0 and GEOS 3.10 or newer, once with NumPy 1.26 and once with NumPy 2.x. -### Check a documentation figure +### Regenerate documentation figures -Run `python -m scripts.render_documentation_figures --output-dir /tmp/inire-figures` to preview the guides' figures. Check the port directions, keepouts, and route against the runnable example before writing its caption. Omit `--output-dir` to write the guide figures to `docs/figures`. The basic example scripts save their own plots in `examples/`. +Run `python -m scripts.render_documentation_figures` to regenerate the guides, the complex-routing walkthrough, and the advanced example gallery in `docs/figures`. Pass `--output-dir /tmp/inire-figures` to preview them in a separate directory. -### Refresh the advanced example gallery +The gallery and walkthrough use the checked-in [layout data](../examples/advanced-layouts.json). The [numbered examples](../examples/README.md) save their own plots in `examples/`. -After changing a stress fixture or the nine-net board, export the inputs again and regenerate the [advanced example figures](../examples/advanced.md). The exporter checks that the saved data reproduces the benchmark geometry and public-default options. Regenerate the intermediate views when the [complex-routing walkthrough](complex-routing-example-1.md) changes. - -```sh -python -m scripts.export_advanced_examples -python examples/advanced_layouts.py --output-dir docs/figures -python -m scripts.render_complex_routing_example -``` - -## Development history - -- [Routing development archive](../archive/routing/README.md) +When editing a guide, state which inputs or earlier example a reader needs to follow a linked section. Run affected examples, check the links and figures, and preserve existing heading anchors. diff --git a/docs/routing-diagnostics.md b/docs/routing-diagnostics.md index 8b87785..22dce06 100644 --- a/docs/routing-diagnostics.md +++ b/docs/routing-diagnostics.md @@ -62,41 +62,29 @@ An earlier entry such as `restored_best` indexes the paths at that stage. Use th Capture the conflict trace for fan-out with warm starts disabled. The best congestion iteration leaves two disjoint pairs of nets competing for space. -```sh -python -m scripts.record_conflict_trace \ - --scenario example_07_large_scale_routing_no_warm_start \ - --output-dir /tmp/inire-trace +The [fan-out regression](../inire/tests/test_example_regressions.py) enables these traces and checks the restored and final layouts. To inspect its result from a checkout, run this Python snippet. + +```python +from inire.tests.example_scenarios import trace_example_07_no_warm_start + +run = trace_example_07_no_warm_start() +for entry in run.conflict_trace: + if entry.stage in ("restored_best", "final"): + print(entry.stage, entry.completed_net_ids, entry.conflict_edges) ``` -1. In `conflict_trace.json`, find `restored_best`. Six nets verify. The conflicts are `net_02`–`net_03` and `net_06`–`net_07`. -2. Compare with `final`. All ten nets pass verification after repair, and the list of conflict edges is empty. -3. Substitute `scripts.record_iteration_trace` for expansion and congestion counts, or `scripts.record_pre_pair_frontier_trace` for reroute order and per-net work before repair. - -- [Saved conflict trace](../archive/routing/conflict_trace.md#example_07_large_scale_routing_no_warm_start) -- [Saved pre-pair trace](../archive/routing/pre_pair_frontier_trace.md) +1. At `restored_best`, six nets verify. The conflicts are `net_02`–`net_03` and `net_06`–`net_07`. +2. At `final`, all ten nets pass verification after repair and the list of conflict edges is empty. +3. Inspect `run.iteration_trace` for expansion and congestion counts and `run.pre_pair_frontier_trace` for reroute order and per-net work before repair. Use the returned result to count final successes. For live progress during routing, pass an [`iteration_callback`](user/api-reference.md#route-a-problem). ## Reproduce and compare -1. Start with a fixture that shows the symptom. Capture the same options at both revisions. For a behavior-preserving change, exact parity checks move sequences, effective ports, physical polygon hashes, scores, stage metadata, stable counters, and coverage. Add `--callbacks` and `--diagnostics` to both captures when changing callback or trace behavior. -2. For a policy change, check verified IDs, paths, and per-net costs first. Advance to the full corpus and relevant holdouts once the focused case behaves as intended. Use interleaved repeats for timing and name the boards that get slower. Time inside failed retries can explain a tail regression that the median obscures. -3. If the run gets slower without more expansions, check the operation timings and use the counters above to pick a narrower trace or profile. - -```sh -# Run this from the baseline checkout. -python -m scripts.routing_benchmark_parity capture /tmp/routing-before.json --case stress -# Run these from the changed checkout. -python -m scripts.routing_benchmark_parity capture /tmp/routing-after.json --case stress -python -m scripts.routing_benchmark_parity compare /tmp/routing-before.json /tmp/routing-after.json -``` - -Use capture scripts with the same snapshot schema on both revisions. Version 1 snapshots still compare with each other. Version 2 adds effective port and polygon data. - -Select a built-in trace case by name with `--scenario`. Use `--output-dir` to write the capture in a scratch directory. +1. Start with the same fixture and options in both revisions. Run the relevant [regression tests](benchmarks.md#run-a-benchmark). +2. For a change intended to preserve routes, compare the verified IDs, move sequences, effective ports, and physical geometry in the returned results. Include stage records, callbacks, or traces when the change touches them. +3. For a change to routing policy, compare verified IDs, paths, and per-net costs first. Then run the corpus and relevant holdouts. Use interleaved repeats for timing, and inspect operation timings when runtime changes without a corresponding change in expansions. ### Check timing and counters -- Run the isolated timing gates with `INIRE_RUN_PERFORMANCE=1 python -m pytest -q inire/tests/test_example_performance.py`. -- Record a snapshot with `python -m scripts.record_performance_baseline --output-dir /tmp/inire-baseline`. For the resulting coverage, timing, and counter summary, see the [example baseline](../archive/routing/performance.md). -- Compare a fresh run with `python -m scripts.diff_performance_baseline`. Use `--metric` to focus on specific work or `--baseline` to override the [default baseline JSON](../archive/routing/performance_baseline.json). +Run the timing gates with `INIRE_RUN_PERFORMANCE=1 python -m pytest -q inire/tests/test_example_performance.py`. Use the work counters above to investigate a slower case. diff --git a/docs/topological-routing.md b/docs/topological-routing.md index 3e505d5..6c15164 100644 --- a/docs/topological-routing.md +++ b/docs/topological-routing.md @@ -42,10 +42,25 @@ In an explicit guide or seed run, `run.topology.corridor_counts` shows how many Compare expansions and seeded IDs on offset gates at the same search budget. -- [Matched-budget command](benchmarks.md#compare-routing-modes) +- [Compare routing modes](benchmarks.md#compare-routing-modes) -### Benchmark fixtures and prior runs + + +### Benchmark fixtures - [Benchmark cases](benchmarks.md#choose-a-case) -- [Fixture sources and regeneration](benchmark-fixtures.md) -- [Probe and retry experiments](benchmark-results.md#near-port-probe-and-retry-experiments) +- [Fixture sources](benchmark-fixtures.md) + + + + + +### Near-port probe and retry experiments + +In the November 26, 2026 experiments, a two-iteration cap reduced public-default corpus expansions by 23% against the full probe budget. Verified paths and costs matched on the corpus and holdouts under `public-defaults` and `corpus-regression`. The splitter tree still verified all six nets with less work. The mixed port bank used more expansions because the last net moved to a larger retry. + +A one-iteration cap increased the cost of a crossing approach. The clipped-proxy case needed the full probe to find its cheaper route. The current two-iteration cap applies to the arc proxy. [Automatic stage sequence](architecture.md#automatic-routing) + +The pre-cap trials showed that failed early retries added work before fallback. Early incumbent recovery chose a higher-cost route at the same coverage on one holdout. In the public-default holdout sweep, the experimental `late-residual-3000` policy recovered the last net on two crossing boards and a return shelf while preserving the verified paths. It required room in the caller's budget and connected residual ports with those paths locked. When changing retry order, measure failed attempts as well as recoveries. + +The original probe tables are in `git show 2b02c6e:docs/topological-routing.md`. The earlier retry triggers, sweeps, and lane comparisons are in `git show ea5cfe7:docs/topological-routing.md`. diff --git a/examples/advanced.md b/examples/advanced.md index 37a3357..aa1a716 100644 --- a/examples/advanced.md +++ b/examples/advanced.md @@ -97,7 +97,7 @@ In `stress-crossings-shared-outside-detour`, a straight external waveguide joins Nine source ports feed routes around seven keepouts. Both variants use width 2, clearance 6, and bend radius 50. - [Lane assignment, turnaround, and refinement](../docs/complex-routing-example-1.md) -- [Fixture and waypoint export](../docs/benchmark-fixtures.md#complex-routing-example-1) +- [Benchmark fixture](../docs/benchmark-fixtures.md#complex-routing-example-1) ### Fixed eastbound headings diff --git a/examples/advanced_layouts.py b/examples/advanced_layouts.py index 0d7cc4c..5e935cd 100644 --- a/examples/advanced_layouts.py +++ b/examples/advanced_layouts.py @@ -23,6 +23,8 @@ from matplotlib import pyplot as plt # noqa: E402 from matplotlib.lines import Line2D # noqa: E402 if TYPE_CHECKING: + from collections.abc import Iterable + from matplotlib.axes import Axes from inire import RoutingRunResult @@ -108,6 +110,24 @@ def _plot_case(problem: RoutingProblem, options: RoutingOptions, run: RoutingRun plt.close(fig) +def render_layouts(layouts: dict, output_dir: Path, *, cases: Iterable[str] | None = None) -> int: + """Render selected gallery layouts and report whether all routes verified.""" + output_dir.mkdir(parents=True, exist_ok=True) + + all_verified = True + for name in dict.fromkeys(cases or layouts): + problem, options = build_problem(layouts[name]) + run = route(problem, options=options) + valid = sum(result.is_valid for result in run.results_by_net.values()) + print(f"{name}: {valid}/{len(problem.nets)} verified") + if valid != len(problem.nets): + all_verified = False + print(" " + ", ".join(f"{res.net_id}: {res.outcome}" for res in run.results_by_net.values() if not res.is_valid)) + _plot_case(problem, options, run, output_dir / f"example-{name}.png") + + return 0 if all_verified else 1 + + def main() -> int: layouts = loads(INPUTS.read_text(encoding="utf-8")) parser = ArgumentParser(description=__doc__) @@ -117,20 +137,7 @@ def main() -> int: ) parser.add_argument("--output-dir", type=Path, default=INPUTS.parent, help="Directory for the setup and result PNGs.") args = parser.parse_args() - args.output_dir.mkdir(parents=True, exist_ok=True) - - all_verified = True - for name in dict.fromkeys(args.case or layouts): - problem, options = build_problem(layouts[name]) - run = route(problem, options=options) - valid = sum(result.is_valid for result in run.results_by_net.values()) - print(f"{name}: {valid}/{len(problem.nets)} verified") - if valid != len(problem.nets): - all_verified = False - print(" " + ", ".join(f"{res.net_id}: {res.outcome}" for res in run.results_by_net.values() if not res.is_valid)) - _plot_case(problem, options, run, args.output_dir / f"example-{name}.png") - - return 0 if all_verified else 1 + return render_layouts(layouts, args.output_dir, cases=args.case) if __name__ == "__main__": diff --git a/inire/tests/data/README.md b/inire/tests/data/README.md new file mode 100644 index 0000000..cff5b88 --- /dev/null +++ b/inire/tests/data/README.md @@ -0,0 +1,8 @@ +# Imported routing fixtures + +[external_routing_benchmarks.json](external_routing_benchmarks.json) contains converted layouts from two upstream sources. The conversion crops layouts, cuts port openings into keepouts, and snaps ports to a 0.1 µm grid. Each case records its upstream archive member and any selected crop. + +| Cases | Pinned source | License | +| --- | --- | --- | +| Splitter tree, ring modulator, and MZM | [FLYR PIC Routing Benchmark](https://huggingface.co/datasets/FLYR/pic-benchmark/resolve/0c1f445792926d97fae01893c89e96b8a9393800/pic-benchmark.zip) | FLYR's bundled license specifies [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). | +| Toy layout and subsets of the Clements and MRR weight-bank layouts | [ScopeX@ASU LiDAR benchmarks](https://github.com/ScopeX-ASU/LiDAR/tree/4e7004d32b0b80d959553797fb30f0737513de0c/src/picroute/benchmarks) | [MIT](LiDAR-LICENSE.txt) | diff --git a/inire/tests/direct_routing_policies.py b/inire/tests/direct_routing_policies.py deleted file mode 100644 index 9d15d1d..0000000 --- a/inire/tests/direct_routing_policies.py +++ /dev/null @@ -1,111 +0,0 @@ -"""Direct routing policies available through the benchmark CLI.""" - -from __future__ import annotations - -from dataclasses import dataclass, replace -from functools import partial -from typing import TYPE_CHECKING - -from inire.router._routing_policy import ( - _alternate_locks, - _direct_trials, - _lattice_probe, - _plan_locks, - _prefer_connected_locks, - _route_residual, - _split_search_budget, - _trial, -) -from inire.router._stack import route_once -from inire.tests.routing_corpus import benchmark_weighted_length - -if TYPE_CHECKING: - from typing import Literal - - from shapely.geometry import Polygon - - from inire import RoutingOptions, RoutingProblem, RoutingRunResult, RoutingStage - from inire.router._routing_policy import LockPlan, RouteCall, Trial - - -@dataclass(frozen=True, slots=True) -class _DirectExperiment: - residual_mode: Literal["guide", "seed"] | None = None - check_connectivity: bool = False - reorder_disconnected: bool = False - split_budget: bool = False - probe: Literal["first", "after"] | None = None - retry_unresolved: bool = False - - -_LOOKAHEAD = _DirectExperiment(check_connectivity=True, reorder_disconnected=True) -# The two None entries use the shipped retry sequence. -_EXPERIMENTS = { - "direct-guide": _DirectExperiment(residual_mode="guide"), - "direct-seed": _DirectExperiment(residual_mode="seed"), - "direct-adaptive": _DirectExperiment(), - "direct-adaptive-retry": _DirectExperiment(retry_unresolved=True), - "direct-cull": _DirectExperiment(check_connectivity=True), - "direct-lookahead": _LOOKAHEAD, - "direct-budgeted-retry": _DirectExperiment(split_budget=True), - "direct-lookahead-retry": None, - "direct-probe-first": replace(_LOOKAHEAD, split_budget=True, probe="first"), - "direct-probe-near-port": None, - "direct-probe-after": replace(_LOOKAHEAD, split_budget=True, probe="after"), -} -DIRECT_POLICIES = tuple(_EXPERIMENTS) - - -def direct_trials( - problem: RoutingProblem, board: Polygon, options: RoutingOptions, strategy: str, *, run_route: RouteCall = route_once, -) -> list[Trial]: - experiment = _EXPERIMENTS[strategy] - summarize = partial(_trial, score=benchmark_weighted_length) - if experiment is None: - return _direct_trials(problem, board, options, strategy, check_trial=summarize, run_route=run_route) - - def check(run: RoutingRunResult, stage: RoutingStage) -> Trial: - return summarize(run, replace(stage, policy=strategy)) - - def run_residual(worker: RoutingOptions, locks: LockPlan) -> Trial: - return check(*_route_residual(problem, worker, locks, residual_mode=experiment.residual_mode, run_route=run_route)) - - plan = partial(_plan_locks, problem, board, options, check_connectivity=experiment.check_connectivity) - locks = plan() - if experiment.reorder_disconnected: - locks = _prefer_connected_locks(problem, board, options, locks) - - first_options = options - retry_options = options - retry_locks = None - probe_limit = 0 - if experiment.split_budget: - retry_locks = _alternate_locks(problem, board, options, locks, check_connectivity=experiment.check_connectivity) - if retry_locks is not None: - probe_limit = min(32, options.search.node_limit // 3) if experiment.probe else 0 - first_options, retry_options = _split_search_budget(options, probe_limit) - - trials = [] - if probe_limit and experiment.probe == "first": - trials.append(_lattice_probe(problem, options, probe_limit, run_route=run_route, check_trial=check)) - if len(trials[-1].valid_costs) == len(problem.nets): - return trials - - first = run_residual(first_options, locks) - trials.append(first) - if len(first.valid_costs) == len(problem.nets): - return trials - - if probe_limit and experiment.probe == "after": - trials.append(_lattice_probe(problem, options, probe_limit, run_route=run_route, check_trial=check)) - if len(trials[-1].valid_costs) == len(problem.nets): - return trials - - if experiment.retry_unresolved and 0 < len(locks.direct) < len(problem.nets): - unresolved = frozenset(first.run.results_by_net.keys() - first.valid_costs.keys()) - candidate = plan(priority=unresolved) - if candidate.direct.keys() != locks.direct.keys(): - retry_locks = candidate - if retry_locks is not None: - trials.append(run_residual(retry_options, retry_locks)) - return trials diff --git a/inire/tests/example_scenarios.py b/inire/tests/example_scenarios.py index 692dcd9..e4dd3b2 100644 --- a/inire/tests/example_scenarios.py +++ b/inire/tests/example_scenarios.py @@ -19,26 +19,19 @@ from inire import ( RoutingResult, RoutingRunResult, SearchOptions, - route, ) from inire.geometry.primitives import Port from inire.results import RouteMetrics, _sum_route_metrics from inire.router._stack import build_routing_stack, collect_worker_result -from inire.tests.routing_corpus import SNAPSHOT_CASES, profile_options -from inire.tests.terminal_bench_scenario import terminal_bench_options, terminal_bench_problem if TYPE_CHECKING: - from collections.abc import Collection, Iterable - from inire.router._astar_types import AStarMetrics from inire.router._router import PathFinder from inire.router.cost import CostEvaluator - from inire.tests.routing_benchmark_case import BenchmarkCase ScenarioOutcome = tuple[float, int, int, int] ScenarioRun = Callable[[], ScenarioOutcome] ScenarioSnapshotRun = Callable[[], "ScenarioSnapshot"] -TraceScenarioRun = Callable[[], RoutingRunResult] @dataclass(frozen=True, slots=True) @@ -167,12 +160,6 @@ def snapshot_example_05() -> ScenarioSnapshot: return _snapshot_worker("example_05_orientation_stress", _build_example_05_worker(DiagnosticsOptions())) -def trace_example_05() -> RoutingRunResult: - pathfinder = _build_example_05_worker(DiagnosticsOptions(capture_conflict_trace=True, capture_frontier_trace=True)) - results = pathfinder.route_all() - return collect_worker_result(pathfinder, results) - - def snapshot_example_06() -> ScenarioSnapshot: bounds = (-20, -20, 170, 170) obstacles = ( @@ -239,10 +226,6 @@ def snapshot_example_07_no_warm_start_seed43() -> ScenarioSnapshot: ) -def trace_example_07() -> RoutingRunResult: - return _trace_example_07_variant(warm_start_enabled=True) - - def trace_example_07_no_warm_start() -> RoutingRunResult: return _trace_example_07_variant(warm_start_enabled=False) @@ -426,19 +409,6 @@ def snapshot_example_09() -> ScenarioSnapshot: return _snapshot_worker("example_09_unroutable_best_effort", build_routing_stack(problem, options).finder) -def snapshot_terminal_bench_pr345() -> ScenarioSnapshot: - problem = terminal_bench_problem() - start = perf_counter() - run = route(problem, options=terminal_bench_options()) - return _make_snapshot("terminal_bench_pr345", run.results_by_net, perf_counter() - start, run.metrics) - - -def _snapshot_routing_benchmark(case: BenchmarkCase) -> ScenarioSnapshot: - start = perf_counter() - run = route(case.problem, options=profile_options(case, "fixture")) - return _make_snapshot(f"routing_benchmark_{case.name.replace('-', '_')}", run.results_by_net, perf_counter() - start, run.metrics) - - SCENARIO_SNAPSHOTS: tuple[tuple[str, ScenarioSnapshotRun], ...] = ( ("example_01_simple_route", snapshot_example_01), ("example_02_congestion_resolution", snapshot_example_02), @@ -472,45 +442,3 @@ EXPECTED_OUTCOMES = { "example_08_custom_bend_geometry": (2, 2, 2), "example_09_unroutable_best_effort": (1, 0, 0), } - -PERFORMANCE_SCENARIO_SNAPSHOTS: tuple[tuple[str, ScenarioSnapshotRun], ...] = ( - ("example_07_large_scale_routing_no_warm_start", snapshot_example_07_no_warm_start), - ("example_07_large_scale_routing_no_warm_start_seed43", snapshot_example_07_no_warm_start_seed43), - ("terminal_bench_pr345", snapshot_terminal_bench_pr345), - *( - (f"routing_benchmark_{case.name.replace('-', '_')}", partial(_snapshot_routing_benchmark, case)) - for case in SNAPSHOT_CASES - ), -) - -TRACE_SCENARIO_RUNS: tuple[tuple[str, TraceScenarioRun], ...] = ( - ("example_05_orientation_stress", trace_example_05), - ("example_07_large_scale_routing", trace_example_07), -) - -TRACE_PERFORMANCE_SCENARIO_RUNS: tuple[tuple[str, TraceScenarioRun], ...] = ( - ("example_07_large_scale_routing_no_warm_start", trace_example_07_no_warm_start), - ("example_07_large_scale_routing_no_warm_start_seed43", trace_example_07_no_warm_start_seed43), -) - - -def capture_scenario_snapshots( - selected_scenarios: Iterable[str] | None = None, - *, - include_performance_only: bool = False, - baseline_scenarios: Collection[str] = (), -) -> tuple[ScenarioSnapshot, ...]: - allowed = None if selected_scenarios is None else set(selected_scenarios) - if allowed is not None: - regular = dict(SCENARIO_SNAPSHOTS) - performance_only = dict(PERFORMANCE_SCENARIO_SNAPSHOTS) - unknown = allowed.difference(regular, performance_only, baseline_scenarios) - if unknown: - raise ValueError(f"Unknown performance scenario(s): {', '.join(sorted(unknown))}") - disabled = allowed.intersection(performance_only).difference(regular) - if disabled and not include_performance_only: - raise ValueError(f"Scenario(s) require --include-performance-only: {', '.join(sorted(disabled))}") - registry = SCENARIO_SNAPSHOTS - if include_performance_only: - registry += PERFORMANCE_SCENARIO_SNAPSHOTS - return tuple(capture() for name, capture in registry if allowed is None or name in allowed) diff --git a/inire/tests/routing_benchmark_case.py b/inire/tests/routing_benchmark_case.py index 52c5781..c8a3304 100644 --- a/inire/tests/routing_benchmark_case.py +++ b/inire/tests/routing_benchmark_case.py @@ -2,12 +2,10 @@ from __future__ import annotations -from contextlib import suppress from dataclasses import dataclass, replace from math import pi from typing import TYPE_CHECKING -from inire.router._bundle import ordered_bundle_terminal_headings from inire.tests.terminal_bench_scenario import LENGTH_COST, terminal_bench_options if TYPE_CHECKING: @@ -28,12 +26,6 @@ class BenchmarkCase: def routing_bound(self) -> int: return len(self.problem.nets) if self.expected_routed is None else self.expected_routed - def fixed_headings_problem(self) -> RoutingProblem: - if self.options.topology.infer_terminal_headings: - with suppress(ValueError): - return ordered_bundle_terminal_headings(self.problem) - return self.problem - def benchmark_options(bend_radius: float, sbend_radius: float | None = None) -> RoutingOptions: options = terminal_bench_options() diff --git a/inire/tests/routing_corpus.py b/inire/tests/routing_corpus.py index a31f1fa..080e6d5 100644 --- a/inire/tests/routing_corpus.py +++ b/inire/tests/routing_corpus.py @@ -2,12 +2,9 @@ from __future__ import annotations -from dataclasses import asdict, replace -from hashlib import sha256 +from dataclasses import replace from typing import TYPE_CHECKING -from shapely import to_wkb - from inire import RoutingOptions from inire.router.cost import build_native_cost_evaluator, weighted_path_length from inire.tests.retry_holdout_benchmarks import RETRY_HOLDOUT_CASES @@ -35,9 +32,6 @@ CORPUS_CASES = ( *BENCHMARK_CASES, *BROAD_CASES, *CROSSING_BENCHMARK_CASES, *STRESS_BENCHMARK_CASES, *CORNER_CASES, *COMPLEX_CASES, *SEARCH_CASES, *SCALING_CASES, ) -SNAPSHOT_CASES = tuple( - case for case in (*BENCHMARK_CASES, *FALLBACK_BENCHMARK_CASES, *EXTERNAL_BENCHMARK_CASES) if case.name != "terminal-bench" -) EXAMPLE_NAMES = { "terminal-bench": "complex-routing-example-1", "terminal-bench-point-terminals": "complex-routing-example-1-point-terminals", @@ -63,9 +57,7 @@ CASE_GROUPS = { "retry-holdout": RETRY_HOLDOUT_CASES, "corpus": CORPUS_CASES, } -PROFILES = ("matched-budget", "public-defaults", "corpus-regression") AUTOMATIC_COST_MODES = {"automatic": "selective", "automatic-span": "never", "automatic-weighted": "always"} -AUTOMATIC_POLICIES = tuple(AUTOMATIC_COST_MODES) def select_cases(groups: Iterable[str]) -> tuple[BenchmarkCase, ...]: @@ -95,7 +87,7 @@ def _public_defaults(case: BenchmarkCase, defaults: RoutingOptions) -> RoutingOp def profile_options(case: BenchmarkCase, profile: str) -> RoutingOptions: - """Resolve fixture geometry and the named budget before mode or CLI overrides.""" + """Resolve fixture geometry and the named budget.""" base = case.options if profile == "fixture": return base @@ -137,13 +129,6 @@ def benchmark_weighted_length(result: RoutingResult) -> float: return weighted_path_length(result.path, LENGTH_COST) -def route_placement(result: RoutingResult) -> dict: - return { - "effective_net": asdict(result.effective_net) if result.effective_net is not None else None, - "physical_polygon_hashes": [sha256(wkb).hexdigest() for wkb in to_wkb(result.locked_geometry, byte_order=1)], - } - - def native_verified_costs( case: BenchmarkCase, options: RoutingOptions, diff --git a/inire/tests/test_performance_reporting.py b/inire/tests/test_performance_reporting.py deleted file mode 100644 index 79049c5..0000000 --- a/inire/tests/test_performance_reporting.py +++ /dev/null @@ -1,187 +0,0 @@ -import json -import subprocess -import sys -from pathlib import Path - -import pytest - -from inire.tests import trace_recording -from scripts import record_frontier_trace, record_iteration_trace, record_pre_pair_frontier_trace - - -def test_performance_baseline_can_be_recorded_and_diffed_with_an_added_scenario(tmp_path: Path) -> None: - repo_root = Path(__file__).resolve().parents[2] - script_path = repo_root / "scripts" / "record_performance_baseline.py" - - subprocess.run( - [ - sys.executable, - str(script_path), - "--output-dir", - str(tmp_path), - "--scenario", - "example_01_simple_route", - ], - check=True, - ) - - payload = json.loads((tmp_path / "performance_baseline.json").read_text()) - assert payload["generated_on"] - assert payload["generator"] == "scripts/record_performance_baseline.py" - assert [entry["name"] for entry in payload["scenarios"]] == ["example_01_simple_route"] - assert (tmp_path / "performance.md").exists() - - retired = "example_retired" - baseline_path = tmp_path / "performance_baseline.json" - payload["scenarios"].append({**payload["scenarios"][0], "name": retired}) - baseline_path.write_text(json.dumps(payload)) - saved_files = {path: path.read_bytes() for path in tmp_path.iterdir()} - invalid = subprocess.run( - [sys.executable, str(script_path), "--output-dir", str(tmp_path), - "--scenario", "example_01_simple_route", "--scenario", "example_01_simple_rote"], - capture_output=True, text=True, check=False, - ) - assert invalid.returncode == 2 - assert "Unknown performance scenario(s): example_01_simple_rote" in invalid.stderr - assert {path: path.read_bytes() for path in tmp_path.iterdir()} == saved_files - - output = tmp_path / "diff.md" - log = tmp_path / "optimization.md" - subprocess.run( - [ - sys.executable, - str(repo_root / "scripts" / "diff_performance_baseline.py"), - "--baseline", - str(tmp_path / "performance_baseline.json"), - "--include-performance-only", - "--scenario", - "example_01_simple_route", - "--scenario", - "example_07_large_scale_routing_no_warm_start", - "--scenario", - retired, - "--metric", - "duration_s", - "--metric", - "nodes_expanded", - "--metric", - "visibility_corner_index_builds", - "--label", - "Step 0 - Baseline", - "--notes", - "Tooling smoke test.", - "--output", - str(output), - "--log", - str(log), - ], - check=True, - ) - - report = output.read_text() - assert "| example_01_simple_route | duration_s |" in report - assert "| example_01_simple_route | visibility_corner_index_builds |" in report - assert "| example_07_large_scale_routing_no_warm_start | duration_s | - |" in report - assert "| example_07_large_scale_routing_no_warm_start | nodes_expanded | - |" in report - assert f"| {retired} | missing | - | - | - |" in report - entry = log.read_text() - assert "Step 0 - Baseline" in entry - assert "Tooling smoke test." in entry - assert report.rstrip() in entry - - -def test_record_conflict_trace_script_writes_both_selected_scenarios(tmp_path: Path) -> None: - repo_root = Path(__file__).resolve().parents[2] - script_path = repo_root / "scripts" / "record_conflict_trace.py" - regular = "example_05_orientation_stress" - performance = trace_recording.NO_WARM_START_SCENARIOS[0] - - subprocess.run( - [ - sys.executable, - str(script_path), - "--output-dir", - str(tmp_path), - "--scenario", - regular, - "--scenario", - performance, - ], - check=True, - ) - - payload = json.loads((tmp_path / "conflict_trace.json").read_text()) - assert payload["generated_at"] - assert payload["generator"] == "scripts/record_conflict_trace.py" - assert [entry["name"] for entry in payload["scenarios"]] == [regular, performance] - markdown = (tmp_path / "conflict_trace.md").read_text() - assert markdown.startswith("# Conflict Trace\n") - for entry in payload["scenarios"]: - assert entry["conflict_trace"] - assert f"## {entry['name']}" in markdown - - -@pytest.mark.parametrize( - ("report", "generate", "heading"), - [ - ("frontier_trace", record_frontier_trace.main, "# Frontier Trace"), - ("iteration_trace", record_iteration_trace.main, "# Iteration Trace"), - ("pre_pair_frontier_trace", record_pre_pair_frontier_trace.main, "# Pre-Pair Frontier Trace"), - ], - ids=["frontier", "iteration", "pre-pair-frontier"], -) -def test_record_trace_reports_support_a_performance_only_scenario( - report, generate, heading, tmp_path, monkeypatch, example_07_no_warm_start_trace, -) -> None: - name = trace_recording.NO_WARM_START_SCENARIOS[0] - registry = dict(trace_recording.TRACE_PERFORMANCE_SCENARIO_RUNS) - assert name in registry - registry[name] = lambda: example_07_no_warm_start_trace - monkeypatch.setattr(trace_recording, "TRACE_PERFORMANCE_SCENARIO_RUNS", tuple(registry.items())) - monkeypatch.setattr(sys, "argv", [f"record_{report}", "--output-dir", str(tmp_path), "--scenario", name]) - - generate() - - payload = json.loads((tmp_path / f"{report}.json").read_text()) - assert payload["generated_at"] - assert payload["generator"] == f"scripts/record_{report}.py" - [scenario] = payload["scenarios"] - assert scenario["name"] == name - if report == "frontier_trace": - # The final layout has no unresolved conflicts to replay. - assert scenario[report] == [] - else: - assert scenario[report] - markdown = (tmp_path / f"{report}.md").read_text() - assert markdown.startswith(heading + "\n") - assert f"## {name}" in markdown - - -def test_characterize_pair_local_search_script_writes_outputs(tmp_path: Path) -> None: - repo_root = Path(__file__).resolve().parents[2] - script_path = repo_root / "scripts" / "characterize_pair_local_search.py" - - subprocess.run( - [ - sys.executable, - str(script_path), - "--output-dir", - str(tmp_path), - "--num-nets", - "6", - "--seeds", - "41", - "--repeats", - "1", - ], - check=True, - ) - - payload = json.loads((tmp_path / "pair_local_characterization.json").read_text()) - assert payload["generated_at"] - assert payload["generator"] == "scripts/characterize_pair_local_search.py" - assert payload["grid"]["num_nets"] == [6] - assert payload["grid"]["seeds"] == [41] - assert payload["grid"]["repeats"] == 1 - assert len(payload["cases"]) == 1 - assert (tmp_path / "pair_local_characterization.md").exists() diff --git a/inire/tests/test_routing_benchmark_parity.py b/inire/tests/test_routing_benchmark_parity.py deleted file mode 100644 index 8ce1506..0000000 --- a/inire/tests/test_routing_benchmark_parity.py +++ /dev/null @@ -1,54 +0,0 @@ -import json -import sys -from dataclasses import replace - -from inire import NetSpec, Port, RoutingOptions, RoutingProblem -from inire.tests.routing_benchmark_case import BenchmarkCase -from inire.tests.routing_corpus import CASE_GROUPS -from scripts.routing_benchmark_parity import main - - -def test_parity_command_reports_the_first_net_difference(tmp_path, monkeypatch, capsys) -> None: - net = NetSpec("lane", Port(10, 20, 0), Port(90, 20, 0)) - problem = RoutingProblem((0, 0, 100, 60), (net,)) - case = BenchmarkCase("placement-control", "Straight lane", problem, RoutingOptions()) - monkeypatch.setitem(CASE_GROUPS, case.name, (case,)) - before = tmp_path / "before.json" - after = tmp_path / "after.json" - capture_settings = ["--case", case.name, "--profile", "corpus-regression", "--callbacks"] - compare = ["parity", "compare", str(before), str(after)] - monkeypatch.setattr(sys, "argv", ["parity", "capture", str(before), *capture_settings]) - assert main() == 0 - payload = json.loads(before.read_text()) - ordinary, with_callback = payload["runs"] - assert ordinary["stable"]["callbacks"] == [] - assert with_callback["stable"]["callbacks"] - assert "native" in ordinary["stable"]["costs"][net.net_id] - original = ordinary["stable"]["nets"][net.net_id] - assert with_callback["stable"]["callbacks"][0]["nets"][net.net_id] == original - - ordinary["elapsed_s"] += 5 - after.write_text(json.dumps(payload)) - monkeypatch.setattr(sys, "argv", compare) - assert main() == 0 - assert "2 runs match." in capsys.readouterr().out - - original["seed"][0]["kind"] = "DifferentMove" - after.write_text(json.dumps(payload)) - assert main() == 1 - message = capsys.readouterr().out - assert "placement-control / corpus-regression" in message - assert "nets.lane.seed[0].kind" in message - - moved = replace(net, start=net.start.translate(dy=20), target=net.target.translate(dy=20)) - monkeypatch.setitem(CASE_GROUPS, case.name, (replace(case, problem=replace(problem, nets=(moved,))),)) - monkeypatch.setattr(sys, "argv", ["parity", "capture", str(after), *capture_settings]) - assert main() == 0 - original = json.loads(before.read_text())["runs"][0]["stable"]["nets"][net.net_id] - shifted = json.loads(after.read_text())["runs"][0]["stable"]["nets"][net.net_id] - assert original["seed"] == shifted["seed"] - assert original["report"] == shifted["report"] - assert original["physical_polygon_hashes"] != shifted["physical_polygon_hashes"] - monkeypatch.setattr(sys, "argv", compare) - assert main() == 1 - assert "nets.lane.effective_net.start.y" in capsys.readouterr().out diff --git a/inire/tests/trace_recording.py b/inire/tests/trace_recording.py deleted file mode 100644 index 6b7483a..0000000 --- a/inire/tests/trace_recording.py +++ /dev/null @@ -1,79 +0,0 @@ -"""Shared scenario selection and artifact writing for the trace scripts.""" - -from __future__ import annotations - -from argparse import ArgumentParser -from dataclasses import asdict -from datetime import datetime -from json import dumps -from pathlib import Path -from typing import TYPE_CHECKING - -from inire.tests.example_scenarios import TRACE_PERFORMANCE_SCENARIO_RUNS, TRACE_SCENARIO_RUNS - -if TYPE_CHECKING: - from collections.abc import Callable - - from inire.results import RoutingRunResult - - -NO_WARM_START_SCENARIOS = ( - "example_07_large_scale_routing_no_warm_start", - "example_07_large_scale_routing_no_warm_start_seed43", -) - - -def result_summary(run: RoutingRunResult) -> dict[str, object]: - results = run.results_by_net.values() - return { - "total_results": len(results), - "valid_results": sum(result.is_valid for result in results), - "reached_targets": sum(result.reached_target for result in results), - } - - -def record_trace( - source: str, - name: str, - *, - scenario_label: str, - default_scenarios: tuple[str, ...], - scenario_payload: Callable[[RoutingRunResult], dict[str, object]], - render_markdown: Callable[[dict[str, object]], str], -) -> None: - parser = ArgumentParser(description=f"Record {name.replace('_', '-')} artifacts for selected trace scenarios.") - parser.add_argument("--scenario", action="append", help="Trace scenario name. Repeat to select multiple scenarios.") - parser.add_argument("--output-dir", type=Path, help=f"Directory for {name}.json and {name}.md. Defaults to /archive/routing.") - args = parser.parse_args() - - registry = dict(TRACE_SCENARIO_RUNS + TRACE_PERFORMANCE_SCENARIO_RUNS) - selected = args.scenario or default_scenarios - for scenario in selected: - if scenario not in registry: - valid = ", ".join(sorted(registry)) - raise SystemExit(f"Unknown {scenario_label} scenario: {scenario}. Valid scenarios: {valid}") - - source_path = Path(source).resolve() - repo_root = source_path.parents[1] - output_dir = repo_root / "archive" / "routing" if args.output_dir is None else args.output_dir.resolve() - output_dir.mkdir(parents=True, exist_ok=True) - scenarios = [] - for scenario in selected: - run = registry[scenario]() - scenarios.append({ - "name": scenario, - "summary": result_summary(run), - "metrics": asdict(run.metrics), - **scenario_payload(run), - }) - payload = { - "generated_at": datetime.now().astimezone().isoformat(timespec="seconds"), - "generator": f"scripts/{source_path.name}", - "scenarios": scenarios, - } - json_path = output_dir / f"{name}.json" - markdown_path = output_dir / f"{name}.md" - json_path.write_text(dumps(payload, indent=2, sort_keys=True) + "\n") - markdown_path.write_text(render_markdown(payload) + "\n") - for path in (json_path, markdown_path): - print(f"Wrote {path.relative_to(repo_root) if path.is_relative_to(repo_root) else path}") diff --git a/plans/documentation-improvements.md b/plans/documentation-improvements.md deleted file mode 100644 index 11c7538..0000000 --- a/plans/documentation-improvements.md +++ /dev/null @@ -1,48 +0,0 @@ -# Documentation editing plan - -Treat familiarity with Python and layout geometry as the starting point for users. Contributors also know how to call Inire and read a result. Explain Inire-specific inputs and decisions where they first affect a task. - -## Reader knowledge by section - -Use these notes during edits. When a heading has inbound links, check the starting knowledge for a reader who opens that heading directly. Name any earlier example whose variables or setup it uses. - -| Page or section | Starting knowledge | New information or action | -| --- | --- | --- | -| README quick start | Python and two port coordinates | Install, route one net, recognize success | -| User and developer guide indexes | The task at hand | Pick the right reference, workflow, example, or check | -| Layout guide / Define the inputs | Ports, widths, and keepouts in an existing layout | Integer port positions, travel headings, and concrete Inire inputs | -| Layout guide / Route between placed crossings | How to describe a net and a keepout | Transform the device ports and leave room for the route to reach them | -| Layout guide / Save a placement recipe | How to obtain a routing result | Keep the resolved net, moves, geometry settings, and coordinate unit | -| Layout guide / Reuse an existing route | A verified result or imported polygons | Choose movable seeds or fixed geometry and replay with the resolved net | -| Troubleshooting / Read the result | A run and a net ID | Interpret the outcome and find the next check | -| Troubleshooting / Why a net stopped short | An unresolved route | Check the capacity bound, turn room, and search budget | -| Troubleshooting / Modes and settings | The observed symptom or desired route behavior | Choose a mode or change one setting and compare results | -| Benchmark fixtures / Fabrication regression cases | A routing or placement change | Find the process dimensions and related layout tests | -| API / Call and inputs | The public call or input type to look up | Signatures, units, accepted values, and callback behavior | -| API / Seeds and results | A proposed move sequence or a returned run | Replay requirements and the fields to inspect | -| API / Options | The setting to change | Its default, effect, and range | -| Architecture / Automatic routing | An Inire run and its outcome | Coverage target, candidate order, fallback, and stopping rules | -| Architecture / Detailed search and congestion | What the worker is being asked to route | Move proposals, pruning, installed-path checks, and pair repair | -| Architecture / Geometry and refinement | A seed or a candidate path | How physical polygons are checked and when a detour is accepted | -| Architecture / Validate a change | The affected subsystem | The relevant entry point and local check | -| Walkthrough / Load the board | Ports and keepouts | See how track capacity sets the target | -| Walkthrough / Assign lanes | The initial board and target | Read waypoint lanes and see where the first plan ends | -| Walkthrough / Turnaround | The westbound initial arrival | See what moves to make the arrival eastbound | -| Walkthrough / Verify and refine | A candidate seed set | Compare installed polygons and the refined route | -| Walkthrough / Inspect the result | The verified layout | Find the selected stage and search effort | -| Walkthrough / Compare modes and guide search | The observed automatic run | Compare all modes and read an actual mesh and partial path | -| Topological routing / Corridor planning | Guide or seed mode and the layout | Space, triangle crossings, lanes, and physical path realization | -| Topological routing / Diagnose and reproduce | An unresolved route or a comparison to repeat | Interpret corridor evidence and find the benchmark scenario | -| Diagnostics / Reports and metrics | A change in coverage, route, or time | Locate the stage and pick the counters to compare | -| Diagnostics / Traces and comparison | A run or change to investigate | Collect the right trace and read its geometry or parity output | -| Benchmarks / Cases and profiles | A behavior to measure | Choose a workload, budget, and comparison command | -| Benchmark fixtures and results | The selected workload or policy change | Find provenance, reproduce input, or interpret prior measurements | -| Examples and gallery | A routing task or feature to try | Choose a runnable case and identify what its figure demonstrates | - -## Editing and review - -- Start with the layout guide, architecture, and complex-routing walkthrough. Apply the same reader check to the remaining active pages. -- Use prose for reasoning, steps for procedures, tables for lookups, and short link lists for navigation and code entry points. Link terms directly when it helps readers identify what they can open. -- Read each section for repeated context, unexplained terms, and text that duplicates a nearby example or caption. Keep figures that reveal intermediate geometry. -- Walk through layout setup, partial-route diagnosis, placement, and a developer change. Run edited examples and confirm their stated results. -- Check local links and images, preserve existing anchors, and keep every active page within two links of the user or developer guide. Archive and planning pages are exempt. diff --git a/plans/full-project-review.md b/plans/full-project-review.md deleted file mode 100644 index c0d1fc9..0000000 --- a/plans/full-project-review.md +++ /dev/null @@ -1,319 +0,0 @@ -# Full project review and follow-up plan - -Review baseline `3d7fc3a`. This pass covers public inputs and seed replay, physical geometry and collision checks, lattice and corridor routing, automatic planner selection, congestion and refinement, diagnostics, examples, and local developer checks. The earlier review fixes are in the baseline. See the [routing simplification plan](routing-simplification.md) for the prior prototypes and their parity requirements. - -The full local run passed 592 tests with `INIRE_RUN_PERFORMANCE=1` on Python 3.13.18, Shapely 2.1.2, and GEOS 3.13.1. Ruff passed. Public defaults matched the prior verified net IDs on all 67 boards, for 433 verified nets. The three focused triangulation capability tests passed, and all seven complex-routing walkthrough figures regenerated byte for byte. All 15 active Markdown pages are within two links of the user or developer guide, and local file links resolve. [Developer checks](../docs/development.md#check-a-change) · [Walkthrough](../docs/complex-routing-example-1.md) - -The follow-up pass independently verified every nonempty returned path on the 67 corpus boards under a 35-node, single-iteration automatic profile with warm start and refinement disabled. The resulting geometry reports matched the public results in that profile. Hatchling built the wheel and source distribution locally. The extracted wheel routed a public-API smoke case outside the checkout, and the unpacked source archive built a wheel and ran complex-routing example 1 to 9/9 with the benchmark CLI. All nine numbered examples ran from both the project directory and a clean export, producing nine images each time. [Automatic residual routing](../inire/router/_routing_policy.py#L211) · [Build configuration](../pyproject.toml#L39) - -Project-directory compatibility checks with Shapely 2.0.0 and 2.0.7 confirmed the automatic lattice fallback on Shapely versions without triangulation, 9/9 coverage in complex-routing example 1, and the documented restrictions on active guide and seed searches. The Shapely 2.0.0 run used Python 3.11.11, GEOS 3.11.1, and NumPy 1.26.4. A 192-layout primitive matrix passed 768 seed verifications on each of three Shapely versions and 768 active searches on Shapely 2.1.2 and 384 each on 2.0.0 and 2.0.7. An independent rectangular geometry check agreed with all 1,728 route reports and the associated final conflict traces on each version. [Mode and dependency behavior](../docs/complex-routing-example-1.md#compare-all-routing-modes) - -On Python 3.14.10 with the local Shapely build against GEOS 3.15.0, the full suite passed 581 tests and skipped the 11 opt-in performance checks. A fresh source archive built a wheel whose 39 production modules all matched the reviewed checkout. The extracted wheel routed a public smoke case on Python 3.13 and 3.14 from outside the checkout. [Local verification](../docs/development.md#check-a-change) · [Build configuration](../pyproject.toml#L39) - -The six imported layouts regenerated byte for byte from the pinned upstream archives. The documented placed-device route survived a WKT export and readback as a connected polygon, and the locked-route example completed a second route around the exported geometry. A 72-call concurrent smoke test reproduced the sequential geometry of 36 simple layouts. A further 96 seed replays used rotated and translated serial-gate layouts. Their geometry reports were consistent under those transforms, and the erased collision diagnostics in one layout reduced to the crossing in item 30. Additional probes used nanometer-scale bends and keepouts, narrow apertures, seed reuse after heading inference, partial incumbent reuse, and dependency combinations outside the lockfile. [Fixture importer](../docs/benchmark-fixtures.md#regenerate-the-converted-inputs) · [Placed-device and export workflow](../docs/user/route-a-layout.md#route-between-placed-crossings) - -Three fresh processes with different Python hash seeds produced identical per-net outcomes, move sequences, polygon WKB hashes, reports, selected stages, and work counters across 82 runs. These covered all 67 corpus boards in bounded automatic mode and five boards in lattice, guide, and seed modes with a fixed net-shuffle seed. [Benchmark options](../inire/tests/routing_corpus.py) - -The independent fabrication pass used three openEBL 2025-02 submissions. KLayout 0.30.12 extracted the silicon polygons, port markers, and authored waveguide waypoints on the submissions' 1 nm grid. A fresh automatic search verified 9/18 links in the Raymond MZI array, 27/36 in the CROW MZI, and 2/4 in the contra-directional coupler with a 225-node limit per attempt. Each link was attempted separately, retaining neighboring authored silicon and opening its two intentional port joins in the keepouts. All 58 links verified when replayed from their authored waypoints with 5 µm circular bends. Reversing the search recovered the other nine CROW links, and lattice attempts with a 1,200-node limit completed the other two layouts. After replacing all 58 links across the three layouts and writing OASIS at 1 nm, the pinned EBeam deck reported exactly the same markers as the originals. The Raymond original, an export-only control, and the modified version all gave zero markers. These are checks against the published deck and the selected optical routes. [Pinned fabrication submissions](https://github.com/SiEPIC/openEBL-2025-02/tree/a887476a301db2a014be007717cd1821e111f58e/submissions) · [Pinned EBeam deck](https://github.com/SiEPIC/SiEPIC_EBeam_PDK/blob/363fbb52eefa8669100499ab531d3fe7befc4867/klayout/EBeam/drc/SiEPIC_EBeam.drc) - -On the independent 5-by-3 mm CPW chip, KLayout confirmed that the published etch layer removes a 5 µm section from the feedline conductor. Routing the two conductor sections as separate connections and reconstructing their 6 µm gaps returned the same effective metal across the full chip after OASIS write and read at 1 nm. Routing one connection with the coupling mask omitted produced a continuous conductor across the intended break. [Published CPW chip and layout source](https://github.com/paulggin/klayout-cpw-design/tree/a38dc34cf6785ba0af41b27f43b6137fd2b69cc7) - -## Implementation order - -Implemented items 1, 2, and 17 cover missing joins, extra line or point contact on the join plane, custom port-face widths, and outer-edge arc accuracy. The focused geometry, API, collision, and refinement run passed 287 tests. - -Implemented items 3, 6, and 21 retain constructive planning for unused custom outlines, reject unsupported search and congestion settings, and match custom S-bend widths consistently in search and replay. - -Implemented items 11, 13, and 30 preserve replay diagnostics across all four modes, report the segment of a width-incompatible seed, skip proximity work in geometry-only runs, and use explicit refinement weights for automatic refinement selection. - -Implemented items 25 and 36 use cardinal heading vectors and consistent length units in the lattice and corridor heuristics. Partial results track geometric progress even with zero heuristic weight, and a high legal move cost no longer acts as a collision sentinel. - -Implemented items 7, 8, 9, and 10 cover endpoint-aware corner visibility with a local fallback, hole-aware plots, indexed terminal-bank checks, and removal of unused private A* node fields. The 4,000-net capacity probe took about 0.11 s for a clear bank and 0.04 s for a densely overlapping bank. - -Implemented items 23 and 38 expose optional same-net spacing and reject edge and vertex shorts between different nets at zero clearance, including automatic reservations. Hard corridor congestion now uses exact physical spacing with exact-fit and diagonal controls. - -Implemented items 4, 5, 12, 15, 16, 18, 20, 24, 26, 27, 28, 32, 37, and 41 cover straight and turn recovery, width-specific corridors, search deadlines, partial hints, inferred headings, terminal diagnostics, and bounded guidance retries. The saved CROW fixtures reproduce all nine physical inputs on their authored grid. Each routes in its authored direction at the 225-node limit. - -Implemented items 14 and 22 exclude repository tests from the wheel and workspace metadata from the source archive. The source archive rebuilt a wheel and verified 9/9 nets on complex-routing example 1. The extracted wheel routed and verified an export outside the checkout with warnings treated as errors on Python 3.11 with Shapely 2.0.7 and NumPy 1.26.4 and 2.2.6. The current Python 3.13 environment also passed. - -Implemented items 19 and 29 bound proximity sampling and move-cache memory. The 8,000-expansion blocked-board probe retained 8,192 absolute move entries and used about 418 MiB peak RSS. The review baseline retained 111,086 entries and used about 648 MiB. - -Implemented items 31, 33, 34, 35, 39, and 40 add authored bend lengths, physical CPW envelopes, process-profile routing, placed-port width checks, rounded export verification, and layer grouping. The local tests use the reviewed widths, radii, pitches, and export grid controls. - -### Implementation verification - -- The full suite passed 746 tests with `INIRE_RUN_PERFORMANCE=1`. Ruff passed for the package, scripts, and examples. -- Both corpus profiles retained the same verified net IDs on all 67 boards, for 433 verified nets per profile. On the matched-budget profile, total search work fell from 27,160 to 26,559 expansions. The splitter tree retained its 6/6 coverage at the original 500-node per-search limit and used 8,957 total expansions, up from 6,298. The combined benchmark-weighted cost fell by about 0.16% across matching net sets. -- The no-warm-start fan-out canary retains its verified coverage and work guardrails. Its example sets `distance_heuristic_weight=10.0` to preserve its intended search priority with a length price of `0.1`. The option scales the heuristic distance term in the chosen cost units. It leaves the applied route objective and the default weight of `1.0` unchanged. -- KLayout read back the rounded bend controls as separate conductors. The pinned EBeam deck produced eight spacing markers for the 1 nm export of the near-limit pair and zero for the 0.01 nm export of the same pair. The 3,072 nm outer-radius control passed Inire's geometric check with 71.03 nm separation at 1 nm resolution and still received four markers from the deck. -- All nine replacement CROW routes passed the 1 nm export check. The assembled OASIS file, the export-only control, and the original layout had the same ten EBeam spacing markers at the same locations. -- All 16 active documentation pages are at most two links from the user or developer guide. All local file links resolve. Six complex-routing walkthrough images regenerated byte for byte. The routing-mode comparison, placed-crossing illustration, and partial-route illustration reflect the current search and geometry. - -| Batch | Work | Acceptance gate | -| --- | --- | --- | -| Physical verification | 1, 2, 17, 23, and 38 | Reject the faulty geometry and keep legal joins valid in search and seed replay. Check circular bend accuracy, folded-route spacing, and isolation between different nets. | -| Routing coverage and selection | 3, 4, 5, 11, 15, 16, 18, 24, 25, 27, 28, 32, 36, and 41 | Recover each reported route at its existing budget, and apply objective units consistently. Reach the required bound on every corpus board. | -| Input, replay, and diagnostic accuracy | 6, 7, 8, 20, 21, 26, 30, and 37 | Diagnose invalid settings and impossible terminals early, preserve useful visibility on large layouts, render the actual free space, and replay the intended physical geometry. | -| Performance and cleanup | 9, 10, 12, 13, 19, and 29 | Compare runtimes and memory where the workload changes, and keep the best verified result if a worker times out. Require exact routing and trace parity for the private-state cleanup. | -| Release packaging | 14 and 22 | Build and smoke-test the runtime wheel independently of the checkout. Keep the source archive usable for development and verify the supported dependency combinations. | -| Fabrication workflow | 31, 33, 34, 35, 39, and 40 | Compare process-specific geometry and authored optical lengths before and after routing and export. Check port matching, the RF cross-section, per-net bend rules, export-grid clearance, and layer assignment. | - -## 1. Detect extra contact on the join plane — High - -Two adjacent custom S-bends can share their centered two-unit port face and another two-unit edge ten units away. The route verifies with zero self-collisions because both intersections lie on the same plane. The extra edge connects separated parts of the route. [Adjacent-component verification](../inire/geometry/component_overlap.py#L48) - -Reproduce on bounds `(0, 0, 220, 120)` at zero clearance. Route from `(20, 30, 0)` to `(180, 30, 0)` using `SBendSeed(40, 50)` and `SBendSeed(-40, 50)` with width 2. Give both outlines their standard local endpoints. The base outline is the strip formed by adding and subtracting one from each y coordinate of `[(0, 0), (20, offset / 10), (50, 3 * offset / 4), (80, offset)]`. Union the positive outline with `box(70, 36, 74, 51)` and `box(73, 49, 80, 51)`. Union the negative outline with `box(6, -3, 8, 11)` and `box(0, 9, 7, 11)`. Seed-only verification reports two shared edges on `x = 100`, spanning `y = 69..71` and `y = 79..81`. - -Determine the connected, centered face shared by the two components and confine the join tolerance to that face. Reuse the predicate in verification, A* ancestor checks, and refinement. Check the off-center edge and a point contact away from the face, ordinary straight and bend joins, and rotated custom joins that differ by rounding. [A* and refinement callers](../inire/router/refiner.py#L69) - -## 2. Validate port-face width on custom bends — Medium - -`SBendOutline(40, 50, 2, polygon)` accepts both terminals with faces only 0.02 units wide. Use the strip in item 1 with `offset=40` and a half-width of `0.01`. A route from `(10, 10, 0)` to `(110, 50, 0)` with a 10-unit width-2 straight on each side verifies with two abrupt width changes. The current check validates the face position, orientation, and finite extent. [Outline validation](../inire/model.py#L52) · [Port-face predicate](../inire/geometry/components.py#L33) - -The same check affects custom 90-degree bends, where one configured polygon can apply to nets of different widths. Set `bend_radii=(10,)` and `bend_physical_geometry=box(0, -11, 11, -9).union(box(9, -11, 11, 0))`. On an empty 100-by-100 board at zero clearance, verify a net from `(10, 20, 0)` to `(30, 40, 90)` with `StraightSeed(10)`, `Bend90Seed(10, "CCW")`, and `StraightSeed(10)`. Lattice and automatic modes both report completion at widths 2 and 4. At width 4 the exported straight faces span 4 units and the bend faces span 2 units. [Custom quarter-turn geometry](../inire/geometry/components.py#L406) - -Check the centered connected span against the declared width for S-bend outlines and the routed net width for custom quarter turns. Interior sections can still vary in width. Compare the face extent within a geometric tolerance so multiple collinear edges can form a single face. Reject the 0.02-unit S-bend outline and accept an asymmetric outline with full-width terminal faces. Verify the width-2 quarter turn and diagnose the width-4 mismatch in both search and seed replay. Describe how a custom quarter-turn template applies on mixed-width boards. [Custom geometry API](../docs/user/api-reference.md#searchoptions) - -## 3. Keep automatic planning available with unused outlines — Medium - -Complex-routing example 1 uses width-2 nets. Adding a single `SBendOutline(40, 50, 3, polygon)` dropped automatic coverage from 9/9 to 0/9 with a 100-node limit, one congestion iteration, warm start off, and refinement off. The width-3 outline matches no net. Automatic switches to lattice routing when the outline list is nonempty, and explicit bundle has the same unconditional restriction. [Automatic dispatch](../inire/router/_automatic.py#L603) · [Bundle checks](../inire/router/_bundle.py#L213) - -Check whether any registered outline applies to a net before changing planner availability. Share the applicability rule between automatic and bundle. Keep the lattice fallback when an outline applies. With an unused width, require the fixed-heading example's 9/9 result and verify that the point-terminal bundle still runs. With a matching outline, verify the exported polygon and preserve the documented bundle error. [Mode comparison and fixture](../docs/complex-routing-example-1.md#compare-all-routing-modes) - -## 4. Recover legal straight moves after a bend — Medium - -On bounds `(38, 18, 54, 62)`, use start `(40, 20, 0)`, target `(40, 60, 180)`, width 2, clearance 2, and keepout `box(52.85, 25, 54, 27.2)`. Use radius-10 quarter turns, disable S-bends and warm start, and run lattice search for one iteration with a 200-node limit. Search stops after the first bend. The seed `CCW(10), straight(20), CCW(10)` verifies. An in-memory probe enabling the flat-ended footprint check at the intermediate port reached the target in five expansions. [Straight-move proposal](../inire/router/_astar_moves.py#L217) · [Flat-ended scan](../inire/geometry/collision.py#L729) - -Preserve the conservative ray for ordinary move proposals. Recover a candidate when the ray blocks an otherwise legal straight at a component output. Try a deferred check if adding the exact scan to the main frontier changes bounded search order. Check all four rotations, an obstacle that genuinely blocks the next straight, and the splitter-tree benchmark, which is sensitive to changes in straight proposals. - -## 5. Recover narrower passages when the shared mesh finds a different corridor — Medium - -The width-specific retry covers nets with no shared corridor. If the shared mesh supplies a different corridor, the narrower net can still lose a usable passage. On an 800-by-600 board, place a keepout at `box(300, 50, 480, 350)`. The width-2 net runs east from `(60, 110, 0)` to `(740, 110, 0)` at clearance 6. Add an unrelated width-100 straight from `(100, 500, 0)` to `(150, 500, 0)`. With seed mode, radius 20, S-bends and warm start off, one iteration, and 500 nodes, the detour changes from completed with two corridors to partial with one corridor. The shared inset closes the lower opening. [Width-specific corridor fallback](../inire/router/_topology.py#L432) - -Prototype a width-specific retry after the shared corridors fail to realize a route, or include an alternative through a passage absent from the shared mesh. Keep the shared lane assignment and the per-net expansion allowance intact. Require the width-2 route to complete with or without the unrelated wide net at the same budget. Check mixed-width portal contention and the existing shared-lane cases for coverage and cost changes. - -## 6. Validate search and congestion settings at construction — Medium - -`SearchOptions(node_limit=float('nan'))` is accepted and bypasses the normal expansion-limit comparison. `CongestionOptions(max_iterations=1.5)` is accepted and raises `TypeError` inside `range()` during routing. A misspelled `net_order='longesst'` silently selects shortest-first ordering. [Search and congestion options](../inire/model.py#L66) · [Expansion ceiling](../inire/router/_search.py#L74) · [Net ordering](../inire/router/_congestion_policy.py#L16) - -`NetSpec` also accepts integer IDs even though the API type is `str`. On a 100-by-40 empty board with one width-2 net from `(5, 20, 0)` to `(90, 20, 0)`, replay `StraightSeed(85)` at zero search nodes and use integer ID `7`. Verification reports one dynamic conflict against the path itself because it queries the index with a string ID. Two overlapping paths with IDs `7` and `"7"` raise `TypeError` while comparing peers. Enforce string IDs at construction, or normalize IDs before uniqueness checks and seed-map validation. [Net model](../inire/model.py#L24) · [Verification index lookup](../inire/geometry/collision.py#L661) - -Validate nonnegative integer budgets and enumerate allowed order names at construction. Keep zero-budget verification behavior and support the documented defaults. In the same change, decide and document which numerical objective and penalty values are supported. Reject nonfinite values before scoring or iteration. Test zero, valid positive values, rejected values, and identifiers loaded from serialized layouts through the public constructors. - -## 7. Make exact-corner visibility useful on real corner states — Medium - -With clearance zero, put two keepouts at `box(10, 20, 20, 30)` and `box(-10, 10, 0, 15)`. The segment from `(10, 20)` to `(0, 15)` touches the two keepouts only at its endpoints. The visibility ray returns reach zero because it counts the source corner itself as a hit. The exact-corner query returns no visible corner. In a separate probe with 200 indexed corners, adding one distant rectangle dropped the same local query from five visible corners to zero. Above 200 corners the graph builder skips construction and the exact query has no local fallback. [Corner visibility](../inire/router/visibility.py) · [Ray intersection](../inire/geometry/collision.py#L812) · [Visibility option](../docs/user/api-reference.md#searchoptions) - -Give visibility rays endpoint-aware semantics and leave move admission responsible for physical clearance. Compute or cache local exact neighbors on demand when global precomputation is skipped. Check an outward ray, a ray entering the source keepout, a blocker strictly between corners, and a local query before and after adding distant corners. Confirm the default tangent mode keeps its existing coverage and work. - -## 8. Show holes in keepouts and routed polygons — Low - -The main route plot and the walkthrough polygon helper draw exterior rings only. For a keepout with exterior `box(20, 20, 80, 80)` and hole `box(30, 30, 70, 70)`, a net from `(35, 50, 0)` to `(65, 50, 0)` verifies inside the hole. Both renderers paint the hole as keepout. The same rendering path also omits holes in custom outlines. [Route visualization](../inire/utils/visualization.py#L49) · [Documentation figure helper](../scripts/render_documentation_figures.py#L45) - -Share a hole-aware polygon renderer for the affected paths, including filled and outline-only geometry. Keep labels, proxy styling, and axis bounds. Verify a point in a hole stays unfilled in a headless rendering test. Regenerate the active walkthrough figures and inspect any visual changes. - -## 9. Avoid quadratic scans of clear terminal banks — Low - -The capacity check enumerates every pair of terminals on each aligned bank. With width-2 nets at `y = 5 * i` between `x = 5` and `x = 95` and clearance 2, every terminal pair is clear. The check took about 0.25, 0.75, and 2.62 seconds for 1,000, 2,000, and 4,000 nets on this machine. [Aligned port conflict check](../inire/router/_capacity.py#L62) - -Index lateral intervals to find pairs that can actually conflict. Preserve the disjoint-net bound and compare deterministic pair selection on overlapping and mixed-width banks. Benchmark the clear bank and a dense bank separately. Use the existing capacity suite and automatic coverage checks before adopting a changed pair order. - -## 10. Remove unused per-node search state — Low - -`AStarNode.base_move_cost`, `cache_key`, and `congestion_resolved` have no readers or current constructor call sites that supply them. The public metrics still expose lazy-congestion counters and two ray-cast categories whose production callers have been removed. [Search node](../inire/router/_astar_types.py#L153) · [Public metrics](../inire/results.py#L216) · [Ray-cast labels](../inire/geometry/collision.py#L693) - -Remove the three private node fields and their constructor arguments in a parity-only change. Keep exported counter names available for existing diagnostics and baseline files. Document retired counters separately if that helps interpret current reports. Compare selected paths and stage, iteration, and frontier traces exactly. [Parity procedure](../docs/routing-diagnostics.md#reproduce-and-compare) - -## 11. Honor the explicit refinement objective in automatic mode — Medium - -Use the seeded foldback fixture with a 100-node search limit, all search objective weights set to zero, and `RefinementOptions(objective=ObjectiveWeights(danger_weight=0))`. With identical geometry and congestion settings, explicit lattice mode returns a verified nine-component route of length 392.83. Automatic mode builds the same refinement but returns its 17-component, 475.66-unit incumbent because both layouts tie under the search objective. [Seeded foldback fixture](../inire/tests/test_refinements.py#L21) · [Refinement scoring](../inire/router/refiner.py#L100) · [Automatic selection](../inire/router/_automatic.py#L149) - -Keep the search objective for ranking ordinary planner attempts. For a verified refinement that preserves the selected net IDs, apply the caller's explicit refinement objective consistently when deciding whether to keep the replacement. Define its interaction with `automatic_length_weights` in the API reference. Check the foldback in both modes, the default selection when no override is set, and the guard against losing verified nets. [Refinement handoff](../inire/router/_automatic.py#L584) · [Objective options](../docs/user/api-reference.md#refinementoptions) - -## 12. Report and enforce the worker deadline during long attempts — Low - -The worker checks its timeout before starting each net. A single search can cross the deadline, complete, and leave `timeout_events` at zero. In a fake-clock probe, a one-net lattice worker with warm start disabled completed a legal straight after the clock advanced from 0 to 61 seconds. Its 60-second deadline was never observed. Corridor preparation and warm-start work can also run past the deadline before the first between-net check. [Worker deadline](../inire/router/_router.py#L290) · [Between-net timeout check](../inire/router/_router.py#L955) · [A* expansion loop](../inire/router/_search.py#L74) - -Define safe cancellation points for the worker. Check the deadline during long search loops and at phase transitions, count expiration once, and keep the best verified result and consistent collision indexes. Use a fake clock to cover a single long search, expiry during preparation, and a timeout after a previous iteration produced a verified layout. Check that tight loops retain their current runtime on the performance suite. - -## 13. Skip proximity sampling in verification-only runs — Low - -In explicit lattice mode with `node_limit=0`, one congestion iteration, and refinement disabled, the default danger weight still builds the proximity tree even though no moves are scored. On a 100,100-by-100,100 board with keepout `box(50, 80, 100050, 100080)`, verification of the straight seed from `(10, 20, 0)` to `(90, 20, 0)` built 80,000 samples and took about 34 ms. Setting the danger weight to zero produced the same verified result and took about 0.8 ms. Both runs expanded zero nodes. [Proximity setup](../inire/router/_stack.py#L47) - -Build obstacle samples when search or enabled refinement actually needs proximity costs. Keep the board bounds available for geometric verification. Test an explicit verification-only run with the default weights and a seeded refinement with a nonzero danger weight. Check automatic candidate scoring separately, since automatic may still need proximity data for layout selection. [Automatic scoring](../inire/router/_automatic.py#L149) - -## 14. Ship a self-contained runtime wheel — Low - -The local wheel contained 41 entries under `inire/tests/`, including benchmark tests and fixtures. It contained no `scripts/` or `examples/` entries. The public routing smoke case passed from the extracted wheel with the checkout removed from the import path. Importing the shipped `inire.tests.test_routing_benchmarks` failed with `No module named 'scripts'`. [Build configuration](../pyproject.toml#L39) · [Benchmark test imports](../inire/tests/test_routing_benchmarks.py#L24) - -Keep repository benchmark tests and their fixtures in the source distribution and exclude them from the runtime wheel. Build both artifacts locally, run the public-API smoke cases against the wheel with the checkout off the import path, and check that the unpacked source distribution can build the wheel and run its benchmark tooling. - -## 15. Keep corridor seeding available for incomplete caller hints — Medium - -On the existing detour fixture, use seed mode with a 100-node search limit, one congestion iteration, and warm start and refinement disabled. The unseeded run completes with a topology-generated seed in 41 expansions. Adding an empty `PathSeed`, or the legal prefix `PathSeed((StraightSeed(5),))`, consumes the detailed-search budget and returns a partial result. Adding a complete straight seed of length 680 through the obstacle returns a static collision with zero expansions. The corridor seed builder skips any net present in the caller's seed mapping. [Detour fixture](../inire/tests/routing_benchmarks.py) · [Corridor seed builder](../inire/router/_router.py#L216) · [Seed use during routing](../inire/router/_router.py#L838) - -Preserve a complete verified caller seed. Treat an empty seed as an absent hint, and allow seed mode to realize a corridor when the caller's seed is incomplete or fails geometric checks. Reuse a legal prefix as guidance when possible. Keep the original diagnostic path when the verification-only budget is zero. Require the detour to complete under the same budget with no seed, an empty seed, and a legal prefix. Check the statically invalid complete hint in both search and verification-only runs, and retain the existing test for caller seeds across repeated runs. [Seed mode tests](../inire/tests/test_topology.py#L56) - -## 16. Infer intermediate S-bend offsets for a multi-bend shift — Medium - -Use an empty 100-by-100 board, width 2, clearance 0, start `(20, 20, 0)`, and target `(56, 40, 0)`. Disable quarter turns and set `sbend_radii=(10,)`, a 100-node budget, one congestion iteration, and warm start and refinement disabled. With `sbend_offsets=None`, lattice, guide, seed, and automatic all return partial. With `sbend_offsets=(10,)`, each mode verifies two consecutive 10-unit S-bends. The implicit target-offset logic only proposes that shift when a single configured bend can cover it. [S-bend move proposals](../inire/router/_astar_moves.py#L329) · [Public option](../docs/user/api-reference.md#searchoptions) - -Propose bounded intermediate offsets when the target lies beyond one S-bend's lateral range, using the remaining forward room and the configured radii. Check both signs, valid fractional radii, and a budget that cannot realize the proposed shift. Preserve explicit signed offset lists and the empty-list setting that disables S-bends. Compare all four modes on the reproducer and review branch counts and coverage on the corpus. - -## 17. Preserve circular bend accuracy in fine layout units — High - -A 100 µm bend represented on a 1 nm grid uses 16 segments per arc. In a zero-budget quarter-turn replay at zero clearance, use bounds `(0, 0, 102000, 102000)`, a 500-unit net from `(1000, 1000, 0)` to `(101000, 101000, 90)`, and `Bend90Seed(100000, "CCW")`. Put a 10-unit square around the point at radius `100190` and angle `-π/2 + π/64` from the bend center `(1000, 101000)`. The entire square is inside the ideal circular guide. The exported polygon misses the keepout by 55.52 units and the result verifies. A circular `SBendSeed(50000, 100000)` also missed a keepout inside the first ideal arc. [Arc sampling](../inire/geometry/components.py#L218) · [S-bend sampling](../inire/geometry/components.py#L509) · [Coordinate units](../docs/user/route-a-layout.md#define-the-inputs) - -The quarter turn uses 1,571 segments at radius 79,999 and drops to 16 at radius 80,001 because the sagitta-derived angle falls below the angular tolerance. Compute the number of segments with a numerically stable formula and keep the approximation error bounded as radius grows. Check quarter turns and both S-bend halves on either side of the threshold, compare several layout units for the same physical geometry, and verify keepouts near both arc boundaries against analytic distances. If a tessellation limit is necessary, give callers an explicit accuracy contract. [Bend option reference](../docs/user/api-reference.md#searchoptions) - -## 18. Keep planning available for unseeded nets on a partially seeded layout — Medium - -Complex-routing example 1 verifies 9/9 with automatic mode, a 100-node limit, one congestion iteration, and refinement disabled. Reuse its verified 2,400-unit straight for `net_04` through `initial_paths` and the same call verifies only that net. An empty `PathSeed` for `net_04` also drops coverage to 1/9. Holding that straight fixed as a keepout verifies one of the eight remaining routes. A nonempty seed mapping suppresses the bundle, column, compact, and direct planners for the whole layout. In the worker, one materialized path also suppresses greedy warm-start generation for every remaining net. [Bundle entry check](../inire/router/_bundle.py#L213) · [Direct paths](../inire/router/_routing_policy.py#L78) · [Worker preparation](../inire/router/_router.py#L289) - -Treat empty paths as absent during planning. Make verified caller paths available as incumbents while retaining compatible construction and warm-start options for unseeded nets. For example, a candidate that already reproduces the caller's straight can use it with its existing geometry. Verify candidates on the whole board before selecting them. Recover 9/9 on this fixture with either hint at the same budget. Cover a caller seed that disagrees with a constructive candidate and preserve the precedence of fixed terminal headings. [Reuse workflow](../docs/user/route-a-layout.md#reuse-an-existing-route) - -## 19. Bound proximity-map work on fine layout grids — Medium - -The default proximity map samples every five layout units and sets its distance cutoff to ten units. Route a width-0.5 µm straight five micrometers below a 1 mm square keepout on a 1.5-by-1.6 mm board. With lattice mode and 20 search nodes, both micrometer and nanometer representations complete in two expansions. At 1 nm per unit, tree setup grows from 800 to 800,000 samples, from about 0.5 ms to 360 ms, and from about 71 MiB to 208 MiB peak process memory. The proximity cost at the same physical position changes from 0.04 to zero. This is active search, so skipping verification-only work in item 13 would leave the problem in place. [Proximity sampling](../inire/router/danger_map.py#L68) · [Automatic candidate scoring](../inire/router/cost.py#L243) · [Coordinate units](../docs/user/route-a-layout.md#define-the-inputs) - -Bound setup work independently of the database unit and document how callers choose the physical range of proximity scoring. Compare an index of boundary segments with exposing a configurable sampling interval and sharing the index between attempts. Keep the default corpus route coverage and measure peak memory on identical one-micrometer, 0.1-micrometer, and one-nanometer layouts. Include a long keepout edge and a polygon with an interior opening. - -## 20. Preserve routed headings when reusing inferred-terminal paths — Low - -On the point-terminal variant of complex-routing example 1, automatic routing with heading inference verifies 9/9. Export the nine `as_seed()` values and replay them using the original `NetSpec` entries and zero search nodes. Only 8/9 verify because `net_08` arrived westbound and its original target heading points east. Replay with both endpoint ports from the chosen path and all nine verify. `PathSeed` stores only moves, so callers saving paths for reuse need the inferred terminal ports as well. [Result seed export](../inire/results.py#L284) · [Heading inference dispatch](../inire/router/_automatic.py#L618) · [Point-terminal walkthrough](../docs/complex-routing-example-1.md#compare-all-routing-modes) - -Add a public example that stores both chosen ports alongside the seed, then rebuilds a zero-budget verification problem. Exercise a changed departure heading and a changed arrival heading, and compare the replayed physical polygons. Use the same port values in the example when exporting geometry and reusing its path. [Reuse workflow](../docs/user/route-a-layout.md#reuse-an-existing-route) - -## 21. Match custom S-bend outlines across ordinary floating-point conversions — Medium - -Register `SBendOutline(40, 50, 0.3, polygon)` and replay `SBendSeed(40, 50)` from `(10, 10, 0)` to `(90, 50, 0)`. Form the outline by taking the points `[(0, 0), (20, 0), (50, 25), (80, 40)]` and joining the upper and lower offsets at `±0.15` in y. At width `0.3` the route exports the registered outline as one polygon. At width `0.1 + 0.2` it exports two circular arc polygons. Both routes verify. Template lookup, move proposals, and planner eligibility require a consistent definition of a matching width. [Outline lookup and registration](../inire/model.py#L93) · [Move proposals](../inire/router/_astar_moves.py#L329) - -Normalize equivalent values or use a narrowly bounded matching tolerance consistently across registration, search, seed replay, and planner eligibility. Detect ambiguous matches explicitly and keep genuinely distinct widths and radii independent. Test the two equivalent widths against the same outline and verify that a materially different width still receives the circular bend. Include values obtained by layout-unit conversion. [Custom outline API](../docs/user/api-reference.md#searchoptions) - -## 22. Declare a runtime-compatible NumPy and Shapely range — Medium - -The runtime requirements allow NumPy 2.2.6 with Shapely 2.0.0. Both wheels install on Python 3.11, but `import inire` fails with `ImportError: numpy.core.multiarray failed to import`. Shapely 2.0.0 imports and routes with NumPy 1.26.4. It emits intersection warnings on verified component joins in complex-routing example 1, which abort the example when runtime warnings are treated as errors. Shapely 2.0.4 introduced NumPy 2.0 wheel compatibility, and 2.0.6 fixed a further NumPy 2.1 compatibility issue. This can affect consumers with an older Shapely pin even when the project's current lockfile works. [Runtime requirements](../pyproject.toml#L23) · [Join verification](../inire/geometry/component_overlap.py#L48) · [Shapely 2.0 release notes](https://shapely.readthedocs.io/en/2.0.7/release/2.x.html) - -Choose and document a compatible dependency floor. Test installation and public routing on Python 3.11 with the oldest supported Shapely and the supported NumPy major versions. Keep the automatic fallback available on a release without constrained triangulation. Include a current environment in the local release smoke checks. - -## 23. Define the spacing requirement between separated parts of one net — Medium - -The API describes `clearance` as required spacing between physical shapes. On an empty board, replay a width-2 route from `(10, 20, 0)` to `(10, 24, 180)` with a 25-unit straight, two consecutive radius-2 counterclockwise turns, and another 25-unit straight. The parallel straight sections are 2 units apart edge to edge. At clearance 4, verification still reports completion with zero self-collisions. The same-net check detects intersections, including unintended contact, and uses no spacing threshold. Close parallel runs can matter for optical coupling even when they belong to one connection. [Clearance API](../docs/user/api-reference.md#routingproblem) · [Self-collision verification](../inire/geometry/component_overlap.py#L63) - -Document the existing inter-net and keepout rule explicitly. Define a separate rule for self-spacing if process clearance is expected between separated segments. Apply it to search, seed verification, and refinement with a local exemption for connected geometry near ordinary joins. Test the folded path, a connected bend with short adjoining straights, and a fold at exact spacing. - -## 24. Propose an S-bend launch between two offset apertures in lattice mode — Medium - -On bounds `(0, 0, 62, 25)` at clearance 1, use a width-2 net from `(1, 7, 0)` to `(60, 13, 0)`. Place one wall across `x = 20..26` with opening `y = 4.95..9.05` and another across `x = 43..49` with opening `y = 10.95..15.05`. Disable quarter turns, set `sbend_radii=(10,)`, `sbend_offsets=(6,)`, and a minimum straight length of 1. Disable danger weighting, warm start, and refinement. With one iteration and a 1,000-node limit, lattice search exhausts its frontier after 14 expansions. Any launch at integer `x = 26..29` can complete with the S-bend and a straight, yet lattice visits none of those states. Guide and seed modes verify the route in 22 and 14 expansions respectively. Automatic mode on Shapely 2.0.0 reproduces the 14-expansion failure. Across 63 generated versions of this two-aperture design, every reference path verified, and lattice missed 51 while the triangulation-capable modes completed all 63. [Straight proposals](../inire/router/_astar_moves.py#L228) · [Candidate generation around visible corners](../inire/router/_astar_moves.py#L52) - -Derive straight candidates from transitions between offset apertures. Include S-bend reach in local obstacle guidance when quarter turns are disabled. Keep move admission responsible for the physical checks. Verify the same case in lattice mode and on Shapely 2.0, with both signs and all four input headings. Compare branch counts on open boards and narrow gates. - -## 25. Make the heading heuristic consistent under cardinal rotation — Medium - -On bounds `(0, 0, 120, 120)`, use a width-1.75 net from `(8, 60, 0)` to `(112, 101, 0)`, clearance 1.25, and keepouts `box(87, 48, 99, 71)` and `box(28, 84, 47, 107)`. Run lattice mode with radius-10 quarter turns, S-bends disabled, a 50-node limit, one congestion iteration, and danger weighting, warm start, tiered strategy, and refinement disabled. The original layout verifies in 17 expansions. Each of the three cardinal rotations reaches the 50-node limit without completing. The original seed verifies when replayed on all four layouts. The heuristic uses trigonometric values for the target heading and tests the perpendicular projection against zero. Tiny nonzero results on an aligned state incur a bend penalty. Replacing only those target vectors with exact cardinal values yielded completion in 17 expansions in every rotation. [Target heading and scoring](../inire/router/cost.py#L105) · [Cardinal rotation helper](../inire/geometry/primitives.py#L59) - -Use the exact cardinal vector in the heuristic. Verify mirrored and rotated geometries with the same budget, including a case where the target genuinely requires an alignment penalty. Compare the selected paths and expansions on the corpus to identify any search-order changes. - -## 26. Give coincident terminals an explicit result — Low - -A connection between abutting cells can have identical arrival and departure ports. Distinct input coordinates can also collapse to the same port after grid snapping. On an empty 100-by-100 board, a net with both endpoints `(30, 20, 0)` produces an empty `unroutable` result with `reached_target=False` in lattice, guide, seed, and automatic modes. The search reaches its target at the initial state, and the worker then treats the empty path as a failure. This looks the same to applications as a failed geometric search. [Grid snapping](../docs/user/api-reference.md#ports-and-nets) · [Reached-target check](../inire/router/_search.py#L103) · [Empty-path result](../inire/router/_router.py#L895) - -Define whether Inire should report a geometry-free connection or ask callers to remove it. If supported, distinguish it from an unroutable path and validate board and port compatibility before treating it as connected. If unsupported, give callers an input error that names the net and document how placed-cell workflows should handle the direct join. Exercise exact and snapped coincidences, opposite headings at the same position, and endpoints outside the board. - -## 27. Keep acute-corner apertures open in the routing model — Medium - -On bounds `(0, 0, 100, 50)` at clearance 1, route a width-2 net from `(7, 15, 0)` to `(93, 35, 0)`. Use keepout triangles `[(35, 0), (65, 0), (50, 22.95)]` and `[(35, 50), (65, 50), (50, 27.05)]`. The gap is 4.1 units at its tightest point. The seed `SBendSeed(10, 10), StraightSeed(50), SBendSeed(10, 10)` verifies. With quarter turns disabled, `sbend_radii=(10,)`, `sbend_offsets=(10,)`, 200 nodes, one iteration, and danger weighting, warm start, and refinement disabled, all four search modes return partial. The mesh reports zero corridors. Its mitered buffers merge across the gap, and the width-aware lattice ray casts against keepouts with the same corner extension. [Mesh padding](../inire/router/_topology.py#L106) · [Width-specific static ray geometry](../inire/geometry/static_obstacle_index.py#L94) - -An in-memory probe using rounded corner padding for the mesh alone restored guide, seed, and automatic routing in 25 expansions. Applying it to the ray alone restored lattice routing in 15. Match the broad-phase geometry to Euclidean clearance, or use a local exact retry when corner padding closes a passage. Keep final move verification exact. Test acute and beveled shapes, a genuinely too-narrow aperture, and exact clearance in addition to the existing rectangular cases. [Physical clearance predicate](../inire/geometry/collision.py#L54) - -## 28. Recover when the corridor cost steers search away from a working route — Medium - -On bounds `(0, 0, 219, 118)` at clearance 1, route width 4.5 from `(16, 48, 0)` to `(199, 82, 0)` and width 1.25 from `(18, 59, 0)` to `(197, 93, 0)`. Use full-height walls across `x = 60..67` with opening `y = 56.25..74.125` and `x = 125..132` with opening `y = 66.25..84.125`. Set both bend radii to 10, S-bend offsets to `(10, 12)`, a 1,000-node search limit, and two congestion iterations. Leave warm start enabled and disable refinement and danger weighting. Lattice verifies both routes in 846 expansions. Default guide strength verifies one route in 3,678 expansions, and seed mode also verifies one. Setting guide strength to zero keeps the corridor proposals and verifies both in 1,488 expansions. Raising the node limit to 4,000 leaves default guide and seed at one route. [Corridor cost](../inire/router/_astar_admission.py#L187) · [Routing retry policy](../inire/router/_router.py#L869) · [Guide strength API](../docs/user/api-reference.md#topologyoptions) - -Allow a bounded lower-strength retry when a corridor yields incomplete coverage. Keep useful corridor proposals and allow an incumbent to be reconsidered when it blocks another feasible route. Compare coverage and work on this board and on a case where the guidance cost helps. Preserve intentional caller settings and define when explicit guide and seed modes can use the retry. - -## 29. Bound search memory on large failed attempts — Medium - -On bounds `(0, 0, 2400, 1600)`, block the board with `box(1180, 0, 1220, 1600)` and route a width-2 net from `(150, 800, 0)` to `(2100, 780, 0)` at clearance 2. Use lattice mode, one congestion iteration, quarter-turn radii `(20, 45)`, S-bend radii `(15, 30)`, and offsets `(-18, -12, 12, 18)`. Turn off danger weighting, tiered strategy, refinement, and warm start. The worker returns a partial path at each configured budget. Peak process memory was about 109 MiB at 500 expansions, 294 MiB at 3,000, and 648 MiB at 8,000. At 8,000 expansions it retained 111,086 absolute move entries and the same number of static-admission keys between the two sets. Lowering the internal geometry-cache threshold to 5,000 entries reduced peak memory at 3,000 expansions to 216 MiB, with the same expansion count and outcome. The static-admission keys were still retained. [Search cache ownership and eviction](../inire/router/_astar_types.py#L229) · [Per-move cache use](../inire/router/_astar_admission.py#L44) - -Measure the separate costs of the move caches, static-admission sets, and live frontier. Give long attempts a practical memory bound and retire stale collision keys with the geometry they describe. Reuse local component geometry where it actually reduces retention. Verify deterministic route and trace parity, check peak memory on the blocked board, and include a long attempt that succeeds. - -## 30. Keep collision diagnostics in verification-only runs — Medium - -On an empty 100-by-100 board, seed width-2 straights from `(10, 50, 0)` to `(90, 50, 0)` and `(50, 10, 90)` to `(50, 90, 90)`. Set the search budget to zero and disable refinement. With `max_iterations=1`, lattice, guide, seed, and automatic each report two colliding paths and one conflict edge. With `max_iterations=2` or its default of 10, the first iteration reports the same conflict. The next iteration replaces both paths with empty results, the layout ranking prefers the empty conflict graph, and the final report calls both paths unroutable. The final trace also loses the conflict edge. [Seed use and retries](../inire/router/_router.py#L838) · [Best-layout ranking](../inire/router/_congestion_policy.py#L31) · [Verification-only option](../docs/user/api-reference.md#searchoptions) - -Verify supplied paths once when the search budget is zero and return the physical result and final conflict graph. Keep complete and incomplete seeds diagnosable alongside unseeded nets. Test both one and several congestion iterations in the four modes, and check whether enabled refinement needs a separate verified replacement rule. Retain the explicit zero-iteration behavior. - -## 31. Preserve authored lengths when rerouting phase-sensitive connections — Medium - -In the Raymond fabrication submission, the two `MZI9` arms carry authored length annotations of 286.770 µm (`Waveguide$10`) and 183.637 µm (`Waveguide$1`). Replacing the former with the automatic route from `(261120, -46270, 0)` to `(261120, -167770, 180)` on the 1 nm grid gives a 127.208 µm path, using two clockwise 5 µm quarter turns and a 111.5 µm straight. Both 500 nm port faces join the existing silicon, and the modified MZI array still passes the published EBeam deck. The signed arm-length difference changes from +103.133 µm to −56.429 µm. Even when the original waypoints and radius are replayed, the circular replacement's reported length can differ from the authored waveguide length. The EBeam 500 nm strip definition specifies Bézier bends, and the `Waveguide` cell's authored 156.137 µm becomes 154.948 µm with circular bends. [Raymond fabrication layout](https://github.com/SiEPIC/openEBL-2025-02/blob/a887476a301db2a014be007717cd1821e111f58e/submissions/EBeam_hannahraymond_MZIv21.gds) · [EBeam waveguide definitions](https://github.com/SiEPIC/SiEPIC_EBeam_PDK/blob/363fbb52eefa8669100499ab531d3fe7befc4867/klayout/EBeam/WAVEGUIDES.xml#L3-L15) · [Public results](../docs/user/api-reference.md#results) - -Document which geometric and fabrication checks are covered and which circuit constraints callers must supply and check. Add a reuse example that compares a verified replacement with the authored length and preserves the incumbent when the length difference falls outside tolerance. Evaluate a per-net length target or pairwise length-difference constraint, and carry the actual process-specific bend length through search, refinement, and export when that model is supplied. Use both a length-sensitive MZI and an unconstrained connection as acceptance cases. [Fabrication regression cases](../docs/benchmark-fixtures.md#fabrication-regression-cases) - -## 32. Infer a launch S-bend before a final quarter turn — Medium - -The CROW MZI fabrication submission has nine comparable lower connections that failed in their authored direction under the 225-node probe. All nine completed in 9 to 11 total expansions when the terminal order was reversed and both port headings were turned 180°. Each reversed route also verified when replayed in its original direction. For the `Waveguide$33` link, use a 500 nm width, 70 nm clearance, 5 and 10 µm radii, and the actual terminals `(49700, -267710, 270)` and `(50180, -308570, 180)` on the 1 nm grid. The reversed search realizes one quarter turn, a straight, and an S-bend into its target. The original direction can use the same sequence in reverse. With the original headings and `sbend_offsets=(5480,)`, automatic also completes at the same budget. The lattice's goal-derived S-bend proposal requires the current and target headings to match, so the original approach does not get the necessary S-bend proposal before the quarter turn. [CROW MZI fabrication layout](https://github.com/SiEPIC/openEBL-2025-02/blob/a887476a301db2a014be007717cd1821e111f58e/submissions/masihb_crow1_mzi_v1.gds) · [A* S-bend proposals](../inire/router/_astar_moves.py#L329) - -Use the position before a supported terminal quarter turn to propose useful S-bend offsets, or add a bounded reverse probe for unresolved nets with reversible geometry. Verify any reversed seed in the requested direction. Fractional S-bends and asymmetric custom outlines need that check because their physical geometry can depend on the travel direction. Retest the nine links, both handednesses, and a connection that needs to take the turn before the S-bend. Measure expansion counts and keep the configured search budget intact. - -## 33. Verify the RF cross-section before exporting a coplanar waveguide — Medium - -The pinned QFoundry feedline defines a 15.5 µm signal trace with a 7 µm gap on each side. Replay two parallel, 200 µm straight connections on a 1 nm grid using `NetSpec.width=15500` and `clearance=3000`. At a 32 µm pitch Inire verifies both center conductors. Converting the paths to the negative lithography layer leaves a 2.5 µm ground strip between the two gap envelopes. The QFoundry deck reports one aluminum width violation. At 28 µm pitch the two envelopes merge and the center ground strip disappears. The deck reports no width violation because the intended strip no longer exists. Replaying the same paths at the 29.5 µm envelope width with 3 µm clearance rejects both pitches. A 36 µm control verifies the envelopes, leaves a 6.5 µm strip, and passes the deck. [RF routing scope](../README.md) · [QFoundry waveguide dimensions and layers](https://github.com/tii-qfoundry/PDK_QFoundry/blob/9c31db1d6879c96bd98460ee134181a865481d75/qfoundry/tech/waveguides.xml#L21-L48) · [QFoundry fabrication checks](https://github.com/tii-qfoundry/PDK_QFoundry/blob/9c31db1d6879c96bd98460ee134181a865481d75/qfoundry/tech/drc/drc.lydrc) - -Route against the gap envelope and replay the verified placement at the signal width. At the 15 µm minimum flux-line bend radius, the router accepts the 15.5 µm signal and the 29.5 µm gap envelope. The 49.5 µm width exceeds the bend diameter. Check the three pitches using the published dimensions and process rules. [Fabrication regression cases](../docs/benchmark-fixtures.md#fabrication-regression-cases) - -## 34. Apply the bend rules for each geometry class on a mixed layout — Medium - -The pinned QFoundry feedline and flux-line profiles have the same 15.5 µm trace width and 7 µm gaps, but their minimum bend radii are 50 µm and 15 µm respectively. On bounds `(0, 0, 150000, 55000)` at 1 nm per unit, route gap-envelope width 29500 from `(35000, 20000, 0)` to `(50000, 35000, 90)` for `flux` and from `(100000, 20000, 0)` to `(115000, 35000, 90)` for `feed`. With clearance 3000, no S-bends, and allowed radii `(15000, 50000)`, lattice completes both with a radius-15000 quarter turn. The feedline violates its process radius. Removing the smaller radius globally also removes the legal flux-line turn. A shared width cannot distinguish these two route profiles. [QFoundry bend profiles](https://github.com/tii-qfoundry/PDK_QFoundry/blob/9c31db1d6879c96bd98460ee134181a865481d75/qfoundry/tech/waveguides.xml#L42-L64) · [Net model](../inire/model.py#L24) · [Search options](../docs/user/api-reference.md#searchoptions) - -Document how to route separately by process profile and preserve each verified group as keepouts. Evaluate a per-net permitted geometry profile for design flows that need joint routing. Use the same profile during search, seed replay, refinement, and final verification. Check this board and a second board with room for both legal turns. - -## 35. Check the physical widths of placed optical ports — Medium - -On a 1 nm grid, connect a 500 nm device port at `(10000, 10000, 0)` to a 3 µm device port at `(110000, 10000, 0)` with a width-500 net. With the documented port openings in the routing keepouts, Inire verifies a straight. On the assembled silicon, the independent EBeam deck reports one `SiEPIC-1a` marker at the target port. Route the 500 nm connection to `(70000, 10000, 0)` instead, and place the pinned 40 µm, 500-to-3000 nm EBeam taper from there to the target. The assembly passes the same deck. The API has port position and heading plus one width for the whole net. The widths of the attached devices live outside that model. [Placed-device workflow](../docs/user/route-a-layout.md#route-between-placed-crossings) · [Published EBeam taper](https://github.com/SiEPIC/SiEPIC_EBeam_PDK/blob/363fbb52eefa8669100499ab531d3fe7befc4867/klayout/EBeam/gds/EBeam/ebeam_routing_taper_te1550_w%3D500nm_to_w%3D3000nm_L%3D40um.gds) · [Pinned EBeam deck](https://github.com/SiEPIC/SiEPIC_EBeam_PDK/blob/363fbb52eefa8669100499ab531d3fe7befc4867/klayout/EBeam/drc/SiEPIC_EBeam.drc) - -Show how to check both terminal widths and place explicit process tapers before routing. Have a layout adapter accept declared port widths and reject a direct join if the widths differ. Use the correctly placed taper, a deliberately omitted taper, and matched-width terminals rotated by 90° as acceptance cases. - -## 36. Keep the search heuristic in the configured cost units — Medium - -On bounds `(0, 0, 190, 100)`, route a width-2 net from `(15, 40, 0)` to `(165, 80, 0)` around `box(63, 7, 85, 55)` at clearance 2. Use lattice mode, a 32-node limit, radius-10 quarter turns, no S-bends, a minimum straight length of 2, and `greedy_h_weight=1.5`. Disable warm start, tiered strategy, and refinement, and use one congestion iteration. With only length in the search objective, `unit_length_cost=1` completes in 12 expansions. Changing the cost per unit to `0.001` or `1000` yields a partial route at 32 expansions. A cost-unit change should leave the pure-length objective ordered the same way. An in-memory probe scaling the Manhattan distance term by the configured length cost restored the original path at `0.001` in 12 expansions. [Search heuristic and move scoring](../inire/router/cost.py#L117) · [Corridor heuristic](../inire/router/_astar_types.py#L99) · [Cost options](../docs/user/api-reference.md#objectiveweights) - -Use the configured length units for estimated remaining distance, including corridor distance. Keep the interpretation of `greedy_h_weight` consistent with the accumulated objective. Check the three cost scales in lattice search, a corridor-guided case, and explicit behavior at zero length cost. - -## 37. Diagnose terminals whose physical ports cannot be reached — Medium - -On bounds `(0, 0, 300, 160)`, route a width-2 net at clearance 2 from `(10, 80, 0)` to `(302, 80, 0)`. Use radius-20 quarter turns, radius-10 S-bends, a 600-node limit, one congestion iteration, and disable warm start, refinement, and danger weighting. Lattice uses all 600 expansions. Automatic uses 2,200 across attempts and returns a partial path with no diagnostic that identifies the off-board terminal. The same happens with target `(280, 80, 0)` inside `box(275, 75, 285, 85)`. As a control, target `(300, 80, 0)` is on the board edge and verifies with a flat end face. [Worker dispatch](../inire/router/_router.py#L838) · [Physical verification](../inire/geometry/collision.py#L608) · [Reported outcomes](../docs/user/api-reference.md#results) - -Check terminal positions and the required physical end faces against the board and keepouts before starting an attempt. Report the specific invalid terminal and keep other nets routable. Preserve valid flush interfaces and port openings. Keep verification of a supplied partial path available for inspecting an infeasible connection, and test placements just inside and outside a boundary and at exact clearance. - -## 38. Distinguish zero clearance from a short between different nets — Medium - -On a 1 nm grid, replay two 8 µm straights with 500 nm width and y coordinates 2000 and 2500. At `clearance=0`, both routes verify without dynamic collisions. Their polygons share an 8 µm edge. After writing and reading the common silicon layer, KLayout merges them into one connected polygon. The published EBeam width and spacing deck produces no marker because it sees a single conductor. At positive clearance, Inire detects the contact. A control with 70 nm of actual gap verifies in both tools and retains two connected components. [Exact clearance predicate](../inire/geometry/collision.py#L48) · [Placement workflow](../docs/user/route-a-layout.md#save-a-placement-recipe) · [Pinned EBeam deck](https://github.com/SiEPIC/SiEPIC_EBeam_PDK/blob/363fbb52eefa8669100499ab531d3fe7befc4867/klayout/EBeam/drc/SiEPIC_EBeam.drc) - -Define and document whether distinct nets may share edges or vertices at zero clearance. For independent same-layer connections, report shared edges as shorts or require an explicit policy for intentional contact. Preserve normal adjacent moves of the same net and process boundaries represented as keepouts. Check a shared edge, an endpoint contact, a valid zero-clearance boundary, and separate exported conductors. - -## 39. Verify clearance on the coordinates written to the layout file — Medium - -On a 1 nm grid, replay concentric counterclockwise quarter turns about `(3000, 6070)`. The inner net is 490 nm wide with radius 2500 nm, from `(3000, 3570, 0)` to `(5500, 6070, 90)`. The outer is 509.94 nm wide with radius 3070 nm, from `(3000, 3000, 0)` to `(6070, 6070, 90)`. At clearance 70 nm both verify, with a minimum floating-point separation of 70.0208 nm. Rounding their polygon vertices to the original 1 nm grid reduces the gap to 68.9420 nm. KLayout reports 12 EBeam `Si_space` markers in the written OASIS file. A 0.1 nm export of the same polygons produces zero markers. The 1 nm control with a 3072 nm outer radius, the same widths, and corresponding endpoints also produces zero markers. [Placement workflow](../docs/user/route-a-layout.md#save-a-placement-recipe) · [Arc polygon coordinates](../inire/geometry/components.py#L235) · [Pinned EBeam spacing rule](https://github.com/SiEPIC/SiEPIC_EBeam_PDK/blob/363fbb52eefa8669100499ab531d3fe7befc4867/klayout/EBeam/drc/SiEPIC_EBeam.drc) - -Document that snapping ports leaves bend polygons with fractional vertex coordinates. In a fabrication export adapter, verify the actual quantized geometries or allow an intentional clearance margin tied to the export grid. Test rounded bends near minimum clearance and check that the selected rounding policy preserves port faces and accepted joins. - -## 40. Preserve layer identity in the routing and export workflow — Low - -On a 1 nm grid, replay a 500 nm-wide silicon straight from `(1000, 10000, 0)` to `(19000, 10000, 0)` and a 750 nm-wide silicon nitride straight from `(10000, 1000, 90)` to `(10000, 19000, 90)`. A single Inire problem reports both as colliding. Each verifies in a separate problem. On the EBeam silicon `1/0` and silicon nitride `4/0` layers, KLayout retains both geometries separately despite their projected intersection, and the published fabrication deck reports zero markers. Exporting both on `1/0` instead produces one connected polygon, also with zero markers. Process layer identity determines which geometry overlaps are allowed. [Layout inputs](../docs/user/api-reference.md#layout-inputs) · [Pinned EBeam layer rules](https://github.com/SiEPIC/SiEPIC_EBeam_PDK/blob/363fbb52eefa8669100499ab531d3fe7befc4867/klayout/EBeam/drc/SiEPIC_EBeam.drc) - -State that each routing problem represents one collision plane. Show how an adapter preserves layer identity, partitions independent layers into separate problems, and adds cross-layer keepouts where the process requires them. Keep placed transition devices in the circuit model. Check both layer assignments and verify connectivity separately from fabrication spacing. - -## 41. Revisit legal turns away from the target before the budget runs out — Medium - -Use bounds `(-25, -185, 230, 0)`, keepout `box(50, -185, 187, -37)`, width 2, clearance 1, and terminals `(190, -40, 270)` and `(20, -50, 0)`. The path must go east around the obstacle before traveling west to approach the target. Use lattice mode, radius-10 quarter turns, no S-bends, straight lengths from 2 to 40, a bend penalty of 10, and a 500-node limit. Use one congestion iteration and disable warm start, tiered strategy, refinement, and danger weighting. The current search returns partial at 500 expansions. An in-memory run admitting the turns immediately completes in 443. A geometric seed verifies as well. The distant-turn rule defers moves whose new headings point away from the target, and A* only releases those moves when the preferred queue empties. [Turn classification](../inire/router/_astar_moves.py#L298) · [Deferred queue](../inire/router/_search.py#L74) - -Keep a bounded share of the search budget for deferred turns, or promote deferred moves when the preferred frontier stops improving. Compare the original budget on this board, a mirrored board, and cases where the detour is blocked. Measure the added search on boards whose best path turns toward the target immediately. - -## Local verification for the batches - -- Run `.venv/bin/ruff check --no-cache inire scripts` and focused regressions for each batch. Run `INIRE_RUN_PERFORMANCE=1 .venv/bin/pytest -q` before closing the plan. Tests run locally using the existing developer workflow. [Developer guide](../docs/development.md#check-a-change) -- Compare `public-defaults` and `corpus-regression` per board for verified IDs, work, and route cost. Use 433 verified nets across 67 boards as the prior public-defaults baseline. Investigate any coverage loss and record intended gains or path changes. Include the splitter-tree regression, mixed-width and crossing holdouts, and the fixed-heading and point-terminal variants of complex-routing example 1. [Benchmark profiles and fixtures](../docs/benchmarks.md#choose-a-profile) -- Exercise automatic, lattice, guide, seed, and bundle where each mode supports the fixture. Confirm the no-triangulation capability tests and run a smoke check using the minimum supported library versions when that environment is available. Replay supplied seeds with a zero search budget where specified. [Mode and dependency behavior](../docs/complex-routing-example-1.md#compare-all-routing-modes) -- Regenerate the walkthrough into a scratch directory. Keep active user and developer pages reachable within two links, with planning and archived materials outside that navigation check. [Figure regeneration](../docs/development.md#check-a-documentation-figure) -- For fabrication changes, compare the original, an export-only control, and the routed design in KLayout. Use the pinned decks above and compare marker types and coordinates. For optical checks, replace the original waveguide polygons on the silicon layer and retain the surrounding layout and port markers. Check circuit length metadata separately. For RF, retain the conductor and gap dimensions through negative-layer export and check ground continuity as well as widths. diff --git a/plans/routing-follow-up-review.md b/plans/routing-follow-up-review.md deleted file mode 100644 index 6dc5aee..0000000 --- a/plans/routing-follow-up-review.md +++ /dev/null @@ -1,228 +0,0 @@ -# Routing follow-up review - -Review baseline `f6e7bac`. This plan follows the [full project review](full-project-review.md) and the subsequent changes to routing, dependency requirements, and benchmark reporting. All 20 items were implemented. The reproductions below describe the baseline. - -## Implementation verification - -- The performance-enabled test suite passed all 395 tests. The topology, terminal, visibility, and refinement tests also passed on Python 3.11 with NumPy 1.26 and on Python 3.14 with Shapely 2.2 and GEOS 3.15. Ruff and the offline lockfile check passed. -- All 152 corpus and holdout boards reached their routing bounds under `matched-budget`, `public-defaults`, and `corpus-regression`. Each profile verified 2,245 nets. Verified IDs and per-net physical route lengths matched the baseline in all three profiles. Independent Shapely checks and zero-node seed replay confirmed board containment, clearance, and replayed geometry. -- The fixed-budget lattice runs verified four nets instead of three on `holdout-staggered-opposed` and two instead of zero on `lidar-clements-8x8`. Guided runs on `blocking-turn-room` verified both nets instead of one in both modes, using 25 guide expansions and 32 seed expansions. The equal-rank partial for `lane_1` on `search-comb-3x4` advanced from x=240 to x=237 in both modes. -- The ten-net fan-out retained all ten routes. Its counters now show 624 pair-local expansions and 1,703 total expansions. With shuffle seeds 42, 44, and 45, the pre-pair trace matched the restored iteration's conflict edges and component indices. A fake-clock test stopped diagnostic replay before its first expansion while keeping the same verified results and routing work. Historical captures retain the metric definitions used at capture time, which are recorded in the [archive guide](../archive/routing/README.md#compare-performance-or-diagnose-a-trace). -- The 200-net mixed-width board retained 400 guides with one triangulation and routed all 200 nets in 400 lattice expansions. The exact-width ray-tree cache retained eight entries. The residual connectivity probe constructed one union for 120 residual widths and again found no disconnected nets. Distinct widths still receive their own mesh when they need recovery. -- Guide and seed each verified the 240 supplied paths on `scale-bank-240-with-keepouts` with zero triangulations and zero expansions. The returned seeds matched the supplied paths. -- The imported fixture comparison reports a 100 nm grid. The grid-cost test checks the normalized objective at all five authored resolutions. The wheel and source distribution carry matching project URLs and README content. All eight README targets, including the illustration and three heading anchors, resolved from outside the checkout. - -### Fixes from the implementation review - -- The pre-pair trace saves the restored layout and replays it after repair and final verification. Under a controlled deadline, both crossing nets now verify with tracing enabled, using the same 608 expansions and one repair attempt as the untraced run. -- A frontier replay that expires increments `diagnostic_timeout_events`. The offset-gate retry still verifies both nets when the guided worker's trace expires. A verification-only worker still delivers its callback. -- The 40-net board with 144 keepouts and a one-grid-unit offset uses one triangulation and retains 80 guides. The earlier implementation built 40 triangulations. Guide and seed modes each verified all 40 nets with one triangulation. Narrower meshes still recover missing corridors and passages near obstacles or board edges. -- All 397 tests passed with performance checks enabled. An independent rerun of all three benchmark profiles verified the same 2,245 net IDs and per-net lengths in each profile. Expansion totals also matched the implementation before these review fixes. - -### Fixes from the second implementation review - -- Frontier-only conflict collection uses verified reports and runs after routing, final verification, and the replay callback. In the dense two-net replay, the callback still fired at 31.6 seconds of controlled work with tracing enabled. The diagnostic pass reached the deadline separately. The offset-gate retry still verified both nets. -- Deferred pre-pair tracing collects component conflicts only for colliding nets. On the 22-net board, expiry during the first optional check stopped further checks and kept all 22 verified routes. -- Failed shared guides can recover narrower alternatives when reservations obstruct the shared space. The width-24 seeded blocker and width-2 offset repro now verifies both nets in 1,792 expansions. The clear 40-net offset board still verifies 40/40 with one triangulation in guide and seed modes. -- The performance-enabled suite passed 398 tests. All three corpus profiles reached every routing bound and matched the prior verified IDs, per-net lengths, and expansion totals. - -## 1. Catch physical keepout collisions missed by bend proxies — High - -Use a `120 × 120` board, a width-2 net from `(10, 20, 0)` to `(80, 80, 90)`, clearance 1, and a keepout from `(77.3, 22.3)` to `(77.7, 22.7)`. Set lattice mode, a 200-node budget, a single 90-degree radius of 10, no S-bends, zero proximity cost, three iterations, and disable warm start and refinement. With `bend_collision_type="clipped_bbox"` and `bend_clip_margin=5`, search repeatedly picks a one-bend path that fails final verification. Standard arc admission finds a valid three-bend detour in 37 expansions. A probe that checks the physical clearance of each proposed bend also finds the detour in 37 expansions with the original clipped proxy settings. - -Check static clearance against the physical outline when a bend proxy may understate it. Query the physical bounds in that case. Reuse the cached move-admission decision and preserve the fast path for standard geometry. Exercise a shrunken built-in proxy, a custom polygon proxy with an arc outline, and an exact-clearance control. Require unchanged coverage across the corpus and check work and runtime for standard arc routing. [Static move admission](../inire/geometry/collision.py#L299) - -## 2. Count all pair-local search expansions — Medium - -In `example_07_large_scale_routing_no_warm_start`, the router verifies 10/10 nets and reports 1,079 total expansions and 42 pair-local expansions. Instrumenting the actual `route_astar` calls in pair repair records 624 expansions over three pair attempts. The failed order spends 582 expansions before returning no candidate. All 624 expansions are absent from the top-level `nodes_expanded` field. The current diagnostics guide documents the narrower meaning of the pair-specific counter. - -Return expansion work even when a pair attempt fails and add it to both counters. Keep metrics from diagnostic replay isolated. Update the metric documentation and reconcile the expansion guardrails and saved baselines that use the older definitions. Compare the selected routes, attempt order, and verified coverage independently of the counter changes. [Pair search](../inire/router/_pair_local.py#L67) · [Counter update](../inire/router/_router.py#L851) · [Metric guide](../docs/routing-diagnostics.md#route-metrics) - -## 3. Skip planning and seed materialization with zero iterations — Medium - -With `max_iterations=0`, the point-terminal bundle fixture returns nine unroutable results with zero iterations in `off` and `automatic` modes. In `bundle` mode the router builds a schedule, performs zero routing iterations, and raises `Bundle schedule failed geometric verification for net_00`. The lattice worker also materializes supplied seeds before discovering that it will run zero iterations. - -Make the disabled-iteration outcome consistent across modes. Skip bundle planning and unused seed materialization while preserving public input checks and per-net diagnostics. Exercise a supported bundle, a bundle-shaped layout rejected by the planner when enabled, and seeded input. Keep zero-node replay with positive iterations available. [Bundle setup](../inire/router/_stack.py#L32) · [Bundle result check](../inire/router/_stack.py#L98) · [Seed preparation](../inire/router/_router.py#L337) - -## 4. Read visibility corners in XY at zero clearance — High - -A `100 × 80` board with a straight width-2 net from `(10, 20, 0)` to `(80, 20, 0)` and a keepout above it is enough to reproduce an exception. Use a polygon with exterior `box(30, 40, 60, 60)`, a hole `box(35, 45, 55, 55)`, and set every vertex's Z coordinate to 5. At zero clearance, both `tangent_corner` and `exact_corner` raise `ValueError: too many values to unpack` in lattice mode. The same input completes when visibility is off. The exception also occurs when the polygon is supplied as a fixed route. At clearance 2 the buffer yields XY coordinates and the search completes in each case. - -Read XY coordinates from each exterior and interior ring before indexing corners. Keep the original polygons available for returned geometry. Exercise XY and XYZ keepouts and fixed routes in both visibility modes and at zero and positive clearance. Compare the paths and the corner counts. [Visibility corner extraction](../inire/router/visibility.py#L55) · [Obstacle buffering](../inire/geometry/static_obstacle_index.py#L62) - -## 5. Keep routing when the conflict count stalls but the layout can improve — High - -Under matched-budget fixture settings with `mode="off"`, a 90-node search limit, seven iterations, warm start off, and refinement off, `holdout-staggered-opposed` stops after four iterations and verifies 3/9 nets. Its conflict edge counts are `[4, 1, 1, 1]`. Disabling only the repeated-count stop yields `[4, 1, 1, 1, 0, 0, 0]` and verifies 4/9. The same change improves `lidar-clements-8x8` from 0/6 to 2/6, against a bound of three. In both cases the edge identities also repeat before a later iteration improves coverage. Of 60 boards checked under these settings, five met the repeat-stop condition and two gained coverage when it was disabled. - -Remove the count-only early exit or replace it with a stopping rule that accounts for the changing congestion penalties. Keep the iteration and time limits. Compare the verified net IDs, check the progression of conflicts and penalties, and measure runtime on the boards that keep searching. Retain the path to pair-local repair while checking that it still triggers where it improves coverage. [Iteration stop](../inire/router/_router.py#L1166) · [Repeated-count rule](../inire/router/_congestion_policy.py#L117) - -## 6. Bound the cost of width-specific corridor meshes — Medium - -On a `1000 × 1000` board with 144 rectangular keepouts below 40 straight nets, corridor planning builds one mesh at uniform width 2 and 40 meshes when widths increase from 2 by 0.01 per net. Both runs guide all 40 nets. The measured planning times were 2.42 seconds and 5.43 seconds in the same process. Every width below the maximum gets a mesh even when the widest mesh has already supplied passages. - -A `1400 × 2400` board with 200 nets and 240 rectangular keepouts scales from one to 200 meshes, with two corridors per net in both runs. Planning took about 54 and 68 seconds in the same process. To reproduce it, place keepouts at `box(20 + 48*x, 18 + 48*y, 31 + 48*x, 30 + 48*y)` for `x` from 0 through 19 and `y` from 0 through 11. Give net `i` east-facing ports at `(5, 620 + 8*i)` and `(45, 620 + 8*i)`. Compare width 2 with `2 + 0.005*i` using clearance 2, bend radius 10, and two corridors per net. Use the mesh count as the primary comparison because the wall times vary with load. - -Keep width-specific recovery for missing corridors and passages that are genuinely too narrow in the shared mesh. Reuse a conservative mesh or defer narrower alternatives until the shared candidates fail. Verify both the mixed-width narrow-aperture fixtures and the case where a wide-mesh corridor exists but the narrower net needs a different passage. Compare triangulation counts and routing coverage on a large mixed-width layout before replacing the eager passes. [Width-specific planning](../inire/router/_topology.py#L384) · [Narrow corridor coverage](../inire/tests/test_topology.py) - -## 7. Update the corridor walkthrough after the retry removals — Low - -The corridor walkthrough still says that a joint retry can move lanes for several nets. The automatic planner removed that retry and its alternate-lane permutation in `7476209`. The architecture overview also describes lattice fallback in terms of planning being unavailable. The current flow requires triangulation and uses lattice when the geometry calls for it or earlier planners leave unresolved nets. - -Describe the shared portal assignment, width-specific recovery, and remaining lattice retries in the active guides. Check the walkthrough links and benchmark command against the current output. Keep the historical review and experiment records tied to their revisions. [Corridor walkthrough](../docs/topological-routing.md#corridor-planning-and-realization) · [Automatic architecture](../docs/architecture.md#automatic-routing) - -The bundle guide also says the smallest 90-degree radius must be a positive integer shared with `sbend_radii`. The planner tries the usable common integer radii. The point-terminal fixture verifies all nine nets with 90-degree radii `(10.5, 50)` and S-bend radii `(50,)`. Describe the eligibility of the common radius and retain the existing layout and geometry requirements. [Mode requirements](../docs/user/tune-and-troubleshoot.md#choose-a-routing-mode) · [Bundle radius selection](../inire/router/_bundle.py#L222) - -Restore the link from the archived refactor plan to the current corpus command. It points to `#run-the-full-regression-corpus`, while the current heading uses `#run-the-full-benchmark-corpus`. The historical results can stay tied to the original corpus. [Archived link](../archive/routing/routing-refactor-plan.md#verification) · [Current corpus command](../docs/benchmarks.md#run-the-full-benchmark-corpus) - -## 8. Hand off to pair repair only when the saved layout has a repairable pair — High - -Run `blocking-turn-room` with matched-budget options, an 85-node limit, five congestion iterations, zero guidance cost, and warm start and refinement off. Both guide and seed modes reach one verified net in iteration 0. In iteration 1 both nets reach their targets but conflict, and the router stops to hand off to pair repair. It restores iteration 0, whose partial path has no conflict edges, so pair repair tries no pairs. Bypassing only the pair-local handoff lets iteration 2 verify both nets. The guide run rises from 10 to 25 expansions and the seed run from 17 to 32. The repeated-count rule in item 5 stays enabled for this reproduction. - -Base the handoff on the saved layout the repair will receive. Require an eligible conflict pair before skipping the remaining congestion iterations. Cover the zero-edge saved layout and retain the early handoff on the fan-out fixture where pair repair succeeds. A control requiring at least one saved conflict edge retained all 10 fan-out routes and all three pair-search attempts. Evaluate coverage and work jointly with item 5. [Pair-local handoff](../inire/router/_router.py#L1163) · [Pair eligibility](../inire/router/_router.py#L727) · [Plateau rule](../inire/router/_congestion_policy.py#L111) - -## 9. Preserve useful partial paths when congestion iterations tie — Low - -With the same settings on `search-comb-3x4`, guide and seed each finish five iterations with no completed nets or conflict edges. The final path for `lane_1` ends at `(240, 150, 180)`. Every callback after iteration 0 shows that net ending at `(237, 150, 180)`, closer to its target at `(15, 150, 180)`. The equal layout rank always keeps the first iteration, even when a later iteration advances a partial path. - -Both partial paths fit the board and meet static clearance. On ties in completed net IDs and conflict rank, prefer more useful partial results using the existing target-distance ordering. Check the geometry of any candidate partial path used for this comparison. Preserve completed geometry and keep conflict trace indices aligned with the selected paths. Include an empty-to-partial case and a control where a closer endpoint belongs to a colliding path. [Layout selection](../inire/router/_router.py#L459) · [Search progress](../inire/router/_search.py#L41) - -## 10. Bound the width-specific ray indexes in lattice search — Medium - -Route the 200-net board from item 6 in lattice mode at four nodes per net and one iteration. Turn off bends, visibility, proximity cost, warm start, and refinement. Both width distributions verify 200/200 in 400 expansions. The uniform-width run retains one ray index with 240 buffered obstacles. The mixed-width run retains 200 indexes and 48,000 buffered obstacles. In fresh processes on the same core, the probes took about 0.35 and 2.05 seconds, with peak memory about 78 and 103 MiB. - -Bound retention while preserving exact-width geometry. Compare a size-limited index cache with a shared raw index that buffers only candidates for each query. Keep the tree for commonly reused widths if it saves work. Check exact-clearance behavior, repeated-width interleaving, a large mixed-width layout, and the normal lattice coverage and runtime baselines. [Width-specific index](../inire/geometry/static_obstacle_index.py#L106) · [Ray query](../inire/geometry/collision.py#L886) - -## 11. Verify complete seed layouts before planning corridors — Medium - -Use the reference paths in `scale-bank-240-with-keepouts` as `initial_paths`, with matched-budget options, one iteration, and warm start and refinement off. Guide and seed each verify 240/240 with zero expansions, after building corridors for all 240 nets. In one local run per mode, corridor planning took about 208 seconds in guide and 210 seconds in seed. A probe bypassing just `plan_corridors` returned identical verified placements in about 0.12 seconds per mode. A 40-net, 144-keepout control reproduced placement parity, with about 2.5 seconds of planning per mode. - -With a controlled clock, a plan that consumes the worker deadline returns an empty, unroutable result for an otherwise valid straight seed in both modes. This isolates the ordering problem without relying on host load. - -When every net has a seed that reaches its target, check the complete seeded layout before building guides. Take the fast path only if the seeds verify together. Exercise partial, incompatible, overlapping, and missing seeds that still need the normal search. Reuse verification work and retain the requested refinement and callback behavior. [Setup before the first iteration](../inire/router/_router.py#L315) · [Corridor planning](../inire/router/_router.py#L282) - -## 12. Scale the flat S-bend surcharge linearly with the benchmark grid — Medium - -The expanded fixture converter multiplies both bend surcharges by the grid scale raised to the power of 1.5. That compensates for the radius adjustment on 90-degree bends. An S-bend has a flat surcharge, so the same physical route is valued differently when expressed in finer grid units. A width-2 µm S-bend with radius 10 µm, offset 8 µm, and an exact 16 µm span has length 18.546 µm at both 1,000 nm and 10 nm grids. With proximity cost off and the default 500-unit surcharge before conversion, normalized native cost changes from 518.546 to 5,018.546. - -Scale the S-bend surcharge by the grid factor. Check normalized costs for a straight, a quarter turn, and an exact-span S-bend across the authored grids. With a corrected surcharge on 24 fine-grid expanded cases that allow S-bends, automatic regression coverage, verified paths, and expansion counts stayed the same. In a lattice control limited to 200 nodes per net and one iteration, `complex-column-5x2` retained the same verified net but changed its path and used 842 expansions instead of 992. Reconcile affected benchmark baselines and update the fixture guide, which still lists 72 expanded cases and eight search challenges. The current groups have 75 and 11 respectively. [Grid conversion](../inire/tests/routing_expanded_benchmarks.py#L59) · [Component radius](../inire/geometry/components.py#L197) · [Native surcharge](../inire/router/cost.py#L234) · [Fixture guide](../docs/benchmark-fixtures.md#micron-scale-routing-cases) - -Propagate the imported grid into the same comparison records. The converted fixtures declare ten layout units per micron, but the loader discards that scale. A JSON comparison of `lidar-toy-example` emits `"grid_nm": null`. The known scale for all six imported boards is 100 nm. Test that the comparison output carries the scale from the fixture data. [Imported fixture loader](../inire/tests/routing_external_benchmarks.py#L13) · [Comparison export](../scripts/compare_topological_routing.py#L413) - -## 13. Make the guidance retry regression independent of corridor candidates — Medium - -The two-net offset-gate test expects the guided attempt to verify one net in each of its first two iterations and the retry without a guidance cost to verify both nets. This holds on the lockfile environment with Shapely 2.1.2 and GEOS 3.13.1. With the local Shapely 2.2.0 distribution and GEOS 3.15.0, the planner generates different corridor centerlines and the first guided iteration verifies both nets. The worker skips the retry and reports selected attempt 0, and the test fails on the hard-coded callback sequence. - -Decouple the retry and attempt-index assertions from the particular corridor candidates this layout receives. Keep the real layout as a coverage control and use a deterministic first-attempt outcome to exercise retry selection and diagnostic indices. Verify the control on both dependency combinations and retain the check that both nets route. [Offset-gate regression](../inire/tests/test_topology.py#L115) · [Explicit retry and selection](../inire/router/_stack.py#L161) - -## 14. Observe the worker deadline during refinement and frontier replay — Medium - -On a `100 × 100` board, replay two perpendicular width-2 straights through the center, from `(10, 50, 0)` to `(90, 50, 0)` and from `(50, 10, 90)` to `(50, 90, 90)`. Use lattice mode, a 60-node limit, one iteration, no bends, warm start off, refinement off, and `capture_frontier_trace=True`. Advance a controlled clock from zero to 61 seconds as the first frontier replay starts. Both diagnostic searches still expand three nodes each past the 60-second worker deadline. The run reports zero timeouts. The same replay routine is used for pre-pair traces. - -On the seeded foldback control with unlimited refinement windows, advance the clock at the first window. A second window starts after expiration, and the timeout is counted only after refinement returns. The worker currently checks once before refining each net. - -Pass the worker's expiry check through frontier A* replay and check it between diagnostic replays and at refinement windows and bounded candidate checkpoints. Keep final verification and the latest verified geometry available after expiration. Exercise expiry before and during a diagnostic search, expiry during a refinement window, and an uninterrupted run with the same results and stable work counters. [Frontier replay](../inire/router/_router.py#L567) · [Worker deadline](../inire/router/_router.py#L382) · [Refinement loop](../inire/router/refiner.py#L423) · [Foldback control](../inire/tests/test_refinements.py#L21) - -## 15. Keep pre-pair counters and frontier geometry on the same layout — Medium - -Run the ten-net fan-out using `_trace_example_07_variant(warm_start_enabled=False, seed=44)`. Iteration 6 verifies six nets and leaves one conflict, `net_06`–`net_07`. Iteration 7 verifies four nets and has four conflict edges, none matching that pair. The worker restores iteration 6 and sends `net_06`–`net_07` to pair repair. The pre-pair trace reports iteration 7's edges, reroute order, and work, while replaying the restored iteration 6 geometry. Four routed paths differ between those layouts. The guide presents this trace as a record of the handoff into pair repair. - -With seed 45, both iterations verify seven nets with one conflict. The trace lists `net_02`–`net_03`, and pair repair receives `net_08`–`net_09`. A comparison of counts alone misses the attribution error. [Fan-out trace fixture](../inire/tests/example_scenarios.py#L367) - -Keep the attempt metadata associated with the saved layout and use it for the trace after restoring that layout. Include carries and any missing per-net attempt data consistently. The iteration trace already records the discarded iteration. Add a control where the conflict identities change and an earlier layout is restored, and check that the pre-pair conflict edges match the pair-repair input and that hotspot geometry refers to that same layout. Preserve coverage and search selection with diagnostics enabled. [Saved-layout restoration](../inire/router/_router.py#L430) · [Pre-pair trace assembly](../inire/router/_router.py#L755) · [Trace guide](../docs/routing-diagnostics.md#traces) - -## 16. Reject unknown performance scenarios before writing reports — Medium - -Run `scripts.record_performance_baseline --scenario example_01_simple_rote --output-dir ` using the documented module invocation. It exits successfully and writes an empty `scenarios` list and a Markdown baseline with no measurements. With the default output directory, those writes replace the committed baseline files. The diff tool accepts the same misspelling and emits an empty comparison. The shared snapshot selector simply drops unknown names. - -Validate all explicitly requested scenario names before measuring or writing files. Distinguish unknown names from performance-only names that need the existing flag. Keep the diff tool's support for a scenario newly present in the current run or present only in the baseline. Exercise a misspelling alongside an existing output file, a mixed valid and invalid selection, and a valid performance-only selection. [Snapshot selection](../inire/tests/example_scenarios.py#L497) · [Baseline recorder](../scripts/record_performance_baseline.py#L100) · [Baseline comparison](../scripts/diff_performance_baseline.py#L200) - -## 17. Resolve heading inference from the caller's seeded request — High - -Use `terminal-bench-point-terminals` in automatic mode with inference enabled, 20 search nodes, one congestion iteration, warm start off, and refinement off. Give `net_00` a radius-1000 quarter-turn seed while only radius 50 is configured. The public wrapper rejects the seed and the automatic planner now sees an unseeded request. It verifies 9/9 after changing `net_08` from the requested east-facing arrival to west-facing. The API describes caller headings as fixed when initial paths are supplied. - -Replace the rejected seed with a compatible `StraightSeed(5)` prefix on `net_00`. All headings stay fixed, but the automatic planner skips the fixed-heading bundle turnaround because it checks the configured inference flag. The run verifies 1/9. Turning inference off while keeping the same prefix and budget verifies 9/9 using the bundle turnaround. - -Resolve whether inference is active at the public boundary, where the original seeds and options are both available, and use that decision for selecting the compatible constructive planner. Preserve diagnostics for rejected seeds and the unseeded inference behavior. Cover a valid prefix, an unusable nonempty seed, and a fully seeded replay. Verify requested and effective poses as well as counts. [Seed filtering](../inire/__init__.py#L141) · [Bundle selection](../inire/router/_automatic.py#L225) · [Inference gate](../inire/router/_automatic.py#L762) · [Heading contract](../docs/user/api-reference.md#topologyoptions) - -## 18. Make the project links usable in release artifacts — Low - -The project and repository URLs are present as top-level keys in `[project]`, but the built wheel has neither a `Home-page` nor a `Project-URL` header. The README is copied into the wheel and into its long description with seven checkout-relative documentation links. The wheel contains none of those targets. One example is `docs/user/route-a-layout.md#define-the-inputs`, which resolves from the repository root and fails from the installed README. - -Declare the links in `[project.urls]` and give the released long description and installed README resolvable documentation links. Verify the wheel and source distribution metadata from fresh builds and check the links from outside the checkout. Keep the repository README's documentation useful when browsing the source. [Package metadata](../pyproject.toml#L1) · [Repository README](../README.md) - -## 19. Reuse connectivity work across residual net widths — Medium - -On a `1400 × 2800` board, use the 240 keepouts from item 6. Place 240 width-2 nets from `(5, 630 + 9*i, 0)` to `(45, 630 + 9*i + int(i >= 120), 0)`, with clearance 2. Direct planning locks the first 120 straights. The connectivity check finds no disconnected nets among the 120 remaining shifts. With uniform widths, it buffers 360 polygons and builds one union. Change the width of residual net `i` to `2 + 0.005*(i - 120)`. The test still finds no disconnected nets, while preparing 120 unions from 43,200 buffered polygons. Local interleaved probes took roughly 0.06 seconds and 6.8 seconds respectively. - -A separate 24-net automatic control with twelve straight locks and twelve mixed-width quarter turns reached this check twice and verified all 24 nets. Screen narrower nets against the widest residual width's free-space regions. Terminals already in one shared region can skip the narrower calculation. Keep the exact-width check where the shared result leaves connectivity unresolved. Compare disconnected IDs, lock selection, and coverage on mixed-width apertures and the corpus. [Connectivity check](../inire/router/_routing_policy.py#L117) · [Lock planning](../inire/router/_routing_policy.py#L155) - -## 20. Keep seed guidance from increasing the cost of free moves — Medium - -On a `120 × 100` board with no obstacles and zero clearance, use a width-2 net from `(10, 45, 0)` to `(100, 5, 270)`. Set lattice mode, eight expansion nodes, radius-10 quarter turns, no S-bends, visibility off, warm start off, one iteration, and refinement off. Set all four objective weights to zero. Supply `PathSeed((StraightSeed(80), Bend90Seed(10, "CW")))`. A matching move with computed cost zero receives a cost of 0.001 at the discount floor. The returned path stops after a straight at `(100, 45, 0)`. - -An in-memory probe capped the discounted cost at the original cost. On the same budget it verified the supplied prefix followed by a length-30 straight. Keep the discount nonincreasing while preserving its floor for moves whose original cost already exceeds the floor. Exercise zero and small positive original costs, seeded and unseeded search, and the low-length-cost benchmarks. [Guidance scoring](../inire/router/_astar_admission.py#L199) - -## Implementation order - -1. Fix bend admission, visibility coordinates, zero-iteration handling, and heading inference for seeded requests. Add targeted reproductions and run the timing-enabled suite. Enforce the worker deadline inside optional refinement and diagnostics. -2. Evaluate the two congestion stopping rules independently. Check the reproduced coverage gains, preserve successful pair repairs, and measure the runtime cost of continuing through a plateau. Handle tied partial outcomes after the coverage changes. -3. Correct pre-pair trace attribution separately from route selection. Update the expansion counters in a separate change so the metric baselines and any affected guardrails can be reconciled with measured work. -4. Change seed verification order, mesh scheduling, ray-index retention, and lock connectivity independently after the correctness fixes. Use the large uniform- and mixed-width layouts, the seeded 240-net board, and narrow passages to check the tradeoffs. Update the walkthrough once the retained routing paths are clear. -5. Correct the fixture unit conversion and compare old and new scores and paths separately from runtime router changes. Decouple the retry regression from the geometry planner's choice of candidates. Check the guidance discount against zero-cost and low-cost search. -6. Validate performance scenario selection and update release metadata. Verify the report and distribution artifacts in scratch directories. - -For each routing change, compare verified net IDs across the corpus and holdout under all three profiles. Preserve coverage, validate changed routes against obstacles, fixed routes, peers, and board bounds, and report length and runtime changes over the common verified nets. Use the full timing-enabled suite before combining changes. - -## Baseline verification - -- All 389 tests passed with performance checks enabled. Ruff passed. The local environment used Python 3.13.18, Shapely 2.1.2, and GEOS 3.13.1. -- All 152 corpus and retry-holdout boards were checked with `matched-budget`, `public-defaults`, and `corpus-regression`. Each profile produced 2,245 verified routes. Independent geometry checks agreed with the reports, and zero-node seed replays reproduced endpoint poses, lengths, and polygon outlines. -- The geometry sweeps covered 96 legal primitive seed replays, 384 active searches across four routing modes, 500 generated corridor plans, 4,320 physical-index comparisons, and 1,077 ray-intersection comparisons. They produced no additional findings. -- Five benchmark cases matched on geometry, counters, and traces across two Python hash seeds, with and without callbacks. The package archives passed content checks and the extracted wheel routed a guide case in the local environment. The documented `offset-gates` comparison also ran successfully with the current command. -- A follow-up sweep across 75 boards and three modes checked iteration handoff and selected partial geometry. Four of the 225 runs stopped at the pair-repair handoff before the configured iteration limit. Bypassing only that condition improved coverage in two runs, both on `blocking-turn-room`. -- The follow-up baseline again passed all 389 timing-enabled tests and Ruff. Another 144 rotated uniform- and mixed-width layouts verified from seed and agreed with the capacity and port-spacing checks. -- In 18 benchmark CLI mode and policy runs, verified outcomes agreed with the selected stages and reported cost entries. Four retry samples on `stress-refine-return-shelf` each verified all four nets and reported placement data for those same net IDs. - -## Previous closing review - -The next full review pass after items 12 and 13 found no additional issues. - -- Independently checked all 152 corpus and holdout boards under each of the three profiles on both Python 3.13.18 with Shapely 2.1.2 and GEOS 3.13.1, and Python 3.14.10 with Shapely 2.2.0 and GEOS 3.15.0. Each environment and profile verified 2,245 routes. Checked endpoint poses, polygon validity and clearance, and geometry and lengths after replay. -- On each dependency combination, 648 generated compound paths replayed from seeds and 96 active mixed-width gate layouts met their bounds and clearances. Callbacks, traces, and final reports agreed. The active control layouts returned equal paths and work counts with diagnostics enabled. -- Built the wheel and source archive and matched all 40 runtime modules in the wheel against the checkout. Exercised automatic, off, guide, and seed routing from the extracted wheel on both environments. All 12 advanced examples verified, the fixture export and five documentation figures regenerated byte for byte, and the local file links across the 15 active documentation pages resolved. -- All 389 timing-enabled tests and Ruff passed in the lockfile environment. The Python 3.14 suite passed 387 tests, skipped the opt-in performance test, and reproduced the one retry assertion failure in item 13. - -## Additional review of deadlines and diagnostics - -- All 389 timing-enabled tests and Ruff passed again. Across 128 seeded foldback controls with varied orientation, radius, width, spacing, and routing mode, refinement preserved endpoint poses, clearance, and route validity. All 128 changed placement without increasing the configured path cost. -- The deadline probes in item 14 exercised real frontier searches and refinement with a controlled clock. A sweep of 225 bounded runs produced one pre-pair trace, whose metadata matched the saved layout. The fan-out with seed 44 and a separate three-net control both reproduced the attribution issue in item 15. - -## Full-codebase review passes - -The expanded review took its scope from the 190 tracked files at `f6e7bac`, including 110 Python files. It covered library modules, tests and fixtures, reporting and import/export commands, examples and visualizations, documentation and archived reports, and packaging and dependency configuration. The first full-codebase pass added items 16–18 and found the imported grid omission in item 12. The release and link checks then added the missing installed-documentation targets in item 18 and the archived link in item 7. - -| Area | Evidence gathered in the follow-up passes | -| --- | --- | -| Public API, geometry, and collision state | 648 compound seed replays exercised terminal poses, clearance, snapshots, and callbacks. An independent oracle agreed with 1,920 physical-index queries after insertions, removals, and replacements. All 36 concurrent routing calls matched serial placements and coverage. | -| Search, constructive planners, congestion, and refinement | Independent clearance and seed-replay checks covered all 152 corpus and holdout boards under the three profiles on Python 3.11, 3.13, and 3.14. Each profile verified 2,245 routes in each environment. Another 96 mixed-width gate controls preserved paths and search work with diagnostics enabled. The earlier 128 refinement controls covered rotated and mirrored paths with several widths and spacings. A same-core check of the slower splitter-tree fixture recorded the same 15,653 expansions and the same verified IDs on Python 3.11 and 3.13. | -| Tests and diagnostics | The lockfile suite passed all 389 tests with performance checks enabled and Ruff passed. The Python 3.11 suite passed 388 tests with the opt-in timing test skipped. A branch-instrumented Python 3.14 run passed 377 tests with performance gates and the known item 13 assertion deselected. The deadline and pre-pair counterexamples were checked against the saved layouts. | -| Benchmarks, scripts, and data | All 16 script entry points accepted `--help`. Exercised benchmark comparisons, two-worker retries, parity snapshots, performance reports, four trace exports, and both waypoint entry points. All 27 exported paths replayed and independently met clearance. The external importer reproduced the checked-in data byte for byte from the two pinned archives. | -| Examples, visualization, and documentation | Executed the user-guide Python snippets with their documented inputs, ran nine numbered examples, and regenerated 24 documentation and gallery figures. Fifteen figures matched byte for byte. The changed gallery placements retained verified coverage and matched the accompanying descriptions. Checked 388 local links across 30 distinct tracked Markdown pages, including the archive and historical plans. The broken archive fragment is recorded in item 7. | -| Build and dependency compatibility | The lockfile check passed offline. Built the wheel and source archive and rebuilt the wheel from the unpacked archive. The 40 runtime Python files matched the checkout. The installed wheel routed in four modes and serialized results on Python 3.11.11 with Shapely 2.1.0, GEOS 3.13.1, and NumPy 1.26.4 and 2.2.6. The four plotting helpers produced PNGs on the minimum Python and Shapely versions. The unpacked source distribution ran the waypoint export to 9/9. | - -The final full-codebase pass after documenting those findings found no additional issues. It reran the suite, independent corpus verification, replay and index controls, command and data round-trips, source and installed documentation checks, and release builds. The numbered findings record the fixes identified at that review baseline. - -## Additional review of lock connectivity and guidance costs - -The next requested pass added items 19 and 20. A two-width aperture control classified the wide net as disconnected and retained the narrow net. The valid eight-node control path also verified independently in seed replay. - -All 389 timing-enabled tests passed and Ruff passed. The offline lockfile check, wheel and source archive rebuild, and a smoke test of all 16 command entry points passed again. Benchmark, retry, parity, waypoint, and diagnostics commands produced their artifacts in scratch directories. - -## Review pass after items 19 and 20 - -This pass found no additional issues at `f6e7bac`. It covered the routing and geometry modules, public results, benchmark and diagnostic commands, fixture data, documentation and generated figures, and release artifacts. - -- All 389 tests passed with performance checks enabled, Ruff passed, and the offline lockfile check passed. Independent geometry and seed-replay checks verified 2,245 routes per profile across all 152 corpus and holdout boards. -- Search-time and final same-net collision checks agreed on 1,008 generated paths, including 244 with overlaps. Across 240 bounded search configurations, traced and ordinary routing agreed on paths and work counts. All 96 verified placements in that matrix met clearance and bounds. Compound replay, mixed-width gate, physical index mutation, and concurrent placement controls passed again. -- The review checked all 16 script entry points. Selected coverage agreed with reported costs and placement data in 18 comparison records and eight retry samples. Both pinned archive imports regenerated the external fixture data byte for byte. The twelve core documentation figures also regenerated byte for byte. -- The wheel and source archive rebuilt successfully and all 40 runtime modules matched. The extracted wheel passed routing in the four search modes and result serialization on Python 3.11 with Shapely 2.1.0. diff --git a/plans/routing-simplification.md b/plans/routing-simplification.md deleted file mode 100644 index 33cc0ab..0000000 --- a/plans/routing-simplification.md +++ /dev/null @@ -1,96 +0,0 @@ -# Routing simplification plan - -Reduce the amount of routing state we rebuild and the number of places that define the same policy. Start with three changes that have a small implementation scope and clear parity checks. Prototype the changes that can affect geometry ordering, cost comparisons, or search work. Keep the public routing modes, defaults, and result fields stable through these batches. - -The baseline is `6608e18`. Its two regression profiles verified 433 of 437 nets across 67 boards, reached every board's routing bound, and completed Terminal-Bench at 9/9. The earlier refactor covers the existing boundaries for the search, diagnostics, and planners. Use the [historical routing refactor plan](../archive/routing/routing-refactor-plan.md) for the rationale behind those boundaries. - -The implementation, parity checks, and decisions on each prototype are recorded in the [simplification results](../archive/routing/simplification-results.md). - -## First implementation batch - -1. **Reuse the installed paths when the last iteration is already the best.** Skip reinstalling geometry when the live index is known to represent the saved result set. Preserve full restoration after a timeout, when an earlier iteration won, and when an iteration callback is present. Exercise all three cases, including a callback that modifies the result mapping. Start with [best-iteration restoration](../inire/router/_router.py#L403). - - An in-memory prototype passed all 134 corpus and 20 diagnostic comparisons after allowing changes in the two path-object counters. It avoided 9,201 removals and 9,201 insertions across the 67 public-default boards. - -2. **Use one layout ranking key.** Iteration selection and pair-local repair both prefer more completed nets, then fewer conflict edges, then fewer dynamic collisions. Put those criteria in one comparison key. Preserve the path-length tie-break and its tolerance in pair-local repair. Check all three tie-breaks and the first recorded iteration before comparing the corpus. Start with [iteration selection](../inire/router/_router.py#L395). - -3. **Use one stable net ordering helper.** Lattice routing, direct locking, and joint-lane recovery each implement Manhattan-distance ordering for `shortest` and `longest`. Share the sort while preserving input order for equal distances and the subsequent priority pass for direct locks. Focus the initial check on mixed headings, equal-distance nets, and alternate lock order. Compare planner stages as well as paths. Start with the [direct lock planner](../inire/router/_routing_policy.py#L77). - -## Small routing and diagnostic cleanups - -4. **Represent a pair of conflicting nets as two IDs.** Replace the single-field pair target class and its order helper with the existing pair of IDs. Keep the order in which targets are visited and the forward and reverse attempts. Verify the two-pair limit and disjoint-edge rule in [pair target selection](../inire/router/_router.py#L666). - -5. **Restore the incumbent once after a rejected pair replacement.** An unsuccessful pair search runs in a local world. The live-world candidate check already restores the incumbent on rejection. Exercise both failure paths before removing the unconditional final reinstall. Check the live index, reports, and path-object counters after a rejection followed by a second attempt. Start with [pair replacement and rollback](../inire/router/_router.py#L761). - -6. **Collect component overlaps when a report consumes them.** Pair-local candidate selection reads net-level conflicts and validity. Check whether its live-world verification can omit component details while leaving the restored and final trace captures intact. Compare exact conflict payloads with each capture flag enabled on its own. Start with [pair candidate verification](../inire/router/_router.py#L761). - -7. **Share incumbent guidance in frontier replay.** Frontier replay selects reached paths and computes the same seed and bonus used for reroute guidance. Use the shared helper at that call site once the replay preconditions are confirmed. Compare sampled prune reasons and verify that the diagnostic run still leaves the selected route and production counters intact. Start with [incumbent guidance](../inire/router/_search.py#L18). - -8. **Remove the unused visibility wrapper.** Delete `_ensure_current` after checking the named corner-index and corner-graph entry points. Run the visibility tests for exact and tangent modes and preserve the distinction between index-only preparation and graph construction. See the [visibility manager](../inire/router/visibility.py#L49). - -## Prototypes for installed geometry and verification - -9. **Keep a capped incumbent installed when the next attempt will carry it forward.** The late capped branch removes the old geometry before immediately installing the incumbent again. Prototype moving that decision ahead of index mutation when the installed path is known. Exercise late caps, partial results, caller seeds, and mutable callback results. The fallback counters and per-net trace should still describe the same attempt. Start with [routing one net](../inire/router/_router.py#L831). - -10. **Keep unchanged nets in the index during pair repair.** A replacement for two nets currently rebuilds the installed set. Prototype a narrower replace and rollback for the two changed nets. Compare component indices and candidate order in conflict reports, especially with several components per net. Check rejected repairs and a successful repair followed by another pair. Accept the change if the local update stays simpler than managing the full rebuild and measurably reduces work. See [installed-path replacement](../inire/router/_router.py#L359). - -11. **Reuse verified reports when the geometry and net set match.** Compare the iteration review, restored review, and final verifier. Identify where the same paths and obstacle state are checked again without an intervening repair or refinement. Preserve the final reports for partial paths and the extra details needed for frontier replay. Measure verification calls and exact checks on a clean worker run and a worker that restores an earlier iteration. Start with the [final verification path](../inire/router/_router.py#L1087). - -12. **Skip refinement setup for paths that cannot supply a window.** The driver removes a path before the refiner checks whether it has enough bends. Check eligibility before removing geometry, using the same rule in direct refiner calls. Compare index updates and `refine_path_calls` on straight, S-bend, and bend-heavy fixtures. Preserve the geometry seen by a real refinement attempt. See [refinement eligibility](../inire/router/refiner.py#L317). - -## Prototypes for scoring and collision work - -13. **Score the changed portion of a refinement window.** Candidate scoring currently walks the prefix, replacement, and suffix for each proposal. Test whether the unchanged portions can be reused for the first cost comparison. Preserve the definitive score after materializing geometry and check floating-point ties near the improvement threshold. Compare candidates built and accepted, path cost, and score calls on long foldbacks and alternating doglegs. Start with [refinement window scoring](../inire/router/refiner.py#L267). - -14. **Build the proximity tree only when a worker can use it.** Keep the board bounds check available. Skip boundary sampling when the search objective and any enabled refinement objective both have zero danger weight. For pair-local search, check the objective it actually uses. Exercise a run with zero search danger weight and nonzero refinement danger weight, and verify that custom bends and bounds behave as before. Start with [worker initialization](../inire/router/_stack.py#L34). - -15. **Measure reuse of static clearance buffers.** Repeated physical verification buffers component polygons against the same clearance. Profile the buffer calls on a dense static layout and compare a small reuse experiment with its retained memory. Account for clearance, the geometry used for verification, and the exact distance check at mitred corners. Keep boundary touching and custom physical bends in the comparison. See [static path verification](../inire/geometry/collision.py#L659). - -16. **Measure overlap between the congestion prechecks.** Count how often grid presence and envelope checks reject a candidate before exact tests, and how much each cached query costs. Test removal or consolidation of one layer on sparse and congested layouts where that layer contributes little. Preserve frozen-net blocking and conflict counts. If pruning pays for the extra state, record the cases that depend on it. Start with [dynamic congestion queries](../inire/geometry/collision.py#L334). - -## Worker and planner setup - -17. **Prepare the joint-lane residual once.** Joint-lane recovery builds a residual board for corridor planning and reconstructs it for search. Pass the prepared nets and keepouts through both operations. Compare skipped IDs, lock order, topology reports, and stage labels on the joint-lane regression test. Use the same preparation for perimeter recovery only where its inputs and result merge match. Start with [joint-lane recovery](../inire/router/_automatic.py#L538). - -18. **Share worker objective initialization where the inputs match.** The ordinary worker and pair-local worker each pass the same objective fields into the evaluator. A shared constructor can lift that mapping out of both paths. Keep each worker's obstacle set explicit, including the distinction between polygons used as locks and polygons used for proximity costs. Preserve the current greedy weight during pair repair. Compare the fan-out callbacks and pair-local traces. See the [pair-local context](../inire/router/_pair_local.py#L21). - -19. **Share the physical containment predicate.** Automatic trial selection and explicit bundle routing both check whether the board covers the returned path polygons. Reuse that check while retaining each caller's error or report handling. Verify designs with flush ports, a shape extending beyond the board, and a custom physical bend. Start with [automatic trial validation](../inire/router/_routing_policy.py#L245). - -20. **Assemble worker results in one place.** The stack and example trace fixture both read the pathfinder's metrics, traces, and results into `RoutingRunResult`. Reuse the production assembly path and check how topology data is populated. Keep fan-out's iteration callback on its existing worker. Compare example traces and explicit guide and seed results before removing the fixture formatter. Start with [worker result assembly](../inire/router/_stack.py#L94). - -## Benchmark and example tooling - -21. **Derive the example runs and snapshots from one registry.** Each ordinary scenario has a run wrapper that calls its snapshot and converts the result. Share the fixture names and order between the outcome tests and the snapshot command. Preserve the timing boundaries and check every existing scenario name. Keep the heavier and trace entries available through their current selectors. Start with the [example scenario registry](../inire/tests/example_scenarios.py#L440). - -22. **Share snapshot selection between recording and comparison.** Both commands select the same registry, filter by scenario, and run the selected captures. Reuse that selection and execution logic with the existing snapshot objects. Let each command keep its output schema. Check repeated `--scenario`, the working `--include-performance-only` flag, and comparison against older baselines. Start with [performance baseline recording](../scripts/record_performance_baseline.py#L13). - -23. **Use the public fixed-route workflow in the locked-path example.** The example script adds a static copy of the first route to a world that still has the path installed. Route the second net with a fresh problem whose keepouts include the first route's physical polygons, as the benchmark fixture now does. Compare exact paths and the rendered plot. Explain any scoring setting needed to reproduce the detour. See the [locked-path example](../examples/03_locked_paths.py). - -## Larger changes with a specific trigger - -24. **Consolidate residual routing around a new recovery case.** Item 17 addresses one repeated construction. A broader interface pays off when another planner needs shared logic for frozen paths, movable seeds, or joining an unresolved result. First inventory which stages require a complete layout check and how they report skipped and unresolved IDs. Design around a concrete duplicate operation and test it across the affected planners. Use the [residual routing policy](../inire/router/_routing_policy.py#L192) as the starting point. - -25. **Split collision queries along a demonstrated boundary.** Use the candidate and exact-test profiles from items 15 and 16 to identify a useful separation between lookup, exact overlap, or ray casting. Keep the hot-path call count, physical clearance, proxy geometry, and cache invalidation visible. Exercise visibility modes, rotated ports, crossing approaches, and custom polygons. Begin with the [collision query code](../inire/geometry/collision.py). - -26. **Revisit public option grouping when an API change is warranted.** Consider consolidating legacy bend geometry options and grouping planner-specific fields when a caller-facing change gives that work a purpose. Inventory existing constructors, custom polygon behavior, serialized benchmark options, and documentation. Plan migration before changing defaults or removing names. Start with the [public option definitions](../inire/model.py). - -## Verification and sequencing - -1. Capture the current corpus with `scripts.routing_benchmark_parity capture` before starting items 1 through 3. Use both `corpus-regression` and `public-defaults`. Add a focused capture with `--callbacks` and `--diagnostics` for Terminal-Bench, obstructed crossings, the mixed port bank, and a fixture with caller seeds. Include the two no-warm-start fan-out seeds for pair repair. -2. Land items 1 through 3 as independently reviewable changes. Then group items 4 through 8 by the behavior they exercise. Tooling items 20 through 23 can proceed on their own because they have focused scenario and script checks. -3. Run the related tests and exact parity for each routing change. Compare verified IDs, paths, native and benchmark costs, selected stage, stage order, bounds, callbacks, traces, and stable counters. List intentional counter differences by name in the comparison. Use `overloaded-gate` and `lidar-clements-8x8` to check that expected geometric bounds still explain incomplete coverage. -4. Prototype items 9 through 16 separately so any route or counter difference has one likely cause. Record the fixture, profile, counts, and result for each trial. For a speed claim, run repeated wall-time measurements with matching options and worker count, and examine both the median and individual slow boards. -5. Run the full test suite and the opt-in example performance tests before combining the routing changes. Refresh an archived example baseline when fixture semantics change. Keep exploratory measurements in scratch output until they support an implementation decision. - -For item 1, take the first capture at the baseline revision and the second at the candidate revision. - -```sh -python -m scripts.routing_benchmark_parity capture /tmp/inire-simplification-before.json --case corpus --jobs 4 -python -m scripts.routing_benchmark_parity capture /tmp/inire-simplification-after.json --case corpus --jobs 4 -python -m scripts.routing_benchmark_parity compare \ - /tmp/inire-simplification-before.json /tmp/inire-simplification-after.json \ - --allow-counter-change dynamic_path_objects_added \ - --allow-counter-change dynamic_path_objects_removed -``` - -For the stable comparison fields and diagnostic capture options, use the [exact parity workflow](../docs/routing-diagnostics.md#reproduce-and-compare). diff --git a/scripts/benchmark_retry_order.py b/scripts/benchmark_retry_order.py deleted file mode 100644 index a761abc..0000000 --- a/scripts/benchmark_retry_order.py +++ /dev/null @@ -1,268 +0,0 @@ -"""Compare opt-in automatic retry orders on the routing corpus.""" - -from __future__ import annotations - -from argparse import ArgumentParser -from concurrent.futures import ProcessPoolExecutor -from dataclasses import asdict, dataclass, replace -from functools import partial -from json import dumps -from pathlib import Path -from statistics import median -from time import perf_counter -from typing import TYPE_CHECKING - -from inire import _route, route -from inire.router._automatic import _AutomaticRun -from inire.router._routing_policy import LockPlan, _best_trial, _disconnected_nets, _route_residual -from inire.tests.routing_corpus import ( - CASE_GROUPS, - PROFILES, - automatic_options, - benchmark_weighted_length, - native_verified_costs, - profile_options, - route_placement, - select_cases, -) - -if TYPE_CHECKING: - from typing import Literal - - from inire import _IterationCallback - from inire.model import RoutingOptions, RoutingProblem - from inire.results import RoutingResult, RoutingRunResult - from inire.router._routing_policy import Trial - from inire.seeds import PathSeed - from inire.tests.routing_benchmark_case import BenchmarkCase - - -@dataclass(frozen=True, slots=True) -class _RetryPolicy: - lattice_limit: int | None = None - probe_iterations: int | Literal["configured"] | None = None - residual_limit: int | None = None - residual_after_fallback: bool = False - - -_POLICIES = { - "baseline": _RetryPolicy(), - **{f"lattice-{limit}": _RetryPolicy(lattice_limit=limit) for limit in (500, 750, 1000, 1500, 2000)}, - **{f"probe-iterations-{count}": _RetryPolicy(probe_iterations=count) for count in (1, 2, 3)}, - "probe-full-budget": _RetryPolicy(probe_iterations="configured"), - **{f"residual-{limit}": _RetryPolicy(residual_limit=limit) for limit in (1500, 3000)}, - "late-residual-3000": _RetryPolicy(residual_limit=3000, residual_after_fallback=True), -} - - -class _RetryExperiment(_AutomaticRun): - def __init__( - self, - problem: RoutingProblem, - options: RoutingOptions, - iteration_callback: _IterationCallback | None, - policy: _RetryPolicy, - ) -> None: - super().__init__(problem, options, iteration_callback) - self.retry_policy = policy - self.retry_attempts: list[dict] = [] - - def _record_retry(self, policy: str, outcome: str, started: float, first_attempt: int) -> None: - self.retry_attempts.append({ - "policy": policy, - "outcome": outcome, - "elapsed_s": perf_counter() - started, - "nodes_expanded": sum(metrics.nodes_expanded for metrics in self.attempts.samples[first_attempt:]), - }) - - def _search_trials(self, trials: list[Trial], target: int) -> None: - super()._search_trials(trials, target) - limit = self.retry_policy.residual_limit - if ( - not self.retry_policy.residual_after_fallback - or limit is None - or limit > self.options.search.node_limit - or target != len(self.problem.nets) - or self.problem.initial_paths - ): - return - best = _best_trial(trials) - if target <= 2 or len(best.valid_costs) != target - 1: - return - - retained = {net_id: best.run.results_by_net[net_id] for net_id in best.valid_costs} - options = replace(self.options, refinement=replace(self.options.refinement, enabled=False)) - trials.extend(self._widen_residual(options, retained, limit, target, policy="late-bounded-residual", check_connectivity=True)) - - def _direct(self, options: RoutingOptions, policy: str, *, hints: dict[str, PathSeed] | None = None) -> list[Trial]: - cap = self.retry_policy.probe_iterations - if policy == "direct-probe-near-port" and cap is not None: - configured = self.options.congestion.max_iterations - iterations = configured if cap == "configured" else min(configured, cap) - if iterations != options.congestion.max_iterations: - options = replace(options, congestion=replace(options.congestion, max_iterations=iterations)) - return super()._direct(options, policy, hints=hints) - - def _seed_recovery_trials(self, options: RoutingOptions, trials: list[Trial], target: int) -> None: - limit = self.retry_policy.lattice_limit - if ( - limit is not None - and limit <= self.options.search.node_limit - and target == len(self.problem.nets) > 2 - and not self.problem.initial_paths - and _near_port_coverage_stalled(trials, target) - ): - retry = replace(options, search=replace(options.search, node_limit=limit)) - started, first_attempt = perf_counter(), len(self.attempts.samples) - self._lattice_fallback(trials, retry, "Near-port and lookahead searches were one net short", policy="early-bounded-lattice") - complete = len(trials[-1].valid_costs) == target - self._record_retry("bounded-lattice", "complete" if complete else "incomplete", started, first_attempt) - if complete: - return - trials[-1] = replace(trials[-1], selection="incomplete-layout") - super()._seed_recovery_trials(options, trials, target) - - def _incumbent_trials(self, options: RoutingOptions, best: Trial, target: int) -> list[Trial]: - trials = super()._incumbent_trials(options, best, target) - limit = self.retry_policy.residual_limit - if ( - limit is None - or self.retry_policy.residual_after_fallback - or not options.search.node_limit < limit <= self.options.search.node_limit - or target != len(self.problem.nets) - or len(best.valid_costs) != target - 1 - or not trials - or trials[0].stage.kind != "incumbent-residual" - or any(trial.selectable and len(trial.valid_costs) >= target for trial in trials) - ): - return trials - - retained = {net_id: best.run.results_by_net[net_id] for net_id in best.valid_costs} - return [*trials, *self._widen_residual(options, retained, limit, target, policy="bounded-residual")] - - def _widen_residual( - self, - options: RoutingOptions, - retained: dict[str, RoutingResult], - limit: int, - target: int, - *, - policy: str, - check_connectivity: bool = False, - ) -> list[Trial]: - started, first_attempt = perf_counter(), len(self.attempts.samples) - if check_connectivity: - with self._time("plan", policy=policy): - blocked = _disconnected_nets(self.problem, self.board, options, retained) - if blocked: - self._record_retry(policy, "disconnected", started, first_attempt) - return [] - - retry = replace( - options, - search=replace(options.search, node_limit=limit), - topology=replace(options.topology, seed_node_limit=max(limit, options.topology.seed_node_limit)), - congestion=replace(options.congestion, max_iterations=min(2, options.congestion.max_iterations)), - ) - run, stage = _route_residual(self.problem, retry, LockPlan(retained), residual_mode="seed", run_route=partial(self._run, policy=policy)) - trial = self._trial(run, replace(stage, kind=policy, policy=policy, incumbent_net_ids=tuple(retained))) - trials = [replace(trial, selection="requires-layout-check")] - complete = False - if len(trial.valid_costs) == target: - verified = self._verify_incumbent(trial) - complete = len(verified.valid_costs) == target - trials.append(verified if complete else replace(verified, selection="incomplete-layout")) - self._record_retry(policy, "complete" if complete else "incomplete", started, first_attempt) - return trials - - -def _near_port_coverage_stalled(trials: list[Trial], target: int) -> bool: - near = [trial for trial in trials if trial.selectable and trial.stage.policy == "direct-probe-near-port"] - wider = [trial for trial in trials if trial.selectable and trial.stage.policy == "direct-lookahead-retry"] - if not near or not wider: - return False - first, second = _best_trial(near), _best_trial(wider) - return len(first.valid_costs) == target - 1 and first.valid_costs.keys() == second.valid_costs.keys() - - -def _measure(case: BenchmarkCase, profile: str, name: str, *, capture_details: bool = True) -> dict: - options = automatic_options(profile_options(case, profile), profile) - retry_attempts: list[dict] = [] - - def run_experiment( - problem: RoutingProblem, options: RoutingOptions, iteration_callback: _IterationCallback | None, - ) -> RoutingRunResult: - experiment = _RetryExperiment(problem, options, iteration_callback, _POLICIES[name]) - run = experiment.execute() - retry_attempts.extend(experiment.retry_attempts) - return run - - started = perf_counter() - if name == "baseline": - run = route(case.problem, options=options) - else: - run = _route(case.problem, options=options, run_router=run_experiment) - elapsed = perf_counter() - started - report = run.automatic - assert report is not None - verified = sorted(report.verified_net_ids) - summary = {"elapsed_s": elapsed, "verified": verified} - if not capture_details: - return summary - return { - **summary, - "routing_bound": report.max_routed, - "nodes_expanded": run.metrics.nodes_expanded, - "weighted_cost": {net_id: benchmark_weighted_length(run.results_by_net[net_id]) for net_id in verified}, - "native_cost": native_verified_costs(case, options, run.results_by_net, verified), - "seeds": {net_id: repr(run.results_by_net[net_id].as_seed()) for net_id in verified}, - "placements": {net_id: route_placement(run.results_by_net[net_id]) for net_id in verified}, - "stages": [asdict(stage) for stage in report.stages], - "selected_stage": report.selected_stage, - "retry_attempts": retry_attempts, - "timings": [asdict(timing) for timing in report.timings], - } - - -def _measure_case(job: tuple[BenchmarkCase, str, tuple[str, ...], int, bool]) -> dict: - case, profile, policies, repeats, capture_details = job - samples = {name: [] for name in policies} - for index in range(repeats): - offset = index % len(policies) - for name in policies[offset:] + policies[:offset]: - samples[name].append(_measure(case, profile, name, capture_details=capture_details)) - return {"case": case.name, "profile": profile, "required": len(case.problem.nets), "samples": samples} - - -def main() -> None: - parser = ArgumentParser(description=__doc__) - parser.add_argument("--case", choices=tuple(CASE_GROUPS), action="append") - parser.add_argument("--profile", choices=PROFILES, action="append") - parser.add_argument("--policy", choices=tuple(_POLICIES), action="append") - parser.add_argument("--repeat", type=int, default=1) - parser.add_argument("--jobs", type=int, default=1) - parser.add_argument("--json", type=Path, help="Write per-run coverage, placement, costs, and retry details to this file.") - args = parser.parse_args() - if args.repeat < 1 or args.jobs < 1: - parser.error("--repeat and --jobs must be positive") - cases = select_cases(args.case or ["corpus"]) - profiles = tuple(dict.fromkeys(args.profile or ("public-defaults", "corpus-regression"))) - policies = tuple(dict.fromkeys(args.policy or _POLICIES)) - capture_details = args.json is not None - jobs = [(case, profile, policies, args.repeat, capture_details) for case in cases for profile in profiles] - rows = [] - with ProcessPoolExecutor(max_workers=args.jobs) as pool: - for result in pool.map(_measure_case, jobs): - if capture_details: - rows.append(result) - summary = " ".join( - f"{name}={len(samples[0]['verified'])}/{result['required']}@{median(s['elapsed_s'] for s in samples):.3f}s" - for name, samples in result["samples"].items() - ) - print(result["case"], result["profile"], summary, flush=True) - if args.json is not None: - args.json.write_text(dumps({"runs": rows}, indent=2) + "\n", encoding="utf-8") - - -if __name__ == "__main__": - main() diff --git a/scripts/characterize_pair_local_search.py b/scripts/characterize_pair_local_search.py deleted file mode 100644 index 1a697b5..0000000 --- a/scripts/characterize_pair_local_search.py +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/env python3 -from __future__ import annotations - -import argparse -import json -from dataclasses import asdict -from datetime import datetime -from pathlib import Path -from time import perf_counter - -from inire.tests.example_scenarios import _run_example_07_variant - - -def _parse_csv_ints(raw: str) -> tuple[int, ...]: - return tuple(int(part) for part in raw.split(",") if part.strip()) - - -def _run_case(num_nets: int, seed: int) -> dict[str, object]: - t0 = perf_counter() - run = _run_example_07_variant( - num_nets=num_nets, - seed=seed, - warm_start_enabled=False, - ) - duration_s = perf_counter() - t0 - return { - "duration_s": duration_s, - "summary": { - "total_results": len(run.results_by_net), - "valid_results": sum(1 for result in run.results_by_net.values() if result.is_valid), - "reached_targets": sum(1 for result in run.results_by_net.values() if result.reached_target), - }, - "metrics": asdict(run.metrics), - } - - -def _is_smoke_candidate(entry: dict[str, object]) -> bool: - summary = entry["summary"] - metrics = entry["metrics"] - return ( - summary["valid_results"] == summary["total_results"] - and metrics["pair_local_search_accepts"] >= 1 - and entry["duration_s"] <= 1.0 - ) - - -def _select_smoke_case(cases: list[dict[str, object]]) -> dict[str, object] | None: - grouped: dict[tuple[int, int], list[dict[str, object]]] = {} - for case in cases: - key = (case["num_nets"], case["seed"]) - grouped.setdefault(key, []).append(case) - - candidates = [] - for (num_nets, seed), repeats in grouped.items(): - if repeats and all(_is_smoke_candidate(repeat) for repeat in repeats): - candidates.append({"num_nets": num_nets, "seed": seed}) - if not candidates: - return None - candidates.sort(key=lambda item: (item["num_nets"], item["seed"])) - return candidates[0] - - -def _render_markdown(payload: dict[str, object]) -> str: - lines = [ - "# Pair-Local Search Characterization", - "", - f"Generated at {payload['generated_at']} by `{payload['generator']}`.", - "", - f"Grid: `num_nets={payload['grid']['num_nets']}`, `seed={payload['grid']['seeds']}`, repeats={payload['grid']['repeats']}.", - "", - "| Nets | Seed | Repeat | Duration (s) | Valid | Reached | Pair Pairs | Pair Accepts | Pair Nodes | Nodes | Checks |", - "| :-- | :-- | :-- | --: | --: | --: | --: | --: | --: | --: | --: |", - ] - for case in payload["cases"]: - summary = case["summary"] - metrics = case["metrics"] - lines.append( - "| " - f"{case['num_nets']} | " - f"{case['seed']} | " - f"{case['repeat']} | " - f"{case['duration_s']:.4f} | " - f"{summary['valid_results']} | " - f"{summary['reached_targets']} | " - f"{metrics['pair_local_search_pairs_considered']} | " - f"{metrics['pair_local_search_accepts']} | " - f"{metrics['pair_local_search_nodes_expanded']} | " - f"{metrics['nodes_expanded']} | " - f"{metrics['congestion_check_calls']} |" - ) - - lines.extend(["", "## Recommendation", ""]) - recommended = payload["recommended_smoke_scenario"] - if recommended is None: - lines.append( - "No smaller stable pair-local smoke scenario satisfied the rule " - "`valid_results == total_results`, `pair_local_search_accepts >= 1`, and `duration_s <= 1.0` across all repeats." - ) - else: - lines.append( - f"Recommended smoke scenario: `num_nets={recommended['num_nets']}`, `seed={recommended['seed']}`." - ) - return "\n".join(lines) - - -def main() -> None: - parser = argparse.ArgumentParser(description="Characterize pair-local search across example_07-style no-warm runs.") - parser.add_argument( - "--num-nets", - default="6,8,10", - help="Comma-separated num_nets values to sweep. Default: 6,8,10.", - ) - parser.add_argument( - "--seeds", - default="41,42,43", - help="Comma-separated seed values to sweep. Default: 41,42,43.", - ) - parser.add_argument( - "--repeats", - type=int, - default=2, - help="Number of repeated runs per (num_nets, seed). Default: 2.", - ) - parser.add_argument( - "--output-dir", - type=Path, - default=None, - help="Directory to write pair_local_characterization.json and .md into. Defaults to /archive/routing.", - ) - args = parser.parse_args() - - repo_root = Path(__file__).resolve().parents[1] - output_dir = repo_root / "archive" / "routing" if args.output_dir is None else args.output_dir.resolve() - output_dir.mkdir(parents=True, exist_ok=True) - - num_nets_values = _parse_csv_ints(args.num_nets) - seed_values = _parse_csv_ints(args.seeds) - - cases: list[dict[str, object]] = [] - for num_nets in num_nets_values: - for seed in seed_values: - for repeat in range(args.repeats): - case = _run_case(num_nets, seed) - case["num_nets"] = num_nets - case["seed"] = seed - case["repeat"] = repeat - cases.append(case) - - payload = { - "generated_at": datetime.now().astimezone().isoformat(timespec="seconds"), - "generator": "scripts/characterize_pair_local_search.py", - "grid": { - "num_nets": list(num_nets_values), - "seeds": list(seed_values), - "repeats": args.repeats, - }, - "cases": cases, - "recommended_smoke_scenario": _select_smoke_case(cases), - } - - json_path = output_dir / "pair_local_characterization.json" - markdown_path = output_dir / "pair_local_characterization.md" - json_path.write_text(json.dumps(payload, indent=2, sort_keys=True) + "\n") - markdown_path.write_text(_render_markdown(payload) + "\n") - - if json_path.is_relative_to(repo_root): - print(f"Wrote {json_path.relative_to(repo_root)}") - else: - print(f"Wrote {json_path}") - if markdown_path.is_relative_to(repo_root): - print(f"Wrote {markdown_path.relative_to(repo_root)}") - else: - print(f"Wrote {markdown_path}") - - -if __name__ == "__main__": - main() diff --git a/scripts/compare_topological_routing.py b/scripts/compare_topological_routing.py deleted file mode 100644 index 128e3ec..0000000 --- a/scripts/compare_topological_routing.py +++ /dev/null @@ -1,434 +0,0 @@ -"""Compare the public routing modes on selected routing benchmarks.""" - -from __future__ import annotations - -from argparse import ArgumentParser -from dataclasses import asdict, dataclass, replace -from functools import partial -from json import dumps -from math import ceil, isfinite -from pathlib import Path -from platform import python_version -from statistics import median -from time import perf_counter -from typing import TYPE_CHECKING - -import shapely -from shapely.geometry import box, mapping - -from inire import RoutingOptions, RoutingStage, _dispatch_route, _route, route -from inire.router._routing_policy import LockPlan, _best_trial, _residual_problem -from inire.router._routing_policy import _trial as _summarize_trial -from inire.router._stack import route_once -from inire.tests.direct_routing_policies import DIRECT_POLICIES -from inire.tests.direct_routing_policies import direct_trials as _direct_trials -from inire.tests.routing_corpus import ( - AUTOMATIC_POLICIES, - CASE_GROUPS, - EXAMPLE_NAMES, - PROFILES, - automatic_options, - benchmark_weighted_length, - native_verified_costs, - profile_options, - select_cases, -) - -if TYPE_CHECKING: - from inire import CapacityLimit, RoutingProblem, RoutingRunResult, RoutingTiming, TopologyReport, _IterationCallback - from inire.router._routing_policy import RouteCall, Trial - from inire.tests.routing_benchmark_case import BenchmarkCase - - -ORDER_POLICIES = ("seed-order-restart", "seed-order-initial", "seed-order-locked") -BUNDLE_POLICIES = ("bundle-first", "bundle-first-refine") -POLICIES = (*DIRECT_POLICIES, *ORDER_POLICIES, *BUNDLE_POLICIES, *AUTOMATIC_POLICIES) - - -@dataclass(frozen=True, slots=True) -class RunSample: - duration_s: float - net_outcomes: dict[str, str] - valid_costs: dict[str, float] - native_valid_costs: dict[str, float] - reached_net_ids: tuple[str, ...] - out_of_bounds_net_ids: tuple[str, ...] - nodes_expanded: int - route_iterations: int - topology: TopologyReport | None - stages: tuple[RoutingStage, ...] - attempt_options: tuple[RoutingOptions, ...] - bundle_rejection: str | None = None - bundle_duration_s: float | None = None - selected_stage: int = 0 - selected_attempt: int | None = None - capacity_limit: CapacityLimit | None = None - planner_rejections: tuple[str, ...] = () - port_conflicts: tuple[tuple[str, str], ...] = () - max_routed: int | None = None - cost_pass_performed: bool = False - timings: tuple[RoutingTiming, ...] = () - - -_trial = partial(_summarize_trial, score=benchmark_weighted_length) - - -def _mode_options(options: RoutingOptions, strategy: str, profile: str = "matched-budget") -> RoutingOptions: - if strategy in AUTOMATIC_POLICIES: - return automatic_options(options, profile, strategy) - if strategy in POLICIES: - return options - return replace(options, topology=replace(options.topology, mode=strategy)) - - -def _order_trials(problem: RoutingProblem, options: RoutingOptions, strategy: str, *, run_route: RouteCall = route) -> list[Trial]: - limit = options.search.node_limit - first_limit = max(1, limit // 2) - first_order = options.congestion.net_order - first_options = replace(options, search=replace(options.search, node_limit=first_limit), topology=replace(options.topology, mode="seed")) - run = run_route(problem, options=first_options) - first = _trial(run, RoutingStage("seed", (), run.metrics.nodes_expanded, first_limit, net_order=first_order)) - if len(first.valid_costs) == len(problem.nets) or limit == 1: - return [first] - - second_order = "shortest" if first_order == "longest" else "longest" - second_limit = limit - first_limit - second_options = replace( - first_options, - search=replace(options.search, node_limit=second_limit), - congestion=replace(options.congestion, net_order=second_order), - ) - incumbents = {net_id: run.results_by_net[net_id] for net_id in first.valid_costs} if strategy != "seed-order-restart" else {} - if strategy == "seed-order-initial": - seeds = {net_id: result.as_seed() for net_id, result in incumbents.items()} - second_problem = replace(problem, initial_paths={**seeds, **problem.initial_paths}) - elif strategy == "seed-order-locked" and incumbents: - second_problem = _residual_problem(problem, LockPlan(incumbents)) - else: - second_problem = problem - - run = run_route(second_problem, options=second_options) - if strategy == "seed-order-locked": - run = replace(run, results_by_net={**incumbents, **run.results_by_net}) - stage = RoutingStage("seed", (), run.metrics.nodes_expanded, second_limit, net_order=second_order, incumbent_net_ids=tuple(incumbents)) - return [first, _trial(run, stage)] - - -def _measure(case: BenchmarkCase, options: RoutingOptions, strategy: str) -> RunSample: - board = box(*case.problem.bounds) - attempt_options: list[RoutingOptions] = [] - selected_attempt: int | None = None - - def select_attempt(index: int) -> None: - nonlocal selected_attempt - selected_attempt = index - - dispatch = partial( - _dispatch_route, attempt_callback=attempt_options.append, - selected_attempt_callback=select_attempt if strategy in ("guide", "seed") else None, - ) - run_route = partial(_route, run_router=dispatch) - run_worker = partial(route_once, attempt_callback=attempt_options.append) - - def measure_direct(problem: RoutingProblem, policy: str) -> tuple[RoutingRunResult, list[Trial]]: - trials: list[Trial] = [] - - def run_direct( - prepared_problem: RoutingProblem, worker_options: RoutingOptions, _iteration_callback: _IterationCallback | None, - ) -> RoutingRunResult: - trials.extend(_direct_trials(prepared_problem, board, worker_options, policy, run_route=run_worker)) - return _best_trial(trials).run - - run = _route(problem, options=options, run_router=run_direct) - return run, trials - - started = perf_counter() - bundle_rejection = None - bundle_duration = None - if strategy in AUTOMATIC_POLICIES: - run = run_route(case.problem, options=options) - report = run.automatic - assert report is not None - selected = report.stages[report.selected_stage] - valid_costs = {net_id: benchmark_weighted_length(run.results_by_net[net_id]) for net_id in report.verified_net_ids} - return RunSample( - duration_s=perf_counter() - started, - net_outcomes={net_id: result.outcome for net_id, result in run.results_by_net.items()}, - valid_costs=valid_costs, - native_valid_costs=native_verified_costs(case, options, run.results_by_net, report.verified_net_ids), - reached_net_ids=tuple(net_id for net_id, result in run.results_by_net.items() if result.reached_target), - out_of_bounds_net_ids=selected.out_of_bounds_net_ids, - nodes_expanded=run.metrics.nodes_expanded, - route_iterations=run.metrics.route_iterations, - topology=run.topology, - stages=report.stages, - attempt_options=tuple(attempt_options), - selected_stage=report.selected_stage, - capacity_limit=report.capacity_limit, - planner_rejections=report.planner_rejections, - port_conflicts=report.port_conflicts, - max_routed=report.max_routed, - cost_pass_performed=report.cost_pass_performed, - timings=report.timings, - ) - if strategy in BUNDLE_POLICIES: - bundle_options = replace( - options, - topology=replace(options.topology, mode="bundle", infer_terminal_headings=case.options.topology.infer_terminal_headings), - congestion=replace(options.congestion, max_iterations=1), - refinement=replace(options.refinement, enabled=strategy == "bundle-first-refine"), - ) - try: - run = run_route(case.problem, options=bundle_options) - except ValueError as exc: - bundle_rejection = str(exc) - bundle_duration = perf_counter() - started - run, trials = measure_direct(case.fixed_headings_problem(), "direct-probe-near-port") - else: - bundle_duration = perf_counter() - started - stage = RoutingStage("bundle", (), run.metrics.nodes_expanded, options.search.node_limit, kind="bundle") - trials = [_trial(run, stage)] - elif strategy in DIRECT_POLICIES: - run, trials = measure_direct(case.fixed_headings_problem(), strategy) - elif strategy in ORDER_POLICIES: - problem = case.fixed_headings_problem() - trials = _order_trials(problem, options, strategy, run_route=run_route) - run = _best_trial(trials).run - else: - run = run_route(case.fixed_headings_problem(), options=options) - trials = [_trial(run, RoutingStage(strategy, (), run.metrics.nodes_expanded, options.search.node_limit))] - best = _best_trial(trials) - duration = perf_counter() - started - return RunSample( - duration_s=duration, - net_outcomes={net_id: result.outcome for net_id, result in run.results_by_net.items()}, - valid_costs=best.valid_costs, - native_valid_costs=native_verified_costs(case, options, run.results_by_net, best.valid_costs), - reached_net_ids=tuple(net_id for net_id, result in run.results_by_net.items() if result.reached_target), - out_of_bounds_net_ids=best.stage.out_of_bounds_net_ids, - nodes_expanded=sum(trial.stage.nodes_expanded for trial in trials), - route_iterations=sum(trial.run.metrics.route_iterations for trial in trials), - topology=run.topology, - stages=tuple(trial.stage for trial in trials), - attempt_options=tuple(attempt_options), - bundle_rejection=bundle_rejection, - bundle_duration_s=bundle_duration, - selected_stage=next(i for i, trial in enumerate(trials) if trial is best), - selected_attempt=selected_attempt, - ) - - -def _print_summary(mode: str, samples: list[RunSample]) -> None: - run = samples[0] - print( - f" {mode}: {median(len(sample.valid_costs) for sample in samples):g}/{len(run.net_outcomes)} valid, " - f"{median(len(sample.reached_net_ids) for sample in samples):g} reached, " - f"{median(sample.nodes_expanded for sample in samples):g} A* nodes, " - f"{median(sample.duration_s for sample in samples):.3f} s median", - flush=True, - ) - if run.valid_costs: - print( - f" benchmark-weighted length {sum(run.valid_costs.values()):.2f}, " - f"native objective cost {sum(run.native_valid_costs.values()):.2f}, nets {', '.join(run.valid_costs)}", - flush=True, - ) - if run.out_of_bounds_net_ids: - print(f" outside board {', '.join(run.out_of_bounds_net_ids)}", flush=True) - if run.bundle_rejection is not None: - print(f" bundle rejected; using direct-probe-near-port. {run.bundle_rejection}", flush=True) - if mode in AUTOMATIC_POLICIES: - selected = run.stages[run.selected_stage] - policy = f", policy {selected.policy}" if selected.policy else "" - print(f" selected {selected.planner}, mode {selected.mode}, operation {selected.operation}{policy}", flush=True) - elapsed = { - operation: median(sum(timing.duration_s for timing in sample.timings if timing.operation == operation) for sample in samples) - for operation in ("plan", "verify", "search", "refine") - } - print(" median stage time " + ", ".join(f"{operation} {seconds:.3f} s" for operation, seconds in elapsed.items()), flush=True) - if run.capacity_limit: - limit = run.capacity_limit - print( - f" capacity {limit.tracks}/{limit.crossing_nets} across x={limit.cut_x:g}, at most {limit.max_routed} on the board", - flush=True, - ) - if run.port_conflicts: - print(f" port spacing limits board to {len(run.net_outcomes) - len(run.port_conflicts)} nets", flush=True) - return - if mode in POLICIES: - for stage in run.stages: - if stage.kind == "bundle": - continue - if stage.kind == "lattice-probe": - print(f" unlocked lattice probe at {stage.node_limit} nodes per attempt", flush=True) - continue - if stage.net_order is not None: - incumbents = f", carried {', '.join(stage.incumbent_net_ids)}" if stage.incumbent_net_ids else "" - print(f" {stage.mode} at {stage.node_limit} nodes per attempt, order {stage.net_order}{incumbents}", flush=True) - continue - skipped = f", skipped {', '.join(stage.skipped_net_ids)}" if stage.skipped_net_ids else "" - print( - f" {stage.mode} at {stage.node_limit} nodes per attempt after locking {len(stage.direct_net_ids)} direct routes{skipped}", - flush=True, - ) - if run.topology is not None: - corridors = sum(count for _, count in run.topology.corridor_counts) - seeds = ", ".join(run.topology.seeded_net_ids) or "none" - print( - f" {corridors} corridors across {len(run.topology.corridor_counts)} nets, " - f"seeds {seeds}, {run.topology.seed_nodes_expanded} seed expansions", - flush=True, - ) - - -def _geometry_json(value: object) -> dict: - if isinstance(value, shapely.Polygon): - return mapping(value) - raise TypeError(f"Cannot serialize {type(value).__name__}") - - -def main() -> None: - parser = ArgumentParser(description=__doc__) - parser.add_argument( - "--profile", choices=PROFILES, default="matched-budget", help="Use CLI budgets, API defaults, or pytest corpus settings." - ) - parser.add_argument( - "--case", - choices=tuple(name for name in CASE_GROUPS if name not in EXAMPLE_NAMES), - type=lambda name: EXAMPLE_NAMES.get(name, name), - action="append", - help="Select a case or suite. Use 'corpus' to select all boards.", - ) - parser.add_argument("--list", action="store_true", help="List the available cases.") - parser.add_argument( - "--mode", - choices=("off", "guide", "seed", "automatic"), - action="append", - help="Repeat to compare modes. The public-defaults profile selects the shipped mode by default.", - ) - parser.add_argument("--policy", choices=POLICIES, action="append", help="Include a routing policy. Repeat to compare policies.") - parser.add_argument("--nodes", type=int, action="append", help="Repeat to compare node budgets. The matched-budget profile defaults to 500.") - parser.add_argument("--iterations", type=int) - parser.add_argument("--refinement", choices=("on", "off"), help="Override refinement for public routing modes.") - parser.add_argument("--refinement-windows", metavar="N", help="Limit attempted windows per net, or use 'unlimited'.") - parser.add_argument("--max-corridors", type=int) - parser.add_argument("--guide-strength", type=float) - parser.add_argument("--seed-nodes", type=int) - parser.add_argument("--sbend-offset", type=float, action="append", help="Override search S-bend offsets. Repeat for multiple offsets.") - parser.add_argument("--net-order", choices=("user", "shortest", "longest")) - parser.add_argument("--no-warm-start", action="store_true") - parser.add_argument("--repeat", type=int, default=1, help="Run each configuration this many times and report median runtime.") - parser.add_argument("--json", type=Path, help="Write options and individual runs to this file.") - args = parser.parse_args() - if args.list: - print("All boards (--case corpus)") - for group, title in ( - ("all", "Core corpus"), - ("holdout", "Held-out boards"), - ("fallback", "Fallback cases"), - ("external", "External cases"), - ("crossings", "Preplaced crossings"), - ("stress", "Stress cases"), - ("geometry-corners", "Tight geometry"), - ("complex-layouts", "Complex layouts"), - ("search-challenges", "Search challenges"), - ("scaling", "Large net and keepout counts"), - ("retry-holdout", "Retry-policy holdouts"), - ): - print(f"{title} (--case {group})") - for case in CASE_GROUPS[group]: - name = EXAMPLE_NAMES.get(case.name, case.name) - print(f" {name:40} {case.description}") - return - if (args.nodes and min(args.nodes) < 1) or (args.iterations is not None and args.iterations < 1) or args.repeat < 1: - parser.error("--nodes, --iterations and --repeat must be positive") - if args.sbend_offset is not None and not all(isfinite(offset) for offset in args.sbend_offset): - parser.error("--sbend-offset must be finite") - refinement_overrides: dict[str, bool | int | None] = {} - if args.refinement is not None: - refinement_overrides["enabled"] = args.refinement == "on" - if args.refinement_windows is not None: - limit_error = "--refinement-windows must be a positive integer or 'unlimited'" - try: - limit = None if args.refinement_windows == "unlimited" else int(args.refinement_windows) - except ValueError: - parser.error(limit_error) - if limit is not None and limit < 1: - parser.error(limit_error) - refinement_overrides["max_windows_per_net"] = limit - topology_overrides = { - name: value - for name, value in ( - ("max_corridors", args.max_corridors), - ("guide_strength", args.guide_strength), - ("seed_node_limit", args.seed_nodes), - ) - if value is not None - } - cases = select_cases(args.case or ["terminal-bench"]) - sbend_offsets = tuple(args.sbend_offset) if args.sbend_offset is not None else None - records = [] - requested = [*(args.mode or ()), *(args.policy or ())] - default_modes = ("off", "guide", "seed") if args.profile == "matched-budget" else (RoutingOptions().topology.mode,) - modes = tuple(dict.fromkeys(requested or default_modes)) - for case in cases: - base = profile_options(case, args.profile) - try: - topology = replace(base.topology, **topology_overrides) - except ValueError as exc: - parser.error(str(exc)) - budgets = tuple(dict.fromkeys(args.nodes or (base.search.node_limit,))) - iterations = base.congestion.max_iterations if args.iterations is None else args.iterations - for budget in budgets: - name = EXAMPLE_NAMES.get(case.name, case.name) - print(f"{name} | {budget} nodes per attempt", flush=True) - options = replace( - base, - topology=topology, - search=replace( - base.search, node_limit=budget, sbend_offsets=sbend_offsets if sbend_offsets is not None else base.search.sbend_offsets - ), - refinement=replace(base.refinement, **refinement_overrides), - congestion=replace( - base.congestion, - max_iterations=iterations, - net_order=args.net_order or base.congestion.net_order, - warm_start_enabled=not args.no_warm_start and base.congestion.warm_start_enabled, - ), - ) - mode_options = {mode: _mode_options(options, mode, args.profile) for mode in modes} - samples: dict[str, list[RunSample]] = {mode: [] for mode in modes} - for repeat in range(args.repeat): - offset = repeat % len(modes) - for mode in modes[offset:] + modes[:offset]: - samples[mode].append(_measure(case, mode_options[mode], mode)) - for mode in modes: - _print_summary(mode, samples[mode]) - requested_mode = mode_options[mode].topology.mode if mode not in POLICIES or mode in AUTOMATIC_POLICIES else None - records.append( - { - "case": case.name, - "strategy": mode, - "requested_mode": requested_mode, - "grid_nm": case.grid_nm, - "reference_net_ids": [net_id for net_id, _ in case.reference_paths], - "options": asdict(mode_options[mode]), - "samples": [asdict(sample) for sample in samples[mode]], - "duration_s_median": median(sample.duration_s for sample in samples[mode]), - "duration_s_p95": sorted(sample.duration_s for sample in samples[mode])[ceil(0.95 * len(samples[mode])) - 1], - } - ) - if args.json is not None: - payload = { - "profile": args.profile, - "python": python_version(), - "shapely": shapely.__version__, - "geos": shapely.geos_version_string, - "cost_metrics": {"valid_costs": "benchmark_weighted_length", "native_valid_costs": "native_objective"}, - "runs": records, - } - args.json.write_text(dumps(payload, indent=2, default=_geometry_json) + "\n") - - -if __name__ == "__main__": - main() diff --git a/scripts/diff_performance_baseline.py b/scripts/diff_performance_baseline.py deleted file mode 100644 index e51ef89..0000000 --- a/scripts/diff_performance_baseline.py +++ /dev/null @@ -1,232 +0,0 @@ -#!/usr/bin/env python3 -from __future__ import annotations - -import argparse -import json -from dataclasses import asdict -from datetime import datetime -from pathlib import Path - -from inire.results import RouteMetrics -from inire.tests.example_scenarios import capture_scenario_snapshots - - -SUMMARY_KEYS = ( - "duration_s", - "valid_results", - "reached_targets", - "route_iterations", - "nets_routed", - "nodes_expanded", - "ray_cast_calls", - "moves_generated", - "moves_added", - "congestion_check_calls", - "verify_path_report_calls", -) - - -def _available_metric_names() -> tuple[str, ...]: - return ( - "duration_s", - "total_results", - "valid_results", - "reached_targets", - *RouteMetrics.__dataclass_fields__.keys(), - ) - - -def _current_snapshots( - selected_scenarios: tuple[str, ...] | None, - *, - include_performance_only: bool, - baseline: dict[str, dict[str, object]], -) -> dict[str, dict[str, object]]: - snapshots = capture_scenario_snapshots( - selected_scenarios, include_performance_only=include_performance_only, baseline_scenarios=baseline.keys(), - ) - return {snapshot.name: asdict(snapshot) for snapshot in snapshots} - - -def _load_baseline(path: Path, selected_scenarios: tuple[str, ...] | None) -> dict[str, dict[str, object]]: - payload = json.loads(path.read_text()) - allowed = None if selected_scenarios is None else set(selected_scenarios) - return { - entry["name"]: entry - for entry in payload["scenarios"] - if allowed is None or entry["name"] in allowed - } - - -def _metric_value(snapshot: dict[str, object], key: str) -> float | None: - if key in {"duration_s", "total_results", "valid_results", "reached_targets"}: - return float(snapshot[key]) - if key not in snapshot["metrics"]: - return None - return float(snapshot["metrics"][key]) - - -def _validate_metrics(metric_names: tuple[str, ...]) -> None: - valid_names = set(_available_metric_names()) - unknown = [name for name in metric_names if name not in valid_names] - if unknown: - raise SystemExit( - f"Unknown metric name(s): {', '.join(sorted(unknown))}. " - f"Valid names are: {', '.join(_available_metric_names())}" - ) - - -def _render_report( - baseline: dict[str, dict[str, object]], - current: dict[str, dict[str, object]], - metric_names: tuple[str, ...], -) -> str: - scenario_names = sorted(set(baseline) | set(current)) - lines = [ - "# Performance Baseline Diff", - "", - "| Scenario | Metric | Baseline | Current | Delta |", - "| :-- | :-- | --: | --: | --: |", - ] - for scenario in scenario_names: - base_snapshot = baseline.get(scenario) - curr_snapshot = current.get(scenario) - if base_snapshot is None: - if curr_snapshot is None: - lines.append(f"| {scenario} | added | - | - | - |") - continue - for key in metric_names: - curr_value = _metric_value(curr_snapshot, key) - if curr_value is None: - lines.append(f"| {scenario} | {key} | - | - | - |") - continue - lines.append(f"| {scenario} | {key} | - | {curr_value:.4f} | - |") - continue - if curr_snapshot is None: - lines.append(f"| {scenario} | missing | - | - | - |") - continue - for key in metric_names: - base_value = _metric_value(base_snapshot, key) - curr_value = _metric_value(curr_snapshot, key) - if base_value is None: - lines.append( - f"| {scenario} | {key} | - | {curr_value:.4f} | - |" - ) - continue - if curr_value is None: - lines.append( - f"| {scenario} | {key} | {base_value:.4f} | - | - |" - ) - continue - lines.append( - f"| {scenario} | {key} | {base_value:.4f} | {curr_value:.4f} | {curr_value - base_value:+.4f} |" - ) - return "\n".join(lines) + "\n" - - -def _render_log_entry( - *, - baseline_path: Path, - label: str, - notes: tuple[str, ...], - report: str, -) -> str: - lines = [ - f"## {label}", - "", - f"Measured on {datetime.now().astimezone().isoformat(timespec='seconds')}.", - f"Baseline: `{baseline_path}`.", - "", - ] - if notes: - lines.extend(["Findings:", ""]) - lines.extend(f"- {note}" for note in notes) - lines.append("") - lines.append(report.rstrip()) - lines.append("") - return "\n".join(lines) - - -def main() -> None: - parser = argparse.ArgumentParser(description="Diff the committed performance baseline against a fresh run.") - parser.add_argument( - "--baseline", - type=Path, - default=Path("archive/routing/performance_baseline.json"), - help="Baseline JSON to compare against. Defaults to archive/routing/performance_baseline.json.", - ) - parser.add_argument( - "--output", - type=Path, - default=None, - help="Optional file to write the report to. Defaults to stdout.", - ) - parser.add_argument( - "--scenario", - action="append", - dest="scenarios", - default=[], - help="Optional scenario name to include. May be passed more than once.", - ) - parser.add_argument( - "--metric", - action="append", - dest="metrics", - default=[], - help="Optional metric to include. May be passed more than once. Defaults to the summary metric set.", - ) - parser.add_argument( - "--label", - default="Measurement", - help="Section label to use when appending to a log file.", - ) - parser.add_argument( - "--notes", - action="append", - dest="notes", - default=[], - help="Optional short finding to append under the measurement section. May be passed more than once.", - ) - parser.add_argument( - "--log", - type=Path, - default=None, - help="Optional Markdown log file to append the rendered report to.", - ) - parser.add_argument( - "--include-performance-only", - action="store_true", - help="Include performance-only snapshot scenarios that are excluded from the default baseline corpus.", - ) - args = parser.parse_args() - - selected = tuple(args.scenarios) if args.scenarios else None - metrics = tuple(args.metrics) if args.metrics else SUMMARY_KEYS - _validate_metrics(metrics) - baseline = _load_baseline(args.baseline, selected) - try: - current = _current_snapshots(selected, include_performance_only=args.include_performance_only, baseline=baseline) - except ValueError as exc: - parser.error(str(exc)) - report = _render_report(baseline, current, metrics) - - if args.output is not None: - args.output.write_text(report) - print(f"Wrote {args.output}") - elif args.log is None: - print(report, end="") - - if args.log is not None: - entry = _render_log_entry( - baseline_path=args.baseline, - label=args.label, - notes=tuple(args.notes), - report=report, - ) - with args.log.open("a", encoding="utf-8") as handle: - handle.write(entry) - print(f"Appended {args.log}") - - -if __name__ == "__main__": - main() diff --git a/scripts/export_advanced_examples.py b/scripts/export_advanced_examples.py deleted file mode 100644 index 5db633f..0000000 --- a/scripts/export_advanced_examples.py +++ /dev/null @@ -1,52 +0,0 @@ -"""Export the advanced example inputs from the canonical benchmark fixtures.""" - -from argparse import ArgumentParser -from json import dumps -from pathlib import Path - -from examples.advanced_layouts import COMPLEX_EXAMPLE, COMPLEX_EXAMPLE_POINTS, INPUTS, build_problem -from inire.tests.routing_corpus import CASE_GROUPS, profile_options -from inire.tests.stress_routing_benchmarks import STRESS_BENCHMARK_CASES - - -def main() -> None: - parser = ArgumentParser(description=__doc__) - parser.add_argument("--output", type=Path, default=INPUTS) - args = parser.parse_args() - - cases = [(case.name, case) for case in STRESS_BENCHMARK_CASES] - for name in (COMPLEX_EXAMPLE, COMPLEX_EXAMPLE_POINTS): - (case,) = CASE_GROUPS[name] - cases.append((name, case)) - entries = [] - for name, case in cases: - problem = case.problem - options = profile_options(case, "public-defaults") - data = { - "bounds": list(problem.bounds), - "clearance": problem.clearance, - "bend_radii": list(options.search.bend_radii), - "sbend_radii": list(options.search.sbend_radii), - "infer_terminal_headings": options.topology.infer_terminal_headings, - "keepouts": [polygon.wkt for polygon in problem.static_obstacles], - "nets": [(net.net_id, net.start.as_tuple(), net.target.as_tuple(), net.width) for net in problem.nets], - } - rebuilt, settings = build_problem(data) - if problem != rebuilt or options != settings: - raise ValueError(f"The advanced example no longer reproduces fixture {name}") - - # Keep ports and each net on one line so the input file is easy to scan. - lines = [f" {dumps(name)}: {{"] - for field in ("bounds", "clearance", "bend_radii", "sbend_radii", "infer_terminal_headings"): - lines.append(f" {dumps(field)}: {dumps(data[field])},") - for field in ("keepouts", "nets"): - values = ",\n".join(f" {dumps(value)}" for value in data[field]) - comma = "," if field == "keepouts" else "" - lines.append(f" {dumps(field)}: [\n{values}\n ]{comma}") - entries.append("\n".join((*lines, " }"))) - - args.output.write_text("{\n" + ",\n".join(entries) + "\n}\n", encoding="utf-8") - - -if __name__ == "__main__": - main() diff --git a/scripts/import_external_routing_benchmarks.py b/scripts/import_external_routing_benchmarks.py deleted file mode 100644 index bb8054a..0000000 --- a/scripts/import_external_routing_benchmarks.py +++ /dev/null @@ -1,327 +0,0 @@ -"""Convert pinned PIC Routing Benchmark and LiDAR inputs into inire fixtures.""" - -from __future__ import annotations - -from argparse import ArgumentParser -from collections import defaultdict -from csv import DictReader -from dataclasses import dataclass -from hashlib import file_digest -from json import dumps, loads -from math import ceil, floor -from pathlib import Path -from tarfile import TarFile -from typing import TYPE_CHECKING -from zipfile import ZipFile - -from shapely import get_parts -from shapely.affinity import scale, translate -from shapely.geometry import Polygon, box - -if TYPE_CHECKING: - from collections.abc import Callable, Iterable - - from shapely.geometry.base import BaseGeometry - - -PIC_REVISION = "0c1f445792926d97fae01893c89e96b8a9393800" -LIDAR_REVISION = "4e7004d32b0b80d959553797fb30f0737513de0c" -PIC_DIGEST = "e4a9479a7fcabe64a0083bdab42a615e2200e7245ab5863a7bf109229d7ec588" -LIDAR_DIGEST = "cfd7a43762a9e71435d6d91a488f31ae1527c8752179805bdb4c345cb3089ba3" -UNITS_PER_MICRON = 10 -HEADINGS = {"E": 0, "N": 90, "W": 180, "S": 270} -ROTATIONS = ((1, 0), (0, 1), (-1, 0), (0, -1)) -OUTPUT = Path(__file__).resolve().parents[1] / "inire/tests/data/external_routing_benchmarks.json" -PIC_DESIGNS = ( - "splitter_tree_1x8_ew", - "splitter_ring_mod_ap_combiner_2_ew", - "splitter_mzm_combiner_4_ew", -) -LIDAR_DESIGNS = { - "toy_example/toy_example.gp.yml": (), - "clements_8x8/clements_8x8.yml": tuple(f"n_{n}" for n in range(30, 36)), - "mrr_weight_bank_4x4/mrr_weight_bank_4x4.yml": tuple(f"n_{n}" for n in range(18, 26)), -} - - -@dataclass(frozen=True, slots=True) -class Pin: - x: float - y: float - heading: int - width: float - - -@dataclass(frozen=True, slots=True) -class Device: - footprints: tuple[Polygon, ...] - pins: dict[str, Pin] - - -Connection = tuple[str, tuple[str, str], tuple[str, str]] - - -def _rotate(x: float, y: float, angle: int) -> tuple[float, float]: - if angle % 90: - raise ValueError(f"Cannot import noncardinal rotation {angle}") - ux, uy = ROTATIONS[int(angle // 90) % 4] - return ux * x - uy * y, uy * x + ux * y - - -def _footprint(bounds: tuple[float, float, float, float], transform: Callable[[float, float], tuple[float, float]]) -> Polygon: - left, bottom, right, top = bounds - return Polygon([transform(left, bottom), transform(right, bottom), transform(right, top), transform(left, top)]) - - -def _port_cutout(pin: Pin, width: float, clearance: float, extent: Polygon) -> Polygon: - # Carve access only from this port's own device. Allow one lattice unit - # for the snap from fractional source coordinates to inire's Port. - margin = width / 2 + clearance + 1 / UNITS_PER_MICRON - reach = max(extent.bounds[2] - extent.bounds[0], extent.bounds[3] - extent.bounds[1]) + 2 * margin - return _footprint((-margin, -margin, reach, margin), lambda x, y: _pin_frame(pin, x, y)) - - -def _pin_frame(pin: Pin, x: float, y: float) -> tuple[float, float]: - dx, dy = _rotate(x, y, pin.heading) - return pin.x + dx, pin.y + dy - - -def _polygons(shape: BaseGeometry) -> Iterable[Polygon]: - for part in get_parts(shape): - if isinstance(part, Polygon) and not part.is_empty and part.area > 0: - yield part - - -def _fixture( - name: str, - source: str, - member: str, - devices: dict[str, Device], - connections: list[Connection], - radius: float, - clearance: float, - *, - die: tuple[float, float, float, float] | None = None, - min_straight: float = 0.5, - expected_routed: int | None = None, -) -> dict: - if not connections: - raise ValueError(f"No compatible connections in {name}") - active = {device for _, start, finish in connections for device, _ in (start, finish)} - if die is None: - bounds = [footprint.bounds for key in active for footprint in devices[key].footprints] - pad = 4 * radius - die = ( - floor(min(b[0] for b in bounds) - pad), - floor(min(b[1] for b in bounds) - pad), - ceil(max(b[2] for b in bounds) + pad), - ceil(max(b[3] for b in bounds) + pad), - ) - x0, y0, x1, y1 = die - board = box(*die) - cutouts: dict[str, list[Polygon]] = defaultdict(list) - nets = [] - for net_id, (a, ap), (b, bp) in connections: - start, finish = devices[a].pins[ap], devices[b].pins[bp] - width = max(start.width, finish.width) - for key, pin in ((a, start), (b, finish)): - for footprint in devices[key].footprints: - cutouts[key].append(_port_cutout(pin, width, clearance, footprint)) - nets.append( - { - "id": net_id, - "start": [round((start.x - x0) * UNITS_PER_MICRON), round((start.y - y0) * UNITS_PER_MICRON), start.heading], - "target": [round((finish.x - x0) * UNITS_PER_MICRON), round((finish.y - y0) * UNITS_PER_MICRON), (finish.heading + 180) % 360], - "width": round(width * UNITS_PER_MICRON, 6), - } - ) - obstacles = [] - for key, device in devices.items(): - for footprint in device.footprints: - clipped = footprint.intersection(board) - for access in cutouts.get(key, ()): - clipped = clipped.difference(access) - for part in _polygons(clipped): - local = scale(translate(part, -x0, -y0), xfact=UNITS_PER_MICRON, yfact=UNITS_PER_MICRON, origin=(0, 0)) - encoded = [[(round(x, 6), round(y, 6)) for x, y in ring.coords] for ring in (local.exterior, *local.interiors)] - polygon = Polygon(encoded[0], encoded[1:]) - if polygon.area > 0: - if not polygon.is_valid: - raise ValueError(f"Invalid device geometry in {name}: {key}") - obstacles.append(encoded) - return { - "name": name, - **({"expected_routed": expected_routed} if expected_routed is not None else {}), - "source": source, - "member": member, - "crop_um": list(die), - "bounds": [0, 0, round((x1 - x0) * UNITS_PER_MICRON), round((y1 - y0) * UNITS_PER_MICRON)], - "bend_radius": radius * UNITS_PER_MICRON, - "clearance": clearance * UNITS_PER_MICRON, - "min_straight": min_straight * UNITS_PER_MICRON, - "obstacles": obstacles, - "nets": nets, - } - - -def _pic_transform(place: dict, x: float, y: float, *, position: bool = True) -> tuple[float, float]: - dx, dy = _rotate(-x if place["mirror_x"] else x, -y if place["mirror_y"] else y, place["orientation_deg"]) - return (dx + place["x_um"], dy + place["y_um"]) if position else (dx, dy) - - -def _pic_device(cell: dict, place: dict, width: float) -> Device: - w, h = cell["bbox"]["width_um"], cell["bbox"]["height_um"] - outline = _footprint((-w / 2, -h / 2, w / 2, h / 2), lambda x, y: _pic_transform(place, x, y)) - pins = {} - for name, port in cell["port_geometry"].items(): - x, y = _pic_transform(place, port["x_um"], port["y_um"]) - dx, dy = _pic_transform(place, *ROTATIONS[HEADINGS[port["orientation"]] // 90], position=False) - pins[name] = Pin(x, y, ROTATIONS.index((dx, dy)) * 90, width) - return Device((outline,), pins) - - -def _pic_macro(module: dict, pdk: dict, place: dict) -> Device: - # The selected designs use vertical edge-coupler arrays at the boundary. - # Their constituent boxes remain obstacles, while optical I/O is outside - # the primitive-to-primitive routing subproblem. - children = module["instances"] - attributes = module["attributes"] - if not (attributes["hard_macro"] and attributes["array_axis"] == "V" and all(child["module"] == "EDGE_COUPLER" for child in children)): - raise ValueError("Unsupported PIC macro in the selected design") - box_size = pdk["EDGE_COUPLER"]["bbox"] - w, h = box_size["width_um"], box_size["height_um"] - outlines = [] - for i in range(len(children)): - row = (i - (len(children) - 1) / 2) * attributes["pitch"] - outlines.append(_footprint((-w / 2, row - h / 2, w / 2, row + h / 2), lambda x, y: _pic_transform(place, x, y))) - return Device(tuple(outlines), {}) - - -def _pic_cases(archive: ZipFile) -> list[dict]: - root = "pic-benchmark" - pdk = loads(archive.read(f"{root}/pdk/pdk_v2_mzi80.json"))["device_defs"] - rules = loads(archive.read(f"{root}/pdk/design_rules_v2_mzi80.json"))["routing_rules"] - summary = list(DictReader(archive.read(f"{root}/data/_batch_summary.csv").decode().splitlines())) - cases = [] - for design in PIC_DESIGNS: - result = next(row for row in summary if row["design"] == design and row["variant"] == "rectilinear") - if result["lvs_ok"] != "True" or result["drc_ok"] != "True" or int(result["n_crossings"]): - raise ValueError(f"Source variant failed the crossing-free LVS and DRC screen: {design}") - folder = f"{root}/data/{design}" - source = loads(archive.read(f"{folder}/{design}_netlist.json")) - member = f"{folder}/rectilinear/{design}_placement.json" - placements = {row["instance"]: row for row in loads(archive.read(member))["placements"]} - modules = source["modules"] - devices = {} - net_ports: dict[str, list[tuple[str, str, str]]] = defaultdict(list) - for inst in modules[source["top_module"]]["instances"]: - key, cell = inst["name"], inst["module"] - module = modules[cell] - if cell not in pdk: - devices[key] = _pic_macro(module, pdk, placements[key]) - continue - devices[key] = _pic_device(pdk[cell], placements[key], rules["waveguide_width_um"]) - directions = {port["name"]: port["direction"] for port in module["ports"]} - for port, wire in inst["connections"].items(): - net_ports[wire].append((directions[port], key, port)) - connections = [] - for net_id, pins in sorted(net_ports.items()): - if len(pins) != 2: - continue - source_pin, sink_pin = sorted(pins, reverse=True) - if (source_pin[0], sink_pin[0]) != ("output", "input"): - raise ValueError(f"Expected a directed 2-pin net in {design}: {net_id}") - connections.append((net_id, (source_pin[1], source_pin[2]), (sink_pin[1], sink_pin[2]))) - cases.append( - _fixture( - f"pic-{design.lower().replace('_', '-')}", - "pic-benchmark", - member, - devices, - connections, - rules["fixed_bend_radius_um"], - rules["min_spacing_um"], - min_straight=rules["min_straight_section_um"], - ) - ) - return cases - - -def _lidar_device(inst: dict, macro: dict) -> Device: - _, (x0, y0), orientation, _ = inst["settings"]["placement"] - w, h = macro["size"] - rotations = {"N": 0, "S": 180, "W": 90, "E": 270, "FN": 0, "FS": 0} - angle = rotations[orientation] - sx, sy = (-1 if orientation == "FN" else 1), (-1 if orientation == "FS" else 1) - rotated = [_rotate(sx * x, sy * y, angle) for x, y in ((0, 0), (w, 0), (w, h), (0, h))] - tx, ty = x0 - min(x for x, _ in rotated), y0 - min(y for _, y in rotated) - - def transform(x: float, y: float) -> tuple[float, float]: - dx, dy = _rotate(sx * x, sy * y, angle) - return dx + tx, dy + ty - - pins = {} - for name, port in (macro.get("pins") or {}).items(): - px, py = transform(port["pin_offset_x"], port["pin_offset_y"]) - hx, hy = _rotate(1, 0, port["pin_orient"]) - heading = ROTATIONS.index(_rotate(sx * hx, sy * hy, angle)) * 90 - pins[name] = Pin(px, py, heading, port["pin_width"]) - return Device((_footprint((0, 0, w, h), transform),), pins) - - -def _lidar_cases(archive: TarFile) -> list[dict]: - import yaml # noqa: PLC0415 - - class BenchmarkLoader(yaml.SafeLoader): - """Accept LiDAR's tuple-valued parameters as inert YAML sequences.""" - - BenchmarkLoader.add_constructor("tag:yaml.org,2002:python/tuple", yaml.SafeLoader.construct_sequence) - cases = [] - for member, selected in LIDAR_DESIGNS.items(): - path = f"LiDAR-{LIDAR_REVISION}/src/picroute/benchmarks/{member}" - source = archive.extractfile(path) - if source is None: - raise ValueError(f"Missing LiDAR input {member}") - with source: - netlist = yaml.load(source, Loader=BenchmarkLoader) - devices = {name: _lidar_device(inst, netlist["library"][inst["settings"]["macro_type"]]) for name, inst in netlist["instances"].items()} - connections = [] - for net_id in selected or netlist["nets"]: - start, finish = netlist["nets"][net_id] - a, ap = start.split(",") - b, bp = finish.split(",") - connections.append((net_id, (a, ap), (b, bp))) - settings = netlist["settings"] - die = tuple(value for corner in settings["die_area"] for value in corner) if not selected else None - name = f"lidar-{settings['design'].replace('_', '-')}" - expected_routed = 3 if name == "lidar-clements-8x8" else None - cases.append(_fixture(name, "lidar", member, devices, connections, settings["wg_radius"], 1.0, die=die, expected_routed=expected_routed)) - return cases - - -def _verify_archive(path: Path, expected: str) -> None: - with path.open("rb") as stream: - if file_digest(stream, "sha256").hexdigest() != expected: - raise ValueError(f"Archive does not match the pinned SHA-256: {path}") - - -def main() -> None: - parser = ArgumentParser(description=__doc__) - parser.add_argument("--pic-archive", type=Path, required=True) - parser.add_argument("--lidar-archive", type=Path, required=True) - parser.add_argument("--output", type=Path, default=OUTPUT) - args = parser.parse_args() - _verify_archive(args.pic_archive, PIC_DIGEST) - _verify_archive(args.lidar_archive, LIDAR_DIGEST) - with ZipFile(args.pic_archive) as pic, TarFile.open(args.lidar_archive) as lidar: - data = { - "units_per_micron": UNITS_PER_MICRON, - "revisions": {"pic-benchmark": PIC_REVISION, "lidar": LIDAR_REVISION}, - "cases": [*_pic_cases(pic), *_lidar_cases(lidar)], - } - args.output.parent.mkdir(parents=True, exist_ok=True) - args.output.write_text(dumps(data, indent=2) + "\n", encoding="utf-8") - - -if __name__ == "__main__": - main() diff --git a/scripts/record_conflict_trace.py b/scripts/record_conflict_trace.py deleted file mode 100644 index a5435f9..0000000 --- a/scripts/record_conflict_trace.py +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env python3 -from __future__ import annotations - -from collections import Counter -from dataclasses import asdict -from typing import TYPE_CHECKING - -from inire.tests.trace_recording import NO_WARM_START_SCENARIOS, record_trace, result_summary - -if TYPE_CHECKING: - from inire.results import RoutingRunResult - - -def _scenario_payload(result: RoutingRunResult) -> dict[str, object]: - return { - "summary": { - **result_summary(result), - "results_by_net": { - net_id: {"outcome": entry.outcome, "reached_target": entry.reached_target, "report": asdict(entry.report)} - for net_id, entry in result.results_by_net.items() - }, - }, - "conflict_trace": [asdict(entry) for entry in result.conflict_trace], - } - - -def _count_stage_nets(entry: dict[str, object]) -> int: - return sum( - 1 - for net in entry["nets"] - if net["report"]["dynamic_collision_count"] > 0 - ) - - -def _canonical_component_pair( - net_id: str, - self_component_index: int, - other_net_id: str, - other_component_index: int, -) -> tuple[tuple[str, int], tuple[str, int]]: - left = (net_id, self_component_index) - right = (other_net_id, other_component_index) - if left <= right: - return (left, right) - return (right, left) - - -def _render_markdown(payload: dict[str, object]) -> str: - lines = [ - "# Conflict Trace", - "", - f"Generated at {payload['generated_at']} by `{payload['generator']}`.", - "", - ] - - for scenario in payload["scenarios"]: - lines.extend( - [ - f"## {scenario['name']}", - "", - f"Results: {scenario['summary']['valid_results']} valid / " - f"{scenario['summary']['reached_targets']} reached / " - f"{scenario['summary']['total_results']} total.", - "", - "| Stage | Iteration | Conflicting Nets | Conflict Edges | Completed Nets |", - "| :-- | --: | --: | --: | --: |", - ] - ) - - net_stage_counts: Counter[str] = Counter() - edge_counts: Counter[tuple[str, str]] = Counter() - component_pair_counts: Counter[tuple[tuple[str, int], tuple[str, int]]] = Counter() - trace_entries = scenario["conflict_trace"] - for entry in trace_entries: - lines.append( - "| " - f"{entry['stage']} | " - f"{'' if entry['iteration'] is None else entry['iteration']} | " - f"{_count_stage_nets(entry)} | " - f"{len(entry['conflict_edges'])} | " - f"{len(entry['completed_net_ids'])} |" - ) - seen_component_pairs: set[tuple[tuple[str, int], tuple[str, int]]] = set() - for edge in entry["conflict_edges"]: - edge_counts[tuple(edge)] += 1 - for net in entry["nets"]: - if net["report"]["dynamic_collision_count"] > 0: - net_stage_counts[net["net_id"]] += 1 - for component_conflict in net["component_conflicts"]: - pair = _canonical_component_pair( - net["net_id"], - component_conflict["self_component_index"], - component_conflict["other_net_id"], - component_conflict["other_component_index"], - ) - seen_component_pairs.add(pair) - for pair in seen_component_pairs: - component_pair_counts[pair] += 1 - - lines.extend(["", "Top nets by traced dynamic-collision stages:", ""]) - if net_stage_counts: - for net_id, count in net_stage_counts.most_common(10): - lines.append(f"- `{net_id}`: {count}") - else: - lines.append("- None") - - lines.extend(["", "Top net pairs by frequency:", ""]) - if edge_counts: - for (left, right), count in edge_counts.most_common(10): - lines.append(f"- `{left}` <-> `{right}`: {count}") - else: - lines.append("- None") - - lines.extend(["", "Top component pairs by frequency:", ""]) - if component_pair_counts: - for pair, count in component_pair_counts.most_common(10): - (left_net, left_index), (right_net, right_index) = pair - lines.append(f"- `{left_net}[{left_index}]` <-> `{right_net}[{right_index}]`: {count}") - else: - lines.append("- None") - - lines.append("") - - return "\n".join(lines) - - -def main() -> None: - record_trace( - __file__, - "conflict_trace", - scenario_label="trace", - default_scenarios=NO_WARM_START_SCENARIOS[:1], - scenario_payload=_scenario_payload, - render_markdown=_render_markdown, - ) - - -if __name__ == "__main__": - main() diff --git a/scripts/record_frontier_trace.py b/scripts/record_frontier_trace.py deleted file mode 100644 index 682d91c..0000000 --- a/scripts/record_frontier_trace.py +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env python3 -from __future__ import annotations - -from collections import Counter -from dataclasses import asdict -from typing import TYPE_CHECKING - -from inire.tests.trace_recording import NO_WARM_START_SCENARIOS, record_trace - -if TYPE_CHECKING: - from inire.results import RoutingRunResult - - -def _scenario_payload(result: RoutingRunResult) -> dict[str, object]: - return {"frontier_trace": [asdict(entry) for entry in result.frontier_trace]} - - -def _render_markdown(payload: dict[str, object]) -> str: - lines = [ - "# Frontier Trace", - "", - f"Generated at {payload['generated_at']} by `{payload['generator']}`.", - "", - ] - - for scenario in payload["scenarios"]: - lines.extend( - [ - f"## {scenario['name']}", - "", - f"Results: {scenario['summary']['valid_results']} valid / " - f"{scenario['summary']['reached_targets']} reached / " - f"{scenario['summary']['total_results']} total.", - "", - "| Net | Hotspots | Closed-Set | Hard Collision | Self Collision | Cost | Samples |", - "| :-- | --: | --: | --: | --: | --: | --: |", - ] - ) - - reason_counts: Counter[str] = Counter() - hotspot_counts: Counter[tuple[str, int]] = Counter() - for net_trace in scenario["frontier_trace"]: - sample_count = len(net_trace["samples"]) - lines.append( - "| " - f"{net_trace['net_id']} | " - f"{len(net_trace['hotspot_bounds'])} | " - f"{net_trace['pruned_closed_set']} | " - f"{net_trace['pruned_hard_collision']} | " - f"{net_trace['pruned_self_collision']} | " - f"{net_trace['pruned_cost']} | " - f"{sample_count} |" - ) - reason_counts["closed_set"] += net_trace["pruned_closed_set"] - reason_counts["hard_collision"] += net_trace["pruned_hard_collision"] - reason_counts["self_collision"] += net_trace["pruned_self_collision"] - reason_counts["cost"] += net_trace["pruned_cost"] - for sample in net_trace["samples"]: - hotspot_counts[(net_trace["net_id"], sample["hotspot_index"])] += 1 - - lines.extend(["", "Prune totals by reason:", ""]) - if reason_counts: - for reason, count in reason_counts.most_common(): - lines.append(f"- `{reason}`: {count}") - else: - lines.append("- None") - - lines.extend(["", "Top traced hotspots by sample count:", ""]) - if hotspot_counts: - for (net_id, hotspot_index), count in hotspot_counts.most_common(10): - lines.append(f"- `{net_id}` hotspot `{hotspot_index}`: {count}") - else: - lines.append("- None") - - lines.extend(["", "Per-net sampled reason/move breakdown:", ""]) - if scenario["frontier_trace"]: - for net_trace in scenario["frontier_trace"]: - reason_move_counts: Counter[tuple[str, str]] = Counter() - hotspot_sample_counts: Counter[int] = Counter() - for sample in net_trace["samples"]: - reason_move_counts[(sample["reason"], sample["move_type"])] += 1 - hotspot_sample_counts[sample["hotspot_index"]] += 1 - lines.append(f"- `{net_trace['net_id']}`") - if reason_move_counts: - top_pairs = ", ".join( - f"`{reason}` x `{move}` = {count}" - for (reason, move), count in reason_move_counts.most_common(3) - ) - lines.append(f" sampled reasons: {top_pairs}") - else: - lines.append(" sampled reasons: none") - if hotspot_sample_counts: - top_hotspots = ", ".join( - f"`{hotspot}` = {count}" for hotspot, count in hotspot_sample_counts.most_common(3) - ) - lines.append(f" hotspot samples: {top_hotspots}") - else: - lines.append(" hotspot samples: none") - else: - lines.append("- None") - - lines.append("") - - return "\n".join(lines) - - -def main() -> None: - record_trace( - __file__, - "frontier_trace", - scenario_label="trace", - default_scenarios=NO_WARM_START_SCENARIOS[:1], - scenario_payload=_scenario_payload, - render_markdown=_render_markdown, - ) - - -if __name__ == "__main__": - main() diff --git a/scripts/record_iteration_trace.py b/scripts/record_iteration_trace.py deleted file mode 100644 index 7bb72bb..0000000 --- a/scripts/record_iteration_trace.py +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python3 -from __future__ import annotations - -from collections import Counter -from dataclasses import asdict -from typing import TYPE_CHECKING - -from inire.tests.trace_recording import NO_WARM_START_SCENARIOS, record_trace - -if TYPE_CHECKING: - from inire.results import RoutingRunResult - - -def _scenario_payload(result: RoutingRunResult) -> dict[str, object]: - return {"iteration_trace": [asdict(entry) for entry in result.iteration_trace]} - - -def _render_markdown(payload: dict[str, object]) -> str: - lines = [ - "# Iteration Trace", - "", - f"Generated at {payload['generated_at']} by `{payload['generator']}`.", - "", - ] - - for scenario in payload["scenarios"]: - lines.extend( - [ - f"## {scenario['name']}", - "", - f"Results: {scenario['summary']['valid_results']} valid / " - f"{scenario['summary']['reached_targets']} reached / " - f"{scenario['summary']['total_results']} total.", - "", - "| Iteration | Penalty | Routed Nets | Completed | Conflict Edges | Dynamic Collisions | " - "Nodes | Congestion Checks | Candidate Ids | Exact Pairs |", - "| --: | --: | --: | --: | --: | --: | --: | --: | --: | --: |", - ] - ) - - net_node_counts: Counter[str] = Counter() - net_check_counts: Counter[str] = Counter() - for entry in scenario["iteration_trace"]: - lines.append( - "| " - f"{entry['iteration']} | " - f"{entry['congestion_penalty']:.1f} | " - f"{len(entry['routed_net_ids'])} | " - f"{entry['completed_nets']} | " - f"{entry['conflict_edges']} | " - f"{entry['total_dynamic_collisions']} | " - f"{entry['nodes_expanded']} | " - f"{entry['congestion_check_calls']} | " - f"{entry['congestion_candidate_ids']} | " - f"{entry['congestion_exact_pair_checks']} |" - ) - for attempt in entry["net_attempts"]: - net_node_counts[attempt["net_id"]] += attempt["nodes_expanded"] - net_check_counts[attempt["net_id"]] += attempt["congestion_check_calls"] - - lines.extend(["", "Top nets by iteration-attributed nodes expanded:", ""]) - if net_node_counts: - for net_id, count in net_node_counts.most_common(10): - lines.append(f"- `{net_id}`: {count}") - else: - lines.append("- None") - - lines.extend(["", "Top nets by iteration-attributed congestion checks:", ""]) - if net_check_counts: - for net_id, count in net_check_counts.most_common(10): - lines.append(f"- `{net_id}`: {count}") - else: - lines.append("- None") - - lines.append("") - - return "\n".join(lines) - - -def main() -> None: - record_trace( - __file__, - "iteration_trace", - scenario_label="iteration-trace", - default_scenarios=NO_WARM_START_SCENARIOS, - scenario_payload=_scenario_payload, - render_markdown=_render_markdown, - ) - - -if __name__ == "__main__": - main() diff --git a/scripts/record_performance_baseline.py b/scripts/record_performance_baseline.py deleted file mode 100644 index 3cedbe9..0000000 --- a/scripts/record_performance_baseline.py +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env python3 -from __future__ import annotations - -import argparse -import json -from dataclasses import asdict -from datetime import date -from pathlib import Path - -from inire.tests.example_scenarios import capture_scenario_snapshots - - -def _build_payload( - selected_scenarios: tuple[str, ...] | None = None, - *, - include_performance_only: bool = False, -) -> dict[str, object]: - snapshots = capture_scenario_snapshots(selected_scenarios, include_performance_only=include_performance_only) - return { - "generated_on": date.today().isoformat(), - "generator": "scripts/record_performance_baseline.py", - "scenarios": [asdict(snapshot) for snapshot in snapshots], - } - - -def _render_markdown(payload: dict[str, object]) -> str: - rows = payload["scenarios"] - lines = [ - "# Performance Baseline", - "", - f"Generated on {payload['generated_on']} by `{payload['generator']}`.", - "", - "The full machine-readable snapshot is in [performance_baseline.json](performance_baseline.json).", - "Use `scripts/diff_performance_baseline.py` to compare a fresh run against that snapshot.", - "", - "| Scenario | Duration (s) | Total | Valid | Reached | Iter | Nets Routed | Nodes | Ray Casts | " - "Moves Gen | Moves Added | Dyn Tree | Corner Index Builds | Congestion Checks | Verify Calls |", - "| :-- | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: | --: |", - ] - for row in rows: - metrics = row["metrics"] - lines.append( - "| " - f"{row['name']} | " - f"{row['duration_s']:.4f} | " - f"{row['total_results']} | " - f"{row['valid_results']} | " - f"{row['reached_targets']} | " - f"{metrics['route_iterations']} | " - f"{metrics['nets_routed']} | " - f"{metrics['nodes_expanded']} | " - f"{metrics['ray_cast_calls']} | " - f"{metrics['moves_generated']} | " - f"{metrics['moves_added']} | " - f"{metrics['dynamic_tree_rebuilds']} | " - f"{metrics['visibility_corner_index_builds']} | " - f"{metrics['congestion_check_calls']} | " - f"{metrics['verify_path_report_calls']} |" - ) - - lines.extend( - [ - "", - "## Full Counter Set", - "", - "Each scenario entry in the JSON records the full `RouteMetrics` snapshot, " - "including cache, index, congestion, and verification counters.", - "These counters are currently observational only and are not enforced as CI regression gates.", - "", - "Tracked metric keys:", - "", - ", ".join(rows[0]["metrics"].keys()) if rows else "", - ] - ) - return "\n".join(lines) + "\n" - - -def main() -> None: - parser = argparse.ArgumentParser(description="Record the example-scenario performance baseline.") - parser.add_argument( - "--output-dir", - type=Path, - default=None, - help="Directory to write performance_baseline.json and performance.md into. Defaults to /archive/routing.", - ) - parser.add_argument( - "--scenario", - action="append", - dest="scenarios", - default=[], - help="Optional scenario name to include. May be passed more than once.", - ) - parser.add_argument( - "--include-performance-only", - action="store_true", - help="Include performance-only snapshot scenarios that are excluded from the default baseline corpus.", - ) - args = parser.parse_args() - - repo_root = Path(__file__).resolve().parents[1] - output_dir = repo_root / "archive" / "routing" if args.output_dir is None else args.output_dir.resolve() - selected = tuple(args.scenarios) if args.scenarios else None - try: - payload = _build_payload(selected, include_performance_only=args.include_performance_only) - except ValueError as exc: - parser.error(str(exc)) - output_dir.mkdir(parents=True, exist_ok=True) - json_path = output_dir / "performance_baseline.json" - markdown_path = output_dir / "performance.md" - - json_path.write_text(json.dumps(payload, indent=2, sort_keys=True) + "\n") - markdown_path.write_text(_render_markdown(payload)) - - if json_path.is_relative_to(repo_root): - print(f"Wrote {json_path.relative_to(repo_root)}") - else: - print(f"Wrote {json_path}") - if markdown_path.is_relative_to(repo_root): - print(f"Wrote {markdown_path.relative_to(repo_root)}") - else: - print(f"Wrote {markdown_path}") - - -if __name__ == "__main__": - main() diff --git a/scripts/record_pre_pair_frontier_trace.py b/scripts/record_pre_pair_frontier_trace.py deleted file mode 100644 index a5486dd..0000000 --- a/scripts/record_pre_pair_frontier_trace.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python3 -from __future__ import annotations - -from collections import Counter -from dataclasses import asdict -from typing import TYPE_CHECKING - -from inire.tests.trace_recording import NO_WARM_START_SCENARIOS, record_trace - -if TYPE_CHECKING: - from inire.results import RoutingRunResult - - -def _scenario_payload(result: RoutingRunResult) -> dict[str, object]: - trace = result.pre_pair_frontier_trace - return {"pre_pair_frontier_trace": asdict(trace) if trace is not None else None} - - -def _render_markdown(payload: dict[str, object]) -> str: - lines = [ - "# Pre-Pair Frontier Trace", - "", - f"Generated at {payload['generated_at']} by `{payload['generator']}`.", - "", - ] - - for scenario in payload["scenarios"]: - lines.extend( - [ - f"## {scenario['name']}", - "", - f"Results: {scenario['summary']['valid_results']} valid / " - f"{scenario['summary']['reached_targets']} reached / " - f"{scenario['summary']['total_results']} total.", - "", - ] - ) - trace = scenario["pre_pair_frontier_trace"] - if trace is None: - lines.extend(["No pre-pair frontier trace captured.", ""]) - continue - - lines.extend( - [ - f"Captured iteration: `{trace['iteration']}`", - "", - f"Conflict edges: `{trace['conflict_edges']}`", - "", - "| Net | Nodes | Checks | Closed-Set | Cost | Hard Collision | Guidance Seed | Frontier Samples |", - "| :-- | --: | --: | --: | --: | --: | :--: | --: |", - ] - ) - reason_counts: Counter[str] = Counter() - for net_trace in trace["nets"]: - frontier = net_trace["frontier"] - lines.append( - "| " - f"{net_trace['net_id']} | " - f"{net_trace['nodes_expanded']} | " - f"{net_trace['congestion_check_calls']} | " - f"{net_trace['pruned_closed_set']} | " - f"{net_trace['pruned_cost']} | " - f"{net_trace['pruned_hard_collision']} | " - f"{'yes' if net_trace['guidance_seed_present'] else 'no'} | " - f"{len(frontier['samples'])} |" - ) - reason_counts["closed_set"] += frontier["pruned_closed_set"] - reason_counts["hard_collision"] += frontier["pruned_hard_collision"] - reason_counts["self_collision"] += frontier["pruned_self_collision"] - reason_counts["cost"] += frontier["pruned_cost"] - - lines.extend(["", "Frontier prune totals by reason:", ""]) - if reason_counts: - for reason, count in reason_counts.most_common(): - lines.append(f"- `{reason}`: {count}") - else: - lines.append("- None") - lines.append("") - - return "\n".join(lines) - - -def main() -> None: - record_trace( - __file__, - "pre_pair_frontier_trace", - scenario_label="pre-pair frontier-trace", - default_scenarios=NO_WARM_START_SCENARIOS, - scenario_payload=_scenario_payload, - render_markdown=_render_markdown, - ) - - -if __name__ == "__main__": - main() diff --git a/scripts/render_complex_routing_example.py b/scripts/render_complex_routing_example.py deleted file mode 100644 index 07cd341..0000000 --- a/scripts/render_complex_routing_example.py +++ /dev/null @@ -1,291 +0,0 @@ -"""Render intermediate router states for complex-routing example 1.""" - -from __future__ import annotations - -from argparse import ArgumentParser -from dataclasses import replace -from json import loads -from math import floor -from pathlib import Path -from typing import TYPE_CHECKING - -from matplotlib.lines import Line2D -from shapely import get_parts, union_all -from shapely.geometry import box - -from examples.advanced_layouts import COMPLEX_EXAMPLE, INPUTS, _draw_ports, build_problem -from inire import DiagnosticsOptions, route -from inire.constants import TOLERANCE_LINEAR -from inire.geometry.intervals import open_intervals -from inire.router._bundle import _identify_layout, plan_ordered_bundle -from inire.router._seed_materialization import materialize_path_seed -from inire.router._stack import route_once -from inire.router._topology import _build_corridors, _endpoint_access, _Mesh, _plan_lane_assignments -from inire.router._waypoints import export_waypoints -from scripts.render_documentation_figures import EDGE, INK, MUTED, _board, _polygon, _save, plt - -if TYPE_CHECKING: - from collections.abc import Mapping, Sequence - - from matplotlib.axes import Axes - - from inire import RoutingOptions, RoutingProblem, RoutingRunResult, SearchOptions - from inire.geometry.components import ComponentResult - - PathMap = Mapping[str, Sequence[ComponentResult]] - - -LOWER = "#326a9b" -UPPER = "#26785e" -SHORT = "#725197" -RETURN = "#b34331" - - -def _seed_paths(problem: RoutingProblem, search: SearchOptions) -> PathMap: - paths = {} - for net in problem.nets: - path = materialize_path_seed( - problem.initial_paths[net.net_id], start=net.start, net_width=net.width, search=search, clearance=problem.clearance, - ) - assert path - paths[net.net_id] = path - return paths - - -def _result_paths(run: RoutingRunResult) -> PathMap: - return {net_id: result.path for net_id, result in run.results_by_net.items()} - - -def _footprint(ax: Axes, path: Sequence[ComponentResult], color: str, *, dashed: bool = False) -> None: - for shape in get_parts(union_all([polygon for move in path for polygon in move.physical_geometry])): - _polygon(ax, shape, fill="none" if dashed else color, edge=color, linewidth=0.9, linestyle="--" if dashed else "-", zorder=4) - - -def _waypoints(ax: Axes, path: Sequence[ComponentResult], color: str, *, marker: str | None = None) -> None: - x, y = zip(*export_waypoints(path), strict=True) - ax.plot(x, y, color=color, marker=marker, markersize=2.6, linewidth=1.35, zorder=4) - - -def _input_figure(directory: Path, problem: RoutingProblem) -> None: - first, last = sorted({x for shape in problem.static_obstacles for x in (shape.bounds[0], shape.bounds[2])})[:2] - cut = (first + last) / 2 - _, bottom, _, top = problem.bounds - solid = [(y0, y1) for x0, y0, x1, y1 in (shape.bounds for shape in problem.static_obstacles) if x0 < cut < x1] - openings = open_intervals(solid, bottom, top) - width = min(net.width for net in problem.nets) - pitch = width + problem.clearance - TOLERANCE_LINEAR - - fig, (board, section) = plt.subplots(1, 2, figsize=(10, 3.6), width_ratios=(4.5, 1), layout="constrained") - _board(board, problem, grid=True) - board.set_title("Input ports, headings, and keepouts", loc="left", color=INK) - board.set_xlabel("x in layout units", color=MUTED) - for net in problem.nets: - _draw_ports(board, net.start, net.target, RETURN if net.net_id == "net_08" else INK, arrow_length=55) - board.axvline(cut, color=SHORT, linestyle="--", linewidth=1.4, zorder=3) - board.text(cut + 33, 260, f"Cut at x = {cut:g}", rotation=90, color=SHORT, fontsize=9) - section.set(title="Openings on the cut", xlim=(0, 1), ylim=(bottom, top), xticks=[]) - section.tick_params(axis="y", labelsize=8, colors=MUTED) - for low, high in solid: - section.axhspan(low, high, color="#d9e1e4") - track_count = 0 - for low, high in openings: - first_track = low + width / 2 + (problem.clearance if low != bottom else 0) - last_track = high - width / 2 - (problem.clearance if high != top else 0) - count = max(0, 1 + floor((last_track - first_track + 2 * TOLERANCE_LINEAR) / pitch)) - track_count += count - section.plot([0.15, 0.15], [low, high], color=SHORT, linewidth=2) - section.scatter([0.27] * count, [first_track + i * pitch for i in range(count)], s=4, color=SHORT) - section.text(0.40, (low + high) / 2, f"{low:g}–{high:g}", va="center", color=INK, fontsize=9) - section.set_xlabel(f"{track_count} available tracks", color=MUTED, fontsize=9) - _save(fig, directory, f"{COMPLEX_EXAMPLE}-input.png") - - -def _lane_figure(directory: Path, problem: RoutingProblem, paths: PathMap, colors: Mapping[str, str]) -> None: - fig, (board, detail) = plt.subplots(2, 1, figsize=(9.5, 5.4), height_ratios=(3, 1), layout="constrained") - fig.suptitle("Ordered bundle waypoints", x=0.01, ha="left", color=INK, fontsize=13) - _board(board, problem) - for net_id, path in paths.items(): - _waypoints(board, path, colors[net_id], marker="o") - groups = (("Lower group", LOWER), ("Upper group", UPPER), ("Short connection", SHORT), ("Outer return", RETURN)) - handles = [Line2D([], [], color=color, label=label) for label, color in groups] - board.legend(handles=handles, loc="lower center", bbox_to_anchor=(0.5, 1), ncols=4, frameon=False, fontsize=9) - - _board(detail, problem, grid=True) - detail.set(xlim=(1270, 1615), ylim=(-5, 64), yticks=(1, 10, 18, 45), xticks=(1350, 1450, 1537)) - detail.set_title("Two continuous lanes below the tower", loc="left", color=INK, fontsize=10) - detail.tick_params(labelsize=8, colors=MUTED) - for net_id in ("net_00", "net_08"): - _waypoints(detail, paths[net_id], colors[net_id]) - detail.text(1450, 33, "Tower", color=MUTED, fontsize=9, ha="center") - detail.text(1292, 10, "net_00", color=LOWER, fontsize=8, va="bottom") - detail.text(1550, 1, "net_08", color=RETURN, fontsize=8, va="bottom") - _save(fig, directory, f"{COMPLEX_EXAMPLE}-lanes.png") - - -def _turnaround_figure(directory: Path, problem: RoutingProblem, proposal: PathMap, verified: PathMap) -> None: - fig, panels = plt.subplots(2, 1, figsize=(9.5, 4.0), layout="constrained") - for ax, paths, title in zip(panels, (proposal, verified), ("Inferred westbound arrival", "Candidate with eastbound arrival"), strict=True): - _board(ax, problem, grid=True) - ax.set(xlim=(995, 2500), ylim=(785, 1028), xticks=(1112, 1500, 2000, 2412), yticks=(850, 991)) - ax.tick_params(labelsize=8, colors=MUTED) - ax.set_title(title, loc="left", color=INK, fontsize=11) - for net_id, color in (("net_07", UPPER), ("net_08", RETURN)): - _footprint(ax, paths[net_id], color) - port = paths["net_08"][-1].end_port - dx = 25 if port.r == 0 else -25 - ax.annotate( - "", xy=(port.x + dx, port.y + 21), xytext=(port.x - dx, port.y + 21), - arrowprops={"arrowstyle": "-|>", "color": RETURN, "lw": 1.5}, zorder=6, - ) - ax.scatter(port.x, port.y, marker="s", s=22, facecolor="white", edgecolor=RETURN, zorder=7) - ax.text(1950, 902, "net_07 · shelf", color=UPPER, fontsize=9) - ax.text(1250, 1004 if paths is proposal else 844, "net_08 · return", color=RETURN, fontsize=9) - _save(fig, directory, f"{COMPLEX_EXAMPLE}-turnaround.png") - - -def _verify_figure(directory: Path, problem: RoutingProblem, paths: PathMap, colors: Mapping[str, str]) -> None: - fig, panels = plt.subplots(2, 1, figsize=(8.5, 6.4), layout="constrained") - prefix = tuple(net.net_id for net in problem.nets[:4]) - for ax, ids, title in zip( - panels, (prefix, paths), ("First four seeds in install order", "Installed layout after verification · 9/9"), strict=True, - ): - _board(ax, problem) - ax.set_title(title, loc="left", color=INK, fontsize=11) - for net in problem.nets: - _draw_ports(ax, net.start, net.target, colors[net.net_id] if net.net_id in ids else EDGE, arrow_length=0) - for net_id in ids: - _footprint(ax, paths[net_id], colors[net_id]) - _save(fig, directory, f"{COMPLEX_EXAMPLE}-verification.png") - - -def _refine_figure(directory: Path, problem: RoutingProblem, before: PathMap, after: PathMap) -> None: - fig, ax = plt.subplots(figsize=(9.5, 2.5), layout="constrained") - _board(ax, problem, grid=True) - ax.set(xlim=(990, 2500), ylim=(793, 1022), xticks=(1100, 1500, 2000, 2412), yticks=(850, 890, 999)) - ax.tick_params(labelsize=8, colors=MUTED) - ax.set_title("Selected refinement of the shelf route · net_07", loc="left", color=INK, fontsize=11) - _footprint(ax, before["net_07"], SHORT, dashed=True) - _footprint(ax, after["net_07"], UPPER) - _footprint(ax, after["net_08"], RETURN) - ax.text(1520, 1005, "Selected shelf", color=UPPER, fontsize=9) - ax.text(1510, 895, "Previous shelf (dashed)", color=SHORT, fontsize=9) - ax.text(1460, 845, "Outer return", color=RETURN, fontsize=9) - _save(fig, directory, f"{COMPLEX_EXAMPLE}-refinement.png") - - -def _guide_figure(directory: Path, problem: RoutingProblem, options: RoutingOptions) -> None: - net = next(net for net in problem.nets if net.net_id == "net_08") - single = replace(problem, nets=(net,)) - radius = min(options.search.bend_radii) - board = box(*single.bounds) - mesh = _Mesh(board, single.static_obstacles, net.width / 2, single.clearance) - endpoints, leads = _endpoint_access(mesh, single.nets, radius) - assignments = _plan_lane_assignments( - mesh, single.nets, endpoints, leads, bend_radius=radius, limit=options.topology.max_corridors, - ) - corridors = _build_corridors(mesh, board, single.nets, assignments, radius) - config = replace( - options, - search=replace(options.search, node_limit=12), - topology=replace(options.topology, mode="guide"), - congestion=replace(options.congestion, max_iterations=1, warm_start_enabled=False), - diagnostics=DiagnosticsOptions(capture_expanded=True), - ) - run = route_once(single, options=config, corridors=corridors) - result = run.results_by_net[net.net_id] - assert result.outcome == "partial" - assert run.metrics.nodes_expanded == config.search.node_limit - - assignment = assignments[net.net_id][0] - guide = corridors[net.net_id][0] - fig, (overview, search) = plt.subplots(1, 2, figsize=(10, 4.3), width_ratios=(2, 1), layout="constrained") - for ax in (overview, search): - _board(ax, single, grid=True) - ax.tick_params(labelsize=8, colors=MUTED) - for i, cell in enumerate(mesh.cells): - _polygon(ax, cell, fill="#dfeee7" if i in assignment.cells else "#f2f6f9", edge="#a4b5bd", linewidth=0.7, zorder=1) - ax.plot(*guide.centerline.xy, color=UPPER, linewidth=1.4, linestyle="--", zorder=3) - _draw_ports(ax, net.start, net.target, INK, arrow_length=0) - overview.set_title(f"Guide mesh · {len(mesh.cells)} triangles", loc="left", color=INK, fontsize=11) - search.set_title("Partial path after 12 expansions", loc="left", color=INK, fontsize=11) - search.set(xlim=(0, 410), ylim=(395, 945), xticks=(0, 100, 200, 300, 400)) - x, y, _ = zip(*run.expanded_nodes, strict=True) - search.scatter(x, y, color=SHORT, s=12, alpha=0.8, zorder=3, label="Expanded position") - _footprint(search, result.path, RETURN) - port = result.path[-1].end_port - search.annotate( - "Partial end port", xy=(port.x, port.y), xytext=(90, 905), color=RETURN, fontsize=8, - arrowprops={"arrowstyle": "->", "color": RETURN}, zorder=5, - ) - search.legend(loc="lower right", fontsize=8) - _save(fig, directory, f"{COMPLEX_EXAMPLE}-guide.png") - - -def _modes_figure(directory: Path, problem: RoutingProblem, options: RoutingOptions) -> None: - config = replace( - options, - search=replace(options.search, node_limit=100), - congestion=replace(options.congestion, max_iterations=1, warm_start_enabled=False), - refinement=replace(options.refinement, enabled=False), - ) - modes = ("automatic", "off", "guide", "seed", "bundle") - fig, panels = plt.subplots(3, 2, figsize=(10, 7), layout="constrained") - fig.suptitle("One congestion iteration · 100 nodes per search", color=INK, fontsize=13) - for ax, mode in zip(panels.ravel()[:-1], modes, strict=True): - settings = replace(config, topology=replace(config.topology, mode=mode, infer_terminal_headings=mode == "bundle")) - run = route(problem, options=settings) - verified = sum(result.is_valid for result in run.results_by_net.values()) - label = "bundle with heading inference" if mode == "bundle" else mode - _board(ax, problem) - ax.set_title(f"{label} · {verified}/{len(problem.nets)} verified", loc="left", color=INK, fontsize=11) - for net in problem.nets: - _draw_ports(ax, net.start, net.target, EDGE, arrow_length=0) - result = run.results_by_net[net.net_id] - if result.path: - _footprint(ax, result.path, UPPER if result.is_valid else RETURN, dashed=not result.is_valid) - - legend = panels.flat[-1] - legend.set_axis_off() - handles = [ - Line2D([], [], color=UPPER, label="Verified path"), - Line2D([], [], color=RETURN, linestyle="--", label="Unverified or partial path"), - ] - legend.legend(handles=handles, loc="center left", frameon=False, fontsize=10) - _save(fig, directory, f"{COMPLEX_EXAMPLE}-modes.png") - - -def main() -> None: - parser = ArgumentParser(description=__doc__) - parser.add_argument("--output-dir", type=Path, default=Path(__file__).resolve().parents[1] / "docs" / "figures") - directory = parser.parse_args().output_dir - directory.mkdir(parents=True, exist_ok=True) - - problem, options = build_problem(loads(INPUTS.read_text(encoding="utf-8"))[COMPLEX_EXAMPLE]) - proposal = plan_ordered_bundle(problem, options.search, infer_terminal_headings=True) - verified = route(problem, options=replace(options, refinement=replace(options.refinement, enabled=False))) - refined = route(problem, options=options) - assert verified.automatic is not None - assert refined.automatic is not None - assert [stage.planner for stage in verified.automatic.stages] == ["bundle-turnaround"] - assert [stage.operation for stage in refined.automatic.stages] == ["verify", "refine"] - assert refined.automatic.selected_stage == 1 - assert len(refined.automatic.verified_net_ids) == len(verified.automatic.verified_net_ids) == len(problem.nets) - assert refined.metrics.nodes_expanded == 0 - - layout = _identify_layout(problem, problem.nets[0].width / 2 + problem.clearance) - colors = {net.net_id: color for group, color in ((layout.lower, LOWER), (layout.upper, UPPER)) for net in group} - colors.update({layout.short.net_id: SHORT, layout.outer_return.net_id: RETURN}) - proposed_paths = _seed_paths(proposal, options.search) - paths = _result_paths(verified) - _input_figure(directory, problem) - _lane_figure(directory, problem, proposed_paths, colors) - _turnaround_figure(directory, problem, proposed_paths, paths) - _verify_figure(directory, problem, paths, colors) - _refine_figure(directory, problem, paths, _result_paths(refined)) - _guide_figure(directory, problem, options) - _modes_figure(directory, problem, options) - print(f"{COMPLEX_EXAMPLE}: {len(problem.nets)}/{len(problem.nets)} verified, {refined.metrics.nodes_expanded} A* expansions") - - -if __name__ == "__main__": - main() diff --git a/scripts/render_documentation_figures.py b/scripts/render_documentation_figures.py index c07cbd9..ebd5f74 100644 --- a/scripts/render_documentation_figures.py +++ b/scripts/render_documentation_figures.py @@ -1,32 +1,48 @@ -"""Render the routing figures embedded in the user and developer guides.""" +"""Render the guide, walkthrough, and advanced example figures.""" from __future__ import annotations from argparse import ArgumentParser from dataclasses import replace from itertools import pairwise +from json import loads +from math import floor from pathlib import Path from typing import TYPE_CHECKING import matplotlib import shapely +from shapely import get_parts, union_all from shapely.geometry import box -from inire import CongestionOptions, NetSpec, ObjectiveWeights, Port, RoutingOptions, RoutingProblem, SearchOptions, route -from inire.router._topology import HEADINGS, _endpoint_access, _Mesh, _plan_lane_assignments +from inire import CongestionOptions, DiagnosticsOptions, NetSpec, ObjectiveWeights, Port, RoutingOptions, RoutingProblem, SearchOptions, route +from inire.constants import TOLERANCE_LINEAR +from inire.geometry.intervals import open_intervals +from inire.router._bundle import _identify_layout, plan_ordered_bundle +from inire.router._seed_materialization import materialize_path_seed +from inire.router._stack import route_once +from inire.router._topology import HEADINGS, _build_corridors, _endpoint_access, _Mesh, _plan_lane_assignments +from inire.router._waypoints import export_waypoints from inire.tests.routing_corpus import CASE_GROUPS, profile_options matplotlib.use("Agg") from matplotlib import pyplot as plt # noqa: E402 +from matplotlib.lines import Line2D # noqa: E402 from matplotlib.patches import FancyBboxPatch # noqa: E402 +from examples.advanced_layouts import COMPLEX_EXAMPLE, INPUTS, _draw_ports, build_problem, render_layouts # noqa: E402 from inire.utils.visualization import draw_polygon # noqa: E402 if TYPE_CHECKING: + from collections.abc import Mapping, Sequence + from matplotlib.axes import Axes from matplotlib.figure import Figure from shapely.geometry import Polygon - from inire import RoutingResult + from inire import RoutingResult, RoutingRunResult + from inire.geometry.components import ComponentResult + + PathMap = Mapping[str, Sequence[ComponentResult]] INK = "#193447" @@ -36,6 +52,10 @@ PARTIAL = "#a43a33" PORTAL = "#a05221" OBSTACLE = "#d9e1e4" EDGE = "#738692" +LOWER = "#326a9b" +UPPER = "#26785e" +SHORT = "#725197" +RETURN = "#b34331" def _save(fig: Figure, directory: Path, name: str) -> None: @@ -241,14 +261,259 @@ def _automatic_stages(directory: Path) -> None: _save(fig, directory, "automatic-stages.png") -def main() -> None: +def _seed_paths(problem: RoutingProblem, search: SearchOptions) -> PathMap: + paths = {} + for net in problem.nets: + path = materialize_path_seed( + problem.initial_paths[net.net_id], start=net.start, net_width=net.width, search=search, clearance=problem.clearance, + ) + assert path + paths[net.net_id] = path + return paths + + +def _result_paths(run: RoutingRunResult) -> PathMap: + return {net_id: result.path for net_id, result in run.results_by_net.items()} + + +def _footprint(ax: Axes, path: Sequence[ComponentResult], color: str, *, dashed: bool = False) -> None: + for shape in get_parts(union_all([polygon for move in path for polygon in move.physical_geometry])): + _polygon(ax, shape, fill="none" if dashed else color, edge=color, linewidth=0.9, linestyle="--" if dashed else "-", zorder=4) + + +def _waypoints(ax: Axes, path: Sequence[ComponentResult], color: str, *, marker: str | None = None) -> None: + x, y = zip(*export_waypoints(path), strict=True) + ax.plot(x, y, color=color, marker=marker, markersize=2.6, linewidth=1.35, zorder=4) + + +def _input_figure(directory: Path, problem: RoutingProblem) -> None: + first, last = sorted({x for shape in problem.static_obstacles for x in (shape.bounds[0], shape.bounds[2])})[:2] + cut = (first + last) / 2 + _, bottom, _, top = problem.bounds + solid = [(y0, y1) for x0, y0, x1, y1 in (shape.bounds for shape in problem.static_obstacles) if x0 < cut < x1] + openings = open_intervals(solid, bottom, top) + width = min(net.width for net in problem.nets) + pitch = width + problem.clearance - TOLERANCE_LINEAR + + fig, (board, section) = plt.subplots(1, 2, figsize=(10, 3.6), width_ratios=(4.5, 1), layout="constrained") + _board(board, problem, grid=True) + board.set_title("Input ports, headings, and keepouts", loc="left", color=INK) + board.set_xlabel("x in layout units", color=MUTED) + for net in problem.nets: + _draw_ports(board, net.start, net.target, RETURN if net.net_id == "net_08" else INK, arrow_length=55) + board.axvline(cut, color=SHORT, linestyle="--", linewidth=1.4, zorder=3) + board.text(cut + 33, 260, f"Cut at x = {cut:g}", rotation=90, color=SHORT, fontsize=9) + section.set(title="Openings on the cut", xlim=(0, 1), ylim=(bottom, top), xticks=[]) + section.tick_params(axis="y", labelsize=8, colors=MUTED) + for low, high in solid: + section.axhspan(low, high, color="#d9e1e4") + track_count = 0 + for low, high in openings: + first_track = low + width / 2 + (problem.clearance if low != bottom else 0) + last_track = high - width / 2 - (problem.clearance if high != top else 0) + count = max(0, 1 + floor((last_track - first_track + 2 * TOLERANCE_LINEAR) / pitch)) + track_count += count + section.plot([0.15, 0.15], [low, high], color=SHORT, linewidth=2) + section.scatter([0.27] * count, [first_track + i * pitch for i in range(count)], s=4, color=SHORT) + section.text(0.40, (low + high) / 2, f"{low:g}–{high:g}", va="center", color=INK, fontsize=9) + section.set_xlabel(f"{track_count} available tracks", color=MUTED, fontsize=9) + _save(fig, directory, f"{COMPLEX_EXAMPLE}-input.png") + + +def _lane_figure(directory: Path, problem: RoutingProblem, paths: PathMap, colors: Mapping[str, str]) -> None: + fig, (board, detail) = plt.subplots(2, 1, figsize=(9.5, 5.4), height_ratios=(3, 1), layout="constrained") + fig.suptitle("Ordered bundle waypoints", x=0.01, ha="left", color=INK, fontsize=13) + _board(board, problem) + for net_id, path in paths.items(): + _waypoints(board, path, colors[net_id], marker="o") + groups = (("Lower group", LOWER), ("Upper group", UPPER), ("Short connection", SHORT), ("Outer return", RETURN)) + handles = [Line2D([], [], color=color, label=label) for label, color in groups] + board.legend(handles=handles, loc="lower center", bbox_to_anchor=(0.5, 1), ncols=4, frameon=False, fontsize=9) + + _board(detail, problem, grid=True) + detail.set(xlim=(1270, 1615), ylim=(-5, 64), yticks=(1, 10, 18, 45), xticks=(1350, 1450, 1537)) + detail.set_title("Two continuous lanes below the tower", loc="left", color=INK, fontsize=10) + detail.tick_params(labelsize=8, colors=MUTED) + for net_id in ("net_00", "net_08"): + _waypoints(detail, paths[net_id], colors[net_id]) + detail.text(1450, 33, "Tower", color=MUTED, fontsize=9, ha="center") + detail.text(1292, 10, "net_00", color=LOWER, fontsize=8, va="bottom") + detail.text(1550, 1, "net_08", color=RETURN, fontsize=8, va="bottom") + _save(fig, directory, f"{COMPLEX_EXAMPLE}-lanes.png") + + +def _turnaround_figure(directory: Path, problem: RoutingProblem, proposal: PathMap, verified: PathMap) -> None: + fig, panels = plt.subplots(2, 1, figsize=(9.5, 4.0), layout="constrained") + for ax, paths, title in zip(panels, (proposal, verified), ("Inferred westbound arrival", "Candidate with eastbound arrival"), strict=True): + _board(ax, problem, grid=True) + ax.set(xlim=(995, 2500), ylim=(785, 1028), xticks=(1112, 1500, 2000, 2412), yticks=(850, 991)) + ax.tick_params(labelsize=8, colors=MUTED) + ax.set_title(title, loc="left", color=INK, fontsize=11) + for net_id, color in (("net_07", UPPER), ("net_08", RETURN)): + _footprint(ax, paths[net_id], color) + port = paths["net_08"][-1].end_port + dx = 25 if port.r == 0 else -25 + ax.annotate( + "", xy=(port.x + dx, port.y + 21), xytext=(port.x - dx, port.y + 21), + arrowprops={"arrowstyle": "-|>", "color": RETURN, "lw": 1.5}, zorder=6, + ) + ax.scatter(port.x, port.y, marker="s", s=22, facecolor="white", edgecolor=RETURN, zorder=7) + ax.text(1950, 902, "net_07 · shelf", color=UPPER, fontsize=9) + ax.text(1250, 1004 if paths is proposal else 844, "net_08 · return", color=RETURN, fontsize=9) + _save(fig, directory, f"{COMPLEX_EXAMPLE}-turnaround.png") + + +def _verify_figure(directory: Path, problem: RoutingProblem, paths: PathMap, colors: Mapping[str, str]) -> None: + fig, panels = plt.subplots(2, 1, figsize=(8.5, 6.4), layout="constrained") + prefix = tuple(net.net_id for net in problem.nets[:4]) + for ax, ids, title in zip( + panels, (prefix, paths), ("First four seeds in install order", "Installed layout after verification · 9/9"), strict=True, + ): + _board(ax, problem) + ax.set_title(title, loc="left", color=INK, fontsize=11) + for net in problem.nets: + _draw_ports(ax, net.start, net.target, colors[net.net_id] if net.net_id in ids else EDGE, arrow_length=0) + for net_id in ids: + _footprint(ax, paths[net_id], colors[net_id]) + _save(fig, directory, f"{COMPLEX_EXAMPLE}-verification.png") + + +def _refine_figure(directory: Path, problem: RoutingProblem, before: PathMap, after: PathMap) -> None: + fig, ax = plt.subplots(figsize=(9.5, 2.5), layout="constrained") + _board(ax, problem, grid=True) + ax.set(xlim=(990, 2500), ylim=(793, 1022), xticks=(1100, 1500, 2000, 2412), yticks=(850, 890, 999)) + ax.tick_params(labelsize=8, colors=MUTED) + ax.set_title("Selected refinement of the shelf route · net_07", loc="left", color=INK, fontsize=11) + _footprint(ax, before["net_07"], SHORT, dashed=True) + _footprint(ax, after["net_07"], UPPER) + _footprint(ax, after["net_08"], RETURN) + ax.text(1520, 1005, "Selected shelf", color=UPPER, fontsize=9) + ax.text(1510, 895, "Previous shelf (dashed)", color=SHORT, fontsize=9) + ax.text(1460, 845, "Outer return", color=RETURN, fontsize=9) + _save(fig, directory, f"{COMPLEX_EXAMPLE}-refinement.png") + + +def _guide_figure(directory: Path, problem: RoutingProblem, options: RoutingOptions) -> None: + net = next(net for net in problem.nets if net.net_id == "net_08") + single = replace(problem, nets=(net,)) + radius = min(options.search.bend_radii) + board = box(*single.bounds) + mesh = _Mesh(board, single.static_obstacles, net.width / 2, single.clearance) + endpoints, leads = _endpoint_access(mesh, single.nets, radius) + assignments = _plan_lane_assignments( + mesh, single.nets, endpoints, leads, bend_radius=radius, limit=options.topology.max_corridors, + ) + corridors = _build_corridors(mesh, board, single.nets, assignments, radius) + config = replace( + options, + search=replace(options.search, node_limit=12), + topology=replace(options.topology, mode="guide"), + congestion=replace(options.congestion, max_iterations=1, warm_start_enabled=False), + diagnostics=DiagnosticsOptions(capture_expanded=True), + ) + run = route_once(single, options=config, corridors=corridors) + result = run.results_by_net[net.net_id] + assert result.outcome == "partial" + assert run.metrics.nodes_expanded == config.search.node_limit + + assignment = assignments[net.net_id][0] + guide = corridors[net.net_id][0] + fig, (overview, search) = plt.subplots(1, 2, figsize=(10, 4.3), width_ratios=(2, 1), layout="constrained") + for ax in (overview, search): + _board(ax, single, grid=True) + ax.tick_params(labelsize=8, colors=MUTED) + for i, cell in enumerate(mesh.cells): + _polygon(ax, cell, fill="#dfeee7" if i in assignment.cells else "#f2f6f9", edge="#a4b5bd", linewidth=0.7, zorder=1) + ax.plot(*guide.centerline.xy, color=UPPER, linewidth=1.4, linestyle="--", zorder=3) + _draw_ports(ax, net.start, net.target, INK, arrow_length=0) + overview.set_title(f"Guide mesh · {len(mesh.cells)} triangles", loc="left", color=INK, fontsize=11) + search.set_title("Partial path after 12 expansions", loc="left", color=INK, fontsize=11) + search.set(xlim=(0, 410), ylim=(395, 945), xticks=(0, 100, 200, 300, 400)) + x, y, _ = zip(*run.expanded_nodes, strict=True) + search.scatter(x, y, color=SHORT, s=12, alpha=0.8, zorder=3, label="Expanded position") + _footprint(search, result.path, RETURN) + port = result.path[-1].end_port + search.annotate( + "Partial end port", xy=(port.x, port.y), xytext=(90, 905), color=RETURN, fontsize=8, + arrowprops={"arrowstyle": "->", "color": RETURN}, zorder=5, + ) + search.legend(loc="lower right", fontsize=8) + _save(fig, directory, f"{COMPLEX_EXAMPLE}-guide.png") + + +def _modes_figure(directory: Path, problem: RoutingProblem, options: RoutingOptions) -> None: + config = replace( + options, + search=replace(options.search, node_limit=100), + congestion=replace(options.congestion, max_iterations=1, warm_start_enabled=False), + refinement=replace(options.refinement, enabled=False), + ) + modes = ("automatic", "off", "guide", "seed", "bundle") + fig, panels = plt.subplots(3, 2, figsize=(10, 7), layout="constrained") + fig.suptitle("One congestion iteration · 100 nodes per search", color=INK, fontsize=13) + for ax, mode in zip(panels.ravel()[:-1], modes, strict=True): + settings = replace(config, topology=replace(config.topology, mode=mode, infer_terminal_headings=mode == "bundle")) + run = route(problem, options=settings) + verified = sum(result.is_valid for result in run.results_by_net.values()) + label = "bundle with heading inference" if mode == "bundle" else mode + _board(ax, problem) + ax.set_title(f"{label} · {verified}/{len(problem.nets)} verified", loc="left", color=INK, fontsize=11) + for net in problem.nets: + _draw_ports(ax, net.start, net.target, EDGE, arrow_length=0) + result = run.results_by_net[net.net_id] + if result.path: + _footprint(ax, result.path, UPPER if result.is_valid else RETURN, dashed=not result.is_valid) + + legend = panels.flat[-1] + legend.set_axis_off() + handles = [ + Line2D([], [], color=UPPER, label="Verified path"), + Line2D([], [], color=RETURN, linestyle="--", label="Unverified or partial path"), + ] + legend.legend(handles=handles, loc="center left", frameon=False, fontsize=10) + _save(fig, directory, f"{COMPLEX_EXAMPLE}-modes.png") + + +def _render_walkthrough(directory: Path, layout: dict) -> None: + problem, options = build_problem(layout) + proposal = plan_ordered_bundle(problem, options.search, infer_terminal_headings=True) + verified = route(problem, options=replace(options, refinement=replace(options.refinement, enabled=False))) + refined = route(problem, options=options) + assert verified.automatic is not None + assert refined.automatic is not None + assert [stage.planner for stage in verified.automatic.stages] == ["bundle-turnaround"] + assert [stage.operation for stage in refined.automatic.stages] == ["verify", "refine"] + assert refined.automatic.selected_stage == 1 + assert len(refined.automatic.verified_net_ids) == len(verified.automatic.verified_net_ids) == len(problem.nets) + assert refined.metrics.nodes_expanded == 0 + + layout = _identify_layout(problem, problem.nets[0].width / 2 + problem.clearance) + colors = {net.net_id: color for group, color in ((layout.lower, LOWER), (layout.upper, UPPER)) for net in group} + colors.update({layout.short.net_id: SHORT, layout.outer_return.net_id: RETURN}) + proposed_paths = _seed_paths(proposal, options.search) + paths = _result_paths(verified) + _input_figure(directory, problem) + _lane_figure(directory, problem, proposed_paths, colors) + _turnaround_figure(directory, problem, proposed_paths, paths) + _verify_figure(directory, problem, paths, colors) + _refine_figure(directory, problem, paths, _result_paths(refined)) + _guide_figure(directory, problem, options) + _modes_figure(directory, problem, options) + print(f"{COMPLEX_EXAMPLE}: {len(problem.nets)}/{len(problem.nets)} verified, {refined.metrics.nodes_expanded} A* expansions") + + +def main() -> int: parser = ArgumentParser(description=__doc__) parser.add_argument("--output-dir", type=Path, default=Path(__file__).resolve().parents[1] / "docs" / "figures") directory = parser.parse_args().output_dir directory.mkdir(parents=True, exist_ok=True) + for render in (_first_route, _placed_crossing, _search_limits, _automatic_stages, _corridor): render(directory) + layouts = loads(INPUTS.read_text(encoding="utf-8")) + _render_walkthrough(directory, layouts[COMPLEX_EXAMPLE]) + return render_layouts(layouts, directory) if __name__ == "__main__": - main() + raise SystemExit(main()) diff --git a/scripts/route_complex_routing_example.py b/scripts/route_complex_routing_example.py deleted file mode 100644 index 4d44cc6..0000000 --- a/scripts/route_complex_routing_example.py +++ /dev/null @@ -1,52 +0,0 @@ -"""Route complex-routing example 1 and export verified waypoints.""" - -from argparse import ArgumentParser -from dataclasses import replace -from json import dumps -from pathlib import Path -from time import perf_counter - -from shapely.geometry import box - -from inire import TopologyOptions, route -from inire.router._waypoints import export_waypoints -from inire.router.cost import weighted_path_length -from inire.tests.terminal_bench_scenario import LENGTH_COST, terminal_bench_options, terminal_bench_problem - - -def main() -> None: - parser = ArgumentParser(description=__doc__) - parser.add_argument("--output", type=Path, help="Write the verified waypoint plan to this JSON file.") - parser.add_argument("--reference-lane-plan", action="store_true", help="Replay the manually supplied reference for comparison.") - parser.add_argument("--single-bottom-track", action="store_true", help="Replay the manual reference with one bottom track.") - args = parser.parse_args() - - options = terminal_bench_options(max_iterations=1) - options = replace(options, refinement=replace(options.refinement, enabled=False)) - started = perf_counter() - if args.reference_lane_plan or args.single_bottom_track: - from inire.tests.terminal_bench_lane_plan import terminal_bench_lane_problem # noqa: PLC0415 - - problem = terminal_bench_lane_problem(share_bottom_passage=not args.single_bottom_track) - else: - problem = terminal_bench_problem() - options = replace(options, topology=TopologyOptions(mode="bundle", infer_terminal_headings=True)) - run = route(problem, options=options) - elapsed = perf_counter() - started - board = box(*problem.bounds) - if run.results_by_net.keys() != {net.net_id for net in problem.nets}: - parser.exit(1, "The route results do not cover the full waypoint plan\n") - for net_id, result in run.results_by_net.items(): - if not result.is_valid or any(not board.covers(shape) for shape in result.locked_geometry): - parser.exit(1, f"Lane plan failed inire verification for {net_id}\n") - - cost = weighted_path_length((component for result in run.results_by_net.values() for component in result.path), LENGTH_COST) - total = len(problem.nets) - print(f"{total}/{total} verified, benchmark-weighted length {cost:.2f}, {run.metrics.nodes_expanded} A* expansions, {elapsed:.3f} s") - if args.output is not None: - waypoints = {net_id: export_waypoints(result.path) for net_id, result in run.results_by_net.items()} - args.output.write_text(dumps({"nets": {net_id: {"waypoints": path} for net_id, path in waypoints.items()}}, indent=2) + "\n") - - -if __name__ == "__main__": - main() diff --git a/scripts/route_terminal_bench.py b/scripts/route_terminal_bench.py deleted file mode 100644 index e7f6c48..0000000 --- a/scripts/route_terminal_bench.py +++ /dev/null @@ -1,7 +0,0 @@ -"""Compatibility entry point for the nine-net waypoint exporter.""" - -from scripts.route_complex_routing_example import main - - -if __name__ == "__main__": - main() diff --git a/scripts/routing_benchmark_parity.py b/scripts/routing_benchmark_parity.py deleted file mode 100644 index ed060d7..0000000 --- a/scripts/routing_benchmark_parity.py +++ /dev/null @@ -1,199 +0,0 @@ -"""Capture and compare exact automatic-routing benchmark results.""" - -from __future__ import annotations - -from argparse import ArgumentParser -from concurrent.futures import ProcessPoolExecutor -from dataclasses import asdict, replace -from json import dumps, loads -from pathlib import Path -from time import perf_counter -from typing import TYPE_CHECKING - -from inire import DiagnosticsOptions, route -from inire.results import RouteMetrics -from inire.tests.routing_corpus import ( - CASE_GROUPS, - PROFILES, - automatic_options, - benchmark_weighted_length, - native_verified_costs, - profile_options, - route_placement, - select_cases, -) -from scripts.compare_topological_routing import _geometry_json - -if TYPE_CHECKING: - from inire import RoutingResult - - -SCHEMA_VERSION = 2 -STABLE_COUNTERS = tuple(name for name in RouteMetrics.__dataclass_fields__ if not name.endswith("_ns")) - - -def _paths(results: dict[str, RoutingResult]) -> dict: - return { - "net_order": list(results), - "nets": { - net_id: { - "outcome": result.outcome, - "reached_target": result.reached_target, - "seed": [{"kind": type(move).__name__, **asdict(move)} for move in result.as_seed().segments], - **route_placement(result), - "report": asdict(result.report), - } - for net_id, result in results.items() - }, - } - - -def _capture(job: tuple[str, str, bool, bool]) -> dict: - name, profile, with_callback, with_diagnostics = job - (case,) = CASE_GROUPS[name] - options = automatic_options(profile_options(case, profile), profile) - if with_diagnostics: - options = replace( - options, - diagnostics=DiagnosticsOptions( - capture_conflict_trace=True, - capture_iteration_trace=True, - capture_frontier_trace=True, - capture_pre_pair_frontier_trace=True, - ), - ) - callbacks = [] - - def notify(index: int, results: dict[str, RoutingResult]) -> None: - callbacks.append({"index": index, **_paths(results)}) - - started = perf_counter() - run = route(case.problem, options=options, iteration_callback=notify if with_callback else None) - elapsed = perf_counter() - started - report = run.automatic - assert report is not None - native_costs = native_verified_costs(case, options, run.results_by_net, report.verified_net_ids) - costs = { - net_id: {"native": cost, "benchmark_weighted_length": benchmark_weighted_length(run.results_by_net[net_id])} - for net_id, cost in native_costs.items() - } - return { - "case": name, - "profile": profile, - "with_callback": with_callback, - "with_diagnostics": with_diagnostics, - "elapsed_s": elapsed, - "stable": { - "options": asdict(options), - **_paths(run.results_by_net), - "costs": costs, - "verified_net_ids": report.verified_net_ids, - "automatic": asdict(replace(report, duration_s=0.0, timings=())), - "timing_labels": [(item.operation, item.planner, item.mode, item.policy) for item in report.timings], - "metrics": {field: getattr(run.metrics, field) for field in STABLE_COUNTERS}, - "topology": asdict(run.topology) if run.topology is not None else None, - "conflict_trace": [asdict(item) for item in run.conflict_trace], - "frontier_trace": [asdict(item) for item in run.frontier_trace], - "pre_pair_frontier_trace": asdict(run.pre_pair_frontier_trace) if run.pre_pair_frontier_trace is not None else None, - "iteration_trace": [asdict(item) for item in run.iteration_trace], - "callbacks": callbacks, - }, - } - - -def _first_difference(expected: object, actual: object, field: str = "") -> str | None: - if expected == actual: - return None - if isinstance(expected, dict) and isinstance(actual, dict): - for key in dict.fromkeys((*expected, *actual)): - path = f"{field}.{key}" if field else str(key) - if key not in expected or key not in actual: - return f"{path} exists on only one side" - difference = _first_difference(expected[key], actual[key], path) - if difference is not None: - return difference - if isinstance(expected, list) and isinstance(actual, list): - for index, (left, right) in enumerate(zip(expected, actual, strict=False)): - difference = _first_difference(left, right, f"{field}[{index}]") - if difference is not None: - return difference - return f"{field} length is {len(expected)} before and {len(actual)} after" - return f"{field} is {expected!r} before and {actual!r} after" - - -def _read(path: Path) -> tuple[int, dict]: - payload = loads(path.read_text(encoding="utf-8")) - version = payload["schema_version"] - if version not in (1, SCHEMA_VERSION): - raise ValueError(f"Unsupported parity schema in {path}") - rows = payload["runs"] - by_key = {(row["case"], row["profile"], row["with_callback"], row["with_diagnostics"]): row for row in rows} - if len(by_key) != len(rows): - raise ValueError(f"Duplicate parity run in {path}") - return version, by_key - - -def _compare(before: Path, after: Path, allowed_counters: list[str]) -> int: - before_version, baseline = _read(before) - after_version, current = _read(after) - if before_version != after_version: - print(f"Parity schema mismatch ({before_version} and {after_version}). Capture both revisions with the same script version.") - return 1 - for key in sorted(baseline.keys() | current.keys()): - label = f"{key[0]} / {key[1]} (callback={key[2]}, diagnostics={key[3]})" - if key not in baseline or key not in current: - print(f"{label}: run exists on only one side") - return 1 - expected, actual = baseline[key]["stable"], current[key]["stable"] - for counter in allowed_counters: - old, new = expected["metrics"].pop(counter), actual["metrics"].pop(counter) - if old != new: - print(f"{label}: allowed counter change {counter} from {old} to {new}") - difference = _first_difference(expected, actual) - if difference is not None: - print(f"{label}: {difference}") - return 1 - print(f"{len(current)} runs match.") - baseline_elapsed = sum(row["elapsed_s"] for row in baseline.values()) - current_elapsed = sum(row["elapsed_s"] for row in current.values()) - print(f"Sum of measured routing times: {baseline_elapsed:.3f}s before and {current_elapsed:.3f}s after.") - return 0 - - -def main() -> int: - parser = ArgumentParser(description=__doc__) - commands = parser.add_subparsers(dest="command", required=True) - capture = commands.add_parser("capture") - capture.add_argument("output", type=Path) - capture.add_argument("--case", choices=tuple(CASE_GROUPS), action="append") - capture.add_argument("--profile", choices=PROFILES, action="append") - capture.add_argument("--callbacks", action="store_true", help="Also capture routing with an iteration callback.") - capture.add_argument("--diagnostics", action="store_true", help="Enable conflict, frontier, and iteration traces.") - capture.add_argument("--jobs", type=int, default=1) - compare = commands.add_parser("compare") - compare.add_argument("before", type=Path) - compare.add_argument("after", type=Path) - compare.add_argument("--allow-counter-change", choices=STABLE_COUNTERS, action="append", default=[]) - args = parser.parse_args() - if args.command == "compare": - return _compare(args.before, args.after, list(dict.fromkeys(args.allow_counter_change))) - - if args.jobs < 1: - parser.error("--jobs must be positive") - cases = select_cases(args.case or ("corpus",)) - profiles = dict.fromkeys(args.profile or ("corpus-regression", "public-defaults")) - callback_modes = (False, True) if args.callbacks else (False,) - jobs = [(case.name, profile, callback, args.diagnostics) for case in cases for profile in profiles for callback in callback_modes] - if args.jobs == 1: - rows = list(map(_capture, jobs)) - else: - with ProcessPoolExecutor(max_workers=args.jobs) as pool: - rows = list(pool.map(_capture, jobs)) - payload = {"schema_version": SCHEMA_VERSION, "runs": rows} - args.output.write_text(dumps(payload, indent=2, default=_geometry_json) + "\n", encoding="utf-8") - print(f"Captured {len(rows)} runs in {args.output}") - return 0 - - -if __name__ == "__main__": - raise SystemExit(main())