You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Retain historical FINAL evidence during Account fence acquisition - #3425
The eight-file 3a99687d comparison on #34242b915f00 retains the V1065.2 historical FINAL observation. The test-layout carry preserves the original scope. Focused physical proof verified the carried fence/history cases and the active review record retains its completed rounds.
Historical FINAL during Account fence acquisition
The Game Session fence owner retains an independently verified physical FINAL as immutable historical evidence when the same acquisition revalidates the exact no-active epoch, original attempt and frozen inventory. Missing or stale evidence keeps the protective SQL fence. Unwitnessed events remain indeterminate. The receipt carries no admission, release, rearm or successor authority.
Four exact local PostgreSQL and Redis cases passed at 481481f5. They cover witnessed FINAL, SQL acquisition before delayed FINAL, the unobserved crash window and the installed V1065.2 catalog seal. Integration compilation and affected Checkstyle passed. Fresh required CI is pending. This stage builds on #3424, with admitted logout in #3428.
Auto reviews are disabled on this repository. 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.
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
No actionable comments were generated in the recent review.
Summary
Summary
This change adds retained historical FINAL evidence to Game Session account-fence acquisition. It affects the game-session-service runtime, its Flyway migrations, its runtime-family catalog, and its design documentation. The diff touches 6 files, with 749 lines added and 36 removed.
Behavior changes
The account fence owner can observe a physical FINAL before it creates its SQL fence intent.
The owner retains the observation as a historical receipt only when the same acquisition revalidates:
the prior no-active fence,
the inventory revision,
the exact original attempt, candidate, and frozen cohort.
If evidence is missing, expired, or displaced, ordering stays indeterminate. The protective SQL fence is still established.
The receipt does not promote frozen inventory. It does not authorize admission, release, rearm, or successor installation.
If the pre-intent read throws a RuntimeException, the original intent path runs without observation evidence.
A read method returns the observation only when its intent, account, inventory revision, cohort digest, and target digest still match.
Adds beginFenceIntentWithFinalObservation, the optional pre-intent FINAL observation entry point. It calls readFinalBeforeAccountIntent on the capacity owner.
Locks the inventory clock through a shared helper. The intent and CLOSED-readback paths still request a lock.
Persists the observation only when the previous fence and locked inventory revision match, and the trusted clock is before the deadline.
retainCommittedBeforeCleanup obtains the execution through retainedExecution. It delegates provisional FINAL recovery to readProvisionalFinal, commits the recovered admission, verifies a COMMITTED exact snapshot, retains its terminal proof, and returns a fresh exact read.
Adds readFinalBeforeAccountIntent(request, reservation, deadline). It requires a PROVISIONAL transition and returns a HistoricalFinalReadback record.
Schema and migration changes
New migration V1065.2__account_fence_historical_final_observation.sql:
Adds the table game_session_account_fence_final_observation, keyed by operation.
Links each row to the account's acquisition intent, transition, and execution. Check constraints cover candidate, session, cohort, and barrier digests, timestamps, and inventory revision.
Insert validation requires a matching acquisition intent at the expected fence epoch, NO_ACTIVE_ACCOUNT_WIDE_FLOW control state, a matching provisional cohort row for the candidate, and an authorized execution for the transition, attempt, and tenant.
Updates, deletes, and truncation are rejected.
Classifies the table as retained control-only evidence.
Updates the runtime-family catalog functions and epoch to include 1065.2.
Combined catalog epoch changes from 13 to 14. The epoch-installation test now rejects epochs 1–14 and 16, and installs epoch 15.
Installs that already contain 1065.1 must apply 1065.2 before the catalog epoch 14 checks pass.
Documentation
design/architecture/microservices/game-session-service/runtime-and-data.md describes the V1065.2 normal-handoff ordering and the receipt limits. It also lists 1065.2 among the installing migration markers that the pre-installation seal excludes, raising that count from thirteen to fourteen.
Expects catalog epoch 14 and includes 1065.2 in installed-history checks.
Adds a populated-upgrade test from 1065.1 to 1065.2. It checks that predecessor rows, classifications, epochs through 13, history, and snapshot evidence are retained, and that the new family is CONTROL with OWNER_POLICY_RETAINED in epoch 14.
The metadata-guard test attempts to insert epoch 15 using epoch 14's catalog bytes.
Validation status
The author reports four local PostgreSQL and Redis cases passed at commit 481481f5. These cover witnessed FINAL, SQL acquisition before delayed FINAL, the unobserved crash window, and the installed V1065.2 catalog seal. This review did not run them.
The author reports integration compilation and affected Checkstyle passed. Not verified in this review.
Fresh required CI is pending. Current CI status: not available.
Two CodeRabbit CLI findings at 834707d and zero findings at 12651dc are reported. A hosted review reported two findings at ca5d37f. The finding details are not available.
Review notes
Changes are confined to the account fence path and its catalog. Admission, release, and rearm behavior do not change.
The stated stage depends on a prior change (#3424). Admitted logout is in a later change (#3428).
The account-fence flow reads physical FINAL evidence before acquisition intent creation. It retains evidence only when acquisition revalidates the fence, inventory revision, deadline, and matching transition data. A new migration stores the evidence as immutable, control-only data and updates the runtime-family catalog.
Changes: Account-fence historical FINAL
Layer / File(s)
Summary
Read and recover provisional FINAL services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/CanonicalGameplayOriginalNewCapacityExecutionOwner.java
The capacity execution owner reads a provisional FINAL before account-intent creation. Committed-capacity retention uses the exact recovered readback.
Capture and bind fence observation services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/CanonicalGameplayAccountAdmissionBarrierRepository.java, services/game-session-service/src/main/resources/db/migration/V1065.2__account_fence_historical_final_observation.sql, design/architecture/microservices/game-session-service/runtime-and-data.md
The barrier captures physical FINAL evidence before creating intent. It persists evidence only when the fence, inventory revision, deadline, and matching transition checks pass. The migration adds immutable storage and validation constraints. The documentation describes the evidence limits and catalog update.
Validate observation and catalog behavior services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/repository/CanonicalGameplayOriginalNewFinalAdmissionOwnerIntegrationTest.java, services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/repository/GameSessionRuntimeFamilyCatalogPostgresIntegrationTest.java
Integration tests cover acquisition ordering, observation retention conditions, immutable evidence, and runtime-family catalog migration and epoch updates.
sequenceDiagram
participant Barrier as Account admission barrier
participant Owner as Capacity execution owner
participant SQL as SQL database
Barrier->>Owner: Read provisional FINAL before account intent
Owner-->>Barrier: Return historical FINAL readback
Barrier->>SQL: Create acquisition intent
Barrier->>SQL: Persist observation if acquisition checks pass
Loading
Merge Risk: Minimal · previous review e092d
This change retains FINAL evidence as immutable history during fence acquisition. It grants no admission, release or successor authority. Review found no actionable merge-blocking risk, subject to the pending CI passing.
Pre-merge checks: 3 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Description check
The description covers the purpose and outcome clearly. It states that the change retains independently verified physical FINAL evidence as immutable historical evidence during Game Session account fe…
Restructure the description to follow the repository template headings: Summary, What Changed, Validation, Notes, and Checklist. Under What Changed, list the main areas: the V1065.2 migration (game_session_account_fence_final_observation ta…
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title "Retain historical FINAL evidence during Account fence acquisition" matches the main change. The raw summary and PR objectives both describe a new read and retention path for physical FINAL …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "Retain historical FINAL evidence during Account fence acquisition" matches the main change. The raw summary and PR objectives both describe a new read and retention path for physical FINAL evidence during account-fence acquisition, with the V1065.2 migration and catalog updates supporting it. The title is specific and concise, and it names the primary behavior.
Full details: Description check
Explanation
The description covers the purpose and outcome clearly. It states that the change retains independently verified physical FINAL evidence as immutable historical evidence during Game Session account fence acquisition. It explains that missing or stale evidence keeps the protective SQL fence, and that the receipt grants no admission, release, rearm, or successor authority. It references the related PR chain (#3424, #3428) and the V1065.2 migration. The Validation content is partly present: it lists four exact local PostgreSQL and Redis cases, integration compilation, and affected Checkstyle. Required items are missing: the template asks for ./gradlew spotlessApply, ./gradlew check, and ./gradlew linkCheck lintMarkdown (the raw summary says design markdown changed), and the author does not state whether those were run. The Notes, the Checklist (including the CLA and design-tracker items), and the explicit template headings (Summary, What Changed, Validation, Notes, Checklist) are absent. The description uses a different structure with a generated LOC report. The description's current-comparison wording is also hard to follow for a reviewer.
Resolution
Restructure the description to follow the repository template headings: Summary, What Changed, Validation, Notes, and Checklist. Under What Changed, list the main areas: the V1065.2 migration (game_session_account_fence_final_observation table), the CanonicalGameplayAccountAdmissionBarrierRepository and CanonicalGameplayOriginalNewCapacityExecutionOwner changes, and the runtime-family catalog update to epoch 14 with the design doc updates. Under Validation, list the commands actually run and state the result of each. Run and report ./gradlew spotlessApply and ./gradlew check, or state why they were not run. Run and report ./gradlew linkCheck lintMarkdown because design markdown changed. Under Notes, add the follow-ups, the pending fresh CI, and the stacking on #3424 and #3428. Complete the Checklist, including the design tracker and review-checklist items if the change touches the auth/session contract. Replace the opaque 'eight-file 3a99687 comparison' and 'test-layout carry' wording with plain statements of what changed.
Finishing Touches
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.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
⚠️ Known PLAY failed: ERROR ENTITLEMENT_UNAVAILABLE after LOGIN. Canonical PLAY transition exception accepted; no runtime qualification or publication.
✅ Changes detection: success
✅ Smoke Gate: success
❌ PR Full-Stack Smoke: failure (known PLAY exception accepted; no runtime qualification or publication)
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
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.
Current comparison
The eight-file
3a99687dcomparison on #34242b915f00retains the V1065.2 historical FINAL observation. The test-layout carry preserves the original scope. Focused physical proof verified the carried fence/history cases and the active review record retains its completed rounds.Historical FINAL during Account fence acquisition
The Game Session fence owner retains an independently verified physical FINAL as immutable historical evidence when the same acquisition revalidates the exact no-active epoch, original attempt and frozen inventory. Missing or stale evidence keeps the protective SQL fence. Unwitnessed events remain indeterminate. The receipt carries no admission, release, rearm or successor authority.
Four exact local PostgreSQL and Redis cases passed at
481481f5. They cover witnessed FINAL, SQL acquisition before delayed FINAL, the unobserved crash window and the installed V1065.2 catalog seal. Integration compilation and affected Checkstyle passed. Fresh required CI is pending. This stage builds on #3424, with admitted logout in #3428.FireMUD LOC impact
Compared
2b915f00ea91→3a99687d382b(PR merge-base → head).PR scope: 8 changed files · 749 added textual lines / 30 deleted textual lines.
Rows are hierarchical and overlapping views; do not add them together.
LOC means cloc code lines; blank and comment-only lines are excluded.