Skip to content

Improve HighDensitySolverA02 convergence for repro02/03/04 and assert solved state - #35

Draft
seveibar wants to merge 1 commit into
mainfrom
codex/fix-solver-implementation-in-repro02,-repro03,-repro04
Draft

Improve HighDensitySolverA02 convergence for repro02/03/04 and assert solved state#35
seveibar wants to merge 1 commit into
mainfrom
codex/fix-solver-implementation-in-repro02,-repro03,-repro04

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

Motivation

  • Repro cases repro02, repro03 and repro04 sometimes timed out or finished with solver.solved === false due to heavy rip-up churn and searches running out of iterations.

Description

  • Add an emergency fallback trigger that runs the fallback router when a connection has accumulated many rip-ups and the search has run long (connRips + searchIterations) by checking connRips >= 24 and searchIterations thresholds and calling tryLastConnectionFallback with a new parameter to indicate emergency mode via forceDeferredRipup (changes in HighDensitySolverA02).
  • Extend deferred rip-up logic so committed routes use deferred rip-up more aggressively in late-stage/over-churn scenarios by widening the conditions to unsolvedSegs.length <= 4 or (ripCount[connId] ?? 0) >= 8 and enabling fallback to request deferred rip-up when forced.
  • Update the fallback routine tryLastConnectionFallback to accept forceDeferredRipup and to use that when deciding deferRipup for committed fallback routes.
  • Update repro tests (tests/repros/repro02, repro03, repro04) to assert expect(solver.solved).toBeTrue() and expect(solver.failed).toBeFalse() alongside the SVG snapshot checks, and refresh the SVG snapshots for the adjusted outputs.

Testing

  • Ran snapshot refresh and tests with BUN_UPDATE_SNAPSHOTS=1 bun test tests/repros/repro02/repro02.test.ts tests/repros/repro03/repro03.test.ts tests/repros/repro04/repro04.test.ts and all three tests passed and snapshots were written.
  • Re-ran tests with bun test tests/repros/repro02/repro02.test.ts tests/repros/repro03/repro03.test.ts tests/repros/repro04/repro04.test.ts and all three tests passed.
  • Ran bun run format (succeeded) and bunx tsc --noEmit which failed in this environment due to a missing external dataset module (@tscircuit/hypergraph/datasets/jumper-graph-solver/dataset02.json).

Codex Task

@vercel

vercel Bot commented Mar 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
high-density-a01 Ready Ready Preview, Comment Mar 14, 2026 0:39am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant