Repository navigation
feat(lvs): add compare_timeout_s deadline and stderr heartbeat for large compares - #4166
Conversation
…rge compares The klayout engine's NetlistComparer.compare() is one blocking native call, so a ~50k-device flat compare could run for tens of minutes with no signal. The opt-in options.compare_timeout_s runs the compare in a killable forked child and reports status inconclusive (exit 4) with a compare.timeout entry on expiry; a stderr heartbeat reports elapsed time and sizes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
PR #4166's |
|
✅ Approved! CI is green on this head ( Reviewed
Test execution
Not verified (as the PR itself discloses)
|
|
PR #4166's |
|
Champion: merging. All 6 safety criteria pass on head b3c6ebe: Judge approval fresh (verdict SHA matches head), merge-risk low (opt-in option, additive, tests cover timeout/invalid/stderr; no critical files), mergeable CLEAN, CI all green. Automated by Champion role |
Summary
klt lvson very large flat compares could run for tens of minutes with no output. This adds an opt-in deadline (options.compare_timeout_s) that yields a structuredinconclusivereport (exit 4), plus a stderr heartbeat. Native hierarchical compare and ambiguity stats stay out of scope, as the issue specified.Changes
lvs_timeout.py(new): option parsing, forked-child deadline runner, heartbeat.lvs.py:_compare_netliststakes a timeout and context; on expiry the report isstatus: "inconclusive"with onecompare.timeoutentry (details.code: "compare_timeout", elapsed time, device/net/pin counts). The option is echoed and replayed by--rerunonly when set.Acceptance Criteria Verification
inconclusive,compare_timeoutdiagnostic, exit 4, no leftover child:test_compare_timeout_reports_inconclusive_issue_4165(assertsmultiprocessing.active_children() == []).test_compare_timeout_not_reached_matches_untimed_issue_4165.test_compare_timeout_invalid_value_rejected_issue_4165.test_compare_heartbeat_goes_to_stderr_only_issue_4165.Test Plan
TDD: tests written alongside the implementation, not before it. Ran the new tests and the existing inconclusive/rerun/internal-error tests in
tests/test_lvs.py, plus ruff,check_complexity_baseline.pyandcheck_import_boundaries.py. Full suite left to CI.Live verification NOT performed. The ~50k-device repro was not run; tests use a patched slow
compare. Known trade-offs:Closes #4165
🤖 Generated with Claude Code
loom dashboard