Summary
mw app uninstall <app> --force prints both an error and "Process completed successfully" when the app has a linked primary database, and the app is not uninstalled. An automated / agent-driven run can't tell that it failed.
Verified against mw 1.19.0.
Repro
- An app installation with a linked primary database (
PATCH /v2/app-installations/{id}/database, purpose: primary).
mw app uninstall <shortId> --force
Output:
Error: AxiosError: Request failed with status code 412
Completed: Process completed successfully
Summary: [Complex content]
Afterwards the app is still present (mw app list) — the uninstall actually failed (HTTP 412), yet the CLI reports success (and appears to exit 0).
Two problems
- False success / wrong exit semantics. On a 412 the CLI should surface the failure, not print "Process completed successfully", and exit non-zero. Today a script cannot detect the failure.
- The 412 reason isn't surfaced. The cause is a linked primary database. A primary DB also can't be unlinked directly —
DELETE /v2/app-installations/{id}/databases/{databaseId} returns 412 "primary database of app installation cannot be unlinked"; you must first repurpose it to custom/cache, then unlink. A clear message like "cannot uninstall: app has a linked primary database — unlink or repurpose it first" would save a lot of guessing.
Note — why the guard matters
The raw API DELETE /v2/app-installations/{id} does cascade-delete the linked primary database. The CLI's 412 guard is a good safety net against silent data loss — it just needs to report the refusal correctly instead of claiming success.
Context
Surfaced while validating the mittwald-migrate skill.
Summary
mw app uninstall <app> --forceprints both an error and "Process completed successfully" when the app has a linked primary database, and the app is not uninstalled. An automated / agent-driven run can't tell that it failed.Verified against
mw 1.19.0.Repro
PATCH /v2/app-installations/{id}/database,purpose: primary).mw app uninstall <shortId> --forceOutput:
Afterwards the app is still present (
mw app list) — the uninstall actually failed (HTTP 412), yet the CLI reports success (and appears to exit 0).Two problems
DELETE /v2/app-installations/{id}/databases/{databaseId}returns412 "primary database of app installation cannot be unlinked"; you must first repurpose it tocustom/cache, then unlink. A clear message like "cannot uninstall: app has a linked primary database — unlink or repurpose it first" would save a lot of guessing.Note — why the guard matters
The raw API
DELETE /v2/app-installations/{id}does cascade-delete the linked primary database. The CLI's 412 guard is a good safety net against silent data loss — it just needs to report the refusal correctly instead of claiming success.Context
Surfaced while validating the
mittwald-migrateskill.