Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ef7e233
Add Account-owned tenant generation projection and exact source proof
benhook1013 Oct 2, 2026
e90b713
Prove strict existing membership source readback without enrollment
benhook1013 Oct 2, 2026
65fa112
Project exact existing membership authority with fenced Redis readback
benhook1013 Oct 2, 2026
9f76353
Converge issuer projection fields and prove committed source recovery
benhook1013 Oct 2, 2026
15aa6ef
Capture durable Account issuer reconciliation receipts
benhook1013 Oct 2, 2026
3f7be76
Authenticate issuer capture transport and verify installed Redis bytes
benhook1013 Oct 2, 2026
6395e56
Verify captured issuer reconciliation across Account and Redis
benhook1013 Oct 2, 2026
776b99c
Persist exact issuer installation acknowledgments in Account
benhook1013 Oct 2, 2026
e390e93
Implement authenticated issuer installation acknowledgment handoff
benhook1013 Oct 2, 2026
dfa42fe
feat(account): add canonical UUID JOIN identity foundations
benhook1013 Oct 2, 2026
ef3e415
fix(account): preserve canonical membership projection field names
benhook1013 Oct 2, 2026
91a0011
test(account): correct canonical identity fixture constraints
benhook1013 Oct 2, 2026
e9595b4
test(account): preserve retained membership projection across UUID sc…
benhook1013 Oct 2, 2026
76a9381
Reconcile Account source ancestry and preserve canonical instance ide…
benhook1013 Oct 4, 2026
f784707
Propagate corrected source proof checkpoint without rewriting history
benhook1013 Oct 4, 2026
6a8ff93
Allow Validation for stacked pull requests
benhook1013 Oct 4, 2026
8224d82
Carry forward reviewed CI safety corrections
benhook1013 Oct 5, 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
211 changes: 207 additions & 4 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/publish-pr-runtime-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ jobs:
fail("source workflow run API id does not match the event")
if source_run.get("workflow_id") != int(workflow_id_text):
fail("source workflow identity changed between event and API")
if source_run.get("name") != source_title:
fail("source workflow API name differs from its exact run title")
if source_run.get("name") not in {"Build Runtime Images", source_title}:
fail("source workflow API name is neither its owning name nor exact run title")
if source_run.get("path") != SOURCE_WORKFLOW_PATH:
fail("source workflow API path is not the trusted runtime-images workflow")
if source_run.get("event") != source_event:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ jobs:
uses: ./.github/actions/setup-trivy

- name: 🔍 Run Trivy and Save Report
shell: bash
run: |
echo "::group::Run Trivy"
trivy fs --config config/security/trivy.yaml . | tee trivy-report.txt
Expand Down Expand Up @@ -207,7 +208,7 @@ jobs:
contents: read
pull-requests: write # Publishes the consolidated security result on the PR.
needs: [changes, trivy-scan, secret-compliance, security-gate]
if: ${{ always() && github.event_name == 'pull_request' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
steps:
- name: Harden runner
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5
Expand Down
51 changes: 48 additions & 3 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
".github/actions/load-workflow-tool-versions/",
".github/actions/setup-python/",
"dev-tools/smoke/",
"dev-tools/minio/",
];
const fullRelevantFiles = new Set([
"build.gradle.kts",
Expand Down Expand Up @@ -145,7 +146,7 @@ jobs:
contents: read
pull-requests: write
needs: [changes]
if: ${{ always() && github.event_name == 'pull_request' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
steps:
- name: Harden runner
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5
Expand Down Expand Up @@ -198,6 +199,26 @@ jobs:
`- ${statusIcon(fullResult)} PR Full-Stack Smoke: \`${fullResult}\``,
].join("\n");

const expectedHeadSha = context.payload.pull_request.head.sha;
const expectedBaseRef = context.payload.pull_request.base.ref;
const expectedBaseSha = context.payload.pull_request.base.sha;
const { data: currentPullRequest } = await github.rest.pulls.get({
...context.repo,
pull_number: context.issue.number,
});
if (
currentPullRequest.state !== "open" ||
currentPullRequest.head.sha !== expectedHeadSha ||
currentPullRequest.base.ref !== expectedBaseRef ||
currentPullRequest.base.sha !== expectedBaseSha
) {
core.info(
`Skipping stale smoke summary for ${expectedBaseRef}@${expectedBaseSha}...${expectedHeadSha}; ` +
`current PR state/base/head is ${currentPullRequest.state}/${currentPullRequest.base.ref}@${currentPullRequest.base.sha}/${currentPullRequest.head.sha}`
);
return;
}

const comments = await github.paginate(
github.rest.issues.listComments,
{
Expand Down Expand Up @@ -277,7 +298,7 @@ jobs:
contents: read
pull-requests: write
needs: [changes, smoke-gate, smoke-summary-pending]
if: ${{ always() && github.event_name == 'pull_request' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' && (github.event.action != 'edited' || github.event.changes.base.ref != null) }}
steps:
- name: Harden runner
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5
Expand Down Expand Up @@ -334,6 +355,26 @@ jobs:
`- ${statusIcon(fullResult)} PR Full-Stack Smoke: \`${fullResult}\``,
].join("\n");

const expectedHeadSha = context.payload.pull_request.head.sha;
const expectedBaseRef = context.payload.pull_request.base.ref;
const expectedBaseSha = context.payload.pull_request.base.sha;
const { data: currentPullRequest } = await github.rest.pulls.get({
...context.repo,
pull_number: context.issue.number,
});
if (
currentPullRequest.state !== "open" ||
currentPullRequest.head.sha !== expectedHeadSha ||
currentPullRequest.base.ref !== expectedBaseRef ||
currentPullRequest.base.sha !== expectedBaseSha
) {
core.info(
`Skipping stale smoke summary for ${expectedBaseRef}@${expectedBaseSha}...${expectedHeadSha}; ` +
`current PR state/base/head is ${currentPullRequest.state}/${currentPullRequest.base.ref}@${currentPullRequest.base.sha}/${currentPullRequest.head.sha}`
);
return;
}

const comments = await github.paginate(
github.rest.issues.listComments,
{
Expand Down Expand Up @@ -476,7 +517,11 @@ jobs:
const eventMergeSha = context.sha;
const prNumber = String(context.payload.pull_request.number);
const started = Date.now();
const timeoutMs = 25 * 60 * 1000;
// Contract-checked against pr-local-smoke; bounded overhead covers metadata,
// runner scheduling and API convergence, not unbounded queue delays.
const producerTimeoutMinutes = 45;
const prerequisiteAndQueueAllowanceMinutes = 45;
const timeoutMs = (producerTimeoutMinutes + prerequisiteAndQueueAllowanceMinutes) * 60 * 1000;
const cancelledReplacementTimeoutMs = 5 * 60 * 1000;
const sleepMs = 15000;
const pullRequestCheckInterval = 4;
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/static-analysis-summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ jobs:
if (
currentPullRequest.state !== "open" ||
!sourceWorkflowName ||
context.payload.workflow_run.name !== expectedSourceTitle ||
(context.payload.workflow_run.name !== sourceWorkflowName &&
context.payload.workflow_run.name !== expectedSourceTitle) ||
context.payload.workflow_run.display_title !== expectedSourceTitle
) {
core.info("The source run is not bound to the current open pull-request base and head.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Later clarification: [ADR 0132](./adr-0132-namespace-scoped-single-character-con

Game Session consumes authoritative Account membership, entitlement, and revocation state. It stores only the token identity and freshness metadata needed to validate a binding, such as token hash, issued-at time, and `membershipVersion`; it must not make a persisted raw backend JWT the durable session authority.

For issuer-generation consumption only, Game Session may maintain one derived consumer-local projection under its own namespace: `session:game:auth:issuer-generation:v1:<issuerId>`. Its schema is `game-session-auth-issuer-projection/v1` with `{schemaVersion, issuerId, issuerAuthGeneration, lastAppliedSourceOutboxSequence, sourceOutboxStreamKey, sourceEventId, sourceEventDigest, appliedAt}` plus bounded per-sequence applied-source evidence, or an explicit immutable Account source-checkpoint lookup. The issuer source event and any recipient evidence it affects remain separate under [Authentication's source-event contract](../system-architecture-authentication.md#authority-source-events-and-recipient-evidence). For this derived issuer projection, bootstrap, advancement, and duplicate verification use Account-authenticated evidence for the exact issuer scope and source checkpoint: exact issuer and stream identity, committed issuer generation and source version, sequence, and complete applicable source-event identity, payload, and digest. No individual recipient's `authorityTuple`, actual `issuanceFence`, or complete `outboxCheckpoints` set is a prerequisite for maintaining this projection. Account's issuer `outboxStreamKey` is immutable for the life of that issuer authority and must not be regenerated by deployment, failover, Redis reset, or projection repair. If authoritative recovery ever changes the stream key or resets its sequence/epoch, Account must first install and expose an authoritative checkpoint for the new exact stream identity/epoch; consumers quarantine the scope and accept no changed- or reset-stream event until that checkpoint is validated. The checkpoint, not an inferred event baseline, is the only value that may establish the new local watermark or permit sequence advancement. The canonical issuer projection watermark is `lastAppliedSourceOutboxSequence`. For each exact `sourceOutboxStreamKey`, an incoming event is applicable only when its source sequence is exactly `lastAppliedSourceOutboxSequence + 1`; a higher sequence is a gap that must be quarantined and reconciled from Account before either the watermark or generation advances. An event at or below the watermark is an idempotent no-op only when retained source evidence or an exact Account checkpoint lookup proves the same complete event identity, payload, and digest, source sequence, exact stream key, and issuer source progress; generation-only equality is insufficient. Missing, partial, stale, regressed, conflicting, or ambiguous evidence, including an older event outside the bounded local evidence window that cannot be resolved by the exact Account lookup, quarantines the scope and is reconciled rather than treated as a no-op. A next-sequence event must pass the same exact source/checkpoint comparison before the watermark or generation advances, and the projection watermark and corresponding source/checkpoint evidence are updated atomically. A lower `issuerAuthGeneration` is contradictory Account evidence, while an equal generation is idempotent and a higher generation uses set-if-greater semantics. The projection is a revocation-consumer cache, not an authority source: it grants no admission or rebind authority. Any individual recipient authorization, admission, or rebind still requires the complete Account-authenticated recipient binding, including the applicable `authorityTuple`, actual `issuanceFence`, and complete `outboxCheckpoints` set, from one snapshot. Game Session must never write or mutate any canonical `session:auth:generation:*` key. Account's durable issuer generation and its canonical projection remain the only authority; Game Session owns only this derived consumer-local projection.
For issuer-generation consumption only, Game Session may maintain one derived consumer-local projection under its own namespace: `session:game:auth:issuer-generation:v1:<issuerId>`. The persisted field schema and exact mapping from Account source snapshot fields are owned by [Redis Coordination Invariants](../system-architecture-redis.md#log-of-record-vs-coordination-buffer). The issuer source event and any recipient evidence it affects remain separate under [Authentication's source-event contract](../system-architecture-authentication.md#authority-source-events-and-recipient-evidence). For this derived issuer projection, bootstrap, advancement, and duplicate verification use Account-authenticated evidence for the exact issuer scope and source checkpoint: exact issuer and stream identity, committed issuer generation and source version, sequence, and complete applicable source-event identity, payload, and digest. No individual recipient's `authorityTuple`, actual `issuanceFence`, or complete `outboxCheckpoints` set is a prerequisite for maintaining this projection. Account's issuer `outboxStreamKey` is immutable for the life of that issuer authority and must not be regenerated by deployment, failover, Redis reset, or projection repair. If authoritative recovery ever changes the stream key or resets its sequence/epoch, Account must first install and expose an authoritative checkpoint for the new exact stream identity/epoch; consumers quarantine the scope and accept no changed- or reset-stream event until that checkpoint is validated. The checkpoint, not an inferred event baseline, is the only value that may establish the new local watermark or permit sequence advancement. The canonical issuer projection watermark is `lastAppliedSourceOutboxSequence`. For each exact persisted `outboxStreamKey`, an incoming event is applicable only when its source sequence is exactly `lastAppliedSourceOutboxSequence + 1`; a higher sequence is a gap that must be quarantined and reconciled from Account before either the watermark or generation advances. An event at or below the watermark is an idempotent no-op only when retained source evidence or an exact Account checkpoint lookup proves the same complete event identity, payload, and digest, source sequence, exact stream key, and issuer source progress; generation-only equality is insufficient. Missing, partial, stale, regressed, conflicting, or ambiguous evidence, including an older event outside the bounded local evidence window that cannot be resolved by the exact Account lookup, quarantines the scope and is reconciled rather than treated as a no-op. A next-sequence event must pass the same exact source/checkpoint comparison before the watermark or generation advances, and the projection watermark and corresponding source/checkpoint evidence are updated atomically. A lower source `issuerAuthGeneration` is contradictory Account evidence, while an equal generation is idempotent and a higher generation uses set-if-greater semantics. The projection is a revocation-consumer cache, not an authority source: it grants no admission or rebind authority. Any individual recipient authorization, admission, or rebind still requires the complete Account-authenticated recipient binding, including the applicable `authorityTuple`, actual `issuanceFence`, and complete `outboxCheckpoints` set, from one snapshot. Game Session must never write or mutate any canonical `session:auth:generation:*` key. Account's durable issuer generation and its canonical projection remain the only authority; Game Session owns only this derived consumer-local projection.

### Canonical Checkpoint And Source-Evidence Binding

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Manages user accounts and authentication for the platform. It stores profile dat
- **Internal:**
- Logging & Admin Service for audit logging.
- Game Session Service consumes tokens to create gameplay sessions.
- **External:** PostgreSQL for account data, Redis for transient session data. Account is the sole writer of its canonical generation projections; the owner-local [Account generation snapshot projection](./runtime-and-data.md#account-generation-snapshot-projection) defines its exact storage, reprojection and readback consequences. This boundary does not grant Game Session write authority or establish production authorization, reset recovery or deployed Redis readiness.
- **External:** PostgreSQL for account data, Redis for transient session data. Account is the sole writer of its canonical generation projections; the owner-local [Account generation snapshot projection](./runtime-and-data.md#account-generation-snapshot-projection), [tenant generation snapshot projection](./runtime-and-data.md#tenant-generation-snapshot-projection), and [membership generation snapshot projection](./runtime-and-data.md#membership-generation-snapshot-projection) define their exact storage, reprojection and readback consequences. These boundaries do not grant Game Session write authority or establish production authorization, reset recovery or deployed Redis readiness.

> See [**Gateway Architecture**](../../system-architecture-gateway.md),
[**Deployment Environments**](../../infrastructure/deployment-environments.md),
Expand Down
Loading
Loading