Skip to content

Classify Safe Updates writes as destructive - #13

Draft
dennisdornon wants to merge 1 commit into
mainfrom
mwp-2369-safe-updates-destructive
Draft

dennisdornon wants to merge 1 commit into
mainfrom
mwp-2369-safe-updates-destructive

Conversation

@dennisdornon

@dennisdornon dennisdornon commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

The Safe Updates abilities that start, continue or cancel a run, retest a site, or mark a failed check as expected now match the destructive name patterns. Each one needs --dry-run and then --confirm, whatever the Dashboard's annotations say. rollback-safe-update-v1 already matched rollback-*. The run and list reads keep their classification.

docs/safety.md describes the Safe Updates behavior, and tests cover each ability name.

The Safe Updates abilities that start, continue or cancel a run, retest
a site or mark a failed check as expected now match the destructive
name patterns, so each needs --dry-run and then --confirm whatever the
Dashboard's annotations say. rollback-safe-update-v1 already matched
rollback-*. The Dashboard requires a preview or confirm for retest and
resolve as well, and the CLI only sends confirm on the destructive
path, so leaving those two out would make them impossible to run.

The run and list reads keep their classification, and docs/safety.md
describes the Safe Updates behavior.
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
Pre-merge checks: Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Validation Evidence Warning The PR changes executable code. HEAD differs from origin/main in src/core/safety-controller.ts (new name patterns for run-, continue-, cancel-, retest- and resolve-safe-update) and in src/core/safety-… Update the PR description to add the validation evidence. List the commands that were run (for example the test command for src/core/safety-controller.test.ts and the full suite, plus lint or typecheck if run) and their outcomes. If verific…
Public Contract Compatibility Inconclusive The PR (mainwp/mainwp-control #13, author dennisdornon, base main, head mwp-2369-safe-updates-destructive) adds five Safe Updates write names to DESTRUCTIVE_NAME_PATTERNS in src/core/safety-controller… 1. Confirm in the Dashboard (mainwp-dashboard, class-mainwp-abilities-safe-updates.php and the abilities REST controller) that POST to /abilities/{name}/run is accepted for retest-safe-update-site-v1 and resolve-safe-update-site-v1, and wha…
Full details: Validation Evidence

Explanation

The PR changes executable code. HEAD differs from origin/main in src/core/safety-controller.ts (new name patterns for run-, continue-, cancel-, retest- and resolve-safe-update) and in src/core/safety-controller.test.ts, plus CHANGELOG.md and docs/safety.md. Because the change is executable, the check applies. The PR description says only that "tests cover each ability name." It does not record any validation command, test run, or outcome. It also does not state that verification could not run. Both required forms of validation evidence are absent, so the check fails. Test coverage is claimed, not reported, and this check does not execute tests.

Resolution

Update the PR description to add the validation evidence. List the commands that were run (for example the test command for src/core/safety-controller.test.ts and the full suite, plus lint or typecheck if run) and their outcomes. If verification could not run, state that explicitly and give the reason. Then re-run the check.

Full details: Public Contract Compatibility

Explanation

The PR (mainwp/mainwp-control #13, author dennisdornon, base main, head mwp-2369-safe-updates-destructive) adds five Safe Updates write names to DESTRUCTIVE_NAME_PATTERNS in src/core/safety-controller.ts. No ability names, REST routes, schemas, or serialized formats change. Two observable CLI-side changes follow from this: 1. Documented, so no FAIL. Run, continue, cancel, retest, and resolve now require --dry-run or --confirm. CHANGELOG.md (Unreleased, "Changed") and docs/safety.md state this and name the affected abilities. The change has no opt-out path. It is labeled "Changed", not "Breaking:" as the project labels earlier breaking changes in the same file. 2. Not documented, and consumer evidence is missing. isKnownDestructiveName() is also used by getHttpMethod() in src/core/abilities-executor.ts (lines 368-399). The PR does not change that file, but the new patterns change its output. A name-destructive ability with readonly annotations no longer goes out as GET. It now goes out as POST with a JSON body {input: params}, instead of a GET query string. For retest-safe-update-site-v1 and resolve-safe-update-site-v1, the mocked annotations in the PR's test (readonly: true, destructive: false) imply the Dashboard annotates them readonly. So the Dashboard-to-Child request method for these two abilities changes from GET to POST. Neither docs/safety.md nor CHANGELOG.md mentions this transport change. Whether it breaks anything depends on whether the Dashboard's abilities run route accepts POST for these abilities. The Dashboard repository is not linked, so this cannot be checked. The check's fail condition requires an observable incompatible change. Whether the method change is incompatible depends on Dashboard route evidence that is unavailable. The check requires INCONCLUSIVE in that case. This verdict does not claim the tests were run, and it does not inspect unlinked repositories.

Resolution

  1. Confirm in the Dashboard (mainwp-dashboard, class-mainwp-abilities-safe-updates.php and the abilities REST controller) that POST to /abilities/{name}/run is accepted for retest-safe-update-site-v1 and resolve-safe-update-site-v1, and what annotations they declare. 2. If POST is not accepted, keep these names out of the destructive override for transport, or add a GET-compatible path. Otherwise, document the GET-to-POST change for these two abilities in CHANGELOG.md and docs/safety.md. 3. Consider labeling the CHANGELOG entry "Breaking:" because existing scripts that run these abilities without flags now fail with ConfirmationRequiredError (exit code 4).
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@dennisdornon
dennisdornon marked this pull request as ready for review November 20, 2026 13:32
@dennisdornon
dennisdornon marked this pull request as draft November 20, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant