the destructive surface has no enumerable source of truth #572
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#563 Epic: the destructive surface has outgrown ADR 0029's classification table
sixfold-space/madtea
#573 scope the destructive audit tool to hypotheses, and stop using it for coverage
sixfold-space/madtea
Reference
sixfold-space/madtea#572
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?
Part of #563. This is the sweep mechanism the other children assume exists.
The problem
Three separate things describe madtea's destructive surface, and each is maintained by hand:
docs/decisions/0029-strict-omission-destruction-model.md:130-141), 9 rows, headed "Every currently destructive-adjacent operation, classified".internal/parity/destructive_remote_pin_test.go, which pins roughly 50 delete-shaped operations with a gated or ungated verdict and a rationale comment per row.docs/reference/destructive.md, whose text is a string literal atinternal/docs/domain.go:189-193(see #570).None derives from the others and none derives from the code. The table says 9, the pin test enumerates far more, and the doc names 5. All three are green.
There is also no way to ask the codebase what its destructive surface is. Answering "which operations can destroy something, and how is each classified" currently means a person reading three files and reconciling them by eye. That is why the count keeps coming out different: three passes over the 24 ungated rows at
destructive_remote_pin_test.go:126-155produced 22, 22, and 25.What to build
One enumerable inventory, derived from the code, that everything else consumes.
omit,machine-proof,already-safe, orunclassified.unclassifiedis the default for anything destructive-shaped, so a new operation is loud rather than silent.destructive.md, and the pin test all read the generated inventory instead of restating it.unclassified, or a classification with no counterpart in the record, fails. A new destructive operation cannot reach main without a classification.Detection, not just description
The marks are still assertions unless something checks them. Two checks worth having:
delete,remove,purge,destroy,reset,restore,transfer,convert,overwrite,replace,drop) and by any handler reaching a forge DELETE or a destructive git subcommand.isDestructiveDeleteOp(internal/parity/destructive_remote_pin_test.go:57) already does a narrow version of this and missestransferandconvertbecause its verb set is delete-only.machine-proofnames the function computing its proof, and a test asserts that function runs before the destructive call.Acceptance criteria
destructive.md, and the pin test all agree with it by construction rather than by review.