Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: restamp physics and destruction traces to 6c238fc
Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
  • Loading branch information
cursoragent and lazyxeon committed Oct 21, 2026
commit 6dbdb4fd8e5bc9bd33caa4a31abc0d1bcb2d181c
6 changes: 3 additions & 3 deletions docs/architecture/destruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ integration_status: wired
summary: "Greybox digs with a sphere Subtract brush on ColumnFns. FlatColumnBase keeps the destruction replay hash."
owns: [astraweave-destruction]
doc_version: "1.6"
last_verified_commit: 7a5fd4f6
last_verified_commit: 6c238fc0
runtime_edges:
- to: astraweave-core
note: "The core replay test calls demolition_bytes."
Expand All @@ -27,8 +27,8 @@ runtime_edges:
| **System name** | Deterministic destruction |
| **Primary crates** | `astraweave-destruction` |
| **Document version** | 1.6 |
| **Last verified against commit** | `7a5fd4f6` |
| **Last verified date** | 2026-10-16 |
| **Last verified against commit** | `6c238fc0` |
| **Last verified date** | 2026-10-21 |
| **Status** | Active. Headless showcase and the required replay case. The Aravath greybox binds integer columns through `ColumnFns` and digs with a sphere `Subtract` brush. `Greybox::step` calls `BridgeAgent::step` after the motor. `apply_brush_now` loads every chunk in `(origin ± radius) / CHUNK_EXTENT` before the tick. A checkpoint stores `persist_bytes` and `restore_dug` replays that log before the next dig. `FlatColumnBase` remains the terrain when no functions are bound, so the `destruction` replay hash is unchanged. The greybox golden is `b6a9d5a2c5da28a6` (#330). The earlier #329 value was `0a576578512f25d2`. |
| **Owner notes** | Design: `docs/current/DESTRUCTION_DESIGN.md`. Survey: `docs/current/DESTRUCTION_ARCHAEOLOGY.md`. `Fixed64` lives in `astraweave-math` (PR #245). |

Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/physics.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runtime_edges:
note: "buoyancy (apply_buoyancy_forces, lib.rs:1464) consumes WaterQuery/AnalyticWater"
owns: [astraweave-physics]
doc_version: "1.14"
last_verified_commit: ae523346
last_verified_commit: 6c238fc0
---

# Architecture Trace: Physics
Expand All @@ -24,7 +24,7 @@ last_verified_commit: ae523346
| **System name** | Physics (Rigid Body Simulation + Subsystems) |
| **Primary crates** | `astraweave-physics` (12 source files / ~31K LoC), wraps `rapier3d 0.22` |
| **Document version** | 1.14 |
| **Last verified against commit** | `ae523346` |
| **Last verified against commit** | `6c238fc0` |
| **Last verified date** | 2026-10-21 |
| **Status** | **Active core** (`PhysicsWorld` + `CharacterController` + Rapier broadphase) **with feature-gated and dormant subsystems** (async-physics, ECS plugin, in-house SpatialHash). The core rigid-body / character / raycast surface is production-wired through `astraweave-gameplay` and `astraweave-npc`. 1.14: `destruction.rs`, `DestructionManager`, `process_destructible_hits`, and `benches/destruction.rs` are removed. `PhysicsWorld` does not write `DestructionCommand`. `break_destructible` only removes the Rapier body. Fracture lives in `astraweave-destruction` and is not called from `PhysicsWorld`. 1.3: `PhysicsWorld::remove_body` is the shared removal path; `break_destructible` delegates to it. `aravath_runtime` uses it to replace chunk trimeshes. Several subsystems (projectile, ragdoll, vehicle, environment, cloth) are independent managers with rich APIs but limited production wiring. The `SpatialHash` module is **dormant** despite being advertised in the crate doc-comment. |
| **Owner notes** | 1.12 (2026-10-18): `raycast_with_and_without_normal` calls `step()` before casting. The query pipeline is empty until then, so the ground ray missed and the bench exited 101. 1.11 (2026-10-17): `deformed_step` takes `ClimbTick` (flags + tick) so the function stays within Clippy's argument limit. The step body is unchanged. 1.10 (2026-10-17): `[patch.crates-io]` points `rapier3d` at `third_party/rapier3d` (crates.io 0.22). A settled step allocates nothing. Vendoring is the current choice. An in-house physics engine is not planned work. #262 stays open. 1.9 (2026-10-17): `PhysicsWorld::step` no longer follows Rapier's step with a full `QueryPipeline::update`. The workspace patches `rapier3d` 0.22 so the drained modified-collider buffer is returned to the set. `one_physics_step_allocates_nothing` stays at 0 allocs. 1.8 (2026-10-16): `gravity.rs` deleted in #330. #336 is closed. `PhysicsWorld::step` still reads the Rapier vector. Cell acceleration is `gravity_mm_s2`. 1.7 (2026-10-16): delete `gravity.rs` with the local sim (#336). 1.6 (2026-10-16): `GravityManager` stays off `PhysicsWorld::step`. This trace is forensic, not aspirational — it documents what is wired today, not what the doc-comments imply. Scale: 12 source files, 31K LoC, 20 test files, 10 benchmarks, 9 consumer Cargo deps (5 production + 4 examples). **Verification pass 2026-05-12 (version 1.1):** resolved 3 markers — (a) `astraweave-scripting` is a real production consumer that uses `PhysicsWorld` as an ECS resource AND wraps it in a `*const PhysicsWorld` raw pointer via `PhysicsProxy` for Rhai bindings (§4 Downstream row corrected); (b) `PhysicsWorld` IS `Send + Sync` (auto-derived, proven by compile-time obligations of `World::get_resource<T>` — §8 Invariant 18 corrected, previous "Send but NOT Sync" claim was wrong); (c) `process_destructible_hits` has zero callers workspace-wide (closed in §11). Decision Log "[Reasoning not recovered]" markers (8 entries) remain — git log searches returned no physics-specific decision commits. **Deep investigation pass 2026-05-12 (version 1.2):** corrected 4 factual errors and enriched 2 Open Questions. Corrections: (a) the crate has **5 features**, not 3 — `alloc-counter` and `fast-alloc` were missing from §1, §5, Appendix A; (b) `alloc-counter` feature location in §9 was wrong (was "Cargo.toml:67-69 — wait that's astraweave-ai", actually `Cargo.toml:17` + bench gating at `:77-80`); (c) `SpatialHash` test surface in §11 was significantly under-counted (claimed "3 dedicated tests" — actually 20+ tests across 4 files: `behavioral_correctness_tests.rs`, `coverage_boost_tests.rs`, `cross_subsystem_validation.rs`, `spatial_hash_character_tests.rs` with 33 `#[test]` attributes); (d) the claim that "`benches/raycast.rs` mentions spatial-hash patterns" was wrong — zero `SpatialHash` references in any bench file. Enrichments: (a) §11 `ecs` feature question now documents three de facto consumer patterns (direct passthrough / `World::insert_resource` without feature / designed `PhysicsPlugin` with feature) — `astraweave-scripting` uses pattern (b) which sits between the existing two; (b) `SpatialHash` Open Question enriched with comprehensive test surface inventory + "no bench" correction. |
Expand Down
Loading