Skip to content
Registry StackDocsv0.48.0

bregctl explain output

View as Markdown

Use this contract when you consume the explanations that bregctl produces for a Base Registry Engine (BReg) project. bregctl --format json explain <subject> <project> writes a BRegCtlReport whose explanation member is a separately versioned document. bregctl inserts the subject’s apiVersion and kind after it serialises the explanation. The report keeps its own breg/ctl-report/v1alpha1 version.

SubjectFormatCurrent versionSchema
modelBRegModelExplanationv1alpha8ModelExplanation.schema.json
accessBRegAccessExplanationv1alpha9AccessExplanation.schema.json
access --scenarioBRegAccessPreviewv1alpha4AccessPreview.schema.json
actionsBRegActionsExplanationv1alpha7ActionsExplanation.schema.json
proposalsBRegProposalsExplanationv1alpha3ProposalsExplanation.schema.json
routesBRegRoutesExplanationv1alpha6RoutesExplanation.schema.json
queriesBRegQueriesExplanationv1alpha5QueriesExplanation.schema.json
eventsBRegEventsExplanationv1alpha6EventsExplanation.schema.json
lifecycleBRegLifecycleExplanationv1alpha8LifecycleExplanation.schema.json

The schemas live in the products/breg/contracts/explain/ directory of the source repository. Each format’s identifier is id.registrystack.org/formats/breg/<format>/<version>, with the format name in lowercase kebab-case. For example, the model format is id.registrystack.org/formats/breg/model-explanation/v1alpha8.

lifecycle accepts no project and describes the engine-owned Proposal state machine. Every other subject requires a project. proposals returns the same source-free Action definitions as actions, filtered to Proposal execution.

Each schema is draft 2020-12 and self-contained. A pinned object seals its members with additionalProperties: false. Adding, removing, renaming or changing a pinned member requires a version bump for that format alone. Select the schema that matches the version in the document.

x-registry-passthrough marks compiler-owned values whose internal shape is outside this contract. Validate any opaque data you use. The annotation states why each node is opaque, and JSON Schema validators ignore it. The Access authority inventory pins principalClaims and the mutually exclusive inventory and error relationship, while the remaining inventory members stay opaque. Casework provider pairing independently verifies its sealed context export and grants no BReg authority.

The Lifecycle payload is pinned in full, because its model exists only to explain this state machine. Actions and Proposals share a source-free inspection shape, and their schemas describe it independently, without external references.

Each entry names the format version that introduced the change. Select the matching schema. The local development runner (rstack dev) reads Model requiresPostgis and Access claimContract.principalClaims and claimContract.requesterClients from these documents.

  • v1alpha8 adds the required requiresPostgis, true when the compiled model needs PostGIS for a bounding-box query, a CRS84 polygon field or a CRS84 polygon Action input.
  • v1alpha7 adds recordTypes[].eventRecord, recordTypes[].grouping and actions[].grouping.
    • eventRecord is null unless the Record type declares an event record descriptor. Otherwise it is the resolved descriptor (descriptorVersion 1, an integer). It names the stored fields that say what a row is about, when it happened, when it takes effect, what it was recorded from and what it corrects.
    • A declared occurredAt or effective names its shape in type (point or interval) beside that shape’s members.
    • Undeclared summary, occurredAt, effective, correction and sourceEventId are explicit null, as are an interval’s open end and a sourceEventId’s unset namespace, namespaceField and constraint.
    • A role’s label, a native role’s namespace and a field’s target (present only for a reference) are omitted, never null.
    • recordedTime is always {"source": "creation-revision"}, because recorded time is read from record history and is never authored.
    • grouping is null unless the Record type or Action authors display.purpose or display.group. It is presentation only and never changes identity, access or execution. Do not infer a purpose or an event record from names, routes, dates or references.
  • v1alpha6 adds dataset display inventories, retains field display and module origins, and adds authoring.documents.
    • Each document names a project-relative file and lists the RFC 6901 JSON Pointers present in the source before defaults or module composition. Paths expose structure and authored mapping keys, without copying leaf content such as labels or configuration values. Documents also identify their kind and module.
    • Each document’s bindings links an explanationPointer against the explanation to a sourcePointer against that source document. The links follow ids and module origins, so they stay correct when compilation reorders arrays or a module extends a Record type. The root explanation binds to /project.
    • Bindings cover datasets, project access profiles, review authorities, Record types, stored and derived fields, record hooks, Actions, inputs, Proposal hooks and statistical datasets.
    • To test authored display, find the object’s binding and append /display/label or /display/description to its source pointer, then look for that exact path in the same document’s authoredPaths. Use the same approach for an unchanged source member such as a stored field’s required. Absence means the source did not author that member; it does not mean every generated member has a default. Compiled names such as revision, canonicalId and schema have no implied source counterpart.
  • v1alpha5 names the native model and Proposal contracts. Model inspection returns source-free recordTypes, actions and the compiled revision.
    • Model field entries always include id, apiName, required, classification, schema and fieldType, including fields absent from every query projection.
    • Current formatters also include boolean encrypted metadata in the author-only Model and Actions inventories; derived fields report false. This extends the compiler-owned field metadata without closing its passthrough shape. Validate this value before you use it to propose before and after review context; the schema permits older field metadata without this member.
    • fieldType carries the same compiled type object as query field summaries, so a form can distinguish multiline text from a bounded string and discover a reference’s target. Its internal shape follows the engine field type contract; the JSON value schema remains the validation contract for field values.
  • v1alpha9 pins claimContract.purposeRequired and adds the pinned claimContract.requesterClients: every client any Record profile, statistical dataset, Action or Proposal permission restricts its requester to.
  • v1alpha8 adds the required timers inventory. It names each root-enabled autonomous timer, the Record and Action surfaces that can shape its control, predicate and mapped-input fields, and the exact product-owned system grant that bounds its future effect. The report does not turn that authority into a selectable access profile or imply a direct Record grant.
  • v1alpha7 names the target Record type, through Record type and route on every read-path grant. Its rowReach inventory includes a read_path surface under the disclosed target Record type, with the root profile’s row boundaries and an exact source path back to the grant.
  • v1alpha6 adds the access-profile display inventory.
  • v1alpha5 names the top-level recordTypes, and uses recordType in route references and consent record references.

Each Record type’s access explanation lists its disclosureConditions in full, with the when literals, because it is author-facing. A profile entry also shows requireAccessReason when set. The author inspection of a registry carries the same disclosureConditions list.

AccessPreview stays at v1alpha4. It gains an optional disclosureConditions list of the ids of the conditions that bind the previewed profile on the Record type, present only when one does. It names no literal.

  • Actions v1alpha7 and Proposals v1alpha3 add migrationReviewRevision, the digest of the Action behaviour contract used to decide whether an activation change requires migration review.
  • Actions v1alpha6 and Proposals v1alpha2 retain optional authored input display separately from the existing label, whose fallback remains apiName. Display text is presentation metadata and never changes identity, matching or authority. Keep the id alongside any label in selection and approval interfaces.
  • At v1alpha5, Action inspection uses the same normalised definitions as Model inspection, including execution policy, Plan, commit guards, dependencies and bounds.
  • ProposalsExplanation started at v1alpha1.
  • Routes v1alpha6 adds availability to the closed Action route kind set, for immediate Actions with reference inputs.
  • At v1alpha5, Record routes use type: record, and Action routes include start and no longer describe the removed request operations. Query operations use recordType.
  • v1alpha6 adds the rejected and review-returned Proposal transitions to the transition selection a Proposal hook may name.
  • Event inspection adds the owning hook phase and the Proposal transition selection.
  • v1alpha8 adds recoveryReasons to every transition. retry recovers dependency-outage and lease-expired; other transitions currently report an empty list.
  • v1alpha7 adds each state’s possible turns. Submitted work has a conditional turn whose ordered rules use the same evaluator as runtime Proposal documents.
  • v1alpha6 adds the terminal rejected state, the reject transition from submitted, and the review-authority-result enforcement, which allows only a verified review result to perform it.
  • v1alpha5 replaces the request state machine with the Proposal state machine.