Files
core2026/docs/architecture/game-clock-participants.json
T

318 lines
12 KiB
JSON

{
"schemaVersion": 1,
"authority": "game-tick",
"tickPerTurn": 36000000,
"policies": ["SHIFT", "KEEP", "REBUILD", "FORBID"],
"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",
"world_state.deadline_generation",
"general.turn_tick",
"general.recent_war_tick",
"general.meta.next_change_tick",
"select_pool.reserved_until_tick",
"select_npc_token.valid_until_tick",
"select_npc_token.pick_more_from_tick",
"message.time_tick",
"message.valid_until_tick",
"message.occurred_game_tick",
"message_action.created_game_tick",
"message_action.expires_game_tick",
"message_action.resolved_game_tick",
"message_action.clock_revision",
"message_action.deadline_generation",
"inheritance_ledger.applied_clock_revision",
"inheritance_ledger.applied_deadline_generation",
"auction.open_tick",
"auction.close_tick",
"auction_bid.occurred_game_tick",
"vote_poll.start_tick",
"vote_poll.end_tick",
"clock_suspension.source_revision",
"clock_suspension.target_revision",
"clock_suspension.cut_tick",
"clock_suspension.catch_up_ticks",
"clock_suspension.gap_ticks",
"clock_suspension.shift_ticks",
"clock_suspension.aligned_tick",
"clock_projection_outbox.target_revision"
],
"wallTimeFields": [
"input_event.created_at",
"input_event.processing_at",
"input_event.completed_at",
"input_event.lease_until",
"read_model_outbox.available_at",
"read_model_outbox.locked_at",
"read_model_outbox.delivered_at",
"web_push_outbox.available_at",
"web_push_outbox.locked_at",
"web_push_outbox.delivered_at",
"turn_daemon_lease.lease_until",
"turn_daemon_lease.heartbeat_at",
"message.created_at_wall",
"message.delete_until_wall",
"message.tombstoned_at_wall",
"message_read_state.updated_at",
"diplomacy_letter.date",
"auction_bid.requested_at_wall",
"auction_bid.created_at",
"auction.finalizing_at",
"auction.finished_at",
"inheritance_ledger.requested_at_wall",
"inheritance_ledger.consumed_at_wall",
"inheritance_ledger.created_at_wall",
"clock_suspension.cut_wall_at",
"clock_suspension.resume_wall_at"
],
"excludedFromReconciliation": [
"all WALL_TIME created_at and updated_at audit fields",
"normal message envelope and five-minute deletion lifecycle",
"account and inheritance receipt timestamps",
"traffic and general-access periods",
"notification and outbox delivery/retry timestamps",
"daemon, worker, editor, gateway, and release leases",
"board, authentication, account, audit, and operator timestamps"
],
"participants": [
{
"key": "world-clock",
"policy": "REBUILD",
"authorityFields": ["world_state.clock_tick", "world_state.clock_revision"],
"projectionFields": ["world_state.clock_base_time", "world_state.clock_wall_anchor"],
"owner": "game-engine/clock-operation"
},
{
"key": "turn-cursor",
"policy": "SHIFT",
"authorityFields": ["world_state.last_turn_tick"],
"projectionFields": ["world_state.meta.lastTurnTime", "in-memory.checkpoint.turnTime"],
"owner": "game-engine/turn-daemon"
},
{
"key": "general-next-turn",
"policy": "SHIFT",
"authorityFields": ["general.turn_tick"],
"projectionFields": ["general.turn_time"],
"owner": "game-engine/turn-daemon"
},
{
"key": "selection-reselection-deadline",
"policy": "SHIFT",
"authorityFields": ["general.meta.next_change_tick"],
"projectionFields": ["general.meta.next_change", "general.meta.nextChangeAt"],
"owner": "game-engine/select-pool"
},
{
"key": "general-recent-war-occurrence",
"policy": "KEEP",
"authorityFields": ["general.recent_war_tick"],
"projectionFields": ["general.recent_war_time"],
"owner": "game-engine/battle"
},
{
"key": "auction-open-occurrence",
"policy": "KEEP",
"authorityFields": ["auction.open_tick"],
"projectionFields": [],
"owner": "game-engine/auction"
},
{
"key": "auction-bid-occurrence",
"policy": "KEEP",
"authorityFields": ["auction_bid.occurred_game_tick"],
"projectionFields": ["auction_bid.event_at"],
"owner": "game-engine/auction"
},
{
"key": "auction-deadline",
"policy": "SHIFT",
"authorityFields": ["auction.close_tick"],
"projectionFields": ["auction.close_at"],
"owner": "game-api/auction-worker"
},
{
"key": "auction-finalizing-recovery",
"policy": "REBUILD",
"authorityFields": ["auction.status", "world_state.deadline_generation"],
"projectionFields": ["redis.auction.timer"],
"owner": "game-api/auction-worker"
},
{
"key": "message-action-occurrence",
"policy": "KEEP",
"authorityFields": ["message_action.created_game_tick"],
"projectionFields": ["message.time", "message.time_tick"],
"rowScope": "messages with a message_action row only",
"owner": "game-engine/message-action"
},
{
"key": "message-action-expiry",
"policy": "SHIFT",
"authorityFields": ["message_action.expires_game_tick"],
"projectionFields": ["message.valid_until", "message.valid_until_tick"],
"rowScope": "messages with a message_action row only",
"owner": "game-engine/message-action"
},
{
"key": "message-action-clock-coordinate",
"policy": "REBUILD",
"authorityFields": ["message_action.clock_revision", "message_action.deadline_generation"],
"projectionFields": [],
"owner": "game-engine/message-action"
},
{
"key": "inheritance-effect-coordinate",
"policy": "KEEP",
"authorityFields": [
"inheritance_ledger.applied_clock_revision",
"inheritance_ledger.applied_deadline_generation"
],
"projectionFields": [],
"owner": "game-engine/inheritance"
},
{
"key": "vote-start-occurrence",
"policy": "KEEP",
"authorityFields": ["vote_poll.start_tick"],
"projectionFields": ["vote_poll.start_at"],
"owner": "game-api/vote"
},
{
"key": "vote-end-deadline",
"policy": "SHIFT",
"authorityFields": ["vote_poll.end_tick"],
"projectionFields": ["vote_poll.end_at"],
"owner": "game-api/vote"
},
{
"key": "select-pool-reservation",
"policy": "SHIFT",
"authorityFields": ["select_pool.reserved_until_tick"],
"projectionFields": ["select_pool.reserved_until"],
"owner": "game-engine/select-pool"
},
{
"key": "npc-selection-window",
"policy": "SHIFT",
"authorityFields": ["select_npc_token.valid_until_tick", "select_npc_token.pick_more_from_tick"],
"projectionFields": ["select_npc_token.valid_until", "select_npc_token.pick_more_from"],
"owner": "game-engine/npc-selection"
},
{
"key": "daemon-command-coordinate",
"policy": "KEEP",
"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-engine/input-event-claim"
},
{
"key": "tournament-deadlines",
"policy": "REBUILD",
"authorityFields": ["redis.tournament.state.nextTick", "redis.tournament.state.bettingCloseTick"],
"projectionFields": ["redis.tournament.state.nextAt", "redis.tournament.state.bettingCloseAt"],
"owner": "game-api/tournament-worker",
"migration": "Redis-only legacy dates must dual-write ticks before exact reconciliation is enabled."
},
{
"key": "movable-json-rule-anchors",
"policy": "SHIFT",
"authorityFields": [
"world_state.meta.turntime",
"world_state.meta.starttime",
"world_state.meta.tnmt_time"
],
"projectionFields": [],
"owner": "game-engine/clock-operation",
"migration": "Explicit adapter shifts registered ISO projections while typed tick columns remain authoritative."
},
{
"key": "unification-wait",
"policy": "REBUILD",
"authorityFields": [
"world_state.meta.isunited",
"world_state.meta.unificationClockSuspensionId",
"clock_suspension.cut_tick",
"clock_suspension.cut_wall_at"
],
"projectionFields": ["world_state.meta.lastTurnTime"],
"owner": "game-engine/unification",
"migration": "Implemented as one exact alignment, optional rate change, invader creation, and revisioned outbox transaction."
},
{
"key": "clock-operation-ledger",
"policy": "KEEP",
"authorityFields": [
"clock_suspension.source_revision",
"clock_suspension.target_revision",
"clock_suspension.cut_tick",
"clock_suspension.catch_up_ticks",
"clock_suspension.gap_ticks",
"clock_suspension.shift_ticks",
"clock_suspension.aligned_tick",
"clock_projection_outbox.target_revision"
],
"projectionFields": [],
"owner": "game-engine/clock-operation"
}
],
"redis": [
{
"keyPattern": "sammo:{profile}:clock:active-revision",
"policy": "REBUILD",
"status": "implemented-with-db-phase-and-deadline-generation-fence"
},
{
"keyPattern": "sammo:{profile}:auction:timer",
"policy": "REBUILD",
"status": "implemented-with-clock-revision-phase-generation-fence"
},
{
"keyPattern": "sammo:{profile}:tournament:state",
"policy": "REBUILD",
"status": "implemented-with-tick-dual-write-and-clock-fence"
}
],
"wallOnly": [
"input_event.created_at",
"input_event.processing_at",
"input_event.completed_at",
"input_event.lease_until",
"turn_daemon_lease.lease_until",
"turn_daemon_lease.heartbeat_at",
"clock_suspension.cut_wall_at",
"clock_suspension.resume_wall_at",
"clock_projection_outbox.available_at",
"clock_projection_outbox.locked_at",
"clock_projection_outbox.applied_at",
"message.created_at_wall",
"message.delete_until_wall",
"message.tombstoned_at_wall",
"message_action.created_at_wall",
"message_action.updated_at_wall",
"auction.created_at",
"auction.updated_at",
"auction_bid.requested_at_wall",
"auction_bid.created_at",
"inheritance_ledger.requested_at_wall",
"inheritance_ledger.consumed_at_wall",
"*.created_at",
"*.updated_at"
]
}