ci: restore the flat world after the hydrated chunk survey #91

Closed
gecko wants to merge 5 commits from t3/fix-ci-integration-tests into main
Owner

Problem

The first full integration suite on the post-refactor architecture (run #832, commit 376d910 + baseline) failed the farm section at distant-logistics — the 13th of 23 cases:

Farm case distant-logistics: java.lang.IllegalStateException: Expected COMPLETE, got Idle. Farm fixture: UNREACHABLE.

The bot walked 38 of ~65 blocks from the distant chests (x=-63) toward the farm and stalled at x=-24, three blocks short of chunks-hydrated's leftover chamber shell. Six re-path attempts (TravelProgress retries) each burned in about a second of Baritone path calculation while the goal process sat inactive between calcs; the travel budget then expired and the fixture ended UNREACHABLE without a single pass.

Root cause

chunks-hydrated (the first farm case) builds two hollow smooth-stone chambers around the survey regions, but its teardown clears only the plot interiors. The 8-block walls (x=-21/x=20, z=-21/z=20, y -63..-54) plus glowstone lighting stay standing for every later farm case, and distant-logistics is the only one whose walk must cross them. The pre-refactor fixture built no such chamber, so this exposure is new with the #81 fixture rewrite — a teardown gap, not intended obstacle coverage (deliberate obstacles are the unreachable case's explicit bedrock walls, which later setups clear inside their own volumes).

Fix

  • chunks-hydrated's assert now restores both regions to the natural superflat profile (stone at -63..-62, grass at -61) while the idle bot is spectator, then kills teardown drops and verifies restored cells.
  • Added the server-free unit test contract for the teardown batch (test_hydrated_teardown_restores_both_regions_for_later_cases).

Sections get a fresh world each, so the build-farm/combat sections are unaffected; the build-farm fixture constructs its own regions.

Validation

  • Local: scripts/ci-preflight.sh, bounded gradlew lint build, scripts/check-release-jar.sh — green (tested commit recorded below).
  • Integration suite=all runs are recorded here as they land.
## Problem The first full integration suite on the post-refactor architecture (run #832, commit 376d910 + baseline) failed the farm section at `distant-logistics` — the 13th of 23 cases: ``` Farm case distant-logistics: java.lang.IllegalStateException: Expected COMPLETE, got Idle. Farm fixture: UNREACHABLE. ``` The bot walked 38 of ~65 blocks from the distant chests (`x=-63`) toward the farm and stalled at `x=-24`, three blocks short of `chunks-hydrated`'s leftover chamber shell. Six re-path attempts (`TravelProgress` retries) each burned in about a second of Baritone path calculation while the goal process sat inactive between calcs; the travel budget then expired and the fixture ended `UNREACHABLE` without a single pass. ## Root cause `chunks-hydrated` (the first farm case) builds two hollow smooth-stone chambers around the survey regions, but its teardown clears only the plot interiors. The 8-block walls (`x=-21`/`x=20`, `z=-21`/`z=20`, y `-63..-54`) plus glowstone lighting stay standing for **every later farm case**, and `distant-logistics` is the only one whose walk must cross them. The pre-refactor fixture built no such chamber, so this exposure is new with the #81 fixture rewrite — a teardown gap, not intended obstacle coverage (deliberate obstacles are the `unreachable` case's explicit bedrock walls, which later setups clear inside their own volumes). ## Fix - `chunks-hydrated`'s assert now restores **both** regions to the natural superflat profile (stone at `-63..-62`, grass at `-61`) while the idle bot is spectator, then kills teardown drops and verifies restored cells. - Added the server-free unit test contract for the teardown batch (`test_hydrated_teardown_restores_both_regions_for_later_cases`). Sections get a fresh world each, so the build-farm/combat sections are unaffected; the build-farm fixture constructs its own regions. ## Validation - Local: `scripts/ci-preflight.sh`, bounded `gradlew lint build`, `scripts/check-release-jar.sh` — green (tested commit recorded below). - Integration `suite=all` runs are recorded here as they land.
ci: restore the flat world after the hydrated chunk survey
All checks were successful
build / Java 25 build (pull_request) Successful in 4m13s
a046451153
The survey case leaves both construction chamber shells (8-block walls
and glowstone lighting) standing after clearing only the plot interiors.
Every later farm case runs inside them, and the distant-logistics walk
from the far chests crosses the west wall: the bot stalled three blocks
short with the goal process inactive between path calculations, burned
the six-retry travel budget and ended UNREACHABLE without reaching the
farm.

Tear both regions down to the natural superflat profile (stone layers
and grass surface) while the idle bot is spectator, verify the restored
cells, and add the unit test contract for the teardown batch.
Author
Owner

Integration suite=all evidence

  • Run #832 — commit 376d910 (pre-fix baseline): failure. goto passed; the farm section passed 12 cases then died on distant-logistics (Expected COMPLETE, got Idle. Farm fixture: UNREACHABLE): the leftover chunks-hydrated chamber wall at x=-21 stalled the distant walk three blocks in, the six-retry travel budget expired with the goal process inactive between path calcs. Combat and build-farm never ran.
  • Run #835 — commit a046451 (this fix, full suite): in progress.
Integration `suite=all` evidence - Run [#832](https://git.glitched.systems/gecko/mcbot/actions/runs/832) — commit `376d910` (pre-fix baseline): **failure**. goto passed; the farm section passed 12 cases then died on `distant-logistics` (`Expected COMPLETE, got Idle. Farm fixture: UNREACHABLE`): the leftover `chunks-hydrated` chamber wall at `x=-21` stalled the distant walk three blocks in, the six-retry travel budget expired with the goal process inactive between path calcs. Combat and build-farm never ran. - Run [#835](https://git.glitched.systems/gecko/mcbot/actions/runs/835) — commit `a046451` (this fix, full suite): **in progress**.

Manual integration failure on a046451153f306d8a597abdd125e0bab4dea5bf3 (full: suite all).

Run: https://git.glitched.systems/gecko/mcbot/actions/runs/835

Informational result only; manual integration is not a PR gate.

Manual integration **failure** on `a046451153f306d8a597abdd125e0bab4dea5bf3` (full: suite `all`). Run: https://git.glitched.systems/gecko/mcbot/actions/runs/835 Informational result only; manual integration is not a PR gate.
Author
Owner

Run #835 — commit a046451 (teardown fix): failure moved to build-farm. goto, all 23 farm cases and combat passed — the flat-world restore worked. chunks-farm (case 1/14) now dies in the fixture's native_probe geometry compare: one source plot cell (-10,62,-10) reads nether_wart[age=1] seconds after the probe fill converted all 900 cells to age=0 (#probe=900 asserted), with no commands touching the source in between, random_tick_speed=0, the client idle (the probe itself never started — the request was answered FAIL). Also documented: the reference-side air fill pops the cloned wart (support layer cleared first, ~900 item drops — Killed 901 entities), which is reference-side noise, not the compare failure.

Dispatched a targeted suite=build-farm cases=chunks-farm reproduction (run #837) to check determinism before instrumenting the fixture.

Run [#835](https://git.glitched.systems/gecko/mcbot/actions/runs/835) — commit `a046451` (teardown fix): **failure moved to build-farm**. goto, all 23 farm cases and combat **passed** — the flat-world restore worked. `chunks-farm` (case 1/14) now dies in the fixture's `native_probe` geometry compare: one source plot cell (`-10,62,-10`) reads `nether_wart[age=1]` seconds after the probe fill converted all 900 cells to `age=0` (`#probe`=900 asserted), with no commands touching the source in between, `random_tick_speed=0`, the client idle (the probe itself never started — the request was answered FAIL). Also documented: the reference-side air fill pops the cloned wart (support layer cleared first, ~900 item drops — `Killed 901 entities`), which is reference-side noise, not the compare failure. Dispatched a targeted `suite=build-farm cases=chunks-farm` reproduction ([run #837](https://git.glitched.systems/gecko/mcbot/actions/runs/837)) to check determinism before instrumenting the fixture.

Manual integration failure on a046451153f306d8a597abdd125e0bab4dea5bf3 (targeted: suite build-farm, cases chunks-farm).

Run: https://git.glitched.systems/gecko/mcbot/actions/runs/837

Informational result only; manual integration is not a PR gate.

Manual integration **failure** on `a046451153f306d8a597abdd125e0bab4dea5bf3` (targeted: suite `build-farm`, cases `chunks-farm`). Run: https://git.glitched.systems/gecko/mcbot/actions/runs/837 Informational result only; manual integration is not a PR gate.
diagnostic: census the probe drift window on chunks-farm
All checks were successful
build / Java 25 build (pull_request) Successful in 44s
b3b5bbcefd
Author
Owner

Run #837 (targeted chunks-farm): failure, reproduced. The diagnostic sampled both plot cells as nether_wart[age=1] — the young crops are aging on both sides between the conversion fills and the compare (~15-25 s windows), with random_tick_speed 0 confirmed set at case setup and no commands touching the crops in the window. The farm section's dark plots never show this (its young-crop asserts and growth-timeout pass), so the drift is specific to this flow — consistent with the pre-#81 fixture synchronizing crop ages to terminal (ripe) states via a random_tick_speed 100 hydration step before any compare, which the rewrite dropped.

Committed b3b5bbc: a bounded drift census in the probe (count+restore age pairs on both plots, live random_tick_speed and game-time reads bracketing a 5 s pause) and dispatched it as run #842 to pin the drift source before redesigning the compare.

Run [#837](https://git.glitched.systems/gecko/mcbot/actions/runs/837) (targeted `chunks-farm`): **failure, reproduced**. The diagnostic sampled *both* plot cells as `nether_wart[age=1]` — the young crops are aging on **both** sides between the conversion fills and the compare (~15-25 s windows), with `random_tick_speed 0` confirmed set at case setup and no commands touching the crops in the window. The farm section's dark plots never show this (its young-crop asserts and `growth-timeout` pass), so the drift is specific to this flow — consistent with the pre-#81 fixture synchronizing crop ages to terminal (ripe) states via a `random_tick_speed 100` hydration step before any compare, which the rewrite dropped. Committed `b3b5bbc`: a bounded drift census in the probe (count+restore age pairs on both plots, live `random_tick_speed` and game-time reads bracketing a 5 s pause) and dispatched it as run [#842](https://git.glitched.systems/gecko/mcbot/actions/runs/842) to pin the drift source before redesigning the compare.

Manual integration failure on b3b5bbcefd7b9b2cfe9812d735c139b20f0857f8 (targeted: suite build-farm, cases chunks-farm).

Run: https://git.glitched.systems/gecko/mcbot/actions/runs/842

Informational result only; manual integration is not a PR gate.

Manual integration **failure** on `b3b5bbcefd7b9b2cfe9812d735c139b20f0857f8` (targeted: suite `build-farm`, cases `chunks-farm`). Run: https://git.glitched.systems/gecko/mcbot/actions/runs/842 Informational result only; manual integration is not a PR gate.
ci: keep build-farm crop asserts deterministic under server tick drift
All checks were successful
build / Java 25 build (pull_request) Successful in 47s
6943dc615c
CI measured young crops aging on both chunk plots minutes into the
chunks-farm case while the overworld reported random_tick_speed 0: the
bare gamerule left the nether ticking at its default, so any exact
crop-state compare raced the server. Freeze the rule in each case's own
dimension, and verify the crop layer by synchronized age-agnostic air
rotations on both plots (count present cells, re-seed young) instead of
racy exact state compares; the same rotation makes the reference
template count, probe conversion, probe reset and ripening fills
drift-immune. Static layers (soil/ring, headroom, crop-layer ring) keep
their exact compare.
Author
Owner

Run #842 (instrumented census): drift measured, mechanism identified. During the probe window with the overworld reporting random_tick_speed 0 at both brackets: source young count 900→898, mirror 896→895 over ~5-8 s — young crops age continuously on both plots; the compare can never be state-exact over minutes. Crucially, the census read the rule bare (= overworld) while the plots live in the nether: the bare gamerule freeze never reached the ticking dimension.

Commit 6943dc6: (1) freeze random_tick_speed in each case's own dimension (execute in for wart cases) with a diagnostic readback; (2) verify the crop layer by synchronized age-agnostic air-rotation censuses on both plots (count + young re-seed) instead of exact crop-state compares; static layers keep exact compares; the same rotation makes the reference template count, probe conversion/reset and ripening fills drift-immune; (3) unit tests updated to the new contracts. Dispatched targeted chunks-farm as run #848.

Run [#842](https://git.glitched.systems/gecko/mcbot/actions/runs/842) (instrumented census): **drift measured, mechanism identified**. During the probe window with the overworld reporting `random_tick_speed 0` at both brackets: source young count 900→898, mirror 896→895 over ~5-8 s — young crops age continuously on both plots; the compare can never be state-exact over minutes. Crucially, the census read the rule **bare** (= overworld) while the plots live in the nether: the bare `gamerule` freeze never reached the ticking dimension. Commit `6943dc6`: (1) freeze `random_tick_speed` **in each case's own dimension** (`execute in` for wart cases) with a diagnostic readback; (2) verify the crop layer by synchronized age-agnostic air-rotation censuses on both plots (count + young re-seed) instead of exact crop-state compares; static layers keep exact compares; the same rotation makes the reference template count, probe conversion/reset and ripening fills drift-immune; (3) unit tests updated to the new contracts. Dispatched targeted `chunks-farm` as run [#848](https://git.glitched.systems/gecko/mcbot/actions/runs/848).

Manual integration failure on 6943dc615cd1a6a9e9f1b99bbbbeb0678ff6a9da (targeted: suite build-farm, cases chunks-farm).

Run: https://git.glitched.systems/gecko/mcbot/actions/runs/848

Informational result only; manual integration is not a PR gate.

Manual integration **failure** on `6943dc615cd1a6a9e9f1b99bbbbeb0678ff6a9da` (targeted: suite `build-farm`, cases `chunks-farm`). Run: https://git.glitched.systems/gecko/mcbot/actions/runs/848 Informational result only; manual integration is not a PR gate.
fix: shift the mirror census z by the reference offset
All checks were successful
build / Java 25 build (pull_request) Successful in 47s
0ef8770457
The crop census kept the source z for the mirror plot, filling the
unloaded band between the two forceloaded regions (That position is not
loaded) instead of the mirrored plot. Shift both axes by OFFSET so the
census lands on the mirrored plot.
Author
Owner

Run #848 (targeted, drift-immune fixture): failure — my census bug, plus a mechanism confirmation. (1) The nether readback confirmed random_tick_speed is 0 in the nether — the dimension freeze works, and with it the source-side counts stayed exact through the probe. (2) The mirror census failed with That position is not loaded: I wrote the mirror census with the source's z coordinates, but the reference is offset in both x and z (OFFSET, 0, OFFSET) — the fill hit the unloaded band between the two forceloaded regions instead of the mirrored plot. The static-layer compares (soil 1024, headroom 3072, ring strips 32/32/30/30) all passed against the correctly-offset mirror.

Commit 0ef8770 shifts the census z by OFFSET (both axes) and updates the unit test. Dispatched run #854.

Run [#848](https://git.glitched.systems/gecko/mcbot/actions/runs/848) (targeted, drift-immune fixture): **failure — my census bug, plus a mechanism confirmation**. (1) The nether readback confirmed `random_tick_speed` is 0 **in the nether** — the dimension freeze works, and with it the source-side counts stayed exact through the probe. (2) The mirror census failed with `That position is not loaded`: I wrote the mirror census with the source's z coordinates, but the reference is offset in **both** x and z (`OFFSET, 0, OFFSET`) — the fill hit the unloaded band between the two forceloaded regions instead of the mirrored plot. The static-layer compares (soil 1024, headroom 3072, ring strips 32/32/30/30) all passed against the correctly-offset mirror. Commit `0ef8770` shifts the census z by `OFFSET` (both axes) and updates the unit test. Dispatched run [#854](https://git.glitched.systems/gecko/mcbot/actions/runs/854).

Manual integration success on 0ef87704575739da988df5d408ed457504ecfcb5 (targeted: suite build-farm, cases chunks-farm).

Run: https://git.glitched.systems/gecko/mcbot/actions/runs/854

Informational result only; manual integration is not a PR gate.

Manual integration **success** on `0ef87704575739da988df5d408ed457504ecfcb5` (targeted: suite `build-farm`, cases `chunks-farm`). Run: https://git.glitched.systems/gecko/mcbot/actions/runs/854 Informational result only; manual integration is not a PR gate.
Author
Owner

Run #854 (targeted chunks-farm, census z fix): success — the drift-immune crop censuses, dimension freeze and corrected mirror coordinates held through the standalone 900-cell wart farm case (probe, build-profile verify, full harvest and independent RCON assertions). Build checks on the PR are green.

Dispatched the full release-equivalent suite=all as run #860 on commit 0ef8770.

Run [#854](https://git.glitched.systems/gecko/mcbot/actions/runs/854) (targeted `chunks-farm`, census z fix): **success** — the drift-immune crop censuses, dimension freeze and corrected mirror coordinates held through the standalone 900-cell wart farm case (probe, build-profile verify, full harvest and independent RCON assertions). Build checks on the PR are green. Dispatched the full release-equivalent `suite=all` as run [#860](https://git.glitched.systems/gecko/mcbot/actions/runs/860) on commit `0ef8770`.

Manual integration failure on 0ef87704575739da988df5d408ed457504ecfcb5 (full: suite all).

Run: https://git.glitched.systems/gecko/mcbot/actions/runs/860

Informational result only; manual integration is not a PR gate.

Manual integration **failure** on `0ef87704575739da988df5d408ed457504ecfcb5` (full: suite `all`). Run: https://git.glitched.systems/gecko/mcbot/actions/runs/860 Informational result only; manual integration is not a PR gate.
farm: re-arm planting when the native scan exhausts early
All checks were successful
build / Java 25 build (pull_request) Successful in 3m16s
0f064c1399
The native farmer's scan is bounded by farmMaxScanSize, which for a
900-cell plot covers exactly the two plot layers. When the strip sweep
ends at a plot edge, the replant scope computed from that position can
exhaust after a few hundred cells while unplanted cells remain, and the
inactive-backend guard then ended the whole pass as UNREACHABLE (CI:
chunks-farm planted 330 of 900).

Give the scan headroom (cells * 3, floor 1800 kept) and re-arm the
planting stage up to three times per job when it stops with seeds and
empty cells: the stage machinery re-issues the farm call from the
current position, so the remaining cells get planted by the same pass
instead of failing it.
Author
Owner

Run #860 (full suite, all fixture fixes): failure, one case further. goto ✓, farm ✓ (23/23), combat ✓ — chunks-farm now fails in the addon's own replant: the harvest sweep completed (ripe=0), planting re-armed and planted ~330 cells, then the native farm process went inactive with 570 cells unplanted, 359 seeds in hand, no drops, and its last goal already planted — the policy's inactive-backend guard ended the pass UNREACHABLE.

Root cause: the native farmer's scan is budget-bounded by farmMaxScanSize (leased to max(1800, cells*2) = exactly 1800 for 900 cells — soil+crop layers with zero headroom). Planting arms wherever the sweep ended, usually a plot edge, so the scan from that position wastes budget on ring blocks and covers only part of the plot: it planted ~330 cells and exhausted its scope. Run #854 passed because its sweep-end position scanned luckier. Flaky, position-dependent.

Commit 0f064c1: give the scan headroom (cells*3, 1800 floor kept) and re-arm the planting stage up to 3× per job when it stops with seeds and empty cells — the existing stage machinery re-issues the farm call from the current position, so the same pass finishes instead of failing. The FarmPolicy table is unchanged (the re-arm sits in the dispatch above it). Dispatched targeted chunks-farm as run #862; full suite follows on a pass.

Run [#860](https://git.glitched.systems/gecko/mcbot/actions/runs/860) (full suite, all fixture fixes): **failure, one case further**. goto ✓, farm ✓ (23/23), combat ✓ — `chunks-farm` now fails in the addon's own replant: the harvest sweep completed (ripe=0), planting re-armed and planted ~330 cells, then the **native farm process went inactive** with 570 cells unplanted, 359 seeds in hand, no drops, and its last goal already planted — the policy's inactive-backend guard ended the pass `UNREACHABLE`. Root cause: the native farmer's scan is budget-bounded by `farmMaxScanSize` (leased to `max(1800, cells*2)` = exactly 1800 for 900 cells — soil+crop layers with zero headroom). Planting arms wherever the sweep ended, usually a plot edge, so the scan from that position wastes budget on ring blocks and covers only part of the plot: it planted ~330 cells and exhausted its scope. Run #854 passed because its sweep-end position scanned luckier. Flaky, position-dependent. Commit `0f064c1`: give the scan headroom (`cells*3`, 1800 floor kept) and re-arm the planting stage up to 3× per job when it stops with seeds and empty cells — the existing stage machinery re-issues the farm call from the current position, so the same pass finishes instead of failing. The `FarmPolicy` table is unchanged (the re-arm sits in the dispatch above it). Dispatched targeted `chunks-farm` as run [#862](https://git.glitched.systems/gecko/mcbot/actions/runs/862); full suite follows on a pass.

Manual integration success on 0f064c139970d5100fa15ea1e66255c92ea36209 (targeted: suite build-farm, cases chunks-farm).

Run: https://git.glitched.systems/gecko/mcbot/actions/runs/862

Informational result only; manual integration is not a PR gate.

Manual integration **success** on `0f064c139970d5100fa15ea1e66255c92ea36209` (targeted: suite `build-farm`, cases `chunks-farm`). Run: https://git.glitched.systems/gecko/mcbot/actions/runs/862 Informational result only; manual integration is not a PR gate.
Author
Owner

Run #862 (targeted chunks-farm, planting re-arm): success — the 900-cell wart farm completed its full pass (probe, profile verify, harvest, replant, deposit and independent RCON assertions) on commit 0f064c1.

Dispatched the full release-equivalent suite=all as run #863.

Run [#862](https://git.glitched.systems/gecko/mcbot/actions/runs/862) (targeted `chunks-farm`, planting re-arm): **success** — the 900-cell wart farm completed its full pass (probe, profile verify, harvest, replant, deposit and independent RCON assertions) on commit `0f064c1`. Dispatched the full release-equivalent `suite=all` as run [#863](https://git.glitched.systems/gecko/mcbot/actions/runs/863).

Manual integration failure on 0f064c139970d5100fa15ea1e66255c92ea36209 (full: suite all).

Run: https://git.glitched.systems/gecko/mcbot/actions/runs/863

Informational result only; manual integration is not a PR gate.

Manual integration **failure** on `0f064c139970d5100fa15ea1e66255c92ea36209` (full: suite `all`). Run: https://git.glitched.systems/gecko/mcbot/actions/runs/863 Informational result only; manual integration is not a PR gate.
gecko closed this pull request 2026-11-02 20:21:58 +00:00
All checks were successful
build / Java 25 build (pull_request) Successful in 3m16s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
gecko/mcbot!91
No description provided.