Skip to content

v0.51.0 contracts and diagnostics - #2912

Closed
jeremi wants to merge 90 commits into
mainfrom
draft/v051-contracts-diagnostics-700e
Closed

jeremi wants to merge 90 commits into
mainfrom
draft/v051-contracts-diagnostics-700e

Conversation

@jeremi

@jeremi jeremi commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

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

One vocabulary for problem codes, record IDs, pagination, route parameters and product logic, with the CI paths that keep them honest.

Closes #2805, #2808, #2809, #2816, #2840, #2841, #2842, #2843, #2846, #2847, #2849, #2850, #2851, #2852, #2889, #2896.
Refs #2817, #2822 and #2880 (partly delivered, see "Not verified").

Draft status

This pull request stays a draft. v0.51 pull requests do not merge before the v0.50.0 release source is cut. When it is, this branch is rebased onto that source and checked again.

Tonight's state:

  • Every commit from v0.51.0 contracts and diagnostics #2886 applies unchanged on main after the v0.50.0 release documentation, and the Rust sources are identical to the reviewed branch. Hosted CI on this head found defects the earlier runs had hidden behind their first failure. They are fixed in separate commits (see "Fixes found in hosted CI"), and hosted CI is now red only where expected.
  • The package-verification follow-up, the posture diagnostics page, the posture CI classifier, the Adapter and Render outbound destination changes and the release roster fix each passed independent review.
  • Still open before ready for review: the Pin configuration warning and JSON conformance controls #2880 exact control positions, which need the companion writer and reader changes on main first, and the rebase onto the v0.50.0 release source.
  • Expected CI red: registry-release validate-current (and the release test that validates every manifest) until v0.50.0 is tagged. The draft v0.50 manifest pins the v0.50 identifier catalog, and this branch regenerates the catalog. See "Not verified".

What each issue delivers

Issue Delivers
#2850 TypeScript task response fixtures are validated against the generated OpenAPI contracts and follow the served Proposal operations, including rebase recovery.
#2840 OpenAPI problem responses declare the development diagnostic field per response, and the docs renderer projects prohibited properties safely.
#2816 Retired configuration spellings are listed once, in the Retired spellings table of the configuration conventions. The convention lint refuses them in format files and the docs gate refuses them in pages, except in migration notes. Retired Evidence and Casework terminology fails on every page. Shared Registry Record ID spellings are enforced.
#2808 Exported problem codes follow one grammar and malformed codes are rejected, and the identifier catalog is regenerated from the current contracts.
#2805 BReg import, ingestion and batch inputs that still use recordIdentifier are refused with a diagnostic that names recordId.
#2809 Record, history, relationship and External View lists use limit and cursor across BReg, its OpenAPI, the query explanation, the Proposal reference and the Rust, Node, Deno and Python clients.
#2841 Coordinator client refusals name the Idempotency-Key header, and Payment problems emit canonical Adapter HTTPS type URIs.
#2843 Generated clients use descriptive lower-camel-case route parameters in Casework, Scheduling, Messaging, OID4VP, Coordinator, Render and the Adapter breg-records contract. A check refuses unpublished route names before publication.
#2842 Render calls authentication.apiKeyRef the shared API key and states its lifecycle: a supported mode for a single trusted caller with no OIDC issuer, which never seals and whose audit entries all carry one key fingerprint.
#2846 bregctl, caseworkctl and evidencectl name production closure checks the same way, with CLI catalog parity.
#2852 The Rust gate inventory is checked structurally, so workflow edits do not silently drop a required gate.
#2849, #2851 A scheduled and opt-in CI job runs the TypeScript live suite under Node, Deno and Chromium against products built from source, plus the opt-in authoring verification. Live checkout and shell execution are required.
#2889 Bounded product logic gets product names: BReg Action Plans, Evidence Derivations and Coordinator Transforms, distinct from service functions. Authoring keys, diagnostics, explain output, schemas, docs and the glossary follow.
#2847 A generated lookup table for posture diagnostics, with CI routing that rebuilds the docs when a posture declaration changes.
#2896 Nightly security reports advisory exceptions that are close to expiry, and the Dockerfile guard still runs when the reminder fails.
#2880 BReg warning and duplicate-key controls and synthetic operator canaries are pinned with exact positions.
#2822 Full live verification requires Deno.
#2817 Adapter source checks, engine data and token egress, live verification, and Render timestamp delivery take their transport from the shared outbound selector. Adapter sources deliberately stay HTTPS or loopback only (see the Adapter product guide): a private range admits an HTTPS answer, never plain HTTP.

Fixes found while rebasing

Fixes found in hosted CI

Each cause is one commit on top of the rebased branch.

  • BReg project SDK paging (One pagination vocabulary #2809). The generated TypeScript and Python project SDKs still sent top on related-record list calls. They now send limit, a test asserts that both generated SDKs pass limit to the native client, and the facility and minimal generated SDKs are regenerated. This is the only product code change in this set.
  • BReg compiled revision pins. The compiled revision digest covers the generated OpenAPI and SDK, so the One pagination vocabulary #2809 and Include the development diagnostic field in OpenAPI problem responses #2840 contract changes move it. The DDL and Action fingerprints are byte-identical to main, and only the OpenAPI pagination names and the development failedCheck member differ. The pins and the eight registered examples that embed the revision are updated, with a comment that says what the revision covers.
  • Tests and fixtures behind the renames. bregctl data lifecycle asserts cursor, the client capability check edits limit, the language server navigation fixture and the service preview projects use actionPlans, the Node facade type test pages with limit, and the OID4VP endpoint test looks up the published sessionReference and requestId paths and counts every route.
  • Diagnostics. The Coordinator client problem test carries the development failedCheck member (Include the development diagnostic field in OpenAPI problem responses #2840). The language server reports Derivation findings under the derivation code and the Evidence finding order follows it. The retired Render seal command names POST /v1/seal/{documentType} (Use consistent route parameter names in generated API clients #2843).
  • Docs. The SQLite extract tutorial shows the starter's derivation assets line, and the deploy tutorial runs the production closure check with the posture its flag requires. Both tutorials were run end to end.
  • Live TypeScript harness. Test people get roles that the plan's service.yaml declares, with product-keyed claims and purposes, so the staged plan passes rstack dev check.
  • Style. rustfmt on the new SDK test and one needless borrow in the language server.

Release scripts

  • The release build scripts store each release roster answer before comparing it, so a failing roster lookup fails the build instead of reading as "not in this release" and silently leaving a binary or image out. A roster test refuses the old comparison shape in every release script.

Breaking changes and migrations

Each product CHANGELOG has the full entry.

  • BReg Action Plans (Use consistent names for service functions and embedded logic #2889). In registry.yaml and module.yaml, rename functions to actionPlans. In an Action's plan, change type: function to type: scripted and rename function to actionPlan. IDs, sources, inputs, writes and the registry.action-plan/v1 ABI are unchanged.
  • BReg diagnostics (Use consistent names for service functions and embedded logic #2889). breg.function.* becomes breg.action-plan.*, and breg.action.function-* becomes breg.action.plan-*. Update alert and report consumers.
  • BReg package upgrade (One pagination vocabulary #2809, Use consistent names for service functions and embedded logic #2889). Strict bregctl check --package refuses a sealed v0.49 package whose generated OpenAPI uses $top, with breg.package.generated-artifacts-refused. Keep the old package and its v0.49 tools and runtime until cutover. Update the authored keys, then run v0.51 bregctl test and bregctl package with --baseline-package ACTIVE, check the successor, and run bregctl plan and the reviewed bregctl apply.
  • BReg resealed artifacts (Use consistent names for service functions and embedded logic #2889). A generated artifact changed and then resealed now reports breg.package.generated-artifacts-refused instead of breg.package.integrity-refused. A sealed source that mixes historical and current Action Plan spellings reports breg.package.integrity-refused.
  • Evidence Derivations (Use consistent names for service functions and embedded logic #2889). Rename functions to derivations and derive.function to derive.derivation. Authoring codes move from evidence.project.function-* to evidence.project.derivation-*. Regenerate typed bindings with evidencectl types and import DerivationBindings.
  • Coordinator Transforms (Use consistent names for service functions and embedded logic #2889). Rename functions to transforms, use type: transform with a transform member, and read coordinator.transform.* diagnostics.
  • Generated client path arguments (Use consistent route parameter names in generated API clients #2843). Casework, Scheduling, Messaging, OID4VP, Render and Adapter breg-records path arguments use lower-camel-case names (for example taskId, holdId, messageId, sessionReference, documentType, recordId). Operation names and HTTP URLs are unchanged. Refresh a Live Effective Contract and its pinned digest together.
  • Payment problem identifiers (Harmonize problem identifiers across product APIs #2841). Payment problems use canonical Adapter HTTPS type URIs. Upgrade strict payment clients with or before the payment host. Updated clients still read the enumerated legacy URNs.
  • Render timestamp authority (Every product chooses outbound transport through the shared destination selector #2817). Render resolves only the timestamp authority's own host and refuses a loopback answer for a host name, and link-local, multicast, unspecified or cloud metadata addresses. Private addresses, localhost and loopback literals stay accepted. A refused address literal fails registry-render check and startup with render.runtime.timestamp-address-refused, a refused answer for a host name fails each seal with reason destination-refused, and a caBundleRef on an http URL is reported as render.runtime.seal-timestamp-ca-bundle-requires-https. Point the URL at a name that does not resolve to loopback, or use localhost, 127.0.0.1 or [::1] for a local test authority, and use https with caBundleRef.
  • Pagination (One pagination vocabulary #2809). Not breaking on the server, which still reads the earlier query spellings during upgrades. Clients write limit and cursor and still read prior skiptoken continuations.

Security review notes: package verification (#2889)

This change touches governed-package integrity.

  • Strict startup, integrity inspection, check and apply-target verification require the current Action Plan spelling in sealed project and module sources. A verified source that needed translation fails with breg.package.generated-artifacts-refused, even when its generated artifacts are byte-identical. An artifact changed and then resealed can produce the same code.
  • Predecessor planning and rehearsal may translate the historical spelling, only after envelope, manifest and per-file digest verification, and only in memory. Each project or module file must use one spelling. A file that mixes or doubles the spellings is refused as an integrity failure, because no release writes one.
  • The expected package digest, the activation ledger and strict generated-artifact comparison continue to bind the installed package and database.
  • Evidence: a source-only reseal whose OpenAPI bytes stay identical is refused, and so are both mixed-spelling orders. A unit test drives the strict and predecessor readers over the same translated closure. The historical module digest is pinned to a literal recorded by the released v0.49 tooling over a copied fixture. Real PostgreSQL successor rehearsal and packaging pass with --baseline-package.
  • The authored readers refuse every historical key. The translation is documented in the BReg guide with its removal condition.

Security review notes: outbound destinations (#2817)

This change narrows an outbound deployment default.

  • Render resolves only the timestamp authority's host and refuses a loopback answer for a host name, and link-local, multicast, unspecified and cloud metadata addresses. Private addresses, localhost and loopback literals stay accepted. registry-render check applies the same rule as the seal's client, so a refused literal fails check and startup, and a refused resolved answer fails each seal with reason destination-refused, not as an unreachable authority.
  • The Adapter source path takes its transport from the shared selector. Adapter sources deliberately stay HTTPS or loopback only. The private plain-HTTP fallback the engine and live verification removed was unreachable, because the authentication policy and the offline checks refuse those origins first.

The .github changes (#2847, #2849, #2851, #2896, and the posture classifier) were reviewed separately and are carried unchanged.

Verification

On this branch, rebased onto the v0.50 integration:

  • BReg package verification: 52 package tests, including the strict and predecessor readers over one translated closure and the mixed-spelling integrity refusals, the historical module digest test, and clippy with runtime,tooling,schema.
  • bregctl explain contract 35/35, including the lifecycle schema contract and every registered example.
  • Render schema drift, serve 28/28 and serve_seal 46 (one opt-in case ignored).
  • Coordinator schemas, operation schemas and OpenAPI reproduce from their generators, and so do the Evidence contracts.
  • CLI catalog regenerates with no diff and its snapshot passes. The identifier catalog regenerates byte-identically twice, all 484 recorded digests match, and reference closure is complete.
  • Generated TypeScript clients reproduce from the committed OpenAPI documents.
  • Configuration conventions: 186 lint tests, 0 unrecorded, stale or errors. The docs vocabulary gate and its 17 tests pass.
  • CI: classifier 243/243, event routing 19/19, BReg gated tests 53, gate inventory 281 gates, nightly release tests.
  • Release scripts: the roster shape test fails on the old comparisons and passes after, and shellcheck adds no finding.

For the hosted CI fixes, on the final head:

  • Hosted CI: CodeQL, DCO, the Render golden gate and the release upgrade rehearsal pass. RegistryStack CI fails only the expected release test (see "Not verified").
  • Locally: cargo fmt and workspace clippy, and the BReg, developer tools, Render and Evidence Rust shards with --no-fail-fast. Also the compiled DDL pins, the BReg generated-artifact check, the client capability check, the facility console and TypeScript client type checks, and the Node facade type check (red before its fix).
  • rstack dev check on both service previews and the staged live plan, and bregctl check on both preview projects.
  • The SQLite extract tutorial, and the first assertion followed by the deploy tutorial, run as a reader. The docs markdown and style checks report 0 errors.

After moving onto the v0.50 release documentation commits, every commit applies unchanged and the Rust sources are identical, so the Rust results above carry over. On the moved branch: the docs source checks, docs unit tests, docs build and built-site checks, docset validation against the release manifests, the identifier reference check, the conventions lint (0 unrecorded, 0 errors) and the client package sync check all pass.

Before the rebase, on the same commits:

  • All eight PostgreSQL-gated package assertions and the opt-in Wasm predecessor lifecycle on isolated TLS PostgreSQL, and bregctl CLI 227/227.
  • Evidence authoring, CLI and runtime suites, Casework library 128/128, Scheduling 291 and LSP 45/45.
  • Node and Deno unit suites for the TypeScript client, mutation controls for the live workflow, docs tests and the production-shaped docs build.

Not verified

  • The root cargo test --workspace gate and every suite not listed above for the rebased branch: left to hosted CI.
  • The Chromium preview runs, the full TypeScript live run and the full Evidence gate were not run locally for the hosted CI fixes.
  • registry-release validate-current fails on this branch until v0.50.0 is tagged: the draft v0.50 manifest pins the v0.50 identifier catalog, and this branch regenerates the catalog (384 entries against 373). Once the tag exists the check reads the catalog from it.
  • Pin configuration warning and JSON conformance controls #2880's full strict conformance matrix: it needs the writer and reader changes from the companion lanes on this base. The archived role-binding and identity-candidate control formats have no matching owner reader yet.
  • Generated clients: calls against running products and the missing clients #2822's live run across all products and Chromium needs every native binary. Generated Registry MCP coverage is still open.
  • bregctl plan and apply over an active package that still uses the old Action Plan spelling. The integration test stops at check of the successor.
  • No package bytes from a real v0.49 release went through the predecessor path. The historical package is a current package resealed with the old spelling.

jeremi added 30 commits December 2, 2026 01:00
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>
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>
Adapter source checks, engine data and token egress, and live
verification now take their destination profile from the shared outbound
selector instead of reading the URL scheme themselves. Behaviour is
preserved apart from removing an unreachable fallback: a plain-HTTP origin
beyond loopback used to freeze as a private service hop, but the
binding's authentication policy and the offline checks already refuse
every such origin before the freeze, which now refuses it too.

Implicit HTTPS, explicit loopback plain HTTP, the canonical numeric
loopback and mTLS admission for none, the anonymous HTTPS
acknowledgement, separate token egress, the deployment's private ranges
and the feature-gated pinned loopback TLS profile are unchanged.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Review follow-up for the source transport selection: the core rule table pins mapped, metadata, link-local and uppercase literals; live verification drops the private-range remedy it can no longer reach and gives the source origin fix instead; the token endpoint fault states where numeric loopback applies.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Three files merged during the lane replay were not rustfmt-clean, which the root format gate refuses.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
A timestamp authority name that resolves to an address the selected client
refuses failed each seal as an unreachable authority to retry later. It is
now a refusal with reason destination-refused. render check applies the
same selection as the seal's client, so a refused address literal and a
CA bundle on an http URL are reported at the URL before startup, each
under its own code. The exact request the authority receives is asserted,
and the resolution rule is documented with its migration.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
A roster lookup inside `[[ "$(release_roster.py ...)" == true ]]` does not
trip set -e, so a roster error read as "not in this release" and the build
silently dropped the binary or image. Assign each roster answer first, so a
failing lookup fails the script, then compare. A roster test refuses the
old shape in every release/scripts/*.sh.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi jeremi added this to the v0.51.0 milestone Dec 2, 2026
Comment thread .github/scripts/test_ci_changes.py Dismissed
jeremi added 17 commits December 2, 2026 02:16
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…tracts

The four no-consent fixtures keep their exact DDL digests and Action
fingerprints. Only generated/openapi.json moves: list query parameters
$top and $skiptoken become limit and cursor, and the Problem schema gains
the development-only failedCheck member.

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

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

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The bbox refusal test edited a top: parameter that the Python client no
longer has, so its Python case silently tested nothing. Assert that both
fixture edits apply.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The project SDK generator still sent `top` to the native list methods after
the clients moved to `limit`, so a generated Python SDK raised on `top=` and
the TypeScript SDK failed its type check. `related()` now takes `limit` and
passes it through. The facility and minimal SDKs are regenerated with the
example-artifacts generator, and the packaged SDK change moves the pinned
fixture revisions without changing their SQL or Action pins.

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

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…e's development posture

The page exports REGISTRY_STACK_POSTURE=development, so --posture production
conflicted with it and the check refused before reaching the closure rule.
Declare production for this one command in the environment instead.

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

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The live harness still wrote per-person grants, which rstack dev refuses.
People now name roles, and the staged plan's service.yaml declares each role
with its actor kind and access profiles, as the product examples do.

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

The explain, ctl-report, ODRL and evidence-source examples embed the
compiled registry revision, which the limit and cursor contracts, the
development failedCheck member and the generated SDK change moved. Each
example changes only that revision.

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

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The contract publishes {sessionReference} and {requestId} for the routes the
runtime registers with {reference} and {request_id}. Look each route up by its
published name and check that every published path is served.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
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