From 9c2b5066ec6d440671d37534a734c18d86812232 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sun, 4 Oct 2026 00:31:37 +0200 Subject: [PATCH] Bound rejected DH dispatch retries and validate applied hooks --- .github/workflows/ci.yml | 10 ++ README.md | 9 +- docs/dispatch-retry.md | 62 ++++++++++ docs/playable-validation.md | 2 +- .../dev/horizonlab/budget/DispatchRetry.java | 14 +++ .../dev/horizonlab/client/HorizonClient.java | 1 + .../mixin/DhPriorityDispatchMixin.java | 76 ++++++++++++ .../horizonlab/mixin/HorizonMixinPlugin.java | 18 +++ .../src/main/resources/fabric.mod.json | 2 +- .../src/main/resources/horizonlab.mixins.json | 2 +- .../horizonlab/budget/DispatchRetryTest.java | 23 ++++ .../dispatch/DispatchIntegration.java | 108 ++++++++++++++++++ packs/START-HERE.txt | 8 +- packs/mods.lock.json | 2 +- tests/test_packs.py | 12 ++ tools/Compare-Benchmarks.html | 1 + tools/build_mod.py | 26 +++++ tools/build_pack.py | 5 +- tools/test_dispatch.py | 64 +++++++++++ 19 files changed, 437 insertions(+), 8 deletions(-) create mode 100644 docs/dispatch-retry.md create mode 100644 mods/horizon-lab/src/main/java/dev/horizonlab/budget/DispatchRetry.java create mode 100644 mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhPriorityDispatchMixin.java create mode 100644 mods/horizon-lab/src/test/java/dev/horizonlab/budget/DispatchRetryTest.java create mode 100644 mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/DispatchIntegration.java create mode 100644 tools/test_dispatch.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b5b47978..7bba9f3bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,7 @@ name: checks on: push: + branches: [main] pull_request: permissions: contents: read @@ -56,6 +57,14 @@ jobs: run: python -c "from tools.build_mod import benchmark_headers; benchmark_headers()" - name: Test pack integrity and comparisons run: python -m unittest discover -s tests -v + - name: Compile the private dispatch fixture + run: python -c "from tools.build_mod import build_dispatch_fixture; build_dispatch_fixture()" + - name: Install headless graphics libraries for applied-hook checks + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y xvfb libgl1 libegl1 libasound2t64 libxkbcommon0 + - name: Exercise the applied dispatcher hooks and upstream rejection path + if: runner.os == 'Linux' + run: python tools/test_dispatch.py - name: Upload original mod and pack manifests only uses: actions/upload-artifact@v4 with: @@ -67,3 +76,4 @@ jobs: dist/debounce-queue-benchmark.txt dist/idle-queue-benchmark.txt dist/object-header-benchmark.txt + dist/dispatch-integration.json diff --git a/README.md b/README.md index 7e254bafb..88c52f471 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Client-first performance research for Minecraft Java **26.3**, preserving vanill ## Play on your Mac -Download **horizon-mac-starter-0.9.0.zip** from [Releases](https://github.com/ludovic111/minecraft-optimization-lab/releases), extract it and open `Mac-Start.command`. It verifies and installs official universal Prism Launcher in `~/Applications` if needed, then opens the balanced pack import. Sign into Microsoft **inside Prism yourself**. This project needs no credentials. +Download **horizon-mac-starter-0.10.0.zip** from [Releases](https://github.com/ludovic111/minecraft-optimization-lab/releases), extract it and open `Mac-Start.command`. It verifies and installs official universal Prism Launcher in `~/Applications` if needed, then opens the balanced pack import. Sign into Microsoft **inside Prism yourself**. This project needs no credentials. Use native **Java 25 ARM64**, maximum heap **6144 MiB**, minimum **512 MiB** on your 16 GB M2 Pro. Prism can download Java automatically. Start at 1280×800 or 1920×1200; full Retina resolution is a larger GPU workload. [START-HERE.txt](packs/START-HERE.txt) has details. The same `.mrpack` files import into Prism on Windows and Linux. @@ -19,6 +19,7 @@ Use native **Java 25 ARM64**, maximum heap **6144 MiB**, minimum **512 MiB** on | adaptive-pacing (experiment) | 12 | 128 | 6144 MiB | | queue-wait (experimental) | 12 | 128 | 6144 MiB | | adaptive-queue (experimental) | 12 | 128 | 6144 MiB | +| dispatch-retry (experimental) | 12 | 128 | 6144 MiB | | low-memory | 8 | none | 3072 MiB | | far-distance | 12 | 256 | 8192 MiB, with sufficient physical RAM | | cinematic | 12 | 128 | 6144 MiB | @@ -30,6 +31,10 @@ Distant LOD is simplified terrain. Nearby blocks retain full detail. Initial gen The optional `queue-wait` pack yields during pending distant-terrain debounce retries; `adaptive-queue` combines it with the existing controllers. [Queue experiment and measurement limits](docs/debounce-queue.md). +Version 0.10 adds an isolated [rejected-dispatch retry experiment](docs/dispatch-retry.md). +It bounds retry passes when a DH worker rejects queued work, preserving original +requeue handling and allowing other executors to progress. Balanced keeps it off. + Version 0.9 also makes the queue's idle wait wakeable for incoming work, preserving its debounce rules and bounded cache-maintenance cadence. It remains part of the optional queue profiles, with separate wake-latency measurements. @@ -77,7 +82,7 @@ python3 tools/build_mod.py python3 tools/build_release.py ``` -Gitignored `dist/` contains eleven packs, our original instrumentation JAR, client/server starter ZIPs and SHA256SUMS. [mods.lock.json](packs/mods.lock.json) pins mod versions, exact dependency closure, SHA-1/SHA-512 and source/license; [fabric.lock.json](packs/fabric.lock.json) pins loader/library SHA-256. Packs use the [Modrinth format](https://support.modrinth.com/en/articles/8802351-modrinth-modpack-format-mrpack). They embed only original project code; third-party mods, game and assets download from their publishers. +Gitignored `dist/` contains twelve packs, our original instrumentation JAR, client/server starter ZIPs and SHA256SUMS. [mods.lock.json](packs/mods.lock.json) pins mod versions, exact dependency closure, SHA-1/SHA-512 and source/license; [fabric.lock.json](packs/fabric.lock.json) pins loader/library SHA-256. Packs use the [Modrinth format](https://support.modrinth.com/en/articles/8802351-modrinth-modpack-format-mrpack). They embed only original project code; third-party mods, game and assets download from their publishers. The server starter uses Lithium/FerriteCore and `/horizonserver bench