[PR #4914] [MERGED] Port ledger: the BlockPattern rows point at the file that ports it #5938

Closed
opened 2026-11-03 05:16:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4914
Author: @sirrayi
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: tools/port-ledger-blockpattern


📝 Commits (1)

  • cb8feee Port ledger: the BlockPattern rows point at the file that ports it

📊 Changes

2 files changed (+7 additions, -6 deletions)

View changed files

📝 tools/port_map/classes-04.tsv (+3 -2)
📝 tools/port_map/game2-012.tsv (+4 -4)

📄 Description

🤖 Opened by sirrayi's AI agent (DeepSeek Harness, deepseek-v4.1-flash), not by sirrayi themselves.

What and why

Fixes #4913, a follow-up to #4892 (merged): that change deleted find_pattern from game/golems.rs, so
three ledger rows name a function that no longer contains the port.

  • tools/port_map/classes-04.tsv mapped BlockPattern.matches and BlockPattern.translateAndRotate to
    crates/horizon-client/src/game/golems.rs::Game::find_golem, with a note saying "golem head and body
    patterns only, not a generic pattern matcher" — which stopped being true the moment block_pattern.rs
    took over.
  • It had no row for BlockPattern.find at all, although the wither has used that port since it landed.
  • tools/port_map/game2-012.tsv called the four CarvedPumpkinBlock.getOrCreate* patterns "inline" into
    find_golem; they are now block_pattern::SNOW_GOLEM_FULL/_BASE and IRON_GOLEM_FULL/_BASE,
    matched by BlockPattern::find, so the rows name the constants.

The port itself is unchanged and correct — it lives in crates/horizon-client/src/block_pattern.rs, where
the wither already used it. This is the ledger catching up, which is the point of the file.

Kind

  • tooling: tools, CI, tests, harnesses

Vanilla reference

None new: this only re-points rows at the existing ports of BlockPattern.find,
BlockPattern.matches, BlockPattern.translateAndRotate and CarvedPumpkinBlock.getOrCreate*.

Self-check

python3 -c "…"   # both files parse: every non-comment line has exactly four tab-separated fields
tools/port_map/classes-04.tsv  ok, 232 rows
tools/port_map/game2-012.tsv   ok, 148 rows

Not run: python3 tools/port_ledger.py map-check, which is the check that would validate these rows —
it needs the decompiled sources (tools/lab.py decompile) and this machine has no vanilla data, so it
answers "No vanilla code: run tools/lab.py decompile". The three targets were confirmed by hand instead:
impl BlockPattern { pub fn matches } and pub fn find in block_pattern.rs, and the free
pub fn translate_and_rotate in the same file, which is the file::fn form the other 2510 free-function
rows use. A maintainer with the sources should run it before merging; the port verdicts will fail the
check loudly if I got an owner name wrong, which is the failure mode I could not test here.

No Rust changed, so no cargo checks apply.


🔄 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/4914 **Author:** [@sirrayi](https://github.com/sirrayi) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `tools/port-ledger-blockpattern` --- ### 📝 Commits (1) - [`cb8feee`](https://github.com/horizon-rust/horizon/commit/cb8feeeff9c38eb754ec7cff7596ee8623c1d079) Port ledger: the BlockPattern rows point at the file that ports it ### 📊 Changes **2 files changed** (+7 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/classes-04.tsv` (+3 -2) 📝 `tools/port_map/game2-012.tsv` (+4 -4) </details> ### 📄 Description > 🤖 Opened by sirrayi's AI agent (DeepSeek Harness, deepseek-v4.1-flash), not by sirrayi themselves. ## What and why Fixes #4913, a follow-up to #4892 (merged): that change deleted `find_pattern` from `game/golems.rs`, so three ledger rows name a function that no longer contains the port. - `tools/port_map/classes-04.tsv` mapped `BlockPattern.matches` and `BlockPattern.translateAndRotate` to `crates/horizon-client/src/game/golems.rs::Game::find_golem`, with a note saying "golem head and body patterns only, not a generic pattern matcher" — which stopped being true the moment `block_pattern.rs` took over. - It had **no row for `BlockPattern.find`** at all, although the wither has used that port since it landed. - `tools/port_map/game2-012.tsv` called the four `CarvedPumpkinBlock.getOrCreate*` patterns "inline" into `find_golem`; they are now `block_pattern::SNOW_GOLEM_FULL`/`_BASE` and `IRON_GOLEM_FULL`/`_BASE`, matched by `BlockPattern::find`, so the rows name the constants. The port itself is unchanged and correct — it lives in `crates/horizon-client/src/block_pattern.rs`, where the wither already used it. This is the ledger catching up, which is the point of the file. ## Kind - [x] tooling: tools, CI, tests, harnesses ## Vanilla reference None new: this only re-points rows at the existing ports of `BlockPattern.find`, `BlockPattern.matches`, `BlockPattern.translateAndRotate` and `CarvedPumpkinBlock.getOrCreate*`. ## Self-check ``` python3 -c "…" # both files parse: every non-comment line has exactly four tab-separated fields tools/port_map/classes-04.tsv ok, 232 rows tools/port_map/game2-012.tsv ok, 148 rows ``` **Not run: `python3 tools/port_ledger.py map-check`**, which is the check that would validate these rows — it needs the decompiled sources (`tools/lab.py decompile`) and this machine has no vanilla data, so it answers "No vanilla code: run tools/lab.py decompile". The three targets were confirmed by hand instead: `impl BlockPattern { pub fn matches }` and `pub fn find` in `block_pattern.rs`, and the free `pub fn translate_and_rotate` in the same file, which is the `file::fn` form the other 2510 free-function rows use. A maintainer with the sources should run it before merging; the `port` verdicts will fail the check loudly if I got an owner name wrong, which is the failure mode I could not test here. No Rust changed, so no `cargo` checks apply. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:16:03 +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#5938
No description provided.