Skip to content

feat: v0.51.0 BReg and Casework journeys - #2913

Closed
jeremi wants to merge 26 commits into
mainfrom
draft/v051-journeys-700e8ea
Closed

jeremi wants to merge 26 commits into
mainfrom
draft/v051-journeys-700e8ea

Conversation

@jeremi

@jeremi jeremi commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Replaces #2887; rebased on main after v0.50.0 (700e8ea).

Status

Draft. This branch carries the same reviewed changes as #2887, replayed onto current main after the v0.50.0 documentation and release notes landed. Only one rebase conflict needed a decision: the Platform changelog entry stays under Unreleased, above the new 0.50.0 section. Every other commit replayed unchanged.

v0.51 pull requests do not merge before the v0.50.0 release source is cut. This draft is open so hosted CI can run the full workspace gate on the rebased tree.

Hosted CI on the rebased tree found six problems that local targeted checks did not cover. This branch fixes them:

  • The docs site inventory test now names the new bregctl report schema as a report format, not configuration.
  • The secret scan read a fixed test attempt UUID as an API key because of its constant name. The constant is renamed. The scan allowlist is unchanged.
  • The public identifier catalog is regenerated to include the new report schema.
  • The bregctl explain contract test reads the explain report example directly, because the registered ctl-report example is now the identity facts report.
  • The breg-mcp citizen journey test enables the token fixtures that the shared Review test support now uses.
  • The synthetic caseworkctl in the rstack Dev tests prints the complete owner report that the offline check requires, as real caseworkctl does.

Expected CI red: Validate release manifest (registry-release validate-current). The current release manifest is the v0.50.0 source, and it pins the identifier catalog's hash and entry count. This branch adds one catalog entry, so the check fails until a v0.51 manifest exists. The v0.50.0 manifest is deliberately left untouched.

Expected CI red until v0.50.0 is tagged: Immutable docs archives. Without the tag, the archive check builds the v0.50.0 docset from this branch's source, and the documentation changes here move its hash away from the lock. Once the tag exists, the check builds from the tag. The archive lock is deliberately left untouched.

Summary

v0.51.0 BReg and Casework journeys. This branch collects reviewed fixes and features for eight issues, plus the native and client handoffs for holder-authorized BReg Actions (#2835).

Closes #2828, #2874, #2881, #2869, #2879, #2875, #2877, #2823.
Part of #2835 (the operated proof and the public holder export are in #2911, and the shipped reference host follows in #2910, see below).

Applicant flows (#2800, #2801, #2802) and organisation stewardship (#2839, #2861, #2867, #2868) moved to v0.52.0 and are not in this branch.

What each issue delivers

#2828 Casework lease observation (test only)

crates/registry-casework/tests/review_postgres.rs now reads fresh PostgreSQL activity with a bounded wait when it observes the dispatcher lease. It covers a stalled activity query timing out, a held row lock refused and rolled back, and stale-owner dispatch fencing. No runtime change.

#2874 Missing array claim fixture (test only)

The multi-reference-array-claim journey expected 404 for refuse-missing-array-claim. Both released v0.49.0 and the role baseline refuse earlier, at profile admission, with 403 profile.not-authorized. The fixture now expects the observed refusal. The two 412 wrong-array cases are unchanged.

#2881 Synthetic licence public check on released binaries (test only)

products/breg/evidence/tests/verify-composition.py gains a served mode that runs a synthetic licence public check against checksum-pinned released v0.49.0 bregctl and Evidence binaries. It exercises five public HTTP cases (success, missing input, wrong code, missing stored code, absence) and compares two exports against nine reviewed hash pins. The harness lets the released launcher cancel startup and cleans up both managed services and the disposable database. Because the role baseline changed two authoring fixtures, the harness pins the exact v0.49.0 Dev plan and BReg journeys it runs against (products/breg/evidence/public-check/*-v0.49.0.yaml). No product runtime change.

#2869 Classification ceilings for stored BReg fields

Record permissions and read paths can select readable fields with readableFields.upToClassification instead of an explicit list.

  • The compiler resolves the ceiling inclusively to concrete stored field IDs after module extensions and project access expansion, then runs the existing access, consent and disclosure validation on the resolved list. The runtime only ever sees the resolved list. An unresolved ceiling yields an empty set and fails closed.
  • Ceilings select only BReg-owned stored fields on the direct Record type or the declared read-path target. Derived outputs, provenance and attachments keep their own grants.
  • External View links accept explicit lists only. A ceiling there is refused at parse, for live and indexed modes.
  • A permission with requireConsent must use explicit lists for its direct reads and read paths. A ceiling there is refused with breg.consent.readable-fields-explicit-required (BREG-SEC-245).
  • Explicit and ceiling forms with the same resolved set produce identical registry revisions and generated artifacts.
  • Authoring schemas for projects and modules are regenerated.
  • Operator, authoring, consent and security docs and the BReg changelog are updated.

#2879 Generated BReg role inventory read-back

bregctl generate identity-facts now reports the exact YAML bytes it wrote: length and SHA-256 are taken from the written artifact. It refuses to overwrite an existing output (identity-facts.output-exists). A new generated tool schema, products/breg/generated/tools/ctl-report.v1alpha1.schema.json, describes the completed BRegCtlReport for this command. It is registered in products/platform/config-formats.yaml with a positive example and listed in the public identifier catalog. The existing explain report example keeps its own byte-for-byte check against current bregctl explain output. Tests compare the native writer's facts with an independently compiled authority inventory. The saved-report reader (#2878) and the conformance witness (#2880) live in other changes.

#2875 Product references in unassigned service roles

An unassigned role in service.yaml could name an unknown product and pass rstack dev check and hosted rstack identity check. The shared role checker now resolves product names in unused roles against the recognized product vocabulary, or against supplied identity facts. An unknown name returns identity.deployment.unknown-product at the exact product key. Assigned roles still require facts for every referenced product, as before. Dev diagnostics point to dev.yaml and service.yaml. Hosted diagnostics keep the "supply identity facts" remedy.

#2877 Offline verification of product role assignments

rstack dev check now verifies each owner tool's offline report: exact report kind, format version, command and status, unique JSON members, the exact output path, profile and claim counts against the typed facts file, and the issuer and audience pair. For Messaging, whose admission comes from the package, it pins the tool bytes, the projected runtime bytes and the verified package digest before and after generation. A non-ignored test checks all nine owners' typed facts, role reference refusal, stale facts context and report format drift against the maintained owner artifacts. rstack dev start behaviour is unchanged. Runtime token issuance and executable custody are unchanged. Platform changelog updated.

#2823 Token corpus

  • Adds a browser callback column for the BReg Review authorization-code sign-in, in both postures, separate from bearer admission (products/platform/conformance/tokens/browser-callback-expected.json).
  • Asserts the four Coordinator ID-token cells (ThunderID, Keycloak, Supabase, Entra) as actual refusals in both postures.
  • Scopes the "negative fixture" wording in the corpus README and fixture schema to bearer admission.
  • Adds BReg Review to the CI selection for corpus path changes.

No production verifier, product caller policy, bearer expectation or token fixture changes.

#2835 Holder-authorized BReg Actions (handoffs only)

  • products/breg/fixtures/holder-authorized-action/: a native fixture that proves own renewal, same-key replay, foreign condition lookup refusal (404), crossed-target write refusal (412) and wrong-profile refusal (403), and checks that the foreign record is unchanged.
  • clients/typescript/holder-function.ts: an internal holder Function helper that binds preparation to one BReg Action on one existing Record. It keeps the holder credential and the write on the host side. In this branch it adds no package export, gateway route or token acquisition.

The follow-on landed in #2911, the v0.51 dev runtime pull request. It carries the reviewed cancellation and preparation deadline supplement, a create-shaped binding for Actions that make a new Record, the public @registrystack/client/holder-function export, and the operated overlay proof (38 cases). The shipped reference host follows in v0.52 (#2910).

Security review notes

#2869: disclosure ceiling, consent rule, operator obligation

  • Disclosure ceiling. The ceiling moves a control from the author to the operator. An author who writes a ceiling no longer edits accessProfiles to widen a grant. A later field addition or reclassification at or below the ceiling widens the compiled grant under the same authored permission. The compiled grant is still explicit, so every runtime check is unchanged.
  • What the operator sees. A successor package that widens a direct grant appears in bregctl diff --package as widening on the Record type. A widened read path appears on the root Record type as review-required, with the nested readable set. A changed list or read-path projection needs a reviewed migration and is never applied automatically. A widened get-only grant follows the existing access-change policy (BREG-RES-03).
  • Consent rule. A consent scope is the profile id, and subjects consented to that scope as it stood. A ceiling could widen it without anyone editing the profile. The compiler therefore refuses a ceiling on any direct grant or read path of a permission with requireConsent (breg.consent.readable-fields-explicit-required, BREG-SEC-245, negative test a_consent_scope_requires_explicit_fields_on_direct_reads_and_read_paths). The refusal fires only when a ceiling is authored, and the ceiling has not been released, so no existing profile breaks.
  • History. Revisions project through the current grant. Lowering a field's classification exposes its earlier values to every ceiling profile with history access. Raising it hides them again. This matches an explicit widening and is now documented.
  • Operator obligation. The BReg security model adds obligation 23: as the migration credential holder, review the effective fields of each affected direct grant and read path before applying a successor, and keep explicit lists on each permission with requireConsent. The BREG-RES-03 mitigation points to it.
  • Unchanged boundaries. External View links stay explicit only. Path authority stays independent of the target's direct grant, as before this change.
  • Review. Independent review: both earlier P2s closed, all P3s addressed. Second independent review: GO with conditions. Its conditions (consent refusal, operator obligation, list and read-path apply behaviour) are met in this branch.

#2823: token cells

  • No cell is settled by widening what a token is accepted for. The bearer expectations, token fixtures, shared loader and driver are unchanged. The loader still rejects an admission expectation for a negative fixture, and the driver still reports an actual admission of a negative fixture as a mismatch.
  • The four Coordinator ID-token cells refuse at audience (ThunderID, Keycloak, Supabase) and at token type (Entra), in both postures.
  • The callback column is scoped to the ID-token member of the Review code response and grants no bearer use. Four client-bound ID token shapes sign in in both postures. The development-marked ID token signs in only in development. Foreign issuer, missing or wrong nonce, wrong audience, and sampled access, refresh and opaque API-key tokens refuse in both postures (4 sign-ins and 9 refusals in production, 5 and 8 in development).
  • The breg-mcp test dependency now enables the shared token fixtures. This is test-only and changes no runtime crate.
  • Independent review: no P1 or P2. The one P3 (fixture schema wording) is fixed.

Other changes

#2875 only tightens authoring acceptance of unknown product names. #2877 only adds refusals to the offline check. #2879 adds a structural report contract and a writer-to-artifact correlation, which carries no grant or file trust by itself. None of them widens role resolution, grants, token issuance or product disclosure. Independent review found no P1 or P2 in #2879 and #2875. Its P2 for #2877 (acceptance matrix only in local evidence) is fixed by the committed nine-owner test.

Verification

On the rebased tree, before hosted CI:

  • TypeScript client package tests, with no failures, including the 11 holder tests.
  • Docs site tests (989 of 989).
  • Repository CI script tests (301).
  • BReg contract validator and its tests.
  • Docs evidence anchors, strict configuration conventions (0 unrecorded, 0 stale, 0 errors), rustfmt on changed files and git diff --check.

For the hosted CI fixes:

  • The identifier reference closure is complete, and the identifier checks pass (32 tests) with the catalog byte-for-byte reproducible.
  • The secret scan finds no leak in the renamed test file.
  • The bregctl explain contract tests (34) pass, and the breg-mcp citizen journey test compiles.
  • With every product tool the CI developer tools lane builds, the rstack, rstack-dev, rstack-service and CLI docs tests pass with no failures (65 native Dev tests among them). The synthetic caseworkctl report was compared with real caseworkctl output under the development posture.
  • Clippy with warnings denied passes on the three changed crates.

Targeted suites on a fresh build of the pre-rebase head:

Other checks on the pre-rebase head: the #2881 harness tests (5) and the full served v0.49.0 public-check run, the generated report schema hash and its positive and invalid examples, ShellCheck and shfmt.

Earlier per-issue runs on the original commits:

The root workspace gate (cargo test --workspace, full Clippy, cargo deny) was not run locally. Hosted CI runs it.

Not verified

jeremi added 23 commits December 2, 2026 00:59
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The completed identity facts report schema sits beside the BReg tool
schemas but is an output an adopter reads, not configuration they write.
Name it as a report schema so the inventory check still requires every
other committed tool schema to be a documented contract.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The secret scan's generic API key rule read the fixed attempt UUID,
assigned to a constant named after the idempotency key, as a credential.
It is a synthetic attempt identifier, so name it for what it is instead
of widening the scan allowlist.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…schema

The report schema joined the BReg v1alpha1 tool schemas without a
regenerated catalog, so the reference closure refused its identifier.
Regenerated with products/identifiers/scripts/generate.py --write.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi jeremi added this to the v0.51.0 milestone Dec 2, 2026
return error.code, json.load(error)

status, result = check(number, checkCode=code)
assert status == 200 and result.pop("observedAt"), (status, result)
The ctl-report registration's example is the completed identity facts report, which shares the explain report's apiVersion and kind. Read the explain example directly and keep the registration check for apiVersion and kind.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The shared review test support signs tokens with TokenSigner and TokenFixture, which registry-platform-testing exposes only under token-fixtures.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
An offline dev check requires the owning tool's complete report for identity facts. The fake now prints the report real caseworkctl emits under the development posture, counting the facts it wrote.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi jeremi added the ci:full Run the heavy integration tier on this pull request label Dec 2, 2026
@jeremi

jeremi commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

Replaced by #2928, the one v0.51.0 pull request (all three lanes replayed onto v0.50.0 and folded).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the heavy integration tier on this pull request

Projects

None yet

2 participants