Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ceeb504
Implement atomic Account password-reset authority source receipts
benhook1013 Oct 1, 2026
9bc43aa
Merge commit '9c6a360660144b62b160a0f737aa055ffaf81739' into codex/un…
benhook1013 Oct 1, 2026
63a3ec1
Resolve retained Game Session tenants to verified UUIDs for Account a…
benhook1013 Oct 2, 2026
933dde7
Separate issuer projection evidence from recipient authorization
benhook1013 Oct 2, 2026
7aa145f
Merge commit '933dde7f6951fd040c26864acdb6165f7726a43d' into codex/un…
benhook1013 Oct 2, 2026
d350582
Require exact PostgreSQL password reset proof and retain its XML
benhook1013 Oct 2, 2026
0ff7ccc
Record retained tenant UUID composed proof and remaining activation g…
benhook1013 Oct 2, 2026
aa22f67
Align target logout profiles with the canonical route matrix
benhook1013 Oct 2, 2026
b380e73
Merge branch 'codex/unit1b-scoped-source-events' into codex/unit1b-ru…
benhook1013 Oct 2, 2026
194eae4
Require retained tenant UUID PostgreSQL readback and record final parent
benhook1013 Oct 2, 2026
0a3f227
Prove exact committed retained-tenant association readback
benhook1013 Oct 2, 2026
c5bebbf
test(unit1b): bind command fixtures to retained tenant UUID evidence
benhook1013 Oct 2, 2026
8344e6e
Add atomic issuer authority source proof and preserve fixture pointer…
benhook1013 Oct 2, 2026
58695d1
Prove issuer source readback over workload mTLS and correct Account U…
benhook1013 Oct 2, 2026
9f1b751
Implement registered issuer projection CAS and strengthen source tran…
benhook1013 Oct 2, 2026
9d62089
Align WebSocket integration fixture with retained tenant UUID authority
benhook1013 Oct 2, 2026
933d1f0
Use canonical Account UUID in WebSocket PLAY character fixture
benhook1013 Oct 2, 2026
c179789
Move coherent Redis projection boundary to existing Account source child
benhook1013 Oct 2, 2026
f9f5147
Record source proof and child handoff after coherent boundary split
benhook1013 Oct 2, 2026
939b93d
Merge published Social and Logging parent preserving Unit 1B authorit…
benhook1013 Oct 4, 2026
6ef37e2
Merge corrected Account and strict Social Logging proof preserving ow…
benhook1013 Oct 4, 2026
a80cd56
Converge canonical realm scope consumers and composed migration proof
benhook1013 Oct 4, 2026
e10741c
test: make retained identity negative fixtures deterministic
benhook1013 Oct 4, 2026
85e1b10
Select every required Game Design owner PostgreSQL proof suite
benhook1013 Oct 4, 2026
f982fd6
Allow Validation for stacked pull requests
benhook1013 Oct 4, 2026
1e0a304
Carry forward reviewed CI safety corrections
benhook1013 Oct 5, 2026
7d01b8b
Carry forward locked Python contract-test fixes
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
151 changes: 148 additions & 3 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,13 +52,13 @@ 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. 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 evidence or an exact Account checkpoint lookup proves the complete required authority evidence: the same `authorityTuple`, positive `issuanceFence`, complete `outboxCheckpoints` set, event ID, sequence, recomputed event digest, exact stream key, and `issuerAuthGeneration`. A sequence/event/digest/stream/generation match without the complete tuple, fence, and checkpoint set is not duplicate proof. Missing, partial, generation-only, 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 complete evidence comparison before the watermark or generation advances; a lower `issuerAuthGeneration` is contradictory Account evidence, while an equal generation is idempotent and a higher generation uses set-if-greater semantics. This local projection is a revocation-consumer cache, not an authority source, and 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>`. 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.

### Canonical Checkpoint And Source-Evidence Binding

[ADR 0030](./adr-0030-risk-based-active-session-revocation.md) owns the unchanged `outboxCheckpoints` entry schema: exactly `{outboxStreamKey, outboxSequence}`, with one entry for every applicable authority stream. `compareOutboxCheckpointEntries(a, b)` compares the unsigned UTF-8 bytes of `outboxStreamKey` lexicographically and places the shorter key first when one is a prefix. Duplicate stream keys, locale collation, Unicode normalization, case folding, alternate escaping, or another ordering are invalid.

Event identity and digest remain separate same-snapshot source evidence rather than members of `outboxCheckpoints`. For each checkpoint, retained applied-source evidence or an exact Account lookup binds `{outboxStreamKey, outboxSequence, eventId, eventDigest, authorityTuple, issuanceFence, outboxCheckpoints}` from one Account linearization point. Delivery, refresh, rebind, binding CAS, acknowledgement, retries, and duplicate detection carry or resolve that complete binding without adding fields to the checkpoint carrier. A latest entry, aggregate maximum, projection-only value, partial source-evidence match, or evidence assembled from separate snapshots is invalid and quarantines the affected scope.
Event identity, digest, and stream position remain source evidence separate from the `outboxCheckpoints` carrier. For recipient authority, an Account-authenticated same-snapshot readback binds the consumed source event evidence to the recipient's complete `authorityTuple`, actual `issuanceFence`, and complete `outboxCheckpoints` set from one Account linearization point. Scope-wide issuer/account/tenant source events are not required to carry that recipient tuple or fence; issuer projection maintenance consumes its exact authenticated issuer source/checkpoint evidence without an individual recipient binding. The closed membership event retains the exact fields declared by its v1 schema. Delivery, refresh, rebind, binding CAS, acknowledgement, retries, and duplicate detection for recipient authority carry or resolve the complete recipient binding and exact source evidence without adding fields to the checkpoint carrier. A latest entry, aggregate maximum, issuer projection alone, partial source-evidence match, or evidence assembled from separate snapshots cannot satisfy recipient authority and quarantines the affected recipient scope.

### Operation Partition

Expand Down
Loading
Loading