Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ada9df7
feat(entity): retain actor identity quarantine and deny unproved cons…
benhook1013 Oct 13, 2026
fe6da5d
Merge commit '759524f910cd6f3b48ed89d5df4c3b09a1369891' into codex/ga…
benhook1013 Oct 13, 2026
e9aba24
docs(entity): qualify current-parent identity stage proof
benhook1013 Oct 13, 2026
c42e434
docs(entity): use supported bounded verification states
benhook1013 Oct 13, 2026
99fb80b
Merge commit 'a005527995b7f483e269cd810e483b64ac4f1676' into codex/ga…
benhook1013 Oct 13, 2026
b80f653
Carry final publication and roster parent fixes into Entity identity
benhook1013 Oct 13, 2026
8b83e16
Carry qualified publication repairs into Entity identity stage
benhook1013 Oct 13, 2026
f405a1a
Carry qualified Game Design replay and current-schema source proof in…
benhook1013 Oct 13, 2026
1e5ad1e
Carry roster review corrections and command-source proof into Entity …
benhook1013 Oct 13, 2026
15cf6c1
Reconcile Entity identity ancestry after Game Design prerequisite merge
benhook1013 Oct 13, 2026
88618b2
Merge commit '82cc9ecc1ab4d242e03c09294592dc53297eba32' into codex/ga…
benhook1013 Oct 13, 2026
486efc5
Merge commit '56ed78456be3ac27de3d7d3a384a32c633c1f578' into codex/ga…
benhook1013 Oct 13, 2026
c1d0fb8
Merge commit '55c6ecb533a66ec520db258820cb1a5fe3ef9e27' into codex/ga…
benhook1013 Oct 13, 2026
af5c5db
Merge commit '3451072b4246386f592f22693bb93eb5a954075f' into codex/ga…
benhook1013 Oct 13, 2026
40d1434
Merge commit '749eaddce84d67241848871ea6c793d6a6f18b1e' into codex/ga…
benhook1013 Oct 13, 2026
8511207
Reconcile Entity retained identity stage after roster parent merge
benhook1013 Oct 13, 2026
0de577e
Qualify retained actor identity guards and cleanup hold errors
benhook1013 Oct 13, 2026
e573002
Order retained identity migrations after applied Saga history and pro…
benhook1013 Oct 13, 2026
d5f7d09
Prepare passive Entity and Account storage while preserving existing …
benhook1013 Oct 13, 2026
c19b9d6
Supply required receipt mount placeholder during bootstrap configurat…
benhook1013 Oct 13, 2026
79fac83
Record isolated Docker client credential-helper proof limitation
benhook1013 Oct 13, 2026
43d38b8
Record qualified passive storage and fresh legacy player-flow proof
benhook1013 Oct 13, 2026
f3afc05
Merge commit '18f8063306c2ddb4337646de50b73619915a0e25' into codex/ga…
benhook1013 Oct 13, 2026
9783537
fix: qualify passive protection acquisition and canonical assignment …
benhook1013 Oct 13, 2026
4e45c70
fix: make Flyway fixture subprocess failure handling explicit
benhook1013 Oct 13, 2026
68ee9a6
fix: retain canonical isolated selected-assignment reads
benhook1013 Oct 13, 2026
4925747
fix: isolate canonical actor storage from legacy numeric consumers
benhook1013 Oct 13, 2026
d7c8f84
Merge commit 'a50a82c633cff7ac2b66ececaa713e2892ee8c65' into codex/ga…
benhook1013 Oct 13, 2026
d7f78eb
Reject unsettled admission holds and qualify passive roster contracts
benhook1013 Oct 13, 2026
0c05e4f
Keep quarantined canonical actors isolated and require manual CI pare…
benhook1013 Oct 13, 2026
9a3edf3
Align CI dispatch contract with immutable Flyway parent input
benhook1013 Oct 13, 2026
e872ab8
Validate committed lifecycle evidence before releasing Account source…
benhook1013 Oct 13, 2026
e105fe9
Reconcile front with merged controller reset maintenance
benhook1013 Oct 13, 2026
02401d4
Reject ambiguous lifecycle numbers and record final settlement proof
benhook1013 Oct 13, 2026
d2f3b7e
Strengthen effective Flyway history and protection regression proof
benhook1013 Oct 13, 2026
333d4ed
Validate PREPARING acquisition before retaining activation protections
benhook1013 Oct 13, 2026
af5a191
test(entity): assert retained identity constraint failures precisely
benhook1013 Oct 13, 2026
2e98a98
Merge commit '78dbdd36169502bc4641e1f4b0a981ef14864776' into codex/ga…
benhook1013 Oct 13, 2026
3505ecb
Merge remote-tracking branch 'origin/develop' into codex/gameplay-ent…
benhook1013 Oct 13, 2026
a6a1333
Merge remote-tracking branch 'origin/develop' into codex/gameplay-ent…
benhook1013 Oct 14, 2026
593b2a9
Reconcile passive actor storage with current develop
benhook1013 Oct 14, 2026
e5fee40
fix: preserve activation counters and exact migration parent validation
benhook1013 Oct 14, 2026
f73fd96
fix: validate retained lifecycle and canonical activation request ide…
benhook1013 Oct 14, 2026
1cce7f4
Merge commit '9e3d795bedd196bd99889f6917b712fe2e88bae3' into codex/ga…
benhook1013 Oct 14, 2026
fc09b48
Correct activation tracker anchors and isolate workflow fetch fixtures
benhook1013 Oct 14, 2026
9db96cf
Merge commit '1855c674d9ca6c283dc6e6384e8d0681955cb738' into codex/ga…
benhook1013 Oct 14, 2026
412e5bb
Remove completed bootstrap bug observation under bounded stewardship
benhook1013 Oct 14, 2026
58ec360
Close activation carrier mismatch and preserve nullable Entity inserts
benhook1013 Oct 14, 2026
05e5aeb
Keep activation proof results at the implementation tracker
benhook1013 Oct 14, 2026
5da24f2
Type guarded legacy friend inserts and simplify assignment test helper
benhook1013 Oct 14, 2026
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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
pull_request:
types: [opened, synchronize, reopened, edited]
workflow_dispatch:
inputs:
flyway_base_sha:
description: Full immutable commit SHA of the receiving parent to compare Flyway history against
required: true
type: string

run-name: CI — Validation ${{ github.event_name == 'pull_request' && format('pr-{0} base-{1} head-{2}', github.event.pull_request.number, github.event.pull_request.base.sha, github.event.pull_request.head.sha) || github.ref_name }}

Expand Down Expand Up @@ -553,6 +558,27 @@ jobs:
- name: ⬇️ Checkout Code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Fetch exact Flyway parent
env:
FLYWAY_BASE_SHA: ${{ github.event_name == 'workflow_dispatch' && inputs.flyway_base_sha || github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
FLYWAY_EVENT_NAME: ${{ github.event_name }}
run: |
if [[ "$FLYWAY_BASE_SHA" == "0000000000000000000000000000000000000000" && "$FLYWAY_EVENT_NAME" != "workflow_dispatch" ]]; then
exit 0
fi
if [[ ! "$FLYWAY_BASE_SHA" =~ ^[[:xdigit:]]{40}$ || "$FLYWAY_BASE_SHA" == "0000000000000000000000000000000000000000" ]]; then
echo "Flyway parent requires a full nonzero immutable 40-character SHA" >&2
exit 1
fi
if ! git cat-file -e "${FLYWAY_BASE_SHA}^{commit}" 2>/dev/null; then
git fetch --no-tags --depth=1 origin "$FLYWAY_BASE_SHA"
fi
resolved_sha="$(git rev-parse --verify "${FLYWAY_BASE_SHA}^{commit}")"
if [[ "${resolved_sha,,}" != "${FLYWAY_BASE_SHA,,}" ]]; then
echo "Flyway base SHA did not resolve to the requested commit" >&2
exit 1
fi

- name: ⚙️ Set Up Java
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6
with:
Expand All @@ -573,6 +599,8 @@ jobs:
cache-read-only: false

- name: 🧪 Check Flyway Migration Versions
env:
FIREMUD_FLYWAY_BASE_REF: ${{ github.event_name == 'workflow_dispatch' && inputs.flyway_base_sha || github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
run: ./gradlew checkFlywayVersions

grpc-transport-config-sanity-checks:
Expand Down
8 changes: 6 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,12 @@ tasks.register<Exec>("linkCheck") {

tasks.register<Exec>("checkFlywayVersions") {
group = "verification"
description = "Checks service Flyway migrations for duplicate or out-of-order versions."
commandLine("bash", "dev-tools/validation/check-flyway-versions.sh")
description = "Checks combined Flyway migration versions and additions against an immutable parent when available."
val baseRef = providers.gradleProperty("flywayBaseRef").orNull
commandLine(
listOf("bash", "dev-tools/validation/check-flyway-versions.sh") +
if (baseRef != null) listOf("--base-ref", baseRef) else emptyList<String>()
)
}

tasks.register<Exec>("checkGrpcTransportConfig") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ This target contract is not complete in the current service. The existing `secur

## Implementation Status

Passive original StartSession admission/activation protection storage adds no callable acquisition, read or settlement API. SQL terminal integrity is not authenticated Game Session/World terminal authority, and no protection grants runtime admission or activation. The [Account storage consequence](./runtime-and-data.md#original-startsession-source-protection-storage) and [focused proof tracker](../../../project-management/implementation-tracking/player-access-and-session.md#original-startsession-source-protection-storage) retain the exact boundary and open producer/consumer gates.

The initial private gameplay LOGIN owner, signer, registry, and response-recovery code is present as unregistered Account source, with focused proof sources. Before its final Account transaction, the commit source publishes the current issuer and Account projections and requires an exact matching observation; publication or observation failure denies the commit. Caller currentness and response recovery may use an older committed signer generation only while the exact original public-key fingerprint remains in the current trusted JWKS and current owner evidence, including the original issuance JTI, still matches; the applicable authority, API, source, expiry, and compromise fences remain required. This does not add or activate an API, proto method, or Spring composition; the source has no caller-selected profile or property override. See the [Player Access and Session tracker](../../../project-management/implementation-tracking/player-access-and-session.md#initial-private-gameplay-login-issuance-source-intake) for exact proof scope; deployed ACL/TLS, signer-key custody, caller authentication, gameplay admission, and runtime activation remain unproved.

Account UUID generation currently has three established provenances: `ACCOUNT_REPOSITORY_INSERT` uses `AccountRepository` and `UUID.randomUUID()`; `ACCOUNT_V29_MIGRATION` uses `gen_random_uuid()` for retained rows; and `ACCOUNT_DATABASE_INSERT` uses the `gen_random_uuid()` database default. These current producer outputs are RFC 4122 version 4 UUIDs. This records generator provenance and does not claim that database constraints reject custom UUID versions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Account owns platform identity, hosted Creator Party/operator and terms currentn

## Implementation Status

The additive [V1003 source-protection storage](../../../../services/account-service/src/main/resources/db/migration/V1003__original_start_session_source_protections.sql) provides passive original StartSession admission and activation protection relations and source-writer exclusions. It adds no registered producer or transport. Qualification and remaining composition gates are recorded in the [source-protection tracker](../../../project-management/implementation-tracking/player-access-and-session.md#original-startsession-source-protection-storage).

Account has an unregistered initial private gameplay LOGIN source slice for request-bound credential digests, signer and JWKS trust, pending and committed registry ownership, authority projection reads, and encrypted response recovery. Before its final Account transaction, the commit source publishes the current issuer and Account projections and requires an exact matching observation; publication or observation failure denies the commit. Caller currentness and response recovery may use an older committed signer generation only while the exact original public-key fingerprint remains in the current trusted JWKS and current owner evidence, including the original issuance JTI, still matches; the applicable authority, API, source, expiry, and compromise fences remain required. The source fixes the explicitly approved `game-session-account-delegation` profile and has no caller-selected profile or property bypass. It adds no endpoint or runtime registration; deployed ACL/TLS, signer-key custody, caller authentication, consumer authorization, gameplay admission, and runtime activation remain unproved. See the [Player Access and Session tracker](../../../project-management/implementation-tracking/player-access-and-session.md#initial-private-gameplay-login-issuance-source-intake) for exact unit and physical fixture proof scope.

Account's unregistered original-ACK storage seam requires PostgreSQL 18 for fresh operations: the original executor performs a writable SERIALIZABLE physical COMMIT on its enlisted connection and returns an opaque acknowledgement only after observing the database clock before unchanged expiry; a separate transaction commits the exact receipt. Receiving V146 changes only the fresh receipt-insert guard, preserving the donor V122 SQL unchanged as receiving V144. Its historical durable reader remains PostgreSQL 16-only, so lost-acknowledgement recovery and retained-receipt retries remain denied on PostgreSQL 18. This storage evidence does not authenticate a caller, establish current Account ownership or admission, authorize gameplay, or register runtime behavior. Migration provenance and pending receiving proof are recorded in the [Player Access and Session tracker](../../../project-management/implementation-tracking/player-access-and-session.md#account-fresh-original-ack-storage-preparation).
Expand Down Expand Up @@ -329,3 +331,19 @@ Account owns the sole supported v1 Stripe integration for FireMUD hosting-plan b
This service sends verification and password reset emails using a configured SMTP provider. Public password-reset, username-recovery, and email-verification initiation use normalized email selectors and return the same neutral HTTP success for known and unknown addresses, including when a known-account post-commit SMTP send throws; those exceptions are caught and logged, while unknown requests create no token and schedule no email. **Current gap:** these sends still run synchronously after commit, so SMTP latency remains a timing oracle; durable asynchronous delivery is absent. Focused service tests prove exception containment, not timing resistance, HTTP-level timing parity, or durable delivery, so this is not full account-enumeration resistance. Public email-verification initiation no longer accepts a numeric account selector, while the internal gRPC method remains account-ID based. Notifications for suspicious logins or account events are queued for asynchronous delivery via a gRPC `NotificationService`. Sample templates live under `resources/templates/` and environment variables configure `spring.mail.*` along with `firemud.mail.from`, `firemud.mail.verification-url`, and `firemud.mail.reset-url`. The Account-owned trusted-source context, distributed candidate/source throttles, and limiter-outage behavior from [ADR 0034](../../decisions/adr-0034-layered-abuse-controls-without-attacker-triggered-account-locks.md) remain unimplemented, so neutral responses do not by themselves complete the abuse-control boundary. The gRPC API is defined in [`notification_service.proto`](../../../../protos/account/v1/notification_service.proto).

The configured default verification URL is a `GET /auth/verify-email` link while Account exposes verification as `POST /auth/verify-email`; the default reset URL points to `/reset-password`, for which no Account route exists. The canonical Gateway forwards Account auth under `/api/account/auth/**` ([Gateway client behavior](../spring-cloud-gateway/client-behavior.md)). The shipped defaults therefore do not route users to the canonical POST APIs ([Account API Contracts](./api-contracts.md#rest-apis)); deployment must provide an explicit web-client/edge handoff or matching handler, with link reachability proof, before recovery and verification are treated as end-to-end live.

## Original StartSession Source-Protection Storage

Account retains admission and activation protection separately from the original World participation. Each protection stores the complete original tuple and redemption projection, capture, ordered source-child evidence, actual Game Session owner mutation/attempt/fence, and unchanged original lease expiry. Admission additionally binds the complete World admission hold; activation binds the canonical World PREPARING evidence and its separate activation request. Database checks validate the nested original issuance-operation identity rather than accepting a matching projection hash alone. Identity/fence allocation, exact current lookup and append-only guards preserve the first protection without renewing authority.

The existing Account source-lock order remains canonical: source-key locks precede protection-row locks, and NOWAIT refuses a reversed or unavailable acquisition. Pending admission or activation blocks the existing source-hold, source-change and hosted-terms disclosure paths until the distinct protection has its exact immutable terminal settlement. Expiry, World receiving settlement, absence and an asserted outcome cannot release another protection. Settlement stores the complete original protection and exact terminal binding; these SQL checks validate integrity and do not authenticate the terminal producer. The owner obligations remain defined by [ADR 0047](../../decisions/adr-0047-logging-admin-as-external-operator-write-ingress.md).

Forward [V1004 lifecycle integrity](../../../../services/account-service/src/main/resources/db/migration/V1004__activation_settlement_lifecycle_integrity.sql) applies one complete closed lifecycle validator to PREPARING evidence before protection acquisition and ACTIVE evidence during COMMITTED settlement. Settlement also binds the retained PREPARING request and immutable owner values; acquisition cannot retain a malformed carrier which its matching COMMITTED result must reject. Malformed or ambiguous lifecycle carriers retain the pending source-writer exclusion; exact ABORTED terminal handling remains separate. This storage validation does not authenticate World or activate the source path. Current proof and limits belong in the [source-protection tracker](../../../project-management/implementation-tracking/player-access-and-session.md#original-startsession-source-protection-storage).

Forward [V1004.1](../../../../services/account-service/src/main/resources/db/migration/V1004.1__activation_settlement_monotonic_lifecycle_counters.sql) also rejects a COMMITTED ACTIVE lifecycle whose `lifecycleEpoch` or `rowVersion` is lower than the retained PREPARING counter. Equal or increased counters remain valid; malformed values and other lifecycle binding checks keep V1004's behavior. This remains Account storage integrity validation and does not authenticate World or activate the source path.

Forward [V1004.2](../../../../services/account-service/src/main/resources/db/migration/V1004.2__activation_settlement_retained_lifecycle_integrity.sql) runs V1004's existing closed PREPARING validator on retained protection evidence before V1004.1's counter comparisons. Thus missing or malformed retained counters cannot bypass monotonicity through SQL `NULL` comparison behavior. It also requires the activation request UUID text at acquisition to equal PostgreSQL's canonical UUID text, rejecting alternate spellings before protection and source-child rows commit. These are storage-integrity checks; they do not backfill retained rows, authenticate World, or activate the source path.

Forward [V1004.3](../../../../services/account-service/src/main/resources/db/migration/V1004.3__activation_acquisition_canonical_carriers.sql) requires all four Base64 carriers in the Account activation request to match the canonical encoding of their decoded tuple, projection, launch-read, and PREPARING bytes before protection acquisition. This prevents accepted whitespace spellings from being retained in an immutable request that later settlement must compare. It changes only the existing acquisition guard and does not backfill rows, authenticate World, or activate the source path. Current proof and limits are recorded in the [source-protection tracker](../../../project-management/implementation-tracking/player-access-and-session.md#original-startsession-source-protection-storage).

V1003 preserves canonical predecessor SQL and retained owner rows; it never backfills protection, adopts missing historical evidence, fabricates owner proof or registers runtime authority. Its scoped PostgreSQL fixtures explicitly stipulate upstream capture/redemption/World rows with upstream producer triggers disabled while leaving the protection and source-writer guards under test enabled. Such execution establishes storage integrity, exclusion and retained-history behavior only. Genuine current-owner acquisition, authenticated terminal reads/settlement, continuously protected admission, activation and the separate selected-owner source-reservation obligation remain unproved.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Handles player characters, NPCs, runtime actor identity, items, and all inventor

## Implementation Status

Persisted rows and realm-aware listing exist, but synthetic-ID paths, fixed RPG columns, published entry-policy/descriptor/template resolution, policy-specific roster handling, namespace-idempotent auto-provision, and fork-local copy proof remain gaps.
Entity V1003–V1010 prepares opaque actor UUIDs, quarantine metadata, namespace/scope integrity, and assignment/receipt/roster storage while retaining legacy values. Exact canonical repository readers, including `ActorIdentityRepository` and `CharacterRepository`, are registered Spring beans. The assignment, receipt, and roster service compositions remain manually composed and unregistered, with no authenticated clients or gRPC handlers. Existing legacy reads, roster listing, updates, cache access, scoped consumers, condition expiry, and cleanup retain develop behavior; this preparation does not enforce runtime quarantine or replace gameplay admission. Authenticated owner provenance, the real Game Session caller and execution replacement, and production activation remain unproved. Focused storage and unchanged legacy player-flow qualification is recorded under [GR-3.1](../../../project-management/implementation-tracking/gameplay-rules-entities-and-effects.md#capability-status); [Entity API Contracts](./api-contracts.md#implementation-status) owns the detailed source and wire contract.

The focused SQL-isolation fixtures may insert owner-resolved rows to test exact tenant/account/namespace/scope predicates; those rows are fixture evidence only and do not prove an Account or Game Design owner supplied that provenance at runtime. Existing `shared-live`, `instance:<id>`, numeric Account/tenant IDs, names, caller checksums, and Game Session pointers never fill missing UUID provenance.

World-owned `character_location` and `npc_location` tables, together with their authoritative movement, occupancy, and read paths, are target-only. They are absent from the current schema and runtime; current room topology or session bindings do not establish location authority, and Entity Management must not persist a competing location table, field, or cache authority.

Expand Down
Loading
Loading