spec: @sensitive(class) — org-defined taxonomy in, key refs out (#111, #112) - #163
Merged
Conversation
This was referenced Jul 25, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the two §6.7 deferrals as a pair (§13 rows 13/14, ledger #21 children). The deciding consumer is the planned chameleon editor with enterprise key management (plus pxfed cloud): sensitive-field maintenance controlled by key access needs a stable schema-side routing handle — which reverses the #111 deferral — while making schema-side key references more dangerous, which cements the #112 rejection.
#111 — accepted:
annotation sensitive(class: string = "")protowire.prefix is reserved (compile-time rejection, mirroring the §7 code-namespace reservation).@sensitivethat specifies a class wins (field, then alias chain most-derived first, then message); a bare@sensitivereasserts sensitivity without reclassifying — it never erases an outer class.""(sensitive but unclassified — exactly today's behavior, so existing bare@sensitiveschemas are untouched).AnnotationArgcarrier: no grammar production, extension number, or report change.#112 — rejected: no
@encrypted(key_ref)in the schemaKey refs, algorithms, and rotation state are deployment topology — they churn per environment/tenant while the data's meaning doesn't — and annotations lower into
FileDescriptorSetartifacts that ship across org boundaries (pxfed cloud makes the leak concrete: schemas travel to the hosted service, key topology must not). Same reasoning that keeps engine config out of file options (§9.4). The sanctioned contract: schema declares what + which class; chameleon maps class → key domain in its own configuration, so rotation never touches the schema.Changes
proto/schema/v1/annotations.proto:annotation sensitive;→annotation sensitive(class: string = "")with the rules in the doc comment.docs/RFC-001-schema-extensions.md: §5.2 library listing; §6.7 classification-parameter rules (4) + protection-metadata rejection; §13 rows 13/14 resolved.testdata/schema-extensions/20_sensitive_class.proto: compile-only fixture pinning every arm of the effective-class rule (no golden — class never appears in reports).testdata/schema-extensions/invalid/reserved_sensitive_class.proto+ manifest row: the reserved-prefix MUST-reject.CHANGELOG.md[Unreleased]: both entries.docs/RFC-001-issues.md: resolution records (second commit).Verification
Compiled through reference
protocompilev0.19.0 (same pipeline as theinternal/schemaextharness): updatedannotations.protoclean;16_sensitive_golden(bare@sensitive) clean — the defaulted param keeps existing use sites arity-valid;20_sensitive_class.protoclean. The invalid fixture currently compiles — protocompile does not yet enforce the reserved prefix; gap issue to be filed on protocompile (precedent: protocompile#121).Closes #111. Closes #112.