Skip to content

Step 11: deterministic pathfinding and authoritative movement - #3

Closed
MerverliPy wants to merge 31 commits into
mainfrom
step11/deterministic-pathfinding-movement
Closed

Step 11: deterministic pathfinding and authoritative movement#3
MerverliPy wants to merge 31 commits into
mainfrom
step11/deterministic-pathfinding-movement

Conversation

@MerverliPy

@MerverliPy MerverliPy commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Status

Step 11 implementation continues from validated Step 10 main (f6be88e0c7c273899263661e31fb6c9639b006f8).

Implemented in this draft

  • deterministic cardinal breadth-first pathfinding
  • canonical MapCellId tie-breaking independent of registration/insertion order
  • blocked-cell and blocked-destination handling
  • deterministic re-path behavior after obstruction changes
  • 100-route concurrent stress test
  • canonical movement-agent entity component state
  • canonical movement serialization and checksum writer
  • deterministic one-cell authoritative movement planner
  • expanded harness from 72 to 78 registered tests

The movement component intentionally uses the existing entity component registration, persistence, and entity-checksum mechanisms. No parallel world, persistence, or checksum system was introduced.

Still required before completion

  • buffered movement replacement mutation through the existing Commit phase
  • commit visibility/conflict tests
  • full save/load continuity test using movement entities
  • global/component checksum divergence test
  • replay and frame-pattern equivalence
  • obstruction-churn soak coverage
  • Release build and exact owner validation evidence
  • backup/rollback artifacts

Closes #1 only after every completion gate is satisfied. This PR remains draft and must not be merged before owner validation.

Copilot AI 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.

Pull request overview

Implements Step 11’s deterministic, cardinal BFS pathfinding and a minimal authoritative movement loop backed by a canonical MovementAgentState component, integrated into the existing mutation/Commit + persistence + checksum + replay pipelines (including new validation workflow and expanded milestone tests).

Changes:

  • Added deterministic BFS pathfinding with canonical neighbor tie-breaking and blocked-cell/destination handling.
  • Introduced authoritative movement state (MovementAgentState) plus a one-cell-per-plan movement planner.
  • Added component replacement support via the existing mutation/Commit pipeline and expanded the exact harness with Step 11 milestone, save/load, replay, frame-pattern, and soak tests.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
GenerationArk.Simulation/State/MutationBuffer.cs Adds EnqueueReplace and Commit/validation/conflict handling for ReplaceComponent.
GenerationArk.Simulation/State/EntityMutationKind.cs Introduces ReplaceComponent = 5 while preserving existing enum values.
GenerationArk.Simulation/State/ComponentStore.cs Adds Replace to update an existing component value for an entity.
GenerationArk.Simulation/State/ComponentRegistry.cs Adds registry-level Replace wiring with entity/type checks.
GenerationArk.Simulation/Movement/MovementAgentState.cs Defines canonical movement component registration, serialization, and checksum participation.
GenerationArk.Simulation/Movement/DeterministicPathfinder.cs Implements deterministic cardinal BFS with canonical neighbor ordering.
GenerationArk.Simulation/Movement/AuthoritativeMovementPlanner.cs Implements deterministic one-step authoritative movement planning.
GenerationArk.Simulation.Tests/Step11WorkflowTrigger.cs Adds a behavior-neutral CI trigger marker.
GenerationArk.Simulation.Tests/Program.cs Registers new Step 11 milestone tests in the exact harness.
GenerationArk.Simulation.Tests/PathfindingMilestoneTests.cs Adds deterministic pathfinding + movement state + planner milestone tests (incl. 100-route concurrency).
GenerationArk.Simulation.Tests/MovementSaveLoadContinuityTests.cs Adds movement save/load continuity and checksum equivalence coverage using the existing snapshot pipeline.
GenerationArk.Simulation.Tests/MovementReplayEquivalenceTests.cs Adds replay, frame-pattern equivalence, and long soak determinism checks for movement scenarios.
GenerationArk.Simulation.Tests/ComponentReplacementMilestoneTests.cs Adds replacement invisibility/atomic conflict rejection/checksum-change tests.
GenerationArk.Simulation.Tests/ArrayEnumerableExtensions.cs Adds an array Reverse() extension delegating to LINQ to avoid span/in-place overload resolution pitfalls in tests.
Generation-Ark-Session-Handoff-Step11-Movement-Core-CI-Validated.md Adds a Step 11 status/handoff artifact documenting CI validation and next gates.
.github/workflows/step11-validation.yml Adds Step 11 CI workflow (Release build + exact harness) with build log artifact upload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +211 to +215
world.RecordLifecycleEvent(
mutation.MutationSequence,
tick,
EntityLifecycleEventKind.ComponentAdded,
mutation.EntityId,
Comment on lines +5 to +7
Step 11 movement-core implementation is active on a draft pull request. The current branch has a successful Release build and an exact 81/81 test-harness result in GitHub Actions. Movement persistence, replay continuity, frame-pattern equivalence, dynamic-obstruction soak, and owner validation are not yet complete.

This file is the authoritative baseline for the next Step 11 phase.
@MerverliPy MerverliPy closed this Jul 20, 2026
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.

Historical proposal: Step 11 deterministic pathfinding and movement

2 participants