Skip to content

docs: open-world AI orchestration archaeology (Phase 1, review before code) - #251

Merged
lazyxeon merged 8 commits into
mainfrom
feat/ai-orchestration
Oct 15, 2026
Merged

lazyxeon merged 8 commits into
mainfrom
feat/ai-orchestration

Conversation

@lazyxeon

@lazyxeon lazyxeon commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Description

Phase 2 of the approved plan, still a draft. This branch does not merge.

Survey and the locked decisions remain in docs/current/AI_ORCHESTRATION_ARCHAEOLOGY.md.

What landed

  • Tiles. astraweave-nav/src/tiles.rs. TILE_SIZE_M is 32. TILE_COMMITS_PER_TICK is 4, lowest (cx, cz) first. A worker fills TileSideBuffer. accept_side_buffer copies it only when input_hash matches the sources the sim would build. Queries write into NavScratch.
  • max_step is live. A shared XZ edge links only when the vertical gap is at most max_step. Coplanar pairs stay linked. The golden max_step_links_a_low_ledge_and_rejects_a_tall_one locks a 0.3 m link and a 1.0 m reject. partial_rebake relinks dirty triangles and leaves other vertices in place.
  • Destruction seam. GeometryNotice matches the fields drain_geometry_notices publishes on feat(destruction): replay, prefracture, and collapse bounds #243 (reason 1 brush, 2 collapse, 3 weave). nav_change_from_geometry_notice maps them. astraweave-destruction is not in this branch, so the replay builds the notice and does not call drain_geometry_notices yet.
  • Perception. build_snapshot no longer emits a breach at a fixed cell. WeaveEffectHook and LocalHazardHook are fixed buffers. A non-zero kind on a cell seals that breach.
  • HTN. astraweave-ai/src/htn.rs. Utility-scored breach and cover, LOD bands, [ActionSlot; 8], cap 64. ecs_ai_demo runs SpatialTick.
  • Allocations. cargo test -p astraweave-ai --features alloc-counter --test zero_alloc_tick -- --test-threads=1 asserts the tile commit and the HTN tick allocate zero times after warmup.
  • Replay. nav_reroute is required in .github/workflows/determinism-replay.yml.

Dormant systems

Surface Decision
UtilityOrchestrator Wired to htn::legacy_utility_plan
dispatch_planner Wired. PlannerMode::Htn is always available
Slice companion Wired to a priority method select. No GoapPlanner::plan and no wall clock
AIArbiter Deferred. Issue #257 (owner: this workstream; plan is in the issue)
Advanced GOAP and GoapPlanner Deferred. Issue #258 (owner: this workstream; plan is in the issue)

llm_dialogue.rs stays issue #225. The Aravath window scene is issue #261. A headless BridgeAgent is being prepared on cursor/aravath-bridge-reroute-568b, stacked on #205.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Security enhancement

Security Considerations

  • Does this PR introduce new dependencies? If yes, have they been vetted for security issues?
    • No third-party crates. astraweave-core's replay test dev-depends on astraweave-nav.
  • Does this PR modify how user input is handled? If yes, has it been validated/sanitized?
  • Does this PR change authentication or authorization mechanisms?
  • Does this PR access sensitive data or modify how it's stored?
  • Does this PR introduce new network communication or modify existing protocols?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have run security checks (cargo audit, cargo deny) locally

Test plan

  • cargo test -p astraweave-nav --lib and the nav integration tests
  • cargo test -p astraweave-ai --lib
  • cargo test -p astraweave-ai --features alloc-counter --test zero_alloc_tick -- --test-threads=1
  • cargo test -p astraweave-core --test replay_hash is stable in one process
  • cargo clippy -p astraweave-nav -p astraweave-core -p astraweave-ai --all-targets --features alloc-counter -- -D warnings
  • determinism-replay / compare matches nav_reroute on Ubuntu, Windows, and macOS
Open in Web Open in Cursor 

@coderabbitai

coderabbitai Bot commented Oct 15, 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: c9365427-9f6e-4e5e-803c-215451ae8e72
  • 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 commented Oct 15, 2026

Copy link
Copy Markdown

Weaving (PR #252) is adding the fixed hazard tail you left as a review question. WorldSnapshot gains:

pub hazards: [WeaveHazard; 16],
pub hazard_count: u8,

WeaveHazard is { kind, x, y, z, temperature, flags, radius_milli }. Kinds: 1 fire, 2 steam, 3 poison gas, 4 deep water, 5 ice. Sort is kind, then z, y, x. Empty slots are zero. perception_world now hashes hazard_count and the occupied slots, so that digest will change and stay cross-OS stable. Existing literals were updated; ..snapshot copies the tail.

NavChange is in astraweave-nav with your fields: tick, seq, min_milli, max_milli. A freeze weave emits one on the command's start tick, same milli AABB as the static ice sheet. Tile rebuild can consume it when your nav work lands. Weaving does not rebake a mesh.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 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-15T19:55:08.256411Z d6992b9 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.

@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: fe349aa01f

ℹ️ 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 thread astraweave-nav/src/lib.rs
Comment on lines +596 to +598
const MAX_RELINK: usize = 4096;
let limit = self.tris.len().min(MAX_RELINK);
let mut dirty_tri = [false; MAX_RELINK];

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 Process dirty triangles beyond the relink cap

For any NavMesh with more than 4,096 baked triangles, an invalidated triangle at index 4,096 or later is never inspected or updated because every relinking loop stops at limit; partial_rebake nevertheless clears all dirty regions before returning. The mesh is therefore marked clean while still publishing stale geometry, so larger production navmeshes cannot reliably react to terrain edits.

Useful? React with 👍 / 👎.

Comment thread astraweave-nav/src/lib.rs
Comment on lines +642 to +647
let n = src.normal_normalized();
if n.length_squared() >= 1e-6 && n.dot(Vec3::Y) >= 0.0 {
self.tris[i].verts = [src.a, src.b, src.c];
self.tris[i].center = src.center();
self.tris[i].normal = n;
}

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 Reapply walkability filtering during partial rebakes

When an edit makes a formerly walkable triangle steeper than max_slope_deg, this condition still accepts and relinks it because it checks only for an upward-facing normal; if the replacement becomes degenerate or downward-facing, the old walkable vertices remain and are likewise relinked. The previous full rebake applied the slope filter and removed such faces, so dynamic terrain can now leave paths through walls, collapsed surfaces, or other non-walkable geometry.

Useful? React with 👍 / 👎.

Comment on lines +462 to +464
if chain_len as usize >= MAX_WAYPOINTS {
break;
}

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 Correctly truncate overlong waypoint chains

When a valid route contains more than MAX_WAYPOINTS nodes, this exits reconstruction before reaching start_n but then emits the requested start followed by the retained tail near the goal. That skips an arbitrary number of intermediate connected nodes—and can also fill the buffer before appending the goal—so callers receive a path whose first segment may cross blocked space. Return failure or retain the start-side prefix when the parent chain exceeds the output capacity.

Useful? React with 👍 / 👎.

Comment thread astraweave-ai/src/htn.rs
Comment on lines +366 to +369
let mut far = scratch.waypoints[0];
for point in scratch.waypoints.iter().take(scratch.waypoint_len as usize) {
if point.x.abs() > far.x.abs() {
far = *point;

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 Choose the movement target by path progress

For routes that move toward the origin on X, or primarily along Z while no waypoint has a larger absolute X than the start, far remains scratch.waypoints[0]; the resulting MoveTo sends the agent to its current cell and repeated replans never advance it. On other routes this can select an arbitrary lateral excursion rather than the next or final waypoint. Select by waypoint order or distance progressed along the path instead of absolute world X.

Useful? React with 👍 / 👎.

let mut scratch = astraweave_nav::NavScratch::new();
let sim_tick = tick.clock;
tick.clock = tick.clock.saturating_add(1);
crate::htn::tick_agents(tick, &mut scratch, sim_tick);

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 Apply spatial HTN plans to ECS agents

When AiPlanningPlugin runs with a SpatialTick—including the updated ecs_ai_demo—this call only stores plans in SpatialTick.agents; it neither writes CDesiredPos nor emits an action event, and a repository-wide search finds no non-test consumer of AgentPlan. Consequently the demo companion is still driven solely by the legacy planner and the new spatial HTN path never affects gameplay; translate these plans into ECS actions here or register a downstream consumer. .github/copilot-instructions.mdL193-L199

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved navigation invalidation, route generation, and scheduling defects undermine reliable rerouting, while validation misses key execution paths.

19 open findings
What changed in this PR

Adds spatial AI planning and tiled navigation to AstraWeave, moving beyond the initial archaeology document toward bridge-collapse rerouting.

Changes:

  • Adds bounded tile commits, destruction-notice adaptation, and step-height connectivity.
  • Introduces HTN planning, spatial observations, scheduling, and demo registration.
  • Adds replay coverage, allocation checks, benchmarks, and architecture updates.
File Description
examples/​ecs_ai_demo/​src/​main.rs Registers the spatial demo resource.
docs/​current/​AI_ORCHESTRATION_ARCHAEOLOGY.md Records the survey, design, and implementation status.
docs/​architecture/​nav.md Updates navigation behavior and status.
docs/​architecture/​ai_pipeline.md Documents HTN and spatial planning.
Cargo.lock Records navigation and destruction dependencies.
astraweave-nav/​src/​tiles.rs Adds tiled navigation, queries, and geometry invalidation.
astraweave-nav/​src/​lib.rs Exports tiles and changes connectivity and rebaking.
astraweave-nav/​Cargo.toml Adds the destruction dependency.
astraweave-nav/​benches/​navmesh_benchmarks.rs Adds a tile-commit benchmark.
astraweave-core/​tests/​replay_support/​mod.rs Adds destruction-backed navigation replay data.
astraweave-core/​tests/​replay_hash.rs Includes the navigation replay digest.
astraweave-core/​tests/​perception_tests.rs Updates expectations for absent breach observations.
astraweave-core/​src/​sim.rs Reserves navigation and HTN random-stream IDs.
astraweave-core/​src/​perception.rs Adds spatial observation buffers and observed POIs.
astraweave-core/​Cargo.toml Adds replay test dependencies.
astraweave-ai/​tests/​zero_alloc_tick.rs Adds allocation assertions for spatial work.
astraweave-ai/​tests/​mutation_resistant_comprehensive_tests.rs Updates planner-mode assertions.
astraweave-ai/​src/​veilweaver.rs Replaces GOAP search with priority-based action selection.
astraweave-ai/​src/​orchestrator.rs Delegates utility planning to the HTN module.
astraweave-ai/​src/​mutation_tests.rs Includes HTN in planner-mode tests.
astraweave-ai/​src/​lib.rs Exports spatial planning interfaces.
astraweave-ai/​src/​htn.rs Adds spatial plans, utility selection, and scheduling.
astraweave-ai/​src/​ecs_ai_plugin.rs Registers the spatial planning system.
astraweave-ai/​src/​core_loop.rs Adds HTN dispatch.
astraweave-ai/​Cargo.toml Enables allocation instrumentation and the HTN benchmark.
astraweave-ai/​benches/​htn_budget.rs Benchmarks planning-budget consumption.
.github/​workflows/​determinism-replay.yml Requires the navigation replay case.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

let mut scratch = astraweave_nav::NavScratch::new();
let sim_tick = tick.clock;
tick.clock = tick.clock.saturating_add(1);
crate::htn::tick_agents(tick, &mut scratch, sim_tick);
Comment thread astraweave-ai/src/htn.rs
let band = band_of(agent.pos_milli, agent.player_milli);
agent.ticks_since_plan = agent.ticks_since_plan.saturating_add(1);
match band {
0 if agent.ticks_since_plan >= REPLAN_TICKS || agent.plan.len == 0 => {
Comment thread astraweave-ai/src/htn.rs
Comment on lines +366 to +370
let mut far = scratch.waypoints[0];
for point in scratch.waypoints.iter().take(scratch.waypoint_len as usize) {
if point.x.abs() > far.x.abs() {
far = *point;
}
Comment thread astraweave-ai/src/htn.rs
Comment on lines +401 to +402
if sealed(hooks, cell_x, cell_y) {
continue;
Comment on lines +320 to +321
pois.push(Poi {
k: "breach".into(),
Comment thread astraweave-ai/src/htn.rs
let b = agents[order[j] as usize];
let band_a = band_of(a.pos_milli, a.player_milli);
let band_b = band_of(b.pos_milli, b.player_milli);
let out = band_a > band_b || (band_a == band_b && a.entity_id > b.entity_id);
Comment thread astraweave-ai/src/htn.rs
Comment on lines +361 to +362
*budget = budget.saturating_sub(1);
if let Some(portal) = best_breach(tiles, scratch, hooks) {
Comment on lines +50 to +52
reset_allocs();
tick_agents(&mut tick, &mut scratch, 9);
let tick_allocs = allocs();
Comment on lines +1162 to +1164
h = mix(h, milli(v.x) as u32 as u64);
h = mix(h, milli(v.y) as u32 as u64);
h = mix(h, milli(v.z) as u32 as u64);
Comment on lines +11 to +12
app.world
.insert_resource(astraweave_ai::SpatialTick::demo_agent());
@cursor
cursor Bot force-pushed the feat/ai-orchestration branch from fe349aa to d7f6555 Compare October 15, 2026 17:33
cursoragent and others added 8 commits October 15, 2026 18:40
Map planners, navmesh, and perception on main, and record the HTN-plus-utility upgrade that waits on review. No runtime code.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Tile rebuilds stop at four per tick and accept a worker buffer only when its input hash matches the synchronous build. A ledge taller than max_step no longer links, and partial_rebake leaves triangles outside the dirty AABB in place.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
The spatial tick scores breaches and destroyed cover with a fixed plan buffer, and perception no longer invents a breach cell. nav_reroute is a required three-OS replay case. UtilityOrchestrator and PlannerMode::Htn call this planner. AIArbiter and the advanced GOAP tree are deferred in issues 257 and 258.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
After warmup both paths record zero heap events under CountingAlloc. Collapse input is a GeometryNotice with the reason bytes drain_geometry_notices publishes; the destruction crate is still on its own branch.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
NavChangeKind is Explosion, Brush, Detach, and Weave. The replay drains GeometryNotice values from DestructionWorld instead of building a second notice type. The workflow still requires planner_pure, perception_world, gameplay_rng, fixed64, combat_resolve, and nav_reroute.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
build_snapshot no longer inserts a breach at a fixed cell. The comprehensive
snapshot test still required one POI, which failed the Ubuntu and Windows jobs.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Main and the nav replay both added astraweave-destruction. The manifest
keeps main's crate and the nav dev-dependency, once each.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
@cursor
cursor Bot force-pushed the feat/ai-orchestration branch from d7f6555 to d6992b9 Compare October 15, 2026 18:42
@lazyxeon
lazyxeon marked this pull request as ready for review October 15, 2026 19:42
@lazyxeon
lazyxeon merged commit 312d708 into main Oct 15, 2026
26 checks passed
@lazyxeon
lazyxeon deleted the feat/ai-orchestration branch October 15, 2026 19:42

@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: d6992b9885

ℹ️ 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 +103 to +104
[notice.x0, notice.y0, notice.z0],
[notice.x1, notice.y1, notice.z1],

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 Scale geometry notices before constructing nav changes

For real destruction events away from the origin, these bounds are in integer terrain/world cells: brush notices copy integer Brush::origin values and collapse notices use floor_whole/ceil_whole. source_hits later compares them with milli(vertex), so a brush spanning x=13..19 is tested against nav vertices near x=16000 and merely rebuilds unchanged geometry. Convert the producer bounds to milli-units here, or standardize the producer contract; the replay currently hides this mismatch by issuing a brush at coordinates such as 24,500.

Useful? React with 👍 / 👎.

Comment on lines +573 to +578
if source_hits(
&self.slots[slot].sources[i],
change.min_milli,
change.max_milli,
) {
removed = true;

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 Rebuild brush edits instead of deleting every source

When a destruction brush uses BrushOp::Add or BrushOp::Smooth, the producer still emits reason 1 and this code maps it to NavChangeKind::Brush; drop_sources ignores the kind and permanently removes every intersecting source triangle. A terrain fill can therefore erase existing navigation instead of publishing the newly raised or smoothed surface, and there is no API here that supplies replacement geometry. Dirty tiles need to rebuild from the current terrain geometry rather than treating every notification as a subtraction.

Useful? React with 👍 / 👎.

Comment on lines +692 to +696
let id = portal_id(
self.slots[a].cx,
self.slots[a].cz,
ia as u16,
self.slots[b].cx,

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 stable identities across tile rebuilds

When an edit removes an early source triangle, drop_sources and build_slot compact the remaining triangles, so their local indices change. Deriving portal IDs from ia/ib (and cover IDs from the same local index later) makes unchanged geometry receive new identities after that rebuild: ordinary portals are then published as new breaches, while lost-cover matching can report a surviving cover as lost and miss the cover actually removed. Derive these IDs from stable source or edge identities instead of compacted array positions.

Useful? React with 👍 / 👎.

Comment thread astraweave-ai/src/htn.rs
Comment on lines +292 to +293
1 => {
plan_route(

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 Schedule deferred band-1 agents before repeat replans

With more band-1 agents than the expansion budget can serve, this unconditional replan combines with the fixed (band, entity_id) ordering to starve the same high-ID tail every tick. For example, after cover is lost each successful route consumes three budget units, so only about 22 of the 32 supported agents are processed; the first agents replan again next tick while the remaining agents are skipped indefinitely. Track deferral or otherwise rotate priority within the band before allowing already-served agents to consume the next tick's budget.

Useful? React with 👍 / 👎.

cursor Bot pushed a commit that referenced this pull request Oct 15, 2026
Freeze emits NavChangeKind::Weave on the nav tile record. The duplicate
struct is gone. The perception case does not append an empty hazard
tail, so that digest stays the one #251 published.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 15, 2026
Freeze emits NavChangeKind::Weave on the nav tile record. The duplicate
struct is gone. The perception case does not append an empty hazard
tail, so that digest stays the one #251 published.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 15, 2026
Freeze emits NavChangeKind::Weave on the nav tile record. The duplicate
struct is gone. The perception case does not append an empty hazard
tail, so that digest stays the one #251 published.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Freeze emits NavChangeKind::Weave on the nav tile record. The duplicate
struct is gone. The perception case does not append an empty hazard
tail, so that digest stays the one #251 published.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Freeze emits NavChangeKind::Weave on the nav tile record. The duplicate
struct is gone. The perception case does not append an empty hazard
tail, so that digest stays the one #251 published.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
lazyxeon added a commit that referenced this pull request Oct 16, 2026
* docs: map weaving surfaces and propose a data-driven framework

Phase 1 only. Inventory of weave, ability, status, material, and physics
paths on main, plus a review-gated modifier-graph design. No runtime code.

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

* feat(core): fixed weave hazard tail on WorldSnapshot

Sixteen hazard slots, sorted by kind then cell, plus NavChange in
milli-units for a later tile rebuild. Snapshot literals and the
perception replay encoding include the tail.

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

* feat(weaving): data-driven casts into the local-sim field

Evolve astraweave-weaving into the modifier graph. Templates stamp
temperature, phase, density, flags, and gravity through SimField.
TestSimField stands in until the local-sim crate exists. Legacy ops
compile to those modifiers, freeze adds a walkable AABB and a NavChange,
and the weaving replay case is required on the three-OS workflow.

Echo dash and shield spend the single Echo ledger. Damage schools scale
after defense, and chill, burn, and stun are read on the hit path.

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

* fix(weaving): emit FieldWrite and drop the private grid

PR #253 owns the cells. Production weaving expands templates into
FieldWrite stamps and hands them to SimField. NullField returns a zero
digest until LocalSim shares this branch. TestSimField stays cfg(test)
and records writes only.

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

* fix: close the snapshot literal before the hazard fields

The slice runtime's world snapshot put the hazard tail outside the
struct, which failed workspace checks.

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

* feat(weaving): match the mod queue_weave signature

The public queue is the 64-slot WeaveScratch from the mods branch:
queue_weave(scratch, start, until, seq, caster, template, origin),
engine template ids 1 through 7 reserved, and parse_template_toml.
The evaluator still turns those commands into FieldWrite stamps.

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

* fix: format hazard literals and drop them from the IPC bench struct

The local WorldSnapshot in ipc_adversarial is not the engine snapshot, so
the hazard tail does not belong on that type. rustfmt also wants the blank
line before each real hazard literal removed.

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

* fix(gameplay): keep hit-stagger from blocking the next combo step

is_stunned was matching every Stagger, so the stagger a hit already
applies cancelled the rest of the chain. Stun is its own effect, from
an item special tag. Shock school scale is 11000 basis points, so the
echo weapon test expects 66 taken.

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

* docs(gameplay): stamp the stun-versus-stagger invariant

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

* fix(weaving): reject origins outside the island and wide template ids

queue_weave returns OutsideIsland for a cell outside ±2048 and leaves the
queued command untouched. parse_template_toml checks the id as i64 before
the u16 cast, so 65544 no longer aliases template 8. In-range replay
origins are unchanged.

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

* docs(weaving): stamp the island-origin invariant

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

* fix(weaving): match #214's template id range check

Reject ids that do not fit u16 before the cast, with the same error
string. Zero and ids 1 through 7 stay engine ids.

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

* fix: share the tile NavChange and keep the perception replay bytes

Freeze emits NavChangeKind::Weave on the nav tile record. The duplicate
struct is gone. The perception case does not append an empty hazard
tail, so that digest stays the one #251 published.

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

* fix(ai): fill the hazard tail on decision-trace snapshots

WorldSnapshot from #287 omitted the weave hazard fields, so the workspace
check failed after the rebase.

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

* ci: retrigger after a Windows rustup timeout

The code is unchanged. Partition 2/3 failed while downloading the
1.89.0 toolchain (os error 10060) before any test ran.

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

* docs: sync the workspace map after the #214 rebase

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

* fix(script): report an out-of-island weave origin

queue_weave can return OutsideIsland. The mod host names that error
instead of leaving the match incomplete.

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.

3 participants