Skip to main content

Crate subc_config

Crate subc_config 

Source
Expand description

Shared config-gate contract. Modules own merge and full JSON Schema/cross-field review; the daemon uses the same policy checks before asking a module to review a proposal.

See the crate README for the number, digest, credential and schema contracts.

Structs§

ApplyRequest
Requests are strict; stored records and replies tolerate added fields.
Changeset
Digest
A full SHA-256, encoded as sha256: followed by 64 lowercase hex characters.
FieldChange
Generation
InputVector
LayerValue
Immutable layer proposal input. A project id is mandatory for project reviews.
Plan
Immutable approval payload. The input vector includes subc.jsonc and every touched module’s layers, declaration and covered program identities.
Refusal
ReviewedTuple
Schema
Approved schema, with local references expanded and use-site policies inherited. Full draft 2020-12 and cross-field validation remain the module’s review duty.
ValidationContext

Enums§

ApplyKind
ApprovalChannel
The review surface actually checked for an approval, not a claim supplied by its requester. Development desktop review never implies app attestation.
Bound
CanonicalError
GenerationState
InputState
Missing files are inputs, distinct from the digest of an empty document.
Layer
RecordedValue
A rejected literal and an accepted vault reference use the same redacted record. Neither the opaque reference id nor a literal is retained in views.
RefusalCode
Serializable refusals deliberately contain no submitted values or schema text.

Constants§

DIGEST_VERSION
PURPOSE_APPLY_PLAN
PURPOSE_CHANGESET
PURPOSE_DECLARATION
PURPOSE_GENERATION
PURPOSE_PLAN
PURPOSE_REVIEW
PURPOSE_SCHEMA
PURPOSE_SNAPSHOT
PURPOSE_VALUE
Domain purposes are fixed protocol strings, not caller-selected labels.
VOCABULARY_META_SCHEMA

Functions§

canonical_json
RFC 8785 with the config-gate lossless-number restriction. Keys sort by UTF-16, not Rust’s UTF-8 string order, even when serde_json’s preserve_order is unified.
digest
SHA-256 of the RFC 8785 envelope {domain, version, value}.
is_vault_reference
References contain opaque ids, not secret material, paths or env expansions.
raw_digest
Exact file bytes use plain SHA-256, independently of parsed-value envelopes.