You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The evidence library (domain.Evidence plus EvidenceControlLink, migration 0052) is the only evidence register the product reads (gorm_compliance_repository.go:265). The old control_evidences table and the domain.ControlEvidence type (internal/domain/compliance.go:100-125) are still there for two reasons: at every boot, BackfillFromControlEvidences copies them into the library (cmd/server/main.go:1408-1415), and the entity timeline still knows the type control_evidence (internal/application/entity/timeline.go:120,141). The comment in cmd/server/schema.go:155-158 says the table stays "for a release".
Before the Evidence Fabric (#554) adds chain of custody and a hash to each proof, there must be exactly one place where evidence lives. Otherwise an auditor can find a document in a table that the chain does not cover.
Why status:blocked
Dropping a table is irreversible and falls under CLAUDE.md "any schema migration that drops or renames a column". The decision goes to the owner as D-056 in docs/DECISIONS.md.
Acceptance criteria
Before anything is dropped, a SQL check proves that every control_evidences row has its counterpart in the library, on a production-like database. The query and its result are pasted here.
The boot backfill is removed once criterion 1 is proven.
The golang-migrate migration that drops control_evidences has a documented down (recreate the empty table) and is tested up and down.
domain.ControlEvidence, its OwnershipBlock and the control_evidence timeline branch are removed. go build ./... and go test ./... are green.
Problem
The evidence library (
domain.EvidenceplusEvidenceControlLink, migration 0052) is the only evidence register the product reads (gorm_compliance_repository.go:265). The oldcontrol_evidencestable and thedomain.ControlEvidencetype (internal/domain/compliance.go:100-125) are still there for two reasons: at every boot,BackfillFromControlEvidencescopies them into the library (cmd/server/main.go:1408-1415), and the entity timeline still knows the typecontrol_evidence(internal/application/entity/timeline.go:120,141). The comment incmd/server/schema.go:155-158says the table stays "for a release".Before the Evidence Fabric (#554) adds chain of custody and a hash to each proof, there must be exactly one place where evidence lives. Otherwise an auditor can find a document in a table that the chain does not cover.
Why
status:blockedDropping a table is irreversible and falls under CLAUDE.md "any schema migration that drops or renames a column". The decision goes to the owner as D-056 in
docs/DECISIONS.md.Acceptance criteria
control_evidencesrow has its counterpart in the library, on a production-like database. The query and its result are pasted here.golang-migratemigration that dropscontrol_evidenceshas a documenteddown(recreate the empty table) and is tested up and down.domain.ControlEvidence, itsOwnershipBlockand thecontrol_evidencetimeline branch are removed.go build ./...andgo test ./...are green.Definition of Done
One evidence table, no backfill at boot, no dead type, and the migration proven both ways.
Blocked on: D-056 (owner)