Repository navigation
damage-control: no-delete ladder covers producer-fed deletes, mv/overwrite, emptying (#1127 #1128) - #1135
Merged
Conversation
…write, and emptying (#1127) (#1128) - #1128: a delete fed by xargs/parallel/loop/substitution/find -exec is judged against the guarded sets using the producer's words; a search root that may reach a guarded path asks (unverifiable, not demoted by bypass). - #1127 (owner ruling): mv of a guarded path out of place is a delete; mv/cp/ install/rsync/ln -f onto a guarded file is an overwrite. Unrelated moves into a guarded dir stay allowed. - Emptying == deleting: truncate, dd of=, `: >` onto a guarded path block. Built by dotdev.dev
Built by dotdev.dev
…1128) - A whole guarded directory (or an ancestor) moved is a delete: mv ~/.claude x, mv * . - Runtime state inside directory entries (cohorts, inbox, sessions) is out of the mv/overwrite/emptying ladder; renaming a guarded FILE in its own dir asks. - Emptying: known-empty redirects (cat /dev/null, true, printf '', : >|, tee </dev/null) and truncate/dd as fed consumers. - Producers: git ls-files & co, parallel 'rm {}' ::: x, -execdir/-ok/-okdir equal -exec. - Narrowed: a producer with no protected argument in an unguarded cwd stays allowed (ls build | xargs rm, find . -mtime +7 | xargs rm); variable roots and a cwd inside a guarded dir ask. Built by dotdev.dev
…mutants (#1135) Built by dotdev.dev
… document the two accepted tradeoffs (#1135) Built by dotdev.dev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Producer-fed deletes (xargs/parallel/loops/substitution/find -exec) are judged like direct operands; mv of a guarded path out of place = delete, mv/cp/install/rsync/ln -f onto a guarded file = overwrite; truncate/dd of=/
: >onto a guarded path blocks (plain>stays allowed). Logic only in_core.py(hooks regenerated; no rule-YAML change). Exact behavior, stated costs and declared residuals:docs/wiki/internals/damage-control.md("What the no-delete ladder judges").Tests:
tests/unit/test_damage_control_producer_fed.py— differential vs direct-operand decision (consumers x producers x targets x homes x default/kill-switch/unattended) + must-allow controls; five mutations each turn it red. Full unit suite: 5829 passed.Closes #1127
Closes #1128
Built by dotdev.dev