Gameplay: stage generic four-worker authority and settlement#85
Draft
ael-dev3 wants to merge 1 commit into
Draft
Gameplay: stage generic four-worker authority and settlement#85ael-dev3 wants to merge 1 commit into
ael-dev3 wants to merge 1 commit into
Conversation
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a draft, additive gameplay slice for the generic four-worker authority system. It is intentionally stacked on PR #82 and does not merge, seed, activate, backfill, deploy, or mutate production.
Dependency and exact refs
fix/realm-renderer-recovery-followupdc9ac4066cb4427dce733713e01789532fb661e3agent/generic-castle-workers-v1dbddbd6Review this PR after the base PR. It preserves the base schema prefix and appends only the generic worker suffix.
What this PR adds
realm_water_revision_v1:realm_worker_system_v1readiness singleton;castle_worker_v1roster;worker_assignment_v1authority;worker_node_occupation_v1generic node lease;worker_command_idempotency_v1command receipts;worker_assignment_schedule_v_1.genesis-001-castle-<castleId>-worker-01through-04.Public/private boundary
Public tables expose shared presentation only: castle/worker identity, lifecycle phase, route timing, resource kind, site, node lease, and scheduled transition metadata. They contain no FID, cargo, private accrual, balance, request key, or authentication data. Assignment, idempotency, settlement, and private resource state stay private.
State and settlement
Worker phases are
idle -> traveling_out -> gathering -> returning -> idle. A generic node lease is deleted when return begins, so another worker may take it. Caller-bound reads calculate exact server-time availability without writing. Scheduled expiry and explicit dispatch/recall commands materialize complete quanta; there is no per-minute write loop and no genericcollectcommand.Legacy cutover and activation
The generic system remains staged in this PR. No production seed, activation, backfill, migration, or deploy operation is included. The active gate requires the readiness singleton, an exact four-worker roster and digest for every founded castle, and zero legacy expedition, occupation, and schedule rows before activation. Protocol remains 3 until a later client-capability release opts into the generic worker methods.
Migration proof
The v12 fixture asserts the exact v11 prefix followed by refs 47–52 and populates one row in every new table. The read-only verifier checks prefix preservation, append-only ordering, populated fixture coverage, and public/private privacy boundaries.
Validation
git diff --checkResidual risks / follow-up
This PR deliberately leaves production activation, roster seeding/backfill, client capability negotiation, aggregate optimization, and full live-loop integration for follow-up PRs. The current staged gate fails closed until an explicit admin-reviewed activation path is added.