Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0308691
Bind connect issuance to durable Account authority and exact readback
benhook1013 Oct 3, 2026
658d80d
Preserve durable bare LOGIN intent and isolate authority proof fixtures
benhook1013 Oct 3, 2026
473f9ca
Validate finite Account token profiles and correct rollback proof bas…
benhook1013 Oct 3, 2026
bb7fb28
Preserve initial bare LOGIN token identity capture and bundle referen…
benhook1013 Oct 4, 2026
13ea49a
Retain fenced membership sources and isolate Account proof fixtures
benhook1013 Oct 4, 2026
2bf2801
Bind retained role evidence and persist fresh global-role sources
benhook1013 Oct 4, 2026
46b0e1f
Bind actual token claim maps and qualify fresh role source triggers
benhook1013 Oct 4, 2026
139175d
docs: bind initial billing and playtest grants to owner evidence
benhook1013 Oct 4, 2026
c2b4f6d
Compose fresh Account role and membership source evidence
benhook1013 Oct 4, 2026
4b7e4f1
Prove Account capture source lock ordering against tenant advancement
benhook1013 Oct 4, 2026
b93ff02
Persist owner launch identity and committed authored-source selector …
benhook1013 Oct 4, 2026
8ee5dca
docs(account): record approved global-role authority boundary
benhook1013 Oct 4, 2026
bf09f2b
Bind World preparation to persisted opaque release reference
benhook1013 Oct 4, 2026
b7cc210
feat(game-session): persist source-qualified launch preparation
benhook1013 Oct 4, 2026
de793a3
Merge commit '27bc73f5826e2053568d84ae1f042db273ea7574' into HEAD
benhook1013 Oct 4, 2026
5579652
Merge commit '17eacb8399b0223b39d3bece63615f69072db837' into HEAD
benhook1013 Oct 4, 2026
974fbda
Converge current authority membership parsing and persisted launch re…
benhook1013 Oct 4, 2026
8a032fa
Merge commit '8ff3d4dadf45ab1728ce8dbaa55a75059ae08dde' into HEAD
benhook1013 Oct 4, 2026
3b514fd
Format composed canonical Version storage proof
benhook1013 Oct 4, 2026
b05b7b2
Merge commit '47098f8fa521faebb794ca7873d3fa3deb82bb6c' into HEAD
benhook1013 Oct 4, 2026
e9a21cf
Merge commit '648961c90724faa28e343b1922686691d8d34818' into HEAD
benhook1013 Oct 4, 2026
12d6cf5
Merge commit '63284319de34ed03c8666b5ab230175e7edd4e93' into HEAD
benhook1013 Oct 4, 2026
420e3b3
Correct canonical scope corruption and source readback fixtures
benhook1013 Oct 4, 2026
cec29b3
Merge immutable canonical release identity into Account authority com…
benhook1013 Oct 4, 2026
8a9badb
Fix canonical namespace evidence in Account PostgreSQL fixtures
benhook1013 Oct 4, 2026
b166428
test(account): stub transactional UUID authentication spy directly
benhook1013 Oct 4, 2026
91a83b7
Align Account PostgreSQL fixtures with canonical evidence
benhook1013 Oct 4, 2026
e635206
Allow Validation for stacked pull requests
benhook1013 Oct 4, 2026
f59bb8a
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
121 changes: 117 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
1 change: 1 addition & 0 deletions design/architecture/decisions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ Validation precedence is fixed: first parse every checked queue row and validate
| [ADR 0182](./adr-0182-separated-hosted-runtime-and-certificate-identity-lifecycles.md) | Accepted | `PO-3.2` | `PO-3.1`, `PO-4.4`, `SF-1.3`, `PO-1.1` | Separated hosted runtime and certificate-identity lifecycles |
| [ADR 0183](./adr-0183-deterministic-effect-id-allocation-and-replay-binding.md) | Proposed - Pending Human Review | `GR-1.2` | `GR-1.4`, `GR-4.1`, `AS-1.2`, `AS-1.4`, `SF-1.4`, `SF-2.3`, `PO-4.2` | Pending command-plan ordering, `planOrdinal`, command-root allocation, UUIDv7 scalar, canonical serialization, and additional child/fan-out allocation mechanics |
| [ADR 0184](./adr-0184-emergency-tcp-proxy-identity-withdrawal.md) | Accepted | `SF-1.3` | `PO-2.1`, `PO-2.2`, `PO-3.2`, `PO-4.4` | Emergency trust cutoff for a withdrawn TCP Proxy bridge identity |
| [ADR 0185](./adr-0185-account-owned-global-role-administration-and-bootstrap.md) | Accepted | `AA-1.1` | `SF-1.1`, `PO-1.1` | Account-owned human global-role administration and protected first-administrator bootstrap boundary |

Capability identifiers are defined in the [FireMUD Product Capability Taxonomy](../../product/capability-taxonomy.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ The Account durable authority record, its immutable versioned evidence bundle, a

Account exposes one immutable, versioned `account-auth-evidence-bundle/v1` for each authorization operation. At one Account linearization point, the bundle contains only Account-owned authority state: the complete applicable registry tuple, both cutoff objects, live applicable global and tenant-role evidence with its role-freshness source, `issuanceFence`, the exact token-identity fence, `membershipVersion` (the exact tenant-ID map, or `{}` when non-applicable), the exact Account scope, a positive `bundleVersion`, the durable source transaction or outbox version, the monotonic source fence, projection freshness/source evidence, and `outboxCheckpoints`. `outboxCheckpoints` contains one exact `{outboxStreamKey, outboxSequence}` checkpoint for every applicable authority stream defined by the scope. Checkpoints cover the exact `account:auth-authority:v1:<scopeId>` stream keys involved in the bundle, with no aggregate maximum or cross-stream sequence substituted for an individual stream checkpoint. Redis registry and lease state plus Game Session binding and installation state are not Account-linearized bundle fields. The immutable bundle reference is `{bundleVersion, sourceVersion, sourceFence, linearization}`; branch decisions, role freshness, generations, and operator references must carry and match that exact reference.

The reference names the existing durable Account capture: `sourceVersion` identifies that immutable capture, and `sourceFence` is the Account-controlled fence for committing and reading that capture. They are capture metadata, not an aggregate or maximum of independently advancing issuer, account, tenant, membership, role or cutoff source versions. The bundle preserves every applicable source's exact version and checkpoint separately, captured consistently at the Account linearization point. Neither reference field replaces `issuanceFence`, an exact-token fence, revocation authority, any per-source version or checkpoint, or current-source validation. A capture remains immutable when a source subsequently advances; its historical readback is not proof that the source is still current. Exact readback must match the complete capture reference, operation and token binding, applicable source set, values, versions and checkpoints. Mixed captures, substituted source evidence, and mismatched references fail closed rather than being repaired by taking a maximum or rereading individual fields. This interpretation was approved by the human architecture owner on 2026-10-04; it clarifies the accepted bundle contract without enabling runtime issuance.

Account issuance and refresh use one Account transaction or composite CAS/fence to create the durable Account evidence and the versioned `account-auth-evidence-bundle/v1` reference. That transaction/CAS does not create the Coordination Redis registry record or any Redis lease or Game Session binding/installation. Each operation-bound registry, lease, binding transition, and installation postcondition is separately versioned, fenced, and idempotent outside the Account transaction and carries the same immutable `operationId`, caller `requestId`, canonical request digest, token digest, and `issuanceFence`; retries and reconciliation apply only missing postconditions. A steady-state gameplay binding instead retains the canonical ADR 0031 binding schema and does not acquire operation-scoped fields after its transition is terminal. `operationId` identifies the one durable Account operation and cannot change after creation. `requestId` is the immutable logical retry identity supplied by the owning API; where a public surface uses `requestId` as its operation ID, it remains the same single identity and no second public identifier is introduced. The canonical token digest is `tokenHash`, the fixed-length SHA-256 digest of the complete compact JWT, and it is immutable for that token identity; it is distinct from the canonical request digest, which never contains raw JWT bytes. The registry record stores the matching Account `bundleVersion`, `sourceVersion`, `sourceFence`, and freshness/linearization evidence with its tuple. Lease, operation-bound binding transition, and installation evidence stores its owning service's positive version/fence plus the exact registry identity and Account bundle reference it satisfies.

Every registry-backed JWT authorization attempt, including `IssueConnectToken` with a presented `player-bootstrap`, performs exactly one atomic issued-token registry lookup, which must return the exact `state=active` record and its positive registry version, then reads exactly one complete immutable Account bundle and each applicable downstream owner evidence at the exact version/fence named by the registry or durable operation. It compares the JWT, registry tuple, every applicable cutoff as its complete generation-plus-`outboxStreamKey`-plus-`outboxSequence` tuple, every applicable `outboxCheckpoint`, separate `membershipVersion`, Account fences, and each independently owned lease, binding, or installation version as one decision. The `membershipVersion` claim, registry field, Account evidence value, and each applicable lease, binding, rebind, rotation, installation, and retry carrier must preserve exactly equal map structure and key/value pairs, including canonical `{}` for non-applicable membership; no omitted, `null`, scalar, or sentinel form is equal. `membershipVersion` remains an independent comparison from `authorityTuple.membershipAuthorityGeneration`; both values must match the same applicable Account authority snapshot. If an owner reports that a requested bundle, registry-linked postcondition, or version/fence was superseded while it was being read, the consumer discards the entire attempt and retries from a new registry lookup; a second change or any reachable mismatch denies. Timeouts and unavailable owners return retryable `AUTH_UNAVAILABLE`. No consumer rereads unrelated fields, combines evidence from different attempts, or claims a cross-store atomic snapshot.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# ADR 0185: Account-Owned Global-Role Administration and Bootstrap

## Status

Accepted

## Implementation Status

The approved authority boundary is target state only. Global-role grant/revoke production, the protected initial-administrator bootstrap, its Account source/event/readback implementation, and Gateway → Logging & Admin ingress are not implemented or proved. The V55 explicit-empty source is fresh-Account birth evidence only; it does not authorize mutation or retained-account enrollment. Existing activation gates remain closed.

## Decision Record

- Human review status: Completed
- Human review date: 2026-10-04
- Human review disposition: Accepted
- Review source: `AUTH-GLOBAL-ROLE-WRITER-01`
- Decision owner: FireMUD human product and architecture owner
- Consultation: Ben explicitly selected “Approve this boundary (Recommended)” on 2026-10-04, relayed by the Overseer through inbox `0f5ec31e-db81-4b31-ab9c-7e94b257cd62`

## Context

Global roles authorize only the control-plane route classes declared by Authentication and the Authorization Route Matrix. Account's V55 birth source records an explicit empty role set for eligible fresh Accounts, but retained role history, mutation authority, and authenticated recipient evidence are not supplied by that source. A present-day legacy scalar, first registrant, token claim, tenant identifier, or ordinary automated workload cannot safely establish the first global administrator or authorize subsequent role changes.

## Decision

Account is the sole authority for granting and revoking global roles and for the current role state used in authorization. Ordinary grant and revoke requests enter through the Gateway to Logging & Admin as human operator actions. The human operator must have a live `platformAdmin` role and current `privileged_control` step-up evidence. Account issues the currentness authorization used at the authoritative owner commit and revalidates it there; the committed operation has durable audit evidence. Logging & Admin is the external ingress and audit/forwarding boundary, not a second role authority.

The first `platformAdmin` is established only through a separate, one-time protected deployment bootstrap. It is not assigned by public registration, first-account status, a legacy scalar, an asserted or signed token role, or ordinary automation. The bootstrap is a distinct operational authority from ordinary grants and revocations.

Global-role actions are account-global actions with an explicit global-account target scope. They cannot use the existing non-moderation `tenant_scope` branch or treat a tenant ID, tenant role, or target-tenant generation as a substitute. Unattended automation cannot grant or revoke global roles.

This decision selects the authority and ingress boundary only. It does not select an HTTP route, protobuf method, action-family schema, mutation identity or digest grammar, exact bootstrap artifact or recovery protocol, durable event schema, source-counter composition, or deployment activation procedure. Those details require canonical owner contracts and focused proof before a route or mutation becomes available. Until then, global-role mutation is target-only and fail closed.

## Consequences

- Authentication owns the normative role-administration policy and its authorization consequences.
- Account owns role persistence, the mutation/currentness decision at commit, durable audit evidence, and authoritative readback. Role-source version, Account authority generation, issuance fence, and event-stream checkpoint remain distinct evidence and must not be inferred from each other.
- Logging & Admin owns only the human external ingress and its local durable intent/audit and forwarding consequences under ADRs 0047 and 0048.
- The Authorization Route Matrix records target-only denial and an explicit global-account action scope. It does not create a runtime route or enable global-role administration.
- The protected first-administrator bootstrap, source/event contract, authenticated capture/readback, retry/recovery behavior, migration/enrollment policy for retained Accounts, and end-to-end proof remain implementation prerequisites.

## Alternatives Considered

### Allow the first registrant or an existing scalar to become administrator

Rejected because public registration and historical role fields do not prove an authorized administrative designation or a trustworthy retained grant history.

### Permit tenant-scoped or ordinary automated role assignment

Rejected because tenant authority does not imply platform-global authority, and the current automation authorization path is tenant-scoped without a human operator or global-role step-up.

### Enable mutations before owner-currentness and audit are committed

Rejected because an ingress decision or preflight read cannot remain authoritative through Account's mutation commit or provide durable attribution.

## Reversibility and Revisit Triggers

The route and storage details remain intentionally unselected and can be specified under this accepted authority boundary. Revisit this decision only if the human owner changes who may administer global roles, the initial-administrator trust boundary, or the required human-only step-up policy.
Loading
Loading