Skip to content

feat(terrain): integer ground, command-log deformation, one streamer - #215

Merged
lazyxeon merged 12 commits into
mainfrom
cursor/ws-terrain-scatter
Oct 16, 2026
Merged

lazyxeon merged 12 commits into
mainfrom
cursor/ws-terrain-scatter

Conversation

@lazyxeon

@lazyxeon lazyxeon commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Description

Rebased onto main cdea968c (#205). Copied #205 code stays on main's version: Aravath characters, combat, veil, fog, and god rays. The column ring uses astraweave-destruction for DestructionCommand, TerrainBase, and VoxelDag. The local copies of those types are gone. Occupancy replay stays in destruction_seam.rs because main's Terrain slot set is four chunks and the loaded ring is the slot set.

Demo voxels still come from fill_height_chunk. ColumnStream decides which chunks stay loaded, in (x, z) order. The replay golden stays 9b607d1a840ecd64.

Required determinism cases are main's eleven plus worldgen_columns and deformed_chunk.

catalog_files_match_sha256 now expects main's sky_equirect row (sky_equirect.png). Rows that publish a sha256 are still hashed. sky_equirect has no digest, so the missing png is not a hash failure.

test_distance_attenuation_files on Windows was try 1 fail (missing wav under the null backend) and try 2 pass, marked flaky 2/3. That is #314. The Windows shard stayed red because of the HDRI assertion, which this commit fixes.

Advisory and cargo-deny failures stay on #303 and #305–#311. Not merged.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change
  • Documentation update

Security Considerations

  • New dependencies, user input, auth, sensitive data, or network changes

astraweave-terrain depends on astraweave-destruction, already in the workspace.

Checklist

  • Style, self-review, docs, and tests
  • cargo audit / cargo deny locally
Open in Web Open in Cursor 

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b17482da-5a44-41b5-bdd3-719fe0922b20
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor
cursor Bot force-pushed the cursor/ws-terrain-scatter branch from 356ab28 to 595f3e1 Compare October 14, 2026 20:35
@cursor cursor Bot changed the title docs(terrain): archaeology of worldgen, voxels, and scatter (WS-RENDER-ENV-B phase 1) feat(terrain): integer ground, one streamer, and dormant-stack cleanup Oct 14, 2026
@cursor cursor Bot changed the title feat(terrain): integer ground, one streamer, and dormant-stack cleanup feat(terrain): integer ground, command-log deformation, one streamer Oct 15, 2026
@cursor
cursor Bot force-pushed the cursor/ws-terrain-scatter branch 2 times, most recently from 6f868ed to f9c2475 Compare October 16, 2026 06:06
cursoragent and others added 12 commits October 16, 2026 07:08
Map the heightmap generator, the voxel path, and the Aravath greybox
against each other before any WS-RENDER-ENV-B feature work. Record
call sites, dormant stacks, the unmerged mesher, and a cross-OS hash
proposal. No runtime code.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
The sim ground is column_gen: integer heights, a dirt road, and SimRng
scatter. DualContouring welds vertices by edge key. worldgen_columns is
a required three-OS replay case. Foliage upload is sorted, zone scatter
uses the world seed, and the pine-forest PBR set is hashed in the manifest.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Add Poly Haven pine-forest ground, rocks, leaves, grass, trees, dry
branches, and the spruit_sunrise HDRI. The conifer is pine_tree_01
(CC0, polyhaven.com/a/pine_tree_01). KayKit stays the greybox props.
Photogrammetry mesh buffers are hashed and not vendored. No Unity
Asset Store files. Sky binding stays with PR #216.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
gltfpack 1.3 decimates the photogrammetry sources to LOD0 under 15k
triangles, plus LOD1, LOD2, and a KTX2 cross billboard. The commands
and output SHA-256 live in the manifest. The huge source buffers stay
build inputs.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
ColumnStream is the demo keep/evict set. Scene saves and the Aravath
checkpoint store the integer column record, with an erosion banner that
the preview is not the ground. PCG dungeons collapse through SeedRng.
Voxel materials bind through ModelSurfaceMaps. --frame-times writes a
CSV beside the exe. The unused heightmap loader, clipmap, GPU erosion,
voxel modifier, and second terrain save format are removed.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
…osion

The seven lib failures were the retired pre-E3 contract. Persistence and
lacunarity tests force four octaves, matching PR #217, so debug and
release share the same bits. Worker column builds commit in (x, z) order.
Integer distance LOD and morph replace the heightmap LOD stack. Integer
droplets replace GPU erosion, and the editor Apply Erosion button writes
that bake. The deletion ledger records what each removed file did.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Scatter generation finishes immediately and runs with the suite.
The camera partition test loads one 32 m cell instead of meshing a
300 m neighborhood. Chunk coordinates round-trip while the f32 origin
is exact, and i32::MAX/2 is locked to the measured one-chunk miss.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Base columns stay the seed record. Apply Erosion appends a DestructionCommand log instead of replacing the snapshot. ColumnStream is the deformation slot set: a pre-sized ring, an in-place (x, z) sort, at most four DAG rebuilds per call, and no heap allocation on the tick.

Scatter ids come from (seed, x, z). A Detach in the log is not respawned. destruction_seam.rs is a temporary copy of the #243 command and DAG types, dropped on rebase onto feat/destruction.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Drop the copied Fixed64, command, and voxel-DAG definitions. The column ring now calls astraweave-destruction. Demo chunks still fill from the island heightfield, and ColumnStream only decides which chunks stay loaded. The determinism job keeps the eleven main cases and adds worldgen_columns and deformed_chunk.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
catalog_files_match_sha256 still hashes every row that publishes a sha256. sky_equirect is in the catalog and has no digest, so the test checks the name and path and does not require the png.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
The rebase left conflict markers in the determinism workflow and the terrain trace. The required set is main's cases, including traversal and traversal_deformed, plus worldgen_columns and deformed_chunk.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Cargo resolved two sha2 versions. The terrain and asset packages stay on 0.10.9.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/ws-terrain-scatter branch from ee771f9 to 738d318 Compare October 16, 2026 07:12
@lazyxeon
lazyxeon marked this pull request as ready for review October 16, 2026 08:28
@lazyxeon
lazyxeon merged commit d0452d3 into main Oct 16, 2026
31 of 32 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T08:33:25.344320Z 738d318 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lazyxeon
lazyxeon deleted the cursor/ws-terrain-scatter branch October 16, 2026 08:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 738d318ac1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +9259 to +9261
let commands = self.dock_tab_viewer.erosion_commands();
let cmd_path = path.with_extension("erosion.cmd");
match fs::write(&cmd_path, commands) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Load saved deformation sidecars when opening scenes

When a user applies erosion, saves, and later reopens the scene, the deformation is written only to .erosion.cmd here, but the editor and runtime scene-loading paths contain no corresponding read or replay of either this file or the .columns sidecar. The scene therefore reports a successful save while reopening it discards the saved terrain deformation; embed these records in the scene or restore and replay the sidecars during scene load.

Useful? React with 👍 / 👎.

Comment on lines +253 to +256
fn brush_touches(brush: Brush, chunk: (i32, i32)) -> bool {
let mut touched = [(0i32, 0i32); 8];
let count = touched_chunks(brush, &mut touched);
touched[..count].contains(&chunk)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Track every chunk touched by accepted brushes

For valid long, thin box brushes, this eight-entry buffer silently omits affected chunks. For example, half_extents: [2047, 0, 0] covers 4,095 cells and passes validate, but spans about 129 chunks; only the first eight can be returned here, so all remaining resident chunks are never marked dirty or replayed. Compute intersection directly or size/reject commands consistently with the command validator.

Useful? React with 👍 / 👎.

Comment on lines +17 to +18
const MAX_HEIGHT: usize = 256;
const MAX_DENSITY: usize = 1024;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve all cells from valid brushes

These capacities are smaller than edits accepted by the shared validator, while add_height and set_density silently return once full. A valid [8, 0, 8] box edits 289 columns and loses the final 33 height changes, while a valid radius-7 sphere contains more than 1,024 density cells and is also truncated. Thus a successfully logged command produces only a partial deformation; either reject commands exceeding per-chunk storage or provide capacity for every accepted cell.

Useful? React with 👍 / 👎.

Comment on lines +245 to +249
pub(crate) fn command_touches(cmd: &DestructionCommand, chunk: (i32, i32)) -> bool {
match cmd.kind {
CommandKind::Brush(brush) => brush_touches(brush, chunk),
CommandKind::Weave(weave) => chunk_of(weave.origin[0], weave.origin[2]) == chunk,
_ => false,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Propagate weave edits across chunk boundaries

When a weave sphere overlaps a boundary—for example, radius 2 at x = 31—this predicate marks only the origin chunk. apply_weave generates density cells beyond that chunk, but they fall outside the origin slot's DAG and the neighboring slot is never dirtied, so the portion across the boundary disappears. Determine every chunk intersected by the weave radius, as is done for brushes.

Useful? React with 👍 / 👎.

cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
#215 is on main at d0452d3. The compare job requires
worldgen_columns and deformed_chunk beside the previous thirteen.
The greybox golden stays the island heightfield hash.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
#215 is on main at d0452d3. The compare job requires
worldgen_columns and deformed_chunk beside the previous thirteen.
The greybox golden stays the island heightfield hash.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
lazyxeon added a commit that referenced this pull request Oct 16, 2026
* docs: correct engine status against main at d6b07fc

The README and the status, build, and architecture pages it advertises
still described the June 2026 snapshot. Record 139 workspace members,
thirty traces, the ten required replay cases, and the systems that
landed with nav reroute, the Aravath bridge, security caps, the decision
inspector, causality, Rhai mods, destruction, and the slice QA replay.
Label greybox, weaving, traversal, local fluids, the frame budget, and
CI as in progress. State the 11 ms GTX 1660 Ti target as unmeasured.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(aw_doc_lint): fail the front door when status claims drift

Vocabulary matches stay in warn mode. The process now always fails if
README drops a required replay case, calls the 11 ms frame budget
measured, marks an open pull as shipped, or if player-facing docs use
the retired game title.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: record #316 image, glTF, and Ollama caps

Rebase onto main at 3971cbe, which includes #316 and the later #318
script tick fix. Image decode is capped at a 4096 edge and 64 MiB,
aw_asset_cli jails glTF file URIs, and Ollama constructors stay on
loopback unless allowing_remote is used. Gameplay scripts do not
receive physics or nav proxies.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: scripting demos no longer call physics or nav

advanced_ai.rhai now uses distance for sight and an empty patrol path.
scripting_playground keeps trigger damage and drops the player raycast.
The hosts still insert the resources.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: weaving is on main and is the eleventh replay case

Rebase onto 5cba174. #252 is no longer listed as in progress.
The required set is eleven cases, including weaving, which hashes
NullField until the local sim in #253. Workspace members are 140.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: the Aravath greybox is on main

Rebase onto cdea968. #205 is the windowed aravath_greybox demo:
CC0 KayKit characters, a streamed three-chunk world, and sword combat.
Its replay hash is Linux and Windows only, not the eleven-case gate.
Workspace members are 141, including astraweave-veil.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: the claimed lockfile bumps were not applied

ARAVATH_DISTRIBUTION.md listed patched crate versions that Cargo.lock
does not contain. Record the locked versions, the tokio-rustls 0.25 and
openh264 ^0.6 pins, and issues #303 and #305-#311. The lockfile is unchanged.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: traversal is on main with two replay cases

Rebase onto a10780f. Required cases are thirteen, adding traversal
and traversal_deformed. The greybox golden is b663da52ea1d566e and
stays a Linux-and-Windows hash, not one of those thirteen.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: deny and audit pass after the supply-chain bumps

Rebase onto 8e5dd73. Record the locked patched versions, the ignored
advisories in #305-#311 and #320-#324, and the greybox tokio net edge
still tracked by #326. Cargo.lock is unchanged.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: fifteen replay cases after terrain columns landed

#215 is on main at d0452d3. The compare job requires
worldgen_columns and deformed_chunk beside the previous thirteen.
The greybox golden stays the island heightfield hash.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: CI burndown is on main and the greybox net fix is not

#217 at a66304d installs libudev for the editor tests and sanitizers,
gives audio tests a per-process fixture directory, and keeps the SPH
step finite. #219 and #256 are closed. #327 stays open for #326.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants