Skip to content

Benchmark and accelerate path closure with slippage - #13

Merged
senegrom merged 2 commits into
mainfrom
improve/slippage-completion
Sep 13, 2026
Merged

senegrom merged 2 commits into
mainfrom
improve/slippage-completion

Conversation

@senegrom

@senegrom senegrom commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Positive slop previously disabled all completion pruning, making small forced fits exhaust the search budget. This change allows pruning against the remaining total gap budget while retaining exact headings/heights and the existing final joint/collision checks.

Physical intervals enclose coordinates outward using integer arithmetic, so nearly cancelling radical coefficients cannot hide valid millimetre gaps. Longer tails use eight directional bounds; short tails use an index of nearby physical boxes. Geometry and future-target caches include remaining slack, and indexes are cleared on return or callback errors. Preprocessing and search limits are unchanged.

Adds 18 slippage benchmarks alongside the nine exact cases. The runner supports suite/case/engine selection, repeated median/min/max timings, gap reporting and ordered result fingerprints. Documentation includes every relevant tradeoff:

  • Forced long gap: 25,001 → 295 nodes, 819 → 41 ms, five → eight forced candidates.
  • Broad offset gap: 25,001 → 286 nodes, 709 → 28 ms, zero → eight forced candidates.
  • Broad bridge with 5 mm slop: 25,001 → 514 nodes, 866 → 50 ms, zero → eight results.
  • Broad mixed search still caps at 25,000 nodes; at the editor's existing 60,000-node budget it finds eight results in about 30,000 nodes. Some broad/field cases take longer despite fewer states.
  • All nine exact benchmarks retain ordered fingerprints and node counts.

Validation:

  • Local regular Python suite: 1,261 passed; all 30 final slippage regressions passed, including the two additional benchmark cases.
  • JavaScript: 55 passed. Ruff and whitespace checks passed.
  • Exhaustive ordered-layout comparisons cover both engines, threshold gaps, cumulative intermediate gaps, forced reversing closures and large cancelling coefficients.
  • Retargeting/future-junction tests now cover slippage. Cleanup tests cover slippage success and callback errors.
  • Real Pyodide browser coverage now solves slop-enabled bridge/long cases and previews/applies an actual forced fit under production CSP.
  • GitHub Chromium: 20 passed. WebKit: 19 passed, one intentional Chromium-only skip.
  • CodeQL passed for Python, JavaScript/TypeScript and Actions.
  • GitHub Python 3.12 and 3.13: 1,263 tests passed on each. Application workflow passed at c600a0f.
  • GitHub's separate AI code-scanning job could not start because the account is not licensed to use Copilot (HTTP 403), the same licensing failure as earlier PRs. No check or repository setting was disabled.

Measurements are local Python 3.12 three-run medians against 3107f25, with identical case settings; they are not timing assertions. See docs/performance.md and docs/search-correctness.md.

@senegrom
senegrom merged commit c320424 into main Sep 13, 2026
10 of 11 checks passed
@senegrom
senegrom deleted the improve/slippage-completion branch September 13, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant