Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,20 @@ jobs:
--require-case 'integration.net.firedevops.firemud.gamedesign.repository.GameTenantCreationRepositoryIntegrationTest#concurrentDuplicateCreationRequestsConvergeOnOneUuidAndReceipt()' \
game-design-service

- name: Verify Account fresh UUID pair and snapshot PostgreSQL proof
if: ${{ !cancelled() && matrix.module == 'account-service' }}
run: |
bash dev-tools/validation/inspect-test-results.sh \
--strict \
--require-suite integration.net.firedevops.firemud.accountservice.repository.AccountMembershipPairAuthorityRepositoryIntegrationTest \
--require-suite net.firedevops.firemud.accountservice.AccountFreshUuidMembershipSnapshotIntegrationTest \
--require-case 'integration.net.firedevops.firemud.accountservice.repository.AccountMembershipPairAuthorityRepositoryIntegrationTest#v39PreservesRetainedPairHistoryAndEnforcesUuidOnlyFreshRows()' \
--require-case 'integration.net.firedevops.firemud.accountservice.repository.AccountMembershipPairAuthorityRepositoryIntegrationTest#v39RefusesToRewriteAnExistingFreshNumericPair()' \
--require-case 'net.firedevops.firemud.accountservice.AccountFreshUuidMembershipSnapshotIntegrationTest#freshUuidSnapshotEnrollsExactNonAdmittingBaselineAndRetriesWithoutSideEffects()' \
--require-case 'net.firedevops.firemud.accountservice.AccountFreshUuidMembershipSnapshotIntegrationTest#freshUuidSnapshotRejectsAdvancedTenantGenerationAndRollsBackBaselineWrites()' \
--require-case 'net.firedevops.firemud.accountservice.AccountFreshUuidMembershipSnapshotIntegrationTest#concurrentFreshUuidSnapshotCallsInitializeOneExactPairBaseline()' \
account-service

- name: 🔎 Verify Game Session PostgreSQL proof case
if: ${{ matrix.module == 'game-session-service' }}
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Account V29 keeps the numeric `accounts.id` primary key and adds an immutable ca

The current Unit 1B draft adds V31 positive authority-generation rows and an account-local issuance fence, enrolls the exact JWT issuer idempotently at startup, initializes new global Account UUID generation and fence in the registration transaction, and enrolls a canonical tenant generation only after approved retained-row association readback. V34 enrolls retained Account UUIDs into both Account generation and fence state without resetting an advanced pair; a half-pair aborts. V33 provides independently sequenced immutable authority events, and the shared closed membership-event codec has Account/Game Session canonicalization vectors. The local V36 candidate adds an Account-owned durable authority row for each verified Account/tenant pair: a never-joined pair has positive version and generation at sequence zero before JOIN, while the first JOIN advances version to two and event sequence to one without independently advancing generation. Its sequence-zero read requires pair provenance, row/receipt/event absence, and the complete tuple under one Account fence; it never grants admission. Retained positive rows can enroll only from exact current event and receipt evidence without renumbering, while contradictory and inactive retained rows remain denied. The current explicit JOIN candidate composes the approved retained tenant UUID, membership generation and fence, role snapshot, canonical V33 event, receipt, audit, and terminal operation in its Account transaction; exact replay and abandoned-`PENDING` recovery require event readback. Retained inactive reactivation still denies without a canonical current INACTIVE event, and the runtime RPC, event delivery/Redis projection, Game Session consumer, and fresh-tenant UUID handoff remain open. Neither V31/V36 enrollment nor this JOIN-local event fences an old issuer binary or completes token issuance. V35 is an unwired Account-owned connect-issuance operation/envelope storage candidate; production issuance still uses the legacy path, and key-ring deployment and exact-result recovery proof remain open. Detailed current proof and rollout limits remain in the [player access and session tracker](../../../project-management/implementation-tracking/player-access-and-session.md).

The selected fresh-tenant Account consumer is a UUID-only owner boundary, separate from retained-manifest import and membership authority. The Account normal workload authenticates to Game Design's `ResolveFreshTenantCreation` read, verifies the exact operation-bound request, digest, source, and receipt evidence, then stores an immutable canonical-UUID association under a claim index shared with retained associations; that index must reject conflicts regardless of which evidence path arrives first. Only after exact source readback may Account commit the association and invoke existing tenant-generation initialization without resetting existing state. This #2915 implementation is in progress and has no passing focused consumer/transaction/readback proof; the strict producer/readback database suite failed as recorded in the tracker. It creates no numeric Account tenant alias or selector and does not enroll membership or enable any runtime path. The identity direction is owned by [Multi-Tenancy](../../system-architecture-multi-tenancy.md#canonical-identity-and-retained-key-bridge), and Game Design's evidence contract by its [API contract](../game-design-service/api-contracts.md#fresh-tenant-creation-operation-and-account-readback).
The fresh-tenant Account consumer is a UUID-only owner boundary, separate from retained-manifest import and membership authority. The Account normal workload authenticates to Game Design's `ResolveFreshTenantCreation` read, verifies the exact operation-bound request, digest, source, and receipt evidence, then stores an immutable canonical-UUID association under a claim index shared with retained associations; that index rejects conflicts regardless of which evidence path arrives first. Only after exact source readback may Account commit the association and invoke existing tenant-generation initialization without resetting existing state. The #2915 source and association components now have passing focused PostgreSQL proof, with the limits recorded in [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md); mocked client and local TLS construction are not live authenticated handoff or activation proof. They create no numeric Account tenant alias or selector and enable no runtime path. The identity direction is owned by [Multi-Tenancy](../../system-architecture-multi-tenancy.md#canonical-identity-and-retained-key-bridge), and Game Design's evidence contract by its [API contract](../game-design-service/api-contracts.md#fresh-tenant-creation-operation-and-account-readback).

The V39 candidate extends the existing pair authority table for that UUID-only association: a fresh pair has no legacy numeric tenant key, while an approved retained pair keeps its positive one-to-one bridge unchanged. Contradictory preexisting fresh numeric keys abort migration without reinterpretation or deletion. A fenced fresh-UUID producer reads back the exact immutable association and constructs the existing complete, nonadmitting never-joined snapshot from its positive pair baseline and pristine upstream authority. It does not create membership or event history, support fresh positive JOIN, reset progressed authority, or enable the runtime RPC; canonical request propagation, advanced source-event support and their producer/consumer proof remain open in the tracker.

Account implements bounded owner-local cleanup of expired password-reset, email-verification, and email-login-challenge SQL rows, with per-family deleted-row counts and oldest-expired-row lag metrics. The cleanup uses the same process-local wall-clock basis as current credential issuance and validation against timezone-less SQL timestamps; cross-node timezone normalization and existing-row migration are not established by this cleanup. Focused unit proof in `ExpiredCredentialCleanupJobTest` has executed locally; PostgreSQL repository integration cases in `CredentialCleanupRepositoryIntegrationTest` compile but were skipped because Docker was unavailable. This cleanup does not claim atomic token consumption, session revocation, or completion of the full [ADR 0163](../../decisions/adr-0163-service-owned-retention-classes-with-cross-service-safety.md) retention contract; shared retention classes, dependency horizons, blockers, holds, and cross-service proof remain outstanding.

Expand Down Expand Up @@ -193,7 +195,7 @@ Runtime caller contract:
- Minimum request fields: `accountId`, `tenantId`, `requestId`.
- Target minimum response fields: `accountId`, `tenantId`, `membershipExists`, `membershipLifecycleState`, `authorityAvailability`, `roles[]`, `gameplayAdmissionAllowed`, `membershipVersion`, `membershipAuthorityGeneration`, `authorityTuple`, `evaluatedAt`, and the applicable `outboxCheckpoints[]` entry for the membership authority stream.
- `membershipAuthorityGeneration` is an opaque Account-owned value. Runtime callers compare it only for exact freshness/equality and must not infer ordering or authority from its representation. It is the authoritative generation for connect-token issuance, gameplay-token refresh, gameplay binding and reconnect validation, and membership revocation.
- `GetTenantMembershipForRuntime` requires `authorityAvailability=AVAILABLE` before its snapshot can authorize admission; `UNAVAILABLE` is an authority failure, not missing or `INACTIVE` membership and cannot produce `JOIN_REQUIRED`. The generated proto and Account producer emit `membershipLifecycleState` and `membershipAuthorityGeneration`. Game Session `PLAY` validates lifecycle consistency against `membershipExists`, `gameplayAdmissionAllowed`, and `membershipVersion`, and rejects a missing or nonpositive generation. It does not validate `authorityAvailability`, roles, the complete tuple, or outbox checkpoints; those fields are absent from the current response. The live Account RPC still rejects before data access, so mocked consumer checks do not establish a fresh atomic target snapshot or fail-closed proof over its complete evidence bundle.
- `GetTenantMembershipForRuntime` requires `authorityAvailability=AVAILABLE` before its snapshot can authorize admission; `UNAVAILABLE` is an authority failure, not missing or `INACTIVE` membership and cannot produce `JOIN_REQUIRED`. The current candidate proto and Account encoder carry lifecycle, roles, the exact one-tenant version map, the authority tuple, issuance fence, checkpoints, and separate source-event evidence. Game Session's candidate validates their correspondence and denies unsupported advanced upstream authority rather than resetting its checkpoints. The candidate does not yet carry explicit `authorityAvailability`, and its request selectors still use retained numeric identities. The live Account RPC rejects before data access; neither mocked responses nor the disabled encoder establish a live Account-authenticated snapshot, a fresh-UUID request handoff, or admission. Detailed implementation and proof limits belong to [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md).
- `GetTenantEntitlementsForRuntime(tenantId, requestId)` is the authoritative internal entitlement surface for gameplay/runtime flows. Runtime callers may cache its positive result only under the strict-new-commitment and bounded-continuity rules in [ADR 0028](../../decisions/adr-0028-differentiated-entitlement-freshness.md); the cache never becomes a second writer.
- Minimum request fields: `tenantId`, `requestId`.
- For target player-admission calls only, the minimum request additionally carries `callerAccountId`, `verifiedConnectScopeId`, and the exact resolved target bundle. Game Session supplies these fields as trusted typed execution/request context; the private `game-session-account-delegation` JWT carries its declared Account authority but does not carry `verifiedConnectScopeId` or the complete runtime target bundle. Account requires `callerAccountId` to equal the authenticated delegation JWT's `accountId`/`sub` and the exact bound Game Session subject, then verifies the scope and target fields against the signed connect scope and current exact target before returning the already-declared caller/target-bound evidence. World Management's tenant/operation-bound lifecycle calls retain their separate operation context and do not fabricate player-binding fields.
Expand Down
5 changes: 5 additions & 0 deletions design/project-management/ai-observations.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,8 @@ Entry format:
- Context: the complete Account snapshot/first-JOIN test held the Account row `FOR UPDATE` and waited for JOIN's explicit Account-lock spy. JOIN first inserts its PENDING intent, whose foreign-key check can already wait on that same row.
- Observation: exact CI timed out at the later spy, not at a source invariant. Instrumenting the actual intent-insert backend before the real insert retained the exact `pg_blocking_pids` correlation and complete before/after DTO assertions; corrected CI `36778631119` executed the race once successfully. Worker exceptions are surfaced rather than hidden behind a latch timeout.
- Expected pattern: trace earlier foreign-key and deferred-trigger work before selecting a concurrency signal; prove the exact blocked backend/owner relation and do not fix a misplaced signal by extending timeouts or changing production transaction order.

- `2026-10-01`: Consume the final validation result before committing a claimed green checkpoint
- Context: a final #2917 tracker edit began a paragraph with a PR hash, which Markdown lint interpreted as a malformed heading. The documentation gate exited nonzero, but its redirected log was not inspected before the local commit.
- Observation: no push occurred; inspection identified the lint failure and the unvalidated claim was corrected in a follow-up commit. Earlier successful documentation checks did not cover that last edit.
- Expected pattern: consume every final gate's exit status and failure log before committing or publishing proof claims; after a status-only edit, validate that exact edited scope rather than inheriting the preceding green result.
2 changes: 1 addition & 1 deletion design/project-management/design-alignment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The preserved 5B implementation work was rebuilt into #2826 Schema, the dependen
| Section | Original scope | Status | Main PR | Evidence / routed work |
| --- | --- | --- | --- | --- |
| 1A | Identity, entitlement, and hosted terms | Provisional; earlier broad discovery closed by judgment, required implementation and proof open | [#2840](https://github.com/benhook1013/FireMUD/pull/2840) | The refreshed 29-source unit had no taper finding; #2846–#2848 are stacked correction drafts, not merge or activation proof. #2848 contains Account gRPC/provider fail-closed boundaries, atomic recovery-token claims, disabled deletion/legacy export, and bounded evidence-only JOIN reconciliation. The [Player Access tracker](../implementation-tracking/player-access-and-session.md#unit-1a-section-exit-dispositions) names each current correction, pre-v1 Account successor, Unit 1B consumer, and activation gate. PostgreSQL concurrency/lost-acknowledgement, composed cross-service/certificate CI, direct text-to-Logging delivery, retained-data disposition, and billing/hosted-terms authority remain open; locally skipped tests do not close them. |
| 1B | Admission, session continuity, and reconnect | Provisional; required producer/consumer implementation and proof open | [#2857](https://github.com/benhook1013/FireMUD/pull/2857), [#2861](https://github.com/benhook1013/FireMUD/pull/2861), [#2873](https://github.com/benhook1013/FireMUD/pull/2873) → [#2876](https://github.com/benhook1013/FireMUD/pull/2876) → [#2880](https://github.com/benhook1013/FireMUD/pull/2880) → [#2881](https://github.com/benhook1013/FireMUD/pull/2881) → [#2911](https://github.com/benhook1013/FireMUD/pull/2911) → [#2914](https://github.com/benhook1013/FireMUD/pull/2914) → [#2915](https://github.com/benhook1013/FireMUD/pull/2915) | Provisional; #2915's Account fresh-tenant consumer is in progress, but its strict creation database gate failed all seven executed cases after migration; no passing producer/readback or live consumer proof is claimed. Account authority/evidence, credential/delegation/registry, fresh UUID association, protected ring delivery, durable reconnect, and HTTPS/mail/abuse/browser gates remain open. Membership RPC and credentials stay denied; ring mount unpublished. See the [Player Access tracker](../implementation-tracking/player-access-and-session.md) for proof and handoffs. |
| 1B | Admission, session continuity, and reconnect | Provisional; required producer/consumer implementation and proof open | [#2857](https://github.com/benhook1013/FireMUD/pull/2857), [#2861](https://github.com/benhook1013/FireMUD/pull/2861), [#2873](https://github.com/benhook1013/FireMUD/pull/2873) → [#2876](https://github.com/benhook1013/FireMUD/pull/2876) → [#2880](https://github.com/benhook1013/FireMUD/pull/2880) → [#2881](https://github.com/benhook1013/FireMUD/pull/2881) → [#2911](https://github.com/benhook1013/FireMUD/pull/2911) → [#2914](https://github.com/benhook1013/FireMUD/pull/2914) → [#2915](https://github.com/benhook1013/FireMUD/pull/2915) | Provisional; #2915's corrected creation and Account association database proof passed, but complete authenticated snapshot, current authority, credential/delegation/registry, protected ring delivery, durable reconnect, and HTTPS/mail/abuse/browser gates remain open. Database component proof is not a live owner handoff or activation proof. Membership RPC and credentials stay denied; ring mount unpublished. See the [Player Access tracker](../implementation-tracking/player-access-and-session.md) for exact proof and handoffs. |
| 1C | Commands, output, and frontend presentation | Queued | — | — |
| 1D | Social, communication, and moderation-facing UX | Queued | — | — |
| 2A | Tick scheduling and region authority | Queued | — | — |
Expand Down
Loading
Loading