Generate contract types, pin fixtures to spec, add build and ADRs
Some checks failed
ci / build (push) Failing after 1m6s
Some checks failed
ci / build (push) Failing after 1m6s
Completes FLUID-WP-0002. The record types in internal/contract are generated from schemas/ by a dependency-free generator; fixtures transcribed from the spec's worked examples validate against those schemas and round-trip through the generated types with DisallowUnknownFields, so a spec change that misses the schemas fails CI rather than drifting silently. Adds identifier prefix helpers, Makefile, GitHub Actions, and five ADRs recording the Go choice, out-of-process attachment, the wire contract as boundary, the evidence store, and revision identity. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014KmVxhJ35tCo7rE7UnLwWu Assistant: claude-code Assistant-Model: opus Assistant-Process: 1116572@bnt-lap001 Assistant-Session: 8ba9bb93-a72a-4883-b189-2499cce5c400
This commit is contained in:
parent
fbbf56df7a
commit
76912adef8
44 changed files with 4010 additions and 7 deletions
58
internal/contract/pressure_gen.go
Normal file
58
internal/contract/pressure_gen.go
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
// Code generated by tools/schemagen. DO NOT EDIT.
|
||||
// Source: schemas/. Regenerate with `make generate`.
|
||||
|
||||
package contract
|
||||
|
||||
type FluidPressureFrequency struct {
|
||||
IndependentConsumers *int64 `json:"independent_consumers,omitempty" yaml:"independent_consumers,omitempty"`
|
||||
Observations *int64 `json:"observations,omitempty" yaml:"observations,omitempty"`
|
||||
}
|
||||
|
||||
// ArchitectureBlueprint.md section 9. Pressure may remain unresolved on purpose.
|
||||
type FluidPressureStatus string
|
||||
|
||||
const (
|
||||
FluidPressureStatusOPEN FluidPressureStatus = "OPEN"
|
||||
FluidPressureStatusANALYZING FluidPressureStatus = "ANALYZING"
|
||||
FluidPressureStatusEXPLAINED FluidPressureStatus = "EXPLAINED"
|
||||
FluidPressureStatusADDRESSED FluidPressureStatus = "ADDRESSED"
|
||||
FluidPressureStatusDISMISSED FluidPressureStatus = "DISMISSED"
|
||||
FluidPressureStatusOUTOFSCOPE FluidPressureStatus = "OUT_OF_SCOPE"
|
||||
)
|
||||
|
||||
// Valid reports whether v is a defined FluidPressureStatus.
|
||||
func (v FluidPressureStatus) Valid() bool {
|
||||
switch v {
|
||||
case FluidPressureStatusOPEN, FluidPressureStatusANALYZING, FluidPressureStatusEXPLAINED, FluidPressureStatusADDRESSED, FluidPressureStatusDISMISSED, FluidPressureStatusOUTOFSCOPE:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type FluidPressure struct {
|
||||
AffectedCohorts []CohortID `json:"affected_cohorts,omitempty" yaml:"affected_cohorts,omitempty"`
|
||||
Class PressureClass `json:"class" yaml:"class"`
|
||||
Confidence *UnitInterval `json:"confidence,omitempty" yaml:"confidence,omitempty"`
|
||||
|
||||
// A pressure record without evidence references is not auditable and must be
|
||||
// rejected.
|
||||
EvidenceRefs []EvidenceRef `json:"evidence_refs" yaml:"evidence_refs"`
|
||||
FirstSeen Timestamp `json:"first_seen" yaml:"first_seen"`
|
||||
Frequency *FluidPressureFrequency `json:"frequency,omitempty" yaml:"frequency,omitempty"`
|
||||
ID PressureID `json:"id" yaml:"id"`
|
||||
InterfaceID InterfaceID `json:"interface_id" yaml:"interface_id"`
|
||||
LastSeen Timestamp `json:"last_seen" yaml:"last_seen"`
|
||||
LinkedHypotheses []HypothesisID `json:"linked_hypotheses,omitempty" yaml:"linked_hypotheses,omitempty"`
|
||||
SchemaVersion SchemaVersion `json:"schema_version" yaml:"schema_version"`
|
||||
Severity *UnitInterval `json:"severity,omitempty" yaml:"severity,omitempty"`
|
||||
|
||||
// ArchitectureBlueprint.md section 9. Pressure may remain unresolved on purpose.
|
||||
Status FluidPressureStatus `json:"status" yaml:"status"`
|
||||
Summary string `json:"summary" yaml:"summary"`
|
||||
}
|
||||
|
||||
// Evidence that the interface differs materially from consumer needs. Pressure is
|
||||
// evidence, not truth (FluidAPIStandards.md section 13).
|
||||
type PressureDocument struct {
|
||||
FluidPressure FluidPressure `json:"fluid_pressure" yaml:"fluid_pressure"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue