generated from coulomb/repo-seed
feat(P4): IHF Phase 4 complete — Outcome Observation and Antifragility Loop
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
Closes the IHF improvement loop. Full antifragility chain now traversable: Widget → Annotation → Candidate → Requirement → Decision → Deployment → OutcomeSignal New artifacts: - DeploymentRecord (immutable, links DecisionRecord to a deployed version) - OutcomeSignal (append-only; DB trigger prevents UPDATE/DELETE) - ChangeEvaluation (one-per-deployment; UNIQUE constraint; 1–5 score) New capabilities: - DeploymentRecordsController (index, show, new, create) - RecordOutcomeSignalAction — capture improved/regressed/neutral/inconclusive signals - Pre/post comparison panel on deployment show (±30-day event/annotation counts) - Regression detection — improved signal followed by high/critical annotation - ChangeEvaluation — idempotent score+rationale per deployment - Recurrence tracking — cycle count per widget, leaderboard - AntifragilityDashboardAction (autoRefresh, 5 panels) per hub - Phase 4 integration tests (T01–T08 logic coverage) - docs/phase4-summary.md; SCOPE.md updated to Phase 4 complete State Hub: workstream 07e9c860 → completed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,26 +34,36 @@ instance Controller DecisionRecordsController where
|
||||
render IndexView { records, requirements, users, mOutcomeFilter }
|
||||
|
||||
action ShowDecisionRecordAction { decisionRecordId } = do
|
||||
record <- fetch decisionRecordId
|
||||
policyRefs <- query @PolicyReference
|
||||
record <- fetch decisionRecordId
|
||||
policyRefs <- query @PolicyReference
|
||||
|> filterWhere (#decisionId, decisionRecordId)
|
||||
|> orderByAsc #createdAt
|
||||
|> fetch
|
||||
implRefs <- query @ImplementationChangeReference
|
||||
implRefs <- query @ImplementationChangeReference
|
||||
|> filterWhere (#decisionId, decisionRecordId)
|
||||
|> orderByAsc #linkedAt
|
||||
|> fetch
|
||||
mRequirement <- case record.requirementId of
|
||||
deploymentRecords <- query @DeploymentRecord
|
||||
|> filterWhere (#decisionId, decisionRecordId)
|
||||
|> orderByDesc #deployedAt
|
||||
|> fetch
|
||||
let deploymentIds = map (.id) deploymentRecords
|
||||
evaluations <- query @ChangeEvaluation
|
||||
|> filterWhereIn (#deploymentId, deploymentIds)
|
||||
|> fetch
|
||||
mRequirement <- case record.requirementId of
|
||||
Nothing -> pure Nothing
|
||||
Just rid -> fetchOneOrNothing rid
|
||||
mCandidate <- case record.candidateId of
|
||||
mCandidate <- case record.candidateId of
|
||||
Nothing -> pure Nothing
|
||||
Just cid -> fetchOneOrNothing cid
|
||||
users <- query @User |> fetch
|
||||
users <- query @User |> fetch
|
||||
render ShowView
|
||||
{ record
|
||||
, policyRefs
|
||||
, implRefs
|
||||
, deploymentRecords
|
||||
, evaluations
|
||||
, mRequirement
|
||||
, mCandidate
|
||||
, users
|
||||
|
||||
Reference in New Issue
Block a user