Unreleased documentation. These pages follow the main branch and can change before the next release. For supported guidance, use v0.44.0.
Your registry can hold a Proposal until a person approves it. Here you connect one Action’s Proposals to a Casework ReviewPolicy, then point your Base Registry Engine (BReg) at Casework for the decision. The registry keeps submission and application; Casework records the decision and writes nothing to your registry.
Start from two projects built to pair
Section titled “Start from two projects built to pair”Create both projects from templates that already agree:
bregctl init --template facility-registry facilitycaseworkctl init --template canonical-review reviewIn facility, the correct-address Action creates a Proposal that requires review by an
authority named casework. In review, a
context provider named facility-proposal-context
lets reviewers see that Proposal: Casework reads it from your registry under each reviewer’s own
access. For another Action, create its approval project
with provider add after choosing its review grants.
Pairing reads the built registry package, not your editable source. Before you go on, test
facility against its own database and seal its package with
bregctl package, as
Check, test, package walks through. Then name the paths
and identifiers once:
casework_project=/absolute/path/to/reviewbreg_package=/absolute/path/to/facility-packageprovider_id=facility-proposal-contextaction_id=correct-addressPair the Proposal context
Section titled “Pair the Proposal context”The registry package exports the shape of the Proposal the Action creates, and the context provider pins the shape it expects. Preview whether they match; the preview writes nothing:
caseworkctl provider pair "$casework_project" \ --provider-id "$provider_id" \ --breg-package "$breg_package" --action-id "$action_id"A working pair reports "ok": true, the verified contract, and the package’s
registryRevision. Its readerAuthority names get-review-status with "sourceWrites": false:
Casework only reads review status from your registry. Write the pair into the Casework project:
caseworkctl provider pair "$casework_project" \ --provider-id "$provider_id" \ --breg-package "$breg_package" --action-id "$action_id" --applyThe report now says "applied": true. If the pin and the export differ, the command exits 1 with
casework.provider-pair.contract-mismatch; review the context changes and update the authored
pins before pairing again. If the binaries differ, select the matching executable with
--bregctl-bin.
Check and package the Casework project
Section titled “Check and package the Casework project”Confirm offline that the two projects still agree, then build the package you deploy:
caseworkctl check "$casework_project" --against-breg-package "$breg_package"caseworkctl package "$casework_project" --output ./paired-casework-packageThe check compares the context contract and its exact schema bytes. It proves the projects agree, not that either service is reachable. Rebuild and recheck whenever the registry package changes.
Create a policy for another Action
Section titled “Create a policy for another Action”For your own Proposal-mode Action, choose an approval pattern and a new Casework directory:
caseworkctl provider add ./action-review \ --breg-project ./registry --action <action-id> \ --pattern two-peer-approval --breg-package <sealed-package>When BReg needs changes, the command exits 1 with
casework.provider-add.breg-changes-needed, prints the missing YAML, and creates no project.
Review the proposed grants and any bypass warnings, apply the intended changes to BReg, rebuild
its package, and rerun. The proposed context shows used inputs and changed fields. Its
changes projection requires a real records.get grant; the output also offers an inputs-only
alternative. Documents are never proposed.
Once BReg is ready, the command creates the pattern with current-source pins and its exported
schema, pairs, checks, and inspects the package. Add --package-output <new-directory> on
creation to write that package. Without --breg-package, creation stops after checking and prints the pairing
step. Repeating the command checks agreement without rewriting files. To package an existing
project, use caseworkctl package --output.
Replace the generated .test producer identities and configure runtime secret references
before deployment.
Bind Casework as the review authority
Section titled “Bind Casework as the review authority”A review authority is the service your registry asks for a decision. The registry project names it, and the registry’s runtime configuration binds it to Casework’s URL and a credential; Review authorities, declared twice shows both halves. On the Casework side, your registry is a trusted producer, the caller allowed to submit a ReviewRequest:
trustedProducers: facility-registry: profile: requester issuer: https://identity.example.test subject: facility-registry-review-producer trustedInitiatorIssuer: https://identity.example.test sourceNamespaces: [facility-registry] reviewPolicies: [facility-address-review] retention: {receiptRetentionDays: 30}Three values in the registry’s binding must agree with that entry:
producerIdequals the producer’s key,facility-registry. Both products fold it into each submission’s digest.- The binding’s
profile, and its credential’s issuer and subject, equal the producer’sprofile,issuer, andsubject. recoveryDaysmust not exceedreceiptRetentionDays, which is at most 365. The registry retries an uncertain submission against an admission receipt Casework keeps only that long. No tool compares the two values.
sourceNamespaces lists the registry names this producer may submit for. Casework decides on the
exact Proposal version and its effectDigest, and the registry accepts only a
ReviewResult that matches them.
By default the registry polls Casework for results. To be called instead, add
completionTokenRef and completionRecipient to the binding together, and give the producer a
completion destination, the registry URL Casework calls, that presents the same token.
Read the signals
Section titled “Read the signals”Submit a Proposal for the paired Action, then read it with an access profile that may apply it.
While Casework reviews it, the Proposal’s apply link is unavailable with reason pending-review
and recovery refresh. A reviewer then finds the work as a
ReviewTask in Casework.
Hand-off faults read differently:
- A credential that matches no producer, or a policy or source namespace the producer does not
list, is refused with 403
operation.not-authorized. The registry logs a warning with the authority, status, and problem code, and the Proposal readsreview-endedwith recoveryrevise. - Every refusal of the hand-off for good, the one above included, reads
review-ended. The Proposal, its list item and its submission read then carryhandoffRefusal, such as{"code": "review.initiator-required"}. The code isreview.initiator-required,review.initiator-excluded,review.policy-mismatch, orreview.refusedfor any other refusal; the authority’s own text is never copied. The two initiator codes usually mean a service submitted work a person must submit, so let the person start or submit the Proposal. - A
producerIdthat differs from the producer’s key fails the registry’s own acceptance check. The Proposal readsdependency-outagewith recoveryretryuntilrecoveryDayspass, thenreview-ended. When a review never settles, checkproducerIdfirst.
After the decision, the Proposal follows its usual states: applied, rejected, or submitted
with Revise offered when changes are requested. Proposals
covers those states; a Casework decision never grants authority to apply.
Cookies on Registry Stack
We use optional cookies to understand how you use the main Registry Stack website and this documentation. If you contact us, we may link this activity to your enquiry. You can change your choice at any time. Read the privacy policy.
Your browser asks sites not to track you, so optional tracking stays off.
We could not use or save that choice. Optional tracking remains off.