PROV-O / CycloneDX / SPDX artifacts are shallow — no per-event, per-constraint traceability #59
Labels
No labels
blocked
bug
design
docs
engineering
feature
infra
priority:high
priority:low
priority:medium
question
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: sscoble/speckl#59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
PROV-O, CycloneDX, and SPDX generators all produce shallow artifacts that miss the spec's structure. Discovered via dogfood compile of
FederatedMeetup.speckdl(see federated-meetup#7). Without these, the "judgement transport" pitch — "when an auditor asks 'where did this behavior come from?', you query the graph" — doesn't actually work.Reproduction
Defects
1. PROV-O captures only the top-level speck
FederatedMeetup.prov.jsonldhas just oneprov:Entityfor the speck itselfCreateGroup,AddSteward,IssueHostCert,BranchCreate, ...) — no PROV entriesBranchInfo,CustodyDeclaration,EquivocationEvidence, ...) — no PROV entrieslen(stewards) >= threshold, ...) — no PROV entriesalways(...), ...) — no PROV entriesIssueHostCertcome from?" is unanswerable2. CycloneDX
components: []componentswithpurl,version,licensesbom { }block consumption — the exampleforgejo-issue-workflow.speckdlhasbom { compiler: ... solver: ... runtime: ... license: ... }but the generator ignores it3. SPDX
builtBy: []bom { }block should populate SPDX'screationInfo.createdByProposed Speckl extensions
A. Per-element PROV-O entities
For each
event X { ... }, generate:For each
constraint: ...andverify: ...:B.
componentsblock (new SpeckDL syntax)These become CycloneDX
components[]entries with properlicenses,purl,type: "library".C. BOM consumption
The existing
bom { compiler: ... solver: ... runtime: ... license: ... }block (used inforgejo-issue-workflow.speckdl) should populate:metadata.tools[]creationInfo.createdBy[]Currently it appears to be ignored.
Acceptance criteria
event,interface,constraint,verifyblockprov:wasDerivedFromlinking back to the parent speckcomponents[]is populated by a newcomponents { }block (or by a default mapping for known primitives)creationInfo.createdBy[]populated frombom { }blockPriority
Medium — the core compile path works, but the provenance/SBOM artifacts are the differentiator vs. any other "spec-to-code" tool. Without these, Speckl is just another TLA+ → TS.
References
compiler/src/generators/provenance.ts— current PROV-O generatorcompiler/src/generators/cyclonedx.ts— current CycloneDX generatorcompiler/src/generators/spdx.ts— current SPDX generatorcompiler/specs/forgejo-issue-workflow.speckdl:266-271— existingbom { }block exampleClosed by dispatch system (c2328)
Subagent completed per-event, per-constraint traceability for PROV-O/CycloneDX/SPDX generators. All 8 provenance-from-IR tests pass:
Delivered: Per-event provenance entities (regulations as usage entities, sources as entities with kind), synthesized provenance handling (no source declaration), valid PROV-O JSON-LD structure for real TEF spec. CycloneDX and SPDX generators updated with deep traceability (per-event, per-constraint).
Code is in working tree (uncommitted).