feat: 시계 reconciliation 워커와 명령 경계 완성
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
"coveredFields": [
|
||||
"input_event.accepted_game_tick",
|
||||
"input_event.accepted_clock_revision",
|
||||
"input_event.accepted_deadline_generation",
|
||||
"input_event.processing_game_tick",
|
||||
"input_event.processing_clock_revision",
|
||||
"input_event.processing_deadline_generation",
|
||||
"world_state.clock_tick",
|
||||
"world_state.last_turn_tick",
|
||||
"world_state.clock_revision",
|
||||
@@ -125,8 +129,16 @@
|
||||
{
|
||||
"key": "accepted-command-coordinate",
|
||||
"policy": "KEEP",
|
||||
"authorityFields": ["input_event.accepted_game_tick", "input_event.accepted_clock_revision"],
|
||||
"projectionFields": [],
|
||||
"authorityFields": [
|
||||
"input_event.accepted_game_tick",
|
||||
"input_event.accepted_clock_revision",
|
||||
"input_event.accepted_deadline_generation"
|
||||
],
|
||||
"projectionFields": [
|
||||
"input_event.processing_game_tick",
|
||||
"input_event.processing_clock_revision",
|
||||
"input_event.processing_deadline_generation"
|
||||
],
|
||||
"owner": "game-api/input-event"
|
||||
},
|
||||
{
|
||||
@@ -139,11 +151,15 @@
|
||||
},
|
||||
{
|
||||
"key": "movable-json-rule-anchors",
|
||||
"policy": "FORBID",
|
||||
"authorityFields": ["world_state.meta.turntime", "world_state.meta.starttime", "world_state.meta.tnmt_time"],
|
||||
"policy": "SHIFT",
|
||||
"authorityFields": [
|
||||
"world_state.meta.turntime",
|
||||
"world_state.meta.starttime",
|
||||
"world_state.meta.tnmt_time"
|
||||
],
|
||||
"projectionFields": [],
|
||||
"owner": "game-engine/world-meta",
|
||||
"migration": "Register typed columns or explicit participant adapters before exact reconciliation can complete."
|
||||
"owner": "game-engine/clock-operation",
|
||||
"migration": "Explicit adapter shifts registered ISO projections while typed tick columns remain authoritative."
|
||||
},
|
||||
{
|
||||
"key": "unification-wait",
|
||||
@@ -179,12 +195,12 @@
|
||||
{
|
||||
"keyPattern": "sammo:{profile}:auction:timer",
|
||||
"policy": "REBUILD",
|
||||
"status": "implemented-without-clock-revision-fence"
|
||||
"status": "implemented-with-clock-revision-phase-generation-fence"
|
||||
},
|
||||
{
|
||||
"keyPattern": "sammo:{profile}:tournament:state",
|
||||
"policy": "REBUILD",
|
||||
"status": "legacy-date-dual-write-required"
|
||||
"status": "implemented-with-tick-dual-write-and-clock-fence"
|
||||
}
|
||||
],
|
||||
"wallOnly": [
|
||||
|
||||
@@ -65,6 +65,19 @@ pop is one Redis operation: verify revision/phase, read `-inf..nowTick`, and
|
||||
remove the claimed members. A failed Redis rebuild therefore leaves the game in
|
||||
`RECONCILING`; process liveness alone is not readiness.
|
||||
|
||||
`applyNextClockProjection()` claims rows with `FOR UPDATE SKIP LOCKED` and uses
|
||||
PostgreSQL UTC wall time for claim/retry timestamps. One Redis Lua operation
|
||||
compares the active source revision, rebuilds the auction timer, conditionally
|
||||
replaces the exact tournament source snapshot, and writes target revision plus
|
||||
deadline generation. The DB finalizer then re-acquires the clock-operation lock
|
||||
and changes `RECONCILING -> RUNNING` only when target revision and generation
|
||||
still match. If the process dies after the Lua commit, retry observes the
|
||||
already-active target revision and performs only the DB finalizer.
|
||||
|
||||
An active legacy tournament containing only `nextAt`/`bettingCloseAt` is a
|
||||
fail-closed migration boundary. Reconciliation remains incomplete until its
|
||||
authoritative `nextTick`/`bettingCloseTick` dual-write exists.
|
||||
|
||||
## Lock order
|
||||
|
||||
All mutation paths use this order:
|
||||
@@ -101,7 +114,9 @@ future anchored realtime profiles as `PREOPEN`, and other profiles as
|
||||
`RUNNING`. Existing DateTime columns remain projections while tick columns are
|
||||
authoritative.
|
||||
|
||||
Exact reconciliation stays disabled while any registry participant is
|
||||
`FORBID`. In particular, Redis-only tournament dates and unification wait must
|
||||
be moved to durable tick/revision contracts before the operation can reach
|
||||
`RUNNING`. Removing these guards to make a partial operation pass is prohibited.
|
||||
Exact reconciliation stays disabled while an active registry participant is
|
||||
`FORBID`. Tournament writes now carry tick/revision/generation coordinates and
|
||||
are revision-fenced in Redis. The remaining unification wait participant must
|
||||
be moved from its `lastTurnTime` workaround to a durable suspension before that
|
||||
workflow can reach `RUNNING`. Removing this guard to make a partial operation
|
||||
pass is prohibited.
|
||||
|
||||
Reference in New Issue
Block a user