What
docs/site/src/content/docs/configure/breg.mdx describes the projection member of an event contract with the sentence "Restricted fields cannot be projected." The compiler enforces no such rule. Restricted fields project fine; what the compiler derives instead is a destination classificationCeiling, and delivery is refused at activation when the compiled ceiling is higher than the ceiling the runtime configuration declares for the destination. An author who reads the page writes the wrong destination binding, or drops a field for a reason that does not exist.
The derived ceiling is the maximum of: the classification of every projected field, the classification of every field named in the event's when condition, the entity's own classification when the trigger is request_lifecycle, and internal when a request_lifecycle event may carry a reject or request-revision reason. So a request_lifecycle event on a restricted entity derives restricted even when every projected field is public.
Evidence
docs/site/src/content/docs/configure/breg.mdx, the projection row of the event contract member table (around line 392): "The field ids copied into the event payload's values. Restricted fields cannot be projected."
crates/registry-breg/src/compiler.rs, compile_event_delivery_inventory (from line 4119): the classifications vector chains event.projection with event_condition_fields(event), pushes entity.classification when event.trigger == EventTrigger::RequestLifecycle, pushes Classification::Internal when request_event_may_include_review_reason(event), and takes the maximum as classification_ceiling.
- No
event.projection.restricted diagnostic exists anywhere in crates/.
crates/registry-breg/src/event_destination.rs line 145 refuses activation with DeliveryCeilingWidening when delivery.classification_ceiling > config.classification_ceiling.
Proposed fix
Replace the sentence with the derivation rule, and say plainly that the consequence of projecting a restricted field is a higher destination ceiling, not a compile refusal. Add a row to docs/site/src/data/breg-events.yaml for the ceiling so the generated event reference carries it too.
Found while
Extracting reusable App Kit skills against Registry Stack v0.32.0.
What
docs/site/src/content/docs/configure/breg.mdxdescribes theprojectionmember of an event contract with the sentence "Restricted fields cannot be projected." The compiler enforces no such rule. Restricted fields project fine; what the compiler derives instead is a destinationclassificationCeiling, and delivery is refused at activation when the compiled ceiling is higher than the ceiling the runtime configuration declares for the destination. An author who reads the page writes the wrong destination binding, or drops a field for a reason that does not exist.The derived ceiling is the maximum of: the classification of every projected field, the classification of every field named in the event's
whencondition, the entity's own classification when the trigger isrequest_lifecycle, andinternalwhen arequest_lifecycleevent may carry a reject or request-revision reason. So arequest_lifecycleevent on arestrictedentity derivesrestrictedeven when every projected field ispublic.Evidence
docs/site/src/content/docs/configure/breg.mdx, theprojectionrow of the event contract member table (around line 392): "The field ids copied into the event payload'svalues. Restricted fields cannot be projected."crates/registry-breg/src/compiler.rs,compile_event_delivery_inventory(from line 4119): theclassificationsvector chainsevent.projectionwithevent_condition_fields(event), pushesentity.classificationwhenevent.trigger == EventTrigger::RequestLifecycle, pushesClassification::Internalwhenrequest_event_may_include_review_reason(event), and takes the maximum asclassification_ceiling.event.projection.restricteddiagnostic exists anywhere incrates/.crates/registry-breg/src/event_destination.rsline 145 refuses activation withDeliveryCeilingWideningwhendelivery.classification_ceiling > config.classification_ceiling.Proposed fix
Replace the sentence with the derivation rule, and say plainly that the consequence of projecting a restricted field is a higher destination ceiling, not a compile refusal. Add a row to
docs/site/src/data/breg-events.yamlfor the ceiling so the generated event reference carries it too.Found while
Extracting reusable App Kit skills against Registry Stack v0.32.0.