Skip to content

[Common] Command interface for authoritative state mutation - #58

Open
utilForever wants to merge 9 commits into
mainfrom
state-mutation
Open

[Common] Command interface for authoritative state mutation#58
utilForever wants to merge 9 commits into
mainfrom
state-mutation

Conversation

@utilForever

@utilForever utilForever commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

Adds a closed Command variant and funnels authoritative tile and biome mutations through World::Apply.

Closes #27.

Why

World state mutations need a single application path that fires EnTT on_update notifications for future delta synchronization.

Type of change

  • Gameplay or simulation logic
  • Island generation, tile-map, or territory expansion
  • Biome, resource, monster, or building rules
  • Combat, quest, or exploration content
  • Automation or resource-flow behavior
  • Client UI, controls, camera, or player feedback
  • Server, networking, persistence, or shared protocol
  • Assets, content, balancing, or tuning
  • Build, tooling, docs, or maintenance

Player-facing impact

None. This is an internal authoritative state-mutation interface.

World and biome impact

  • Starting island generation: No behavioral change; generated chunks remain deterministic.
  • Territory expansion blocks: N/A
  • Biome distribution or selection: No generation change; explicit biome mutations now use commands.
  • Resource availability: N/A
  • Monster spawning: N/A
  • Buildable structures: N/A
  • Save/load compatibility: N/A

Technical notes

  • Client impact: Formatting only; no behavior change.
  • Server impact: Provides the authoritative command application surface; no server wiring in this PR.
  • EnTT/ECS impact: Mutable registry access and public chunk lifecycle mutators are closed; accepted commands mutate through patch<Chunk> so on_update fires.
  • CMake/vcpkg impact: None.
  • Stacked PR base: world-generation.

How was this tested?

  • CMake configure/build succeeded
  • Tests passed locally, or missing tests are explained below
  • vcpkg dependencies restore/install correctly
  • Changed gameplay or simulation behavior was manually tested
  • Tile, island, and territory expansion interactions still behave as expected
  • Biome-specific resources, monsters, and buildings still behave as expected
  • Client/server behavior was checked, if affected
  • Save/load or persistence behavior was checked, if affected
  • Performance was considered for large islands, expanded maps, or busy automation setups

Test details:

Windows x64 / Visual Studio 2026
cmake --preset debug
cmake --build --preset debug
ctest --test-dir out/build/debug --output-on-failure

Result: 1/1 tests passed.
Coverage includes command application, EnTT update notifications, seed/coordinate forwarding, and chunk load-order independence.

Screenshots or recordings

N/A

Checklist

  • Documentation or README changes were added, if needed
  • New dependencies, tools, assets, or configuration changes are documented
  • Generated files, local-only settings, secrets, and credentials were not introduced
  • Breaking changes, save migrations, or protocol changes are clearly described
  • Review notes are included for risky or non-obvious changes

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0cb80d97-b282-4d50-a541-1e5df8ed68cf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@utilForever utilForever changed the title [Common] Add command interface for authoritative state mutation [Common] Command interface for authoritative state mutation Aug 9, 2026
@utilForever
utilForever requested a review from BaeJiwoo August 9, 2026 04:43
@utilForever utilForever self-assigned this Aug 9, 2026
@utilForever
utilForever requested a review from jinmiles August 9, 2026 04:43
@utilForever utilForever added C-common Category: Common system S-waiting-for-review Status: The PR is ready for review. T-feature Type: A request for a new feature. labels Aug 9, 2026
@utilForever
utilForever marked this pull request as ready for review August 9, 2026 04:44
Comment thread common/include/islewright/common/world.hpp
Base automatically changed from world-generation to main August 12, 2026 10:30

@BaeJiwoo BaeJiwoo 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.

Looks good to me.
I reviewed command.hpp, rng.hpp, world.cpp.
I hople merge conflicts are being resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-common Category: Common system S-waiting-for-review Status: The PR is ready for review. T-feature Type: A request for a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Common] Command interface for authoritative state mutation

2 participants