Skip to content

Compose protected region bootstrap and durable binding acknowledgements - #3315

Merged
benhook1013 merged 76 commits into
developfrom
codex/gameplay-region-runtime-owner-20261027
Oct 29, 2026
Merged

benhook1013 merged 76 commits into
developfrom
codex/gameplay-region-runtime-owner-20261027

Conversation

@benhook1013

@benhook1013 benhook1013 commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Compose the World and region consumer boundary: exact initial-location and lifecycle reads, region initialization with lease/fence ownership, and durable binding acknowledgement. The Entity runtime-reference producer and passive client are inherited from merged #3341. Current head b7bf14e1dd10 targets develop 918d8d221eb6; the unique comparison is 76 files.

The later CI-only correction raises Game Session's job budget from 60 to 90 minutes, preserving every full native, static, packaging and cleanup check and all other module limits. On 9a3fd6d4de40, Game Session hit GitHub's explicit one-hour timeout; the complete 39-job inventory had no other module failures. The existing required-gate/summary contracts, actionlint and canonical tracked YAML lint pass for this correction. Replacement exact-head CI is pending. Both review channels remain closed by the User; earlier review results retain their original source attribution.

Region initialization completes descriptor, script, connection, application-principal and current-source checks before its one-use SQL claim, then immediately sends the sole EVAL on that prepared connection. A deterministic preflight failure retains the first permission. A stop after the claim or an ambiguous send preserves the original held scope; it does not grant another creation permission or automatic recovery. The bridge joins canonical and operational region identity, and reconstructs retained World requests through the shared owner helper.

This batch also corrects two maintenance blockers: the physical Redis response-loss fixture now drops only a genuinely sufficient AOF acknowledgement and retries the same original closure after insufficient responses; Node tooling consumes the exact canonical pin without a duplicate major-24 policy. Production Redis durability requirements are unchanged. The proposed Redis and Node updates remain in their separate Renovate PRs.

R1028 passes all seven region-lease native cases and the two fixed UUID/nil unit cases, with enabled affected analysis, formatting and documentation checks. R1034 passes all 28 physical LoginContext cases with the exact proposed Redis digest 21090af93f83… and Node 26.13.0, plus the workflow authority contract, locked frontend lint/build and OpenAPI consumers. Original pin files were restored before publication. These are focused component and tooling proofs; controlled upstream sources, issuer incarnation and test PKI do not establish production custody, registration, activation or a complete public player journey.

CLI10, CLI11 and the retained final CLI12 accepted fixes are published and recorded. CLI12’s five informational findings are fixed in this head: the lock-order fixture now instruments the actual production bridge sequence, its polling yields between observations, and recovery/proof detail has one canonical documentation owner. R1040 passes all seven native region-owner cases plus enabled main/integration static analysis, formatting and documentation checks. The User closed both Hosted and CLI channels; no further discovery is planned. All 13 retained review threads are resolved at the current source refresh. Current receiving CI remains required before merge; historical green results do not establish this head’s CI.

FireMUD LOC impact

Compared 918d8d221eb6 → b7bf14e1dd10 (PR merge-base → head).
PR scope: 76 changed files · 14,901 added textual lines / 191 deleted textual lines.

Section Base LOC Head LOC Δ LOC Change
Overall 1,396,143 1,409,835 +13,692 +1.0%
 Source 1,303,009 1,316,667 +13,658 +1.0%
  ↳ Code 581,846 588,711 +6,865 +1.2%
  ↳ Tests 721,163 727,956 +6,793 +0.9%
 Markdown 61,721 61,755 +34 +0.1%
 Design 64,676 64,710 +34 +0.1%
  ↳ Architecture 45,862 45,873 +11 +<0.1%
  ↳ Project management 6,178 6,201 +23 +0.4%
  ↳ Observability 2,147 2,147 0 0.0%
  ↳ Operator runbooks 579 579 0 0.0%
  ↳ gRPC API documentation 8,433 8,433 0 0.0%
  ↳ Product requirements and user journeys 926 926 0 0.0%
  ↳ Developer workflows 472 472 0 0.0%
  ↳ Other design 79 79 0 0.0%

Rows are hierarchical and overlapping views; do not add them together.
LOC means cloc code lines; blank and comment-only lines are excluded.

…meplay-2972-first-new-owner-local-20261026

# Conflicts:
#	design/project-management/ai-observations.md
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Summary

Summary

  • Entity Management Service adds ReadPreseededActorRuntimeReference for trusted, same-namespace Game Session callers. Entity assigns a durable numeric runtime identity from an exact assignment receipt. The read returns an existing projection and does not allocate or repair one.
  • World Management Service adds ReadInitialPlayerLocationRegion. It reads retained placement, current room-to-region mappings, and lifecycle evidence in a read-only repeatable-read snapshot. Game Session Service independently validates the lifecycle evidence.
  • Game Session Service adds manually composed region timeline and lease owners, durable executor fencing, and a first-NEW session-binding bridge. The bridge validates source and lease evidence, reads back the Redis binding, and records a durable acknowledgement. Acknowledgements remain immutable through retries, grant replacement, Account member repair, and definitive abort. These owners are not registered on the default path and do not establish player admission.
  • Contracts and documentation update Entity and World protobuf APIs, service contracts, runtime and operational guidance, Redis region-key projection, and implementation tracking. Redis scripts and descriptors support region leases, initial timeline setup, and session-binding bridge operations.
  • Schema and deployment add Entity migration V1022 and Game Session migrations V1041–V1044.2, including V1044.1. These migrations add runtime projections, region ownership and timeline preparation, bridge acknowledgements, retained-abort checks, and lease-bound runtime fencing. V1044.2 validates retained executor_fence values and converts the column from NUMERIC to BIGINT. Deployments must apply the migrations and provide the Game Session Redis scripts and descriptors.

Validation and gaps

  • The supplied objectives report R943 passing 37 selected native decision, Human, and region cases, and enabled affected static and formatting checks. Combined receiving R946 passed 15 native region, final-admission, and Account cases after the full parent carry. Earlier checkpoints include R932, R934, and R935; failed aggregate results are tracked separately. These are focused proofs, not full-suite results.
  • Exact-head remote CI is pending. The latest full review was triggered, but no findings were supplied. Current review-finding counts are unavailable.
  • Tests use controlled World and Entity responses and test PKI. They do not establish production custody, default registration, public admission, first-OPEN, or activation. Owners remain manually composed and unregistered.
  • Entity runtime-projection termination disposition and cleanup registration remain undefined. Whole-instance TERMINATED remains blocked pending cleanup and retention proof. If initial timeline preparation remains INITIALIZING after its one-time creation permission is consumed, no same-scope automated or operator repair exists.

The change adds Entity runtime references, an authenticated World region read, and manually composed Game Session region ownership. It also adds durable SQL and Redis state, lease fencing, session-binding bridge acknowledgements, database guards, and cross-service validation. Production registration and runtime admission are not established.

Changes: Entity runtime reference

Layer / File(s) Summary
Runtime projection and guarded read
protos/entity-management/v1/*, services/entity-management-service/src/main/java/..., services/entity-management-service/src/main/resources/db/migration/V1022__preseeded_runtime_actor_projection.sql
Entity allocates numeric runtime projections from completed assignment evidence. The same-namespace Game Session RPC reads existing projections without allocating or repairing missing state.
Projection and migration coverage
services/entity-management-service/src/test/...
Tests cover stable reads, selector checks, allocation races, retained assignments without backfill, and migration-history updates. Historical migration fixtures seed retained rows directly.

World region consequence

Layer / File(s) Summary
Authenticated region read
protos/world-management/v1/*, services/world-management-service/src/main/java/...
World adds a bounded region-read RPC. Its repeatable-read repository query checks retained placement, current lifecycle evidence, and exact room-to-region mappings.
Game Session evidence comparison
services/game-session-service/src/main/java/..., services/world-management-service/src/test/...
Game Session compares World’s response with a separate lifecycle read. Client and codec checks validate target, placement, lifecycle evidence, request identifiers, region assignment, and size bounds.

Region owner and bridge

Layer / File(s) Summary
Owner preparation and fencing
services/game-session-service/src/main/java/..., services/game-session-service/src/main/resources/db/migration/V1041__canonical_region_runtime_owner.sql, services/game-session-service/src/main/resources/db/migration/V1042__canonical_region_session_binding_bridge_ack.sql
Game Session persists region status and timeline preparation, then installs an epoch-1 timeline and durable executor fence from retained source and incarnation evidence.
Redis lease and binding operations
services/game-session-service/src/main/resources/redis/*, services/game-session-service/src/main/java/...
Scripts implement scoped lease acquisition, renewal, and readback; guarded timeline initialization; and session-binding probe, apply, and readback.
Bridge acknowledgement and database guards
services/game-session-service/src/main/java/..., services/game-session-service/src/main/resources/db/migration/V1042*, services/game-session-service/src/main/resources/db/migration/V1044*, services/game-session-service/src/test/...
The first-NEW bridge records Entity and World provenance and Redis readback before acknowledgement. Database guards validate retained abort sources and lease-bound decisions. Tests cover retries, changed grants, Redis loss, and runtime fences.

Supporting contracts and validation

Layer / File(s) Summary
Identity, lifecycle, and operational contracts
design/architecture/*, design/project-management/*, services/common-platform-core/src/main/java/..., services/common-platform-core/src/test/...
Documentation defines scoped runtimeEntityId, tenant-region tags, timeline retry boundaries, cleanup status, and validation outcomes. Common lifecycle evidence provides a deterministic read-request ID.

Priority: Normal

Estimated code review effort: 5 (Critical) | ~120 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant GameSession
  participant Entity
  participant World
  participant Redis
  participant Database
  GameSession->>Entity: Read existing runtime reference
  GameSession->>World: Read retained placement and region evidence
  GameSession->>World: Compare authenticated lifecycle evidence
  GameSession->>Database: Prepare timeline and bridge provenance
  GameSession->>Redis: Initialize timeline and acquire scoped lease
  GameSession->>Database: Install executor fence
  GameSession->>Redis: Apply and read back session binding
  GameSession->>Database: Record bridge acknowledgement
Loading
Merge Risk: Low · up to 61ee9

The change composes the first-NEW region bootstrap path and no concrete runtime defect was established. Before merge, mark runtime replacement as target state in the Entity design document and trim the run-level attribution from the observations entry. Current-head remote CI was still pending when this review was prepared.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description is detailed and substantive, but it does not follow the repository template. It has no '## Summary', '## What Changed', '## Validation', '## Notes', or '## Checklist' headings. Its val… Restructure the description to follow the repository template. Add a Summary section stating the purpose and user/operator-visible outcome, and link the related issues, trackers (#3315, #2973, #3320, #3341), and design docs. Add a What Chan…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title "Compose protected region bootstrap and durable binding acknowledgements" matches the main change: the PR wires the manually composed first-NEW region path (World placement/lifecycle reads, …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Compose protected region bootstrap and durable binding acknowledgements" matches the main change: the PR wires the manually composed first-NEW region path (World placement/lifecycle reads, Entity runtime-reference read, Game Session region lease owner, executor fence, bridge readback, and durable ACK persistence via V1041-V1044 migrations and new owner classes). It is specific and descriptive, though it omits the Entity runtime-reference read and the NUMERIC-to-BIGINT migration, which is acceptable since the title need not cover every detail.

Full details: Description check

Explanation

The description is detailed and substantive, but it does not follow the repository template. It has no '## Summary', '## What Changed', '## Validation', '## Notes', or '## Checklist' headings. Its validation content is spread through prose and does not list the commands actually run in the template's format. It also does not state whether './gradlew spotlessApply', './gradlew check', or './gradlew linkCheck lintMarkdown' ran; it mentions 'enabled affected static analysis, formatting and documentation checks' and says replacement exact-head CI is pending. The Checklist section is absent, so CLA, tracker, and review-checklist confirmations are not recorded. The description also relies heavily on internal run identifiers (R1028, R1034, R1040, CLI10-12) that a reviewer cannot resolve from the PR itself.

Resolution

Restructure the description to follow the repository template. Add a Summary section stating the purpose and user/operator-visible outcome, and link the related issues, trackers (#3315, #2973, #3320, #3341), and design docs. Add a What Changed section listing the main areas (World initial-location region read, Entity runtime-reference read, Game Session region lease/fence/bridge, migrations V1041-V1044.2, the CI timeout change). Add a Validation section listing the exact commands run, including './gradlew spotlessApply', './gradlew check' (or state that it has not been run and why), and './gradlew linkCheck lintMarkdown' because design docs changed. Add a Notes section for the pending exact-head CI, the stacked dependencies, and the unproved production admission. Add the Checklist with each item checked or explicitly unchecked, including the CLA item and the review-checklists item for auth/session and scripting changes. Replace unexplained internal run IDs with the commands and results they stand for.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Summary

✅ Full-stack smoke completed with Smoke Gate: success

  • ✅ Changes detection: success
  • ✅ Smoke Gate: success
  • ✅ PR Full-Stack Smoke: success

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Static Analysis Summary

✅ Static analysis checks passed

  • ✅ CodeQL gate: success
  • ✅ License gate: success

CodeQL breakdown

  • ⏭️ CodeQL analysis (java): skipped
  • ⏭️ CodeQL analysis (javascript-typescript): skipped

@github-actions

Copy link
Copy Markdown
Contributor

Security Summary

✅ Security checks passed or were intentionally skipped

  • ✅ Security gate: success
  • ✅ Trivy filesystem scan: success
  • ✅ Secret compliance validation: success

@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 3/5

[High impact] Adds new cross-service API methods and database schema for runtime actor identity.

Fix abort after region acknowledgement and shared-region admission before merging.

Findings

  1. P1 Abort fails after bridge success ▶
  2. P1 Later players cannot join ▶

Reviews (1) · Last reviewed commit: "docs(gameplay): record final protected-p..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Validation Summary

✅ All validation checks passed

  • ✅ Validation gate: success
  • ✅ Buf generation: success
  • ✅ Dockerfile lint: success
  • ✅ ShellCheck: success
  • ✅ Python script validation: success
  • ✅ Dev tool contract checks: success
  • ⏭️ Dev Tools README contract: skipped
  • ✅ YAML lint: success
  • ✅ Metrics cardinality policy check: success
  • ✅ Flyway migration sanity checks: success
  • ✅ gRPC transport configuration sanity checks: success
  • ✅ GitHub workflow lint: success
  • ✅ Helm chart lint: success
  • ✅ Helm render validation: success
  • ✅ Helm transaction proof: success
  • ✅ Validate Documentation: success
  • ✅ Frontend checks: success
  • ✅ Service build/test matrix: success

Coverage reports and failure logs are available in the workflow artifacts.

@benhook1013
benhook1013 changed the base branch from codex/gameplay-runtime-identity-association to codex/gameplay-current-issuer-membership-20261029 October 29, 2026 05:48
… codex/gameplay-2972-first-new-owner-local-20261026

Copy link
Copy Markdown
Owner Author

Review scope changed: the Entity runtime-reference producer and passive Game Session client, including their original SQL and proof, moved earlier to #3341. This PR now targets #3341 and retains its 71-file World/region consumer boundary. All 21 transferred postimages were preserved from published 7e75; prior 95-file reviews keep their original comparison history. Inherited parent fixes are reconciled, and current-head CI remains separate. Existing review controls are unchanged.

@benhook1013

Copy link
Copy Markdown
Owner Author

CodeRabbit CLI — 1 Found, 0/1/0 Accepted (Major/Minor/Trivial), 0 Routed
71 files · 2m 55s · 7edd5e2

…meplay-2972-first-new-owner-local-20261026

# Conflicts:
#	services/world-management-service/src/test/java/crossservice/net/firedevops/firemud/worldmanagement/tenant/WorldOriginalStartSessionPreparationOwnerCompositionCrossServiceTest.java
@benhook1013

Copy link
Copy Markdown
Owner Author

CodeRabbit CLI — 5 Found, 1/1/2 Accepted (Major/Minor/Trivial), 0 Routed
71 files · 3m 26s · 44c1d33

@benhook1013
benhook1013 changed the base branch from codex/gameplay-current-issuer-membership-20261029 to develop October 29, 2026 10:49
@benhook1013

Copy link
Copy Markdown
Owner Author

CodeRabbit CLI — 3 Found, 1/0/0 Accepted (Major/Minor/Trivial), 0 Routed
71 files · 2m 58s · a3792e6

@benhook1013

Copy link
Copy Markdown
Owner Author

CodeRabbit CLI — 5 Found, 0/0/5 Accepted (Major/Minor/Trivial), 0 Routed
74 files · 3m 53s · ba6154e

@benhook1013
benhook1013 enabled auto-merge October 29, 2026 12:21
@benhook1013
benhook1013 merged commit 3e6ed3c into develop Oct 29, 2026
187 checks passed
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.

1 participant