[PR #2270] [MERGED] parity: give the mob_ai oracle a 4g heap #4160

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

📋 Pull Request Information

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

Base: main ← Head: fix/mob-ai-oracle-heap


📝 Commits (1)

  • 17e4d54 parity: give the mob_ai oracle a 4g heap

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 tools/test_mob_ai_parity.py (+3 -1)

📄 Description

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

The mob_ai harness went red three times today. Each time, the vanilla oracle (VanillaMobAiOracle) ran out of its 3g heap. In #2160's CI run the stack trace was java.lang.OutOfMemoryError: Java heap space in PoiManager.tick → SectionStorage.unpackChunk, and the oracle exited with 3. The Rust probe had nothing to do with it. This PR raises the oracle's heap to 4g. Only one other oracle goes above 3G (neoforge_oracle at 4G).

Why it runs out

  • Each scenario forces 9x9 chunks at its own origin (x = 512·i). That means a run generates ~80 new chunks per scenario, and main now has 171 scenarios (#2160's head had 143).
  • GC log of one oracle run on main (-Xlog:gc, Mac mini under load): the live heap after GC is not a leak. It swings between 0.3 and 1.0 GB, ending near 1 GB. The heap peaks at ~1.8 GB before collections, during chunk loading.
  • On a busy runner more chunks are in flight at once, so the peaks go higher. At 3g, mob_ai passes alone (138 s, #2160's head) and fails sometimes when the machine is loaded.

Checks

  • Oracle alone at 4g, on main + this change (tools/test_mob_ai_parity.py --java-only): passes in 235 s. Max RSS 3.7 GB. 211k output lines for 171 scenarios.
  • The heap size can't change the oracle's output. CI runs the full harness.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 9a7f75b75, 40 s)

Check Result
Scope ✅ 1 files, +3 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 310 run, FAILED (errors=2) (40 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 2 affected, to run in CI (--quick): lan_integration, mob_ai
Label skip-release

Python tests: the same 2 environment-only errors as on main (java not on the test PATH).

🤖 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/2270 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/mob-ai-oracle-heap` --- ### 📝 Commits (1) - [`17e4d54`](https://github.com/horizon-rust/horizon/commit/17e4d547c738ce1317a3cb592fd46f50c83a8d6f) parity: give the mob_ai oracle a 4g heap ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/test_mob_ai_parity.py` (+3 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. The mob_ai harness went red three times today. Each time, the vanilla oracle (`VanillaMobAiOracle`) ran out of its 3g heap. In #2160's CI run the stack trace was `java.lang.OutOfMemoryError: Java heap space` in `PoiManager.tick` → `SectionStorage.unpackChunk`, and the oracle exited with 3. The Rust probe had nothing to do with it. This PR raises the oracle's heap to 4g. Only one other oracle goes above 3G (neoforge_oracle at 4G). ## Why it runs out - Each scenario forces 9x9 chunks at its own origin (x = 512·i). That means a run generates ~80 new chunks per scenario, and main now has 171 scenarios (#2160's head had 143). - GC log of one oracle run on main (`-Xlog:gc`, Mac mini under load): the live heap after GC is not a leak. It swings between 0.3 and 1.0 GB, ending near 1 GB. The heap peaks at ~1.8 GB before collections, during chunk loading. - On a busy runner more chunks are in flight at once, so the peaks go higher. At 3g, mob_ai passes alone (138 s, #2160's head) and fails sometimes when the machine is loaded. ## Checks - Oracle alone at 4g, on main + this change (`tools/test_mob_ai_parity.py --java-only`): passes in 235 s. Max RSS 3.7 GB. 211k output lines for 171 scenarios. - The heap size can't change the oracle's output. CI runs the full harness. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 9a7f75b75, 40 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +3 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 310 run, FAILED (errors=2) (40 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 2 affected, to run in CI (--quick): lan_integration, mob_ai | | Label | `skip-release` | Python tests: the same 2 environment-only errors as on main (`java` not on the test PATH). 🤖 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-03 04:15:07 +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#4160
No description provided.