[PR #388] [MERGED] version_port.py harnesses: every harness on the candidate, newly failing ones in the port report #2525

Closed
opened 2026-11-02 15:56:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/388
Author: @ludovic111
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @ludovic111

Base: main ← Head: feat/version-port-harnesses


📝 Commits (5)

  • ec0725a version_port.py harnesses: horizon-prepare and every harness in the candidate, newly failing ones in the report
  • 285593e docs/version-ports.md: the candidate harness run, status
  • 1cd72f1 port_harness: horizon-prepare writes the data generator's reports into the candidate, not through regen's link to the version store
  • fec2e20 port_harness: horizon-prepare's javac errors from the log it names (also when classifying again)
  • c82d3f2 docs/version-ports.md: the harness stage replayed both ways

📊 Changes

6 files changed (+431 additions, -27 deletions)

View changed files

📝 docs/version-ports.md (+50 -13)
➕ tests/test_port_harness.py (+84 -0)
📝 tests/test_port_report.py (+22 -2)
➕ tools/port_harness.py (+198 -0)
📝 tools/port_report.py (+37 -6)
📝 tools/version_port.py (+40 -6)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Slice 2 of the port pipeline (docs/version-ports.md, "Run every harness against the new version"). Stacked on #359 (regen).

What

tools/version_port.py harnesses NEW [names] [--old OLD] [--baseline state.json] [--no-run], in tools/port_harness.py:

  1. horizon-prepare in the candidate worktree (ports/NEW), then its sounds and panorama steps from the version store's launcher-shaped copy (the asset index and the sound/panorama objects are downloaded once per version, sha1 checked);
  2. tools/parity.py there, every harness or the ones named (PARITY_HOSTS='', local);
  3. each harness classified pass, oracle (its Java oracle no longer compiles against NEW: javac's one-line errors are kept) or fail, and against a baseline state.json from the pinned version, newly failing or a known failure of main.

Writes diff-OLD-NEW/harnesses.json and keeps the logs of what doesn't pass beside it. report reads it: horizon-prepare failing becomes a rank-1 item; a newly failing harness no item names becomes a rank-2 item; items gain the harnesses that fail for them; the summary gets "harnesses on NEW: …". --no-run reclassifies an earlier run against another baseline without running anything.

Why

So a port shows at once what already works on the new version and what broke, and so main's known failures (#290) don't count as port work.

How tested

  • tests/test_port_harness.py (classification, shards, oracle detection, baseline, assets filter) and a test_port_report test of the harness items.
  • Replay both ways, on the 17 harnesses closest to what 26.3 changed (22 runs with datafix's shards), each direction's run the other's baseline:
26.3 → 26.2 (ports/26.2) 26.2 → 26.3 (ports/26.3)
horizon-prepare failed: VanillaHeightmapOracle.java:33: cannot find symbol: variable FULL_CODEC (class BlockState) → rank-1 item ok, with sounds and panorama from the downloaded assets
pass 1 (food) 17
oracle no longer compiles 4: chunk_generation, command_exec, command_parse, hotbar (javac names ServerChunkCache's constructor, com.mojang.authlib.services, RegistryLayer.WORLD) 0
fail 12 0
newly failing 16 0

The 26.2 → 26.3 report's summary: "harnesses on 26.3: 17 pass, 0 whose oracle no longer compiles, 0 fail; 0 newly failing". Numbers in the doc's Replay section.

  • The replay found two bugs, fixed here: horizon-prepare's data generator wrote through regen's .local/datagen/out/reports link into the version store (and deleted the link), so the stage now drops the link first (own_reports, tested; the link pointed at the version store here, and shared-local was checked untouched: no report newer than Oct 10); and javac errors of a failed horizon-prepare are read from the log it names (named_logs, tested).

pr_ready (tools/pr_ready.py --quick --base feat/version-port-regen on ludovics-mac-mini, against feat/version-port-regen at 0efe7d731, 36 s)

Check Result
Scope ✅ 6 files, +431 −27
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 250 run, FAILED (errors=2) (22 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ no harness affected
Label skip-release

The two Python test errors (test_parity_runner OracleReuse, test_rust_parity source hashes) fail the same way on plain origin/main on macOS (/private/var vs /var temp paths, a stubbed java exiting 127); CI runs them on Linux.

What needs Ludovic

Nothing: it only runs locally on a candidate worktree; nothing is published.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/388 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/version-port-harnesses` --- ### 📝 Commits (5) - [`ec0725a`](https://github.com/horizon-rust/horizon/commit/ec0725aeb00bd7c8c096c9d7354572b038fa6f7b) version_port.py harnesses: horizon-prepare and every harness in the candidate, newly failing ones in the report - [`285593e`](https://github.com/horizon-rust/horizon/commit/285593e5312ae222f22ad25afe2b9682f9c75c2e) docs/version-ports.md: the candidate harness run, status - [`1cd72f1`](https://github.com/horizon-rust/horizon/commit/1cd72f1ba741d685dcf5fffffafb941ff25bbe3f) port_harness: horizon-prepare writes the data generator's reports into the candidate, not through regen's link to the version store - [`fec2e20`](https://github.com/horizon-rust/horizon/commit/fec2e20f72549f7a6064511d45c4f58ec8b7d852) port_harness: horizon-prepare's javac errors from the log it names (also when classifying again) - [`c82d3f2`](https://github.com/horizon-rust/horizon/commit/c82d3f25c4ac9e82ad9001a3fa11378312760ff2) docs/version-ports.md: the harness stage replayed both ways ### 📊 Changes **6 files changed** (+431 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `docs/version-ports.md` (+50 -13) ➕ `tests/test_port_harness.py` (+84 -0) 📝 `tests/test_port_report.py` (+22 -2) ➕ `tools/port_harness.py` (+198 -0) 📝 `tools/port_report.py` (+37 -6) 📝 `tools/version_port.py` (+40 -6) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Slice 2 of the port pipeline (docs/version-ports.md, "Run every harness against the new version"). Stacked on #359 (regen). ## What `tools/version_port.py harnesses NEW [names] [--old OLD] [--baseline state.json] [--no-run]`, in `tools/port_harness.py`: 1. horizon-prepare in the candidate worktree (`ports/NEW`), then its `sounds` and `panorama` steps from the version store's launcher-shaped copy (the asset index and the sound/panorama objects are downloaded once per version, sha1 checked); 2. `tools/parity.py` there, every harness or the ones named (`PARITY_HOSTS=''`, local); 3. each harness classified **pass**, **oracle** (its Java oracle no longer compiles against NEW: javac's one-line errors are kept) or **fail**, and against a baseline `state.json` from the pinned version, **newly failing** or a known failure of main. Writes `diff-OLD-NEW/harnesses.json` and keeps the logs of what doesn't pass beside it. `report` reads it: horizon-prepare failing becomes a rank-1 item; a newly failing harness no item names becomes a rank-2 item; items gain the harnesses that fail for them; the summary gets "harnesses on NEW: …". `--no-run` reclassifies an earlier run against another baseline without running anything. ## Why So a port shows at once what already works on the new version and what broke, and so main's known failures (#290) don't count as port work. ## How tested - `tests/test_port_harness.py` (classification, shards, oracle detection, baseline, assets filter) and a `test_port_report` test of the harness items. - **Replay both ways**, on the 17 harnesses closest to what 26.3 changed (22 runs with datafix's shards), each direction's run the other's baseline: | | 26.3 → 26.2 (`ports/26.2`) | 26.2 → 26.3 (`ports/26.3`) | | --- | --- | --- | | horizon-prepare | failed: `VanillaHeightmapOracle.java:33: cannot find symbol: variable FULL_CODEC (class BlockState)` → rank-1 item | ok, with sounds and panorama from the downloaded assets | | pass | 1 (`food`) | **17** | | oracle no longer compiles | 4: `chunk_generation`, `command_exec`, `command_parse`, `hotbar` (javac names `ServerChunkCache`'s constructor, `com.mojang.authlib.services`, `RegistryLayer.WORLD`) | 0 | | fail | 12 | 0 | | newly failing | 16 | **0** | The 26.2 → 26.3 report's summary: "harnesses on 26.3: 17 pass, 0 whose oracle no longer compiles, 0 fail; 0 newly failing". Numbers in the doc's Replay section. - The replay found two bugs, fixed here: horizon-prepare's data generator wrote through regen's `.local/datagen/out/reports` link into the version store (and deleted the link), so the stage now drops the link first (`own_reports`, tested; the link pointed at the version store here, and `shared-local` was checked untouched: no report newer than Oct 10); and javac errors of a failed horizon-prepare are read from the log it names (`named_logs`, tested). **pr_ready** (`tools/pr_ready.py --quick --base feat/version-port-regen` on ludovics-mac-mini, against feat/version-port-regen at 0efe7d731, 36 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +431 −27 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 250 run, FAILED (errors=2) (22 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ no harness affected | | Label | `skip-release` | The two Python test errors (`test_parity_runner` OracleReuse, `test_rust_parity` source hashes) fail the same way on plain `origin/main` on macOS (`/private/var` vs `/var` temp paths, a stubbed `java` exiting 127); CI runs them on Linux. ## What needs Ludovic Nothing: it only runs locally on a candidate worktree; nothing is published. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:56:54 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#2525
No description provided.