Repository navigation
feat: local field on main, greybox host, weaving stamps - #330
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
FieldWrite and FieldEvent are weaving's records. LocalSim implements SimField. Material ids match the weaving stamp list, wood ignites at 300, and the freeze hold is -200. A destruction brush opens a cell that volume falls through. The greybox publishes columns into the traversal water probe. submersion_between feeds the swim state. local_sim is written into the replay artifact and is not required until the three OS hashes match. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
The test ran with the crate as its working directory, so a relative target path missed the workspace file the merge step reads. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Linux, Windows, and macOS agreed on 77768119e8ef4377a23268b522bf3d2303b44cf4ca0cda39eb15c7fef5eb29c8. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
The field now sits on main after the bridge dig. The golden is b6a9d5a2c5da28a6. Cell acceleration is gravity_mm_s2 of the zone's milli-g. gravity.rs is gone; PhysicsWorld::step still uses Rapier. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
52635e6 to
38279cb
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38279cb84a
ℹ️ 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".
| let mat = material_of(materials, material); | ||
| let base = i32::from(mat.map(|m| m.density0).unwrap_or(1000)); |
There was a problem hiding this comment.
Derive published density from the liquid phase
When ordinary liquid is stamped into a nonsolid cell, sample_solid labels that cell MAT_AIR, whose demo_materials row has density0: 0; neither AddVolume nor SetPhase changes the material. This therefore publishes a density of zero for normal water, and PhysicsWorld::apply_buoyancy_forces multiplies that value directly into the buoyancy force, causing bodies to sink through locally simulated water. The base density should come from the liquid phase, such as water or oil, rather than the underlying solid-field material.
Useful? React with 👍 / 👎.
| if self.column_len as usize >= MAX_COLUMNS { | ||
| self.column_drops = self.column_drops.saturating_add(1); | ||
| return; |
There was a problem hiding this comment.
Deduplicate water columns before enforcing the cap
When more than one region contains dense liquid, the first region can consume all 4,096 entries with one row per wet voxel before this cap is checked for later regions; the subsequent deduplication may shrink those entries to only 256 XZ columns, but every later region has already been dropped. As a result, physics receives no water columns for those later regions even though the final deduplicated table had ample capacity. Deduplicate by (x, z) while collecting, or enforce the cap only on unique columns.
Useful? React with 👍 / 👎.
| if index == 0 { | ||
| return Some((0, -1, 0)); | ||
| } | ||
| let zone = zones.iter().find(|z| z.index == index)?; |
There was a problem hiding this comment.
Fall back to world gravity when a zone row is absent
If a persisted cell references a gravity index that is omitted from a later tick's zones slice, this ? returns None, which the flow solver interprets as no gravity and therefore traps liquid in place. For the same cell, gravity_milli_g_at explicitly falls back to world gravity when the row is missing, so fluid and entity gravity disagree after a zone is removed or temporarily unavailable. Missing rows should take the same world-down fallback used by the public gravity sampler.
Useful? React with 👍 / 👎.
#330 added benches/tick.rs. The runner treats an unmapped discovered package as fatal, so every shard exited before Criterion ran and the regression alert failed the same way. The 600s cap and the 14-way matrix stay as they are. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
#330 added benches/tick.rs. The runner treats an unmapped discovered package as fatal, so every shard exited before Criterion ran and the regression alert failed the same way. The 600s cap and the 14-way matrix stay as they are. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Description
Rebased onto
main84d3888a(#329). Draft. Do not merge.Greybox::stepkeeps the bridge agent and the dig, then ticksLocalSim. The greybox golden isb6a9d5a2c5da28a6(the #329 golden plusfield_digest).local_simis the 16th required replay case. The digest that matched on three OSes before this rebase was77768119e8ef4377a23268b522bf3d2303b44cf4ca0cda39eb15c7fef5eb29c8. This rebase does not change that case's bytes.LocalSim::gravity_mm_s2_atsamples a cell throughastraweave_weaving::gravity_mm_s2.gravity.rsis deleted.PhysicsWorld::stepstill reads the Rapier gravity vector only, so the other required replay cases stay on that path.#253 is already closed as superseded by this PR.
Type of change
Security Considerations
Checklist
Milestone
Rebased onto #329. Greybox golden recomputed.
local_simis required. CI is running on this push. Do not merge.