Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
d26912e
Prepare complete bound credentials and original NEW candidate install…
benhook1013 Oct 28, 2026
2d60cf8
Merge commit '7847e769005d20ec1cb8994dd4809a59c30ab280' into codex/ga…
benhook1013 Oct 28, 2026
669d8ff
Record candidate receiving proof and static analysis availability
benhook1013 Oct 28, 2026
dd703fa
Merge commit 'a63a0189b15872fa4b06d5d609bba78d6bfc1c3e' into codex/ga…
benhook1013 Oct 28, 2026
6a0d062
Merge commit 'adfaf0fbc7' into codex/gameplay-original-new-credential…
benhook1013 Oct 28, 2026
eb3a0d2
Merge commit 'c878d2c2fe39afcc1b597e48ac8d32a9db34cd04' into codex/ga…
benhook1013 Oct 28, 2026
e99d4e5
Merge commit 'aaa9b4ae694fe2f745452a514d2567d3fc23d424' into codex/ga…
benhook1013 Oct 28, 2026
39c0dab
Merge commit '1df41d852500e13b6a64c425fb2e022a0826e4b3' into codex/ga…
benhook1013 Oct 28, 2026
6d97aeb
Merge commit '317055a1c04b4b61e453919feb55b036e2457e37' into codex/ga…
benhook1013 Oct 28, 2026
9fdf095
Merge commit 'b5ae981d58e57391be62b528fe9e7df711177aa8' into codex/ga…
benhook1013 Oct 28, 2026
bba89a8
Align Account receipt recovery and retained migration fixtures
benhook1013 Oct 28, 2026
a97ace0
Merge commit 'd1b051ecf82e140b0e0e6d0bcc4af66977b77d1d' into codex/ga…
benhook1013 Oct 28, 2026
65d3893
test(account): compare recovered acknowledgement receipt values
benhook1013 Oct 28, 2026
9cdb4c0
Merge commit '2c4c63742bd2a194f77981769c76fb2b610c7422' into codex/ga…
benhook1013 Oct 28, 2026
facba83
Merge commit '05eddb9a9b72038a903137a49d8e28bf1817d1d9' into codex/ga…
benhook1013 Oct 28, 2026
b9d67b7
Merge commit 'be2743f7dee6c3b851583ae5b347db247aef4193' into codex/ga…
benhook1013 Oct 28, 2026
af3225e
docs: record current credential and candidate receiving proof
benhook1013 Oct 28, 2026
bcd23c2
Merge commit '78fb1c2bdbb86380fd3210c80a12aae63d0a6749' into codex/ga…
benhook1013 Oct 28, 2026
db781c6
Merge commit '37cd6cf866bd04e4c386227a8218aebcbdc37497' into codex/ga…
benhook1013 Oct 28, 2026
f714742
Merge commit '75b18856cdabdbb1c8479fc8ece863f50f96e414' into codex/ga…
benhook1013 Oct 28, 2026
033d31e
Merge commit 'bdbfc648a14a2c2240c432fd4a9d66996f70ba45' into codex/ga…
benhook1013 Oct 28, 2026
4bfa4de
fix: follow exact runtime smoke after unexecuted duplicate cancellation
benhook1013 Oct 28, 2026
b3306de
Merge commit '093ad2f5a9410aa128570e8f762b3861a6dd5287' into codex/ga…
benhook1013 Oct 28, 2026
519ddfc
Align retarget contract with complete smoke candidate selection
benhook1013 Oct 29, 2026
f46097f
Resolve retained unknown Account abort with immutable transition evid…
benhook1013 Oct 29, 2026
94fcaf3
Merge commit '4ac34961131d899272d43893d17664d3e3716697' into codex/ga…
benhook1013 Oct 29, 2026
29d4621
Merge commit '3d67c73e3317e6c7a7bf76402c2d6141d6fd8d63' into codex/ga…
benhook1013 Oct 29, 2026
ba3223c
Merge commit '1eca27d97c3de361fb9bfc39f70410d6a35f3351' into codex/ga…
benhook1013 Oct 29, 2026
2a76f2c
Record exact recovery frontier and reconciled receiving proof
benhook1013 Oct 29, 2026
69ddf93
Carry current-membership and region reconciliation into NEW credentia…
benhook1013 Oct 29, 2026
bb5c954
Strengthen original NEW candidate guards and review proof
benhook1013 Oct 29, 2026
0de36b1
Carry qualified settlement receiving parent into NEW review fixes
benhook1013 Oct 29, 2026
4a5dad2
fix(game-session): preflight original new candidate before dispatch c…
benhook1013 Oct 29, 2026
f45fde7
Merge branch 'codex/gameplay-2972-issuer-ack-local-20261026' into cod…
benhook1013 Oct 29, 2026
30fa721
test(game-session): assert retryable evidence at its actual boundary
benhook1013 Oct 29, 2026
979cf21
style(game-session): apply canonical formatting to candidate corrections
benhook1013 Oct 29, 2026
f2194b5
Carry current parent contracts and region error handling into credent…
benhook1013 Oct 29, 2026
623b6be
Merge commit '86f77c4728c8c71118369e1b93d236ac1f43b44a' into codex/ga…
benhook1013 Oct 29, 2026
aef5c84
Merge branch 'codex/gameplay-2972-issuer-ack-local-20261026' into cod…
benhook1013 Oct 29, 2026
182454b
test(gameplay): seed retained bootstrap at its historical schema
benhook1013 Oct 29, 2026
da02e29
Merge branch 'codex/gameplay-2972-issuer-ack-local-20261026' into cod…
benhook1013 Oct 29, 2026
db6eb16
Merge commit 'db4188eda48f541f67083683cb3f3669e3cdccde' into codex/ga…
benhook1013 Oct 29, 2026
4de882d
Merge commit '324d47a44caafe0d24fcfb8e3c74659b30a833a2' into codex/ga…
benhook1013 Oct 29, 2026
062090b
Merge commit 'f0d484d3809150291747b0e19657f987b7c96741' into codex/ga…
benhook1013 Oct 29, 2026
5c20680
Merge branch 'codex/gameplay-2972-issuer-ack-local-20261026' into cod…
benhook1013 Oct 29, 2026
db5e485
Merge branch 'codex/gameplay-2972-issuer-ack-local-20261026' into cod…
benhook1013 Oct 29, 2026
26f203f
Keep issuer admission retention proof at genuine historical frontiers
benhook1013 Oct 29, 2026
1063bfa
ci: allow bounded completion of Game Session native validation
benhook1013 Oct 29, 2026
e8868ea
Keep historical barrier proof separate from current physical issuer p…
benhook1013 Oct 29, 2026
aff7cfb
Merge commit '0c69cb2d29c7aa0bd66804c97ac0831423c1933f' into codex/ga…
benhook1013 Oct 29, 2026
330a6bd
Import historical binding transition snapshot in admission fixture
benhook1013 Oct 29, 2026
b34b306
Address original NEW credential and candidate review guards
benhook1013 Oct 29, 2026
e54d95f
Verify recorded WAL query without a mock statement resource
benhook1013 Oct 29, 2026
3b06295
Merge commit '8b562a636cfb303a47ccc4ca154b716ee13165ba' into codex/ga…
benhook1013 Oct 29, 2026
2a05357
fix: recover original NEW credential retries and close review findings
benhook1013 Oct 29, 2026
1ddcd82
Merge remote-tracking branch 'origin/develop' into codex/gameplay-ori…
benhook1013 Oct 29, 2026
afbf864
fix: recheck original caller before credential activation
benhook1013 Oct 29, 2026
bca7288
fix: report receipt transaction availability on credential issuance
benhook1013 Oct 29, 2026
bb52257
refactor: share original NEW token lifetime and skew policy
benhook1013 Oct 29, 2026
94bff9e
fix: cap Account original NEW continuity readback
benhook1013 Oct 29, 2026
01d18a7
fix: handle concurrent namespace enrollment across unique constraints
benhook1013 Oct 29, 2026
a313e99
Reuse the canonical original NEW candidate byte bound
benhook1013 Oct 29, 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
116 changes: 111 additions & 5 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,97 @@ jobs:
const workflowPath = ".github/workflows/runtime-images.yml";
const repositoryName = `${owner}/${repo}`;
const positiveInteger = (value) => Number.isSafeInteger(value) && value > 0;
const preExecutionCancelledJobNames = new Set([
"Derive Runtime Image Metadata",
"Dispatch PR Base Refreshes",
"Build Runtime Base Image",
"Build Backup Verifier Image",
"PR Hosted Identity Controller Smoke",
"PR Full-Stack Smoke (runtime-required=$" + "{{ needs.image-meta.outputs.runtime_smoke_required }})",
"Publish Trusted Backup Verifier Image",
"Published Runtime Full-Stack Smoke",
"Dispatch Trusted PR Runtime Publication",
"Build Runtime Images ($" + "{{ matrix.service }})",
"Build Trusted Hosted Identity Controller",
"Publish Trusted Hosted Identity Controller",
"Promote Smoke-Tested Runtime Images",
]);

const preExecutionCancelledProofs = new Set();
async function isPreExecutionCancelledAttempt(run, expectedDisplayTitle, identity) {
if (run.event !== "pull_request" || run.status !== "completed" || run.conclusion !== "cancelled" ||
!positiveInteger(run.id) || !positiveInteger(run.run_attempt)) return false;
const headRepository = context.payload.pull_request.head.repo?.full_name;
if (typeof headRepository !== "string" || headRepository.length === 0) return false;
const attemptPath = "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}";
const requestAttempt = () => withTransientGitHubRetry(
"exact cancelled runtime attempt lookup",
() => github.request(attemptPath, {
owner, repo, run_id: run.id, attempt_number: run.run_attempt,
})
);
const exactAttempt = (source) => source.id === run.id &&
source.run_attempt === run.run_attempt && source.status === "completed" &&
source.conclusion === "cancelled" && source.path === workflowPath &&
source.repository?.full_name === repositoryName &&
source.workflow_id === run.workflow_id && positiveInteger(source.workflow_id) &&
source.event === "pull_request" && run.event === "pull_request" &&
source.display_title === expectedDisplayTitle &&
run.display_title === expectedDisplayTitle &&
source.head_sha === identity.headSha && run.head_sha === identity.headSha &&
source.head_repository?.full_name === headRepository;
const latestAttempt = async () => {
const { data } = await withTransientGitHubRetry(
"current cancelled runtime run lookup",
() => github.rest.actions.getWorkflowRun({ owner, repo, run_id: run.id })
);
return data.id === run.id && data.run_attempt === run.run_attempt &&
data.status === "completed" && data.conclusion === "cancelled";
};
const proofKey = JSON.stringify([
repositoryName, workflowPath, run.id, run.run_attempt, run.workflow_id,
run.display_title, run.head_sha, expectedDisplayTitle, identity.headSha, headRepository,
]);
try {
// Attempt/workflow/job proof is immutable; the latest attempt is always fresh.
if (preExecutionCancelledProofs.has(proofKey)) return await latestAttempt();
const { data: before } = await requestAttempt();
if (!exactAttempt(before) || !(await latestAttempt())) return false;
const { data: workflow } = await withTransientGitHubRetry(
"cancelled runtime workflow identity lookup",
() => github.rest.actions.getWorkflow({ owner, repo, workflow_id: before.workflow_id })
);
if (workflow.id !== before.workflow_id || workflow.path !== workflowPath ||
workflow.name !== "Build Runtime Images") return false;
const jobs = await withTransientGitHubRetry(
"exact cancelled runtime attempt jobs lookup",
() => github.paginate(
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs",
{ owner, repo, run_id: run.id, attempt_number: run.run_attempt, per_page: 100 }
)
);
if (!Array.isArray(jobs) || jobs.length !== preExecutionCancelledJobNames.size) return false;
const jobIds = new Set();
const jobNames = new Set();
for (const job of jobs) {
if (!positiveInteger(job.id) || jobIds.has(job.id) || job.run_id !== run.id ||
jobNames.has(job.name) ||
!preExecutionCancelledJobNames.has(job.name) ||
job.status !== "completed" || !["cancelled", "skipped"].includes(job.conclusion) ||
!Array.isArray(job.steps) || job.steps.length !== 0) return false;
jobIds.add(job.id);
jobNames.add(job.name);
}
if (jobNames.size !== preExecutionCancelledJobNames.size) return false;
const { data: after } = await requestAttempt();
if (!exactAttempt(after) || !(await latestAttempt())) return false;
preExecutionCancelledProofs.add(proofKey);
return true;
} catch (error) {
core.warning(`Cancelled runtime attempt ${run.id}/${run.run_attempt} is not proven pre-execution: ${error.message}`);
return false;
}
}

async function verifyCanonicalSmokeProducer(run, candidate, identity) {
if (!positiveInteger(run.id) || !positiveInteger(run.run_attempt)) return false;
Expand Down Expand Up @@ -726,11 +817,12 @@ jobs:
}
workflowRunQuery.created = `${pullRequestCreatedAt}..*`;
}
let matching = null;
const matchingRuns = [];
Comment thread
benhook1013 marked this conversation as resolved.
Resolved
await withTransientGitHubRetry(
"runtime-images workflow lookup",
async () => {
workflowRunPages: for await (const response of github.paginate.iterator(
matchingRuns.length = 0;
for await (const response of github.paginate.iterator(
github.rest.actions.listWorkflowRuns,
workflowRunQuery
)) {
Expand All @@ -755,13 +847,27 @@ jobs:
continue;
}
}
matching = run;
break workflowRunPages;
const createdAt = Date.parse(run.created_at ?? "");
if (!Number.isFinite(createdAt) || !positiveInteger(run.id)) {
throw new Error("matching runtime-images run has invalid native chronology");
}
matchingRuns.push({ run, createdAt });
}
}
}
);
return matching;
matchingRuns.sort((left, right) => right.createdAt - left.createdAt || right.run.id - left.run.id);
let newestPreExecutionCancellation = null;
for (const candidate of matchingRuns) {
const run = candidate.run;
if (run.status === "completed" && run.conclusion === "cancelled" &&
await isPreExecutionCancelledAttempt(run, expectedDisplayTitle, identity)) {
newestPreExecutionCancellation ??= run;
continue;
}
return run;
}
return newestPreExecutionCancellation;
}

async function resolveCurrentIdentity(label) {
Expand Down
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ checkstyle {

spotbugs {
toolVersion.set(spotbugsToolVersion)
// Preserve full analysis while keeping the auxiliary classpath out of one OS-limited argument.
useAuxclasspathFile.set(true)
}

subprojects {
Expand Down Expand Up @@ -323,6 +325,7 @@ subprojects {

spotbugs {
toolVersion.set(spotbugsToolVersion)
useAuxclasspathFile.set(true)
}

// --- Gate Checkstyle & SpotBugs ---
Expand Down Expand Up @@ -351,10 +354,10 @@ subprojects {
.filterNot { it.path.contains(generatedDir) }
.map { fileTree(it) { exclude(protoAndJooqPackages) } }
)
// Keep source roots unexpanded so -sourcepath stays a compact argument.
sourceDirs.setFrom(
sourceDirs.files
.filterNot { it.path.contains(generatedDir) }
.map { fileTree(it) { exclude(protoAndJooqPackages) } }
)
auxClassPaths.from(originalClassDirs)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,16 @@ The handler returns `PERMISSION_DENIED` for a caller that is not the exact verif

### Canonical public-production NEW admission lease source

The local [AccountGameplayAdmissionLeaseService](../../../../protos/account/v1/account_gameplay_admission_lease.proto) carrier prepares the four purpose-specific `AcquireGameplayAdmissionLease`, `FinalizeGameplayAdmissionLease`, `ReadGameplayAdmissionLease` and `AbortGameplayAdmissionLease` methods selected by [canonical session admission](../../system-architecture-session-behavior.md#canonical-public-production-new-admission). The intended peer is the exact same-namespace Game Session workload. Acquisition carries a transient initial LOGIN GSA credential and typed expected candidate/target values; those values remain comparisons against independently resolved current owners. Finalize, Read and Abort carry the complete unchanged original canonical lease bytes. Abort's absent decision remains unknown, and its cleanup reference represents an outstanding obligation. The expected candidate’s `issuer_id` is the exact Account issuer string; the manual authenticated owner joins it to the independently verified token and current issuer source/checkpoint, rather than accepting an equal generation as issuer identity.
The local [AccountGameplayAdmissionLeaseService](../../../../protos/account/v1/account_gameplay_admission_lease.proto) carrier prepares the six purpose-specific `AcquireGameplayAdmissionLease`, `FinalizeGameplayAdmissionLease`, `ReadGameplayAdmissionLease`, `AbortGameplayAdmissionLease`, `IssueOriginalNewGameplayCredential` and `ConfirmOriginalNewGameplayAdmission` methods selected by [canonical session admission](../../system-architecture-session-behavior.md#canonical-public-production-new-admission). The intended peer is the exact same-namespace Game Session workload. Acquisition carries a transient initial LOGIN GSA credential and typed expected candidate/target values; those values remain comparisons against independently resolved current owners. Finalize, Read and Abort carry the complete unchanged original canonical lease bytes. Abort's absent decision remains unknown, and its cleanup reference represents an outstanding obligation. The expected candidate’s `issuer_id` is the exact Account issuer string; the manual authenticated owner joins it to the independently verified token and current issuer source/checkpoint, rather than accepting an equal generation as issuer identity.

The shared codec preserves the existing 64 KiB lease and 15-second lifetime bounds, closed presence-aware fields, exact operation and binding-scope correlation, and the complete original ACK-receipt shape for a committed readback. Parsing that shape proves neither authentication nor physical commit or receipt durability. The local source now includes a concrete authenticated lease owner and a same-namespace certificate-guarded manual receiver/server factory; it remains unregistered. Focused Account-source and manual TLS proof cover acquisition and first fresh finalization/ACK with controlled reverse Game Session responses. Exact non-admitting read/abort and retained terminal lookup revalidate the current caller/global Account/token while preserving the original lease; tenant-source changes do not authorize new admission or erase the cleanup obligation. Retained PostgreSQL-version restrictions, token-retirement and orphan-cleanup delivery, actual Game Session authority and admitted `PLAY`/`LOOK` remain unqualified. Account must use the existing original physical-commit and independently durable receipt owners; wire evidence cannot reconstruct their in-process acknowledgement. Local source and proof status remain in [Account runtime and data](./runtime-and-data.md#implementation-status).

#### Unknown-decision abort resolution

An `ABORTED` original operation whose decision was unknown retains its null decision, original lease bytes and cleanup reference permanently. A later transition-selected Abort may return separate Account-owned resolution evidence; it never changes that original terminal result. Account verifies the exact existing provisional Game Session decision through its protected reverse read outside SQL, then rechecks the current authenticated caller and unchanged original abort under a fresh writable serializable transaction before recording one immutable resolution. The resolution binds its own identity, the original lease UUID, fence and canonical digest, the original cleanup UUID and the verified transition UUID. It grants neither admission nor completed Game Session cleanup.

Exact retries return the retained resolution after current-caller and original-operation checks without requiring Game Session to remain provisional. Conflicting selectors or evidence fail closed. Read and null-decision Abort continue to return the original unknown terminal result without resolution; unrelated purposes cannot carry it. Game Session requires the separately authenticated, exactly correlated resolution before its existing fenced transition and binding/index cleanup. Broader orphan-delivery and production-registration qualification remain separate.

### Operator Authorization References

StartSession response recovery preserves the raw `firemud/account-response-envelope/aad/v1` grammar and authenticates the canonical authority-evidence bytes directly; no digest replaces those bytes. The authority bundle is bounded at 128 KiB, the complete canonical binding and exact response plaintext at 144 KiB each, and the AES-GCM envelope by that plaintext maximum plus its bounded header and tag. Repository and PostgreSQL storage allow at most 160 KiB. Forward migration [V126.3](../../../../services/account-service/src/main/resources/db/migration/V126.3__start_session_response_envelope_bounds.sql) replaces only the envelope-size guard and leaves retained ciphertext and the existing immutable/erasure rules intact.
Expand Down
Loading
Loading