← Back to Pull requests

cmd/limactl: accumulate errors in batch delete and disk delete actions #5853

Closed
unknown closed this pull request without merging on Nov 26, 2026 02:14 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 11:18 UTC
Author

What This PR Changes

When deleting multiple instances or disks via limactl delete inst1 inst2 or limactl disk delete disk1 disk2, an error on an early target caused an immediate return. That skipped remaining valid targets and, for instance deletion, skipped reconcile.Reconcile(ctx, "").

This PR:

  • In cmd/limactl/delete.go: accumulates per-instance errors, continues processing remaining targets, always runs reconcile.Reconcile, and returns errors.Join(errs...).

  • In cmd/limactl/disk.go: accumulates per-disk errors, continues processing remaining targets, and returns errors.Join(errs...).

  • In cmd/limactl/delete_test.go & cmd/limactl/disk_test.go: tests mixed success+failure batches, single failures, and batch successes.
  • Linked Issue (Required in most cases)

    N/A

    How I Tested This

    Environment: Linux Mint 22.3 (Linux 7.0.0-43-generic, x86_64), Go 1.26.4, golangci-lint 2.15.0, commit 6b861ad8 vs base 1c12d399 in an isolated LIMA_HOME:

    make ltag && make limactl
    go test -v -race ./cmd/limactl/...
    golangci-lint run ./cmd/limactl/...
    
    limactl delete prot1 ok1 prot2 ok2          # 1c12d399 stopped at prot1; PR deletes ok1,ok2 and reports prot1+prot2 (exit 1)
    limactl disk delete d_lock1 d_ok1 d_lock2 d_ok2  # 1c12d399 stopped at d_lock1; PR deletes d_ok1,d_ok2 and reports both locks (exit 1)
    limactl delete prot1                        # exit 1
    limactl unprotect prot1 prot2 && limactl delete prot1 prot2  # exit 0
    limactl disk unlock d_lock1 d_lock2 && limactl disk delete d_lock1 d_lock2  # exit 0
    limactl delete nonexistent                  # warning, exit 0
    

    Not tested locally: macOS (vz/krunkit) and Windows guest teardown paths during deletion.

    AI Usage

    Assisted-by: Antigravity

    Diff: 225 lines (+168 / -57) across 2 files Reviewer: AkihiroSuda Review duration: 2336m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 225 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.324
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5853"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.9% (MEDIUM) · Higher = larger blast radius
    36.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.6% · Safe to merge
    14.6%
    Repository