Map sources, mapbake, digest-only map images
  • Rust 90.4%
  • Shell 8%
  • Just 1.6%
Find a file
Valentin LAMBOLEY-DEPOIRE 9c69a4a086
All checks were successful
CI / rust: lint, tests (push) Successful in 1m16s
CI / ci-freshness: vendored files match TEMPLATE_REV (push) Successful in 1s
CI / vendor-freshness: vendored inputs unmodified, mapbake revs == pin (push) Successful in 1s
CI / maps: bake, verify, scratch images, digest-only push, prove (push) Successful in 45s
fix(ci): read the pushed digest from --digestfile, not push stdout
podman 5 prints no digest line on push; the stdout grep always came up
empty and failed the maps job after a good push. --digestfile is the
contract.
2026-10-08 15:26:50 +02:00
.github/workflows fix(ci): read the pushed digest from --digestfile, not push stdout 2026-10-08 15:26:50 +02:00
ci feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
libs/alysia-schem feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
maps feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
server feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
.gitignore feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
Cargo.lock feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
Cargo.toml feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
clippy.toml feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
deny.toml feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
justfile feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
justfile.ci feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
README.md feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
rust-toolchain.toml feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
rustfmt.toml feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
VENDOR_REV feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00
VENDOR_SHA256 feat: map sources, mapbake pipeline and digest-only map images 2026-10-08 15:10:47 +02:00

alysia-maps

Map sources, the offline baker, and digest-only map images — extracted from the alysia monorepo (plugins/alysia-core/maps, server/tools/mapbake*, server/world-seed, maps/MapContainerfile, libs/alysia-schem at VENDOR_REV).

One map today: plaza for mode sumo (see maps/manifest; the mode concept lives in the plugin's game code and is stamped into map.yaml by mapbake --mode).

Layout

Path Role
maps/ Sources: *.schem + manifest (map×mode list) + MapContainerfile (FROM scratch)
server/tools/mapbake The baker binary: bake (schematic → Pump world) + verify (manifest contract)
server/tools/mapbake-plan MIT plan phase (schematic bytes → JSON plan); the GPL-3.0 write side only sees the JSON
libs/ Vendored alysia-schem — exact copy at VENDOR_REV, guarded by VENDOR_SHA256
server/pins.toml Pinned Pumpkin git rev (copy of the monorepo's server/pins.toml; also the pumpkin-* revs in mapbake/Cargo.toml, and embedded into the binary via include_str! — hence the mirrored path)
justfile Consumer wrapper: import 'justfile.ci' plus bake / verify / maps-build
justfile.ci, ci/ Vendored from alysia-ci-templates at TEMPLATE_REV — never patched locally

Commands

just bake                 # bake every map in maps/manifest into dist/maps/<map>/
just verify               # exact non-air count + witness + DataVersion per map
just maps-build plaza     # FROM-scratch image alysia/maps-plaza:local
just ci-lint              # fmt + clippy (-D warnings) + machete + deny
just --set test_args "" ci-test   # full test suite (no containers needed)

dist/ is gitignored build output. sha.txt next to each baked world is the reseed marker the backend entrypoint gates on: sha256 over the sorted per-file digests of the baked directory (itself excluded).

Pipeline

bake uses fixed inputs (spawn auto, base-y 100, file offset, plains, seed 0): a rebake of unchanged sources reproduces map.yaml exactly. The emitted binaries (.pump, level.dat) carry writer timestamps and are NOT byte-stable across runs — another reason the baked world is not committed: a committed reference could never be rebake-compared. CI pushes one image per map with a content-derived tag (<map>:map-<16 hex of map.yaml>) — never latest, never main — and proves each pushed digest back through COPY --from=<registry>/<map>@<digest>. The digest is the version. Backend images consume maps that way:

COPY --from=git.zeto.fr/alysia/alysia-maps/plaza@sha256:<digest> /maps/plaza/ /opt/alysia/world-seed/maplab/

world-seed: deliberately not committed

The monorepo versions server/world-seed/maplab/ as the staged input its backend image COPYs — but it is a build artifact of this repo's baker, not a source. Committing the baked .pump worlds here would duplicate the artifact in two forms and let the sources and the committed bytes drift apart silently. This repo commits the sources (maps/*.schem), rebuilds via bake, and gates on verify (23657 non-air blocks, witness minecraft:emerald_block at [0, 100, 0] for plaza). The scratch image replaces the staged seed directory as the handoff to the backend.

Vendoring

  • VENDOR_REV: monorepo commit the vendored files come from. Re-vendor: copy libs/alysia-schem, server/tools/mapbake*, maps/*.schem, server/pins.toml, maps/MapContainerfile from that commit (keep the server/ + libs relative layout: the path dependencies and the include_str!("../../../pins.toml") resolve unedited), regenerate VENDOR_SHA256 with sha256sum over those inputs, bump VENDOR_REV.
  • Two one-line layout adaptations vs the monorepo (kept hash-guarded, not verbatim): maps/MapContainerfile copies from dist/ instead of plugins/dist/; bake_tests.rs reads the plaza fixture from maps/plaza.schem instead of plugins/alysia-core/maps/plaza.schem.
  • End of vendoring: once the libs are versioned and tagged, replace the libs/ copy with the registry/crates version and delete VENDOR_*.
  • Template updates: re-vendor justfile.ci + ci/ at the new tag, bump TEMPLATE_REV in .github/workflows/ci.yml.