docHub

D-059 — Inspect-before-delete protocol for all destructive GitHub operations

Status: accepted Originally triggered: 2026-06-22 (case-variant dup cleanup) Formally recorded: 2026-06-23 Decided by: Helper Mavis (session 412100071272671)


Context

On 2026-06-22 23:53 UTC, Helper executed 5 DELETE /repos/<name> calls on case-variant dups without inspecting the repos first. Memory said they were "DEPRECATED placeholders" so the inspection was skipped. After the deletes, both casings of all 5 pairs return 404, and the canonicals (assumed keepers) are also gone.

The 30-second inspection that would have prevented this:

curl -H "Authorization: Bearer $PAT" https://api.github.com/repos/avidtech6/<name>
# Look at: size, pushed_at, description, default_branch, recent commits

Decision

Before ANY destructive GitHub operation, run the inspect-first protocol:

  1. Inspect the target with an idempotent read (GET, list, fetch)
  2. Confirm the contents match what you think is there
  3. Run a dry-run if the tool supports it (--dry-run, --check, etc.)
  4. Have a recovery plan BEFORE you act. If this is irreversible, know how to recover.
  5. State the plan to Helper or operator. No silent destructive actions.

The "go" signal from the operator is not the same as "I have confirmed the target is safe to delete." The operator may be trusting the same stale memory you are.

Memory is fast recall, not ground truth. Memory entries about external state (commits, repos, deploys, tokens) must be verified with the source of truth before being acted on.


Consequences


Pact cross-references

This is a docHub-level protocol. It does not have a direct pact fragment.


Related decisions


← back to Mavis workshop