Summary
Concepts are only emitted when referenced from positions the generator declares (event/command properties, query parameters and returns). Concepts that are referenced only from inside complex child records or read-model properties are dropped from the document — silently, with no diagnostic. In a real application this includes PII-marked concepts, so the generated document understates the application's PII surface — which cuts directly against Screenplay's "concepts carry compliance" design goal.
Evidence (real application)
Diffing the generated Ada document (105 concepts) against the source (120 Core concept types, counting ConceptAs<T> and EventSourceId<T> derivatives) shows 15 concepts missing, none of which appear as a top-level event/command property type:
| Concept |
PII |
Where it lives |
FirstName |
yes |
inside PersonalDetails child record |
LastName |
yes |
inside PersonalDetails child record |
PhoneNumber |
yes |
inside PersonalDetails child record |
AnswerText |
yes |
inside RequirementAnswer child record (carried by events via IEnumerable<RequirementAnswer>) |
CriterionNote |
yes |
inside evaluation child records |
EvaluationScore, SkillName, VoucherLineHours, WebsiteUrl, ActivityFeedKey, MagicLinkRecipientId, TripletexInvoiceId, TripletexPaymentId, TripletexCustomerPaymentId, RequestEmailParserConfigurationId |
no |
child records / read-model-only positions |
All five PII concepts carry [PII] and validation rules in source (FirstName: NotEmpty().MaximumLength(100), PhoneNumber: Matches(@"^\+?[\d\s\-().]{7,20}$"), …) — none of that reaches the document.
Related: the document does reference the child record types themselves in event property positions, e.g.
event TimesheetMonthApproved
...
days ApprovedDayLine[]
ApprovedDayLine is never declared anywhere in the document — the Screenplay grammar has no complex-type declaration construct (companion language issue filed on Cratis/Screenplay). So today the document both references shapes it cannot define and loses the concepts inside them.
Suggested fix
- Emit concepts transitively: when registering a type reference, walk complex record types' members and register the concepts found there. Concepts are declarable today — nothing in the grammar blocks this — and it restores the PII/validation story even while child-record shapes remain undeclarable.
- Diagnose the shape loss: when an event/command/read-model property references a complex record type, emit an Information diagnostic that its shape (and any nested compliance annotations) cannot be expressed, so the loss is visible per the generator's nothing-dropped-silently principle.
Environment
Cratis.Arc.Screenplay 20.65.0 (Analysis/Types/TypeRegistry.cs)
Summary
Concepts are only emitted when referenced from positions the generator declares (event/command properties, query parameters and returns). Concepts that are referenced only from inside complex child records or read-model properties are dropped from the document — silently, with no diagnostic. In a real application this includes PII-marked concepts, so the generated document understates the application's PII surface — which cuts directly against Screenplay's "concepts carry compliance" design goal.
Evidence (real application)
Diffing the generated Ada document (105 concepts) against the source (120 Core concept types, counting
ConceptAs<T>andEventSourceId<T>derivatives) shows 15 concepts missing, none of which appear as a top-level event/command property type:FirstNamePersonalDetailschild recordLastNamePersonalDetailschild recordPhoneNumberPersonalDetailschild recordAnswerTextRequirementAnswerchild record (carried by events viaIEnumerable<RequirementAnswer>)CriterionNoteEvaluationScore,SkillName,VoucherLineHours,WebsiteUrl,ActivityFeedKey,MagicLinkRecipientId,TripletexInvoiceId,TripletexPaymentId,TripletexCustomerPaymentId,RequestEmailParserConfigurationIdAll five PII concepts carry
[PII]and validation rules in source (FirstName: NotEmpty().MaximumLength(100),PhoneNumber: Matches(@"^\+?[\d\s\-().]{7,20}$"), …) — none of that reaches the document.Related: the document does reference the child record types themselves in event property positions, e.g.
ApprovedDayLineis never declared anywhere in the document — the Screenplay grammar has no complex-type declaration construct (companion language issue filed on Cratis/Screenplay). So today the document both references shapes it cannot define and loses the concepts inside them.Suggested fix
Environment
Cratis.Arc.Screenplay20.65.0 (Analysis/Types/TypeRegistry.cs)