Skip to content

E21-33: CI checks the release role provisioner refuses its fixture (DEC-2350 S4b-2 follow-up) - #2308

Merged
kunwarshivam merged 54 commits into
mainfrom
claude/v2-provisionerd-release
Oct 23, 2026
Merged

kunwarshivam merged 54 commits into
mainfrom
claude/v2-provisionerd-release

Conversation

@kunwarshivam

Copy link
Copy Markdown
Owner

Story

E21-33, DEC-2350 S4b-2 follow-up. The coordinator asked for this release pin as a small PR on top of #2307, so #2307's review isn't held up. Base: claude/v2-provisionerd (#2307, 3ec86eea). It touches xtask/src/main.rs only: 109 lines added, 6 removed.

cargo xtask ci provisionerd-release follows the shape of stub-release and exchange-release:

  • It runs only when the diff selects mandate-provisionerd (DEC-1190).
  • It first refuses an environment that turns the release profile's debug assertions back on (release_profile_untouched, DEC-2322).
  • It builds the binary with --release and runs run --probe … --workspace ws_1 --namespace ws-1 --fixture with an empty environment.
  • It requires exit 2, role_provisioner_start_failed: fixture_not_built alone on stderr, and nothing on stdout. A build that kept running is reported as holding a fixture vault.
  • It is in FULL_JOB and PR_JOBS, and in USAGE, which also gains the missing exchange-release.

Spec clause → test

Spec clause or invariant Test name
The check accepts only the lone refusal: not exit 0 or 1, not anything on stdout, not a second line, not another refusal code, not a missing newline, not an empty stderr. It runs in full and in check tests::the_release_provisioner_check_accepts_only_the_lone_refusal

Dependencies

None.

Journal events added

None.

Not done

S4c, the chart, comes as its own PR.

Decisions needed

None.

Safety checklist (safety-critical changes)

  • No floats in money or quantity paths
  • No clock reads or randomness in the core
  • No unwrap, expect, or panics on trading paths
  • Ordering: inputs processed in journal order
  • Replay: same inputs give identical outputs
  • No secrets or trading content in logs or notifications
  • No x-planned or (planned: ...) marker added to a value the code already serves, or a reviewer signed it off (DEC-683)

Checks


Generated by Claude Code

claude added 30 commits October 22, 2026 16:46
…nge only once its roles exist (journal v0.77, DEC-2350)

Journal spec §9.33 adds ConnectionRolesMade, ConnectionRolesRefused and ConnectionRolesRemoved on the
control stream at schema version 1, with rule 261 (a system actor and a cause) and stream rules 262
and 263 (each record tied to its OAuth request; a removal after the roles were made, each role once,
on its occasion, and the executor's role on a revocation only once no generation of its executor is
left running). §9.21 starts a token exchange only once its request's ConnectionRolesMade is read.
Connections spec §5.2 step 4 orders the roles first. The reference module connection_roles builds
the vectors: 36 invalid and 4 valid drafts, 19 rule-262 and rule-263 streams, 4 validator, 8 stream
and 7 vector mutants caught. Reserves and fills DEC-2350; adds the provisioner's backlog row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LmJtE8JXVQjyqTteJ5b9Cm
…role paths is DEC-2630 item 7's

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LmJtE8JXVQjyqTteJ5b9Cm
…xchange's alone (DEC-2350 item 3)

Rule 263 narrows to one removal per made roles, of the token exchange's role, on a closed request or
a revocation. A kill switch's start after a revocation can always log in; the cost, one executor role
per closed or revoked connection granting a read of its own destroyed token, is recorded in DEC-2350
with the sweep left in the backlog. The executor's role is an invalid draft; its stream cases and the
process fold go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LmJtE8JXVQjyqTteJ5b9Cm
…, and grant delete on the exchange's mount alone (DEC-2350, review)

Rule 263 now holds a removal's causation_id to a closer of its connection journaled after the
latest ConnectionRolesMade, so it never cites an earlier request's refusal under a new request of
the same id (DEC-699). The fold and the oracle each read it their own way; four new streams and a
vector mutant pin it. DEC-2350 item 5 adds delete on the token exchange's mount's block only, so
the policy itself keeps the executor's role. fixtures/refcases/journal.json is regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LmJtE8JXVQjyqTteJ5b9Cm
…ameters as strings (DEC-2350 item 5, V2's live check)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LmJtE8JXVQjyqTteJ5b9Cm
…change's roles alone, tests pending (DEC-2350)

S2 of DEC-2350, the vault side, option (B): the executor's role is never
removed.

- Identity::Provisioner, provisioned with an AppRole and a secret id
  only when provisioning is given the workspace's namespace
  (KubernetesAuth::namespace, from --secrets-namespace); its policy is
  provisioner_policy for that namespace and nothing else.
- provisioner_policy grants delete on the token exchange's mount's
  block alone (stubbed seam: provisioner_capabilities).
- role_request sends the pinned list parameters, the namespace and the
  policy, as plain strings: OpenBao's allowed_parameters pin refuses a
  JSON array however it is filled, so every role request was refused
  (verified on OpenBao 2.7.1; stubbed seam: pinned).
- A pin test that the provisioner's + sits on exactly the two
  Kubernetes mounts' role paths, and a live test that the provisioner's
  own token makes both roles, is refused a widened role, an executor
  role's removal, a policy and a secret, and removes the exchange's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…change's roles alone (DEC-2350)

S2's implementation: provisioner_capabilities grants delete on the
token exchange's roles alone, and pinned sends a pinned list parameter
as a plain string. Deletes the pending markers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
DEC-2350 item 5 now drops read from both blocks, since OpenBao refuses
a role read under required_parameters however it is granted: the
executor's block is create and update, the token exchange's create,
update and delete. The pin test asserts that, and the live test that
the provisioner reads neither role it makes. Merges #2278's head.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…tests pending (DEC-2350)

S3 of DEC-2350: journal spec v0.77 §9.33's ConnectionRolesMade,
ConnectionRolesRefused and ConnectionRolesRemoved on the control
stream, against the vectors' connection_roles section. Pending: the
catalogue entry, each base and valid draft parsing, every invalid
draft refused at its path, append judging rule 261 alone, and the
verifier's fold verify_connection_roles answering every stream case of
rules 262 and 263. The fold is stubbed; the parse tests fail on the
unknown event type, with behaviour-only rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…DEC-2350)

S3's implementation: the journal registers ConnectionRolesMade,
ConnectionRolesRefused and ConnectionRolesRemoved on the control
stream at schema version 1, catalogued with no configuration, and
append checks rule 261 on each (a system actor, then a cause). The
verifier's fold verify_connection_roles judges rules 262 and 263 as
the reference does: an answer names its own version-2 OAuth request,
once; a removal follows its connection's latest roles made, once, and
names a closer of those roles of its own occasion, a connect refusal
or a revocation journaled after them. Deletes the pending markers and
the four behaviour-only rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…pinned without a server, test pending (DEC-2350)

Review item on S2: only a live server told provisioner_policy from
openbao_policy for the provisioner's role, so the gate missed a
mutant there. provisioned_policy, stubbed here, is the one choice
provision makes, and a unit test pins it: provisioner_policy for the
provisioner given the namespace, openbao_policy for every other
identity and for the provisioner without one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…pinned without a server (DEC-2350)

provision writes each role's policy through provisioned_policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…he exchange's, tests pending (DEC-2350)

S4a of DEC-2350: RoleProvisioner, the role provisioner's session with
the vault, as OpenBaoSource is when it logs in as the provisioner:
make_roles makes the executor's and then the token exchange's role as
role_request forms them, and remove_exchange_role removes the
exchange's. No operation removes an executor's role (DEC-2350 item 3).
RoleRefusal names a failure in ConnectionRolesRefused's two reasons.
Both operations and the error mapping are stubbed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…he exchange's (DEC-2350)

S4a's implementation: make_roles POSTs the executor's and then the token
exchange's role_request, and remove_exchange_role DELETEs the
exchange's, a 404 being a role already gone. A refusal maps to
vault_unavailable for an outage or a sealed vault and to role_refused
for every other. Removes the temporary Unimplemented variant and the
pending markers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…ending (DEC-2350)

Mutants found two readings of rule 263 the vectors leave open: a
ConnectionRefused of another occasion taken for a request's close, and
a removal whose occasion does not name its closer's kind. A pending
test edits the removed_on_close case into each and expects rule 263
at the removal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
The fold compares a removal's named occasion against its closer's kind
in one step, an occasion that names neither standing for no closer, and
deletes the pending marker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
S4b of DEC-2350: mandate-provisioner, the role provisioner's library.
plan folds the control stream into the steps owed: roles to make for
each unanswered version-2 OAuth request, and the exchange's role to
remove once a request whose roles were made closes, or its connection
is revoked. Provisioner::tick performs each on the vault within the
30 s deadline and journals it, with the opaque alert
connection_roles_refused (RB-12) on a refusal. The records' drafts are
real, with event ids derived from the step; the plan and the pass are
stubbed. Pending: a request's roles once, a refusal and a slow vault,
a close and a revocation removing only the exchange's role, a step
the journal missed done again and recorded once, two racing writers,
an unopened stream, and the plan against every valid vector stream.

The crate is at layer 9, above mandate-vault, with its layers row and
CODEOWNERS line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
S4b's implementation. plan folds the control stream as the journal's
verify_connection_roles reads rules 262 and 263: a version-2 OAuth
request with no answer is owed its roles, unless it closed first, and
a connection whose roles were made is owed the exchange's removal once
its request closes or it is revoked, with that first closer as cause.
tick performs the first step owed on the vault within the deadline,
journals it, and reads the stream again, so each record is drafted
against the stream as it is; another writer's record under it is read
again at most APPEND_TRIES times. A refusal raises
connection_roles_refused (RB-12) with no ids; a removal the vault does
not do is retried by the next pass. No step removes an executor's
role. Deletes the temporary Unimplemented variants and the pending
markers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
… fails on

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…ts pending; the feature map's entry (DEC-2350)

Mutants found readings of the plan the vectors leave open: an API-key
or version-1 request, a close of one connection's request before its
answer, two connections' made roles, and a refusal of another occasion.
Three pending tests pin each over synthetic streams. The role
provisioner's feature-map entry names its code, tests and runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
A pass takes at most the steps it first owed and APPEND_TRIES more, so
a stream that never shows a record committed ends the pass as a
journal halt rather than looping; the plan tests' pending markers go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
claude added 22 commits October 22, 2026 21:42
…ending

A session that never logged in, built for unit tests, lets the identity check be
tested with no vault running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
A role operation from any other session is refused role_refused before the vault
is reached. The DELETE's doc now says why a missing auth mount counts as removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
The provisioner over the Postgres control stream, written as mandate-deployd
writes it, and the vault, logged in by AppRole as the provisioner and again every
hour. A session near its token's end that no login replaced stops the process,
failed, so it never calls the vault with a lapsed token. --fixture runs it over
memory and a vault that keeps nothing, and a release build refuses it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…es its fixture

cargo xtask ci provisionerd-release, in full and in check, like stub-release:
it builds mandate-provisionerd with --release when the diff selects it, runs it
with --fixture, and requires exit 2 with fixture_not_built alone on stderr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…2334, DEC-2338)

#2289 added `api-release` to `cargo xtask ci full` (DEC-2338 item 5) after
#2195 had split `full`'s parts into `full-checks` and `full-checks-2`
(DEC-2334). No CI job ran `api-release`, and
`the_full_jobs_run_exactly_the_full_group` failed on main.

Its release build of `mandate-api-server` takes about five minutes on its own.
Neither existing job has room for that under ten minutes (DEC-464):
`full-checks-2`'s `reference` alone is about 4.5 minutes, before its two
release builds. So it runs in `full-checks-3`, on the same selection, and
`full` needs all three. The verdict table now shows a failed, cancelled or
skipped `full-checks-3` failing `full`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UoxcMViCbnGUTPSaduuGYU
`cargo deny --locked check` fails on main. In ctutils 0.4.2, the constant-time
`Choice` mask lacked an optimization barrier (RUSTSEC-2026-0385,
RustCrypto/utils#1569); 0.4.4 and later fix it. ctutils is a transitive
RustCrypto crate, reached through aes-gcm, crypto-bigint, digest, sec1 and
universal-hash (webpush, p256, sqlx-postgres). `cargo update -p ctutils` makes
a patch-level bump. Nothing else in Cargo.lock moves, and no manifest or
dependency row changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UoxcMViCbnGUTPSaduuGYU
The vault's provisioner role operations and main's fingerprint key and registry are both kept,
the tests' mounts gain main's transit mount and the Kubernetes auth its namespace, xtask runs
both the role provisioner's and the API's release checks, and the journal spec's status takes
main's v0.80 with this branch's v0.77 clause in its place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
Main runs no job for its api-release part, so the full-job split test fails there; this ports
#2322's fix, which no-ops once it lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
Main's full-job split has no room for it in full-checks-2, so it runs beside the API's release
build, about two minutes more, under ten (DEC-464).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
The journal spec's status and history keep main's v0.75 and this branch's v0.77 in numeric
order, generate.py builds both new sections, the catalogue holds both records' types, the vectors
and fixture are regenerated, and full-checks-3 keeps the role provisioner's release check beside
main's api-release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
The journal spec, vectors, reference and fixture are main's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
The vault tests hold both main's policy_prefix and this branch's provisioner modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
@kunwarshivam
kunwarshivam changed the base branch from claude/v2-provisionerd to main October 23, 2026 13:33
@kunwarshivam
kunwarshivam marked this pull request as ready for review October 23, 2026 13:33
claude and others added 2 commits October 23, 2026 15:10
The usage text lists main's cell-seeded and cell-upgrade beside this branch's exchange-release
and provisionerd-release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
@kunwarshivam
kunwarshivam merged commit 82afa36 into main Oct 23, 2026
46 checks passed
@kunwarshivam
kunwarshivam deleted the claude/v2-provisionerd-release branch October 23, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants