From aaacfd71cba6f90f59c0a5c023dc4b261cf8d105 Mon Sep 17 00:00:00 2001 From: ShiboSoftwareDev Date: Sun, 2 Aug 2026 23:12:37 +0200 Subject: [PATCH 1/3] fix: retain graph guidance until the destination layer --- lib/core.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core.ts b/lib/core.ts index 44ad336..748d6d6 100644 --- a/lib/core.ts +++ b/lib/core.ts @@ -1560,11 +1560,11 @@ export class TinyHyperGraphSolver extends BaseSolver { const routeId = this.state.currentRouteId! const directedHopCountToEnd = this.problemSetup.directedHopCountToEndByRoute[routeId] - const startPortId = this.problem.routeStartPort[routeId]! + const endPortId = this.problem.routeEndPort[routeId]! if ( directedHopCountToEnd && - this.topology.portZ[neighborPortId] === this.topology.portZ[startPortId] + this.topology.portZ[neighborPortId] !== this.topology.portZ[endPortId] ) { const directedHopCount = getDirectedRouteHopCount( this.topology, From 3c2f64cbf69b3eff89f4934451bb8098369a651f Mon Sep 17 00:00:00 2001 From: ShiboSoftwareDev Date: Sun, 2 Aug 2026 23:18:25 +0200 Subject: [PATCH 2/3] ci: generate destination-layer fix snapshot --- .github/workflows/bun-test.yml | 4 +- .../cross-layer-heuristic-detour.snap.svg | 527 ------------------ 2 files changed, 3 insertions(+), 528 deletions(-) delete mode 100644 tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg diff --git a/.github/workflows/bun-test.yml b/.github/workflows/bun-test.yml index ff846d8..ddce5e6 100644 --- a/.github/workflows/bun-test.yml +++ b/.github/workflows/bun-test.yml @@ -36,5 +36,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: test-snapshots - path: tests/**/__snapshots__/*.diff.png + path: | + tests/**/__snapshots__/*.diff.png + tests/**/__snapshots__/*.snap.svg if-no-files-found: ignore diff --git a/tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg b/tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg deleted file mode 100644 index 3057b67..0000000 --- a/tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg +++ /dev/null @@ -1,527 +0,0 @@ -input topologysolver result From f24160f638dfc6473ace9bca2fb1b42b64ba7412 Mon Sep 17 00:00:00 2001 From: ShiboSoftwareDev Date: Sun, 2 Aug 2026 23:19:40 +0200 Subject: [PATCH 3/3] test: add hosted destination-layer fix snapshot --- .github/workflows/bun-test.yml | 4 +- .../cross-layer-heuristic-detour.snap.svg | 496 ++++++++++++++++++ 2 files changed, 497 insertions(+), 3 deletions(-) create mode 100644 tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg diff --git a/.github/workflows/bun-test.yml b/.github/workflows/bun-test.yml index ddce5e6..ff846d8 100644 --- a/.github/workflows/bun-test.yml +++ b/.github/workflows/bun-test.yml @@ -36,7 +36,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: test-snapshots - path: | - tests/**/__snapshots__/*.diff.png - tests/**/__snapshots__/*.snap.svg + path: tests/**/__snapshots__/*.diff.png if-no-files-found: ignore diff --git a/tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg b/tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg new file mode 100644 index 0000000..b0f13a5 --- /dev/null +++ b/tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg @@ -0,0 +1,496 @@ +input topologysolver result