You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DELETE /projects/v1/:id triggers an immediate, irreversible destructive
cascade (drop schema, delete Lambdas, release subdomains, tombstone
mailbox, etc.) — not a reactivatable grace window. v1.32.0 conflated it
with the automatic lease-expiry state machine, and the misleading "grace
window would have reactivated" success text + "Soft-delete" description
created a real data-loss-risk bug for agents reading the tool metadata.
This commit:
- Renames the MCP tool archive_project → delete_project to match the
HTTP verb and the CLI's `projects delete` subcommand (all three
interfaces are now consistently named).
- Rewrites the tool description to state immediate, irreversible
destructive cascade, list the cascade effects, and explicitly
contrast with the automatic lease-expiry grace path (which is still
handled by errors.ts 402 extraction from v1.32.0).
- Rewrites the success message to match (no reactivation claim).
- Corrects CLI `projects delete` help text.
- Updates README, sync.test.ts SURFACE, mcp-integration.test.ts import,
and openspec/specs/project-lifecycle-surface/spec.md.
Breaking for MCP clients that have `archive_project` cached — they'll
need to pick up `delete_project`.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-**WHEN** a subdomain-claim tool receives `HTTP 409` with body `{ "message": "Subdomain reserved", "hint": "Name held for original owner during grace period" }`
24
24
-**THEN** the tool result includes the 409 status, the message and hint, and next-step text mentioning the reservation rather than reusing the 403 lease-expired guidance
25
25
26
-
### Requirement: archive_project tool text reflects grace-period vocabulary
26
+
### Requirement: delete_project tool name and text match the API
27
27
28
-
The `archive_project`MCP tool description and success message, and the corresponding CLI subcommand output, SHALL use the new lifecycle vocabulary (purge / grace window) rather than the obsolete "archived" wording. The tool name, CLI subcommand name, HTTP method, and endpoint path SHALL remain unchanged.
28
+
The MCP tool that calls `DELETE /projects/v1/:id` SHALL be named `delete_project` (matching the HTTP method) and its description SHALL state that the call triggers an immediate, irreversible cascade purge (drop schema, delete Lambdas, release subdomains, tombstone mailbox, etc.) and SHALL distinguish that explicit purge from the automatic lease-expiry grace state machine. The CLI subcommand SHALL remain `run402 projects delete <id>` and use equivalent wording.
29
29
30
-
#### Scenario: Successful archive
30
+
#### Scenario: Successful delete
31
31
32
-
-**WHEN** the agent invokes `archive_project` on a live project and the API returns 200
33
-
-**THEN** the tool returns success text that uses "purged" (or equivalent purge/grace vocabulary) and does not describe the project as "archived"
32
+
-**WHEN** the agent invokes `delete_project` on a live project and the API returns 200
33
+
-**THEN** the tool returns success text that names the action as a delete/purge, lists the cascade effects, and states that the action is irreversible
34
34
35
35
#### Scenario: Tool description advertised via MCP list
36
36
37
37
-**WHEN** an MCP client lists available tools
38
-
-**THEN** the description for `archive_project` reflects the soft-delete lifecycle (grace window → purge) and does not claim the project becomes "archived" after 7 days
38
+
-**THEN** the description for `delete_project` describes immediate destructive cascade, explicitly contrasts it with the automatic lease-expiry grace path, and does not claim the project enters a reactivatable grace window
39
39
40
40
### Requirement: SKILL.md runtime sections document the grace state machine
"Soft-delete a project: the gateway moves it into the grace-period state machine (active → past_due → frozen → dormant → purged, ~104 days) and this tool removes it from the local key store. End-user data plane keeps serving during grace; renewing the tier before purge reactivates it. After purge the action cannot be undone.",
400
-
archiveProjectSchema,
401
-
async(args)=>handleArchiveProject(args),
398
+
"delete_project",
399
+
"Immediately and irreversibly delete a project: the gateway runs the full destructive cascade (drop tenant schema, delete Lambda functions, release subdomains, tombstone mailbox, remove sender domain, wipe secrets and app versions) and sets status=purged. This tool also removes the project from the local key store. Distinct from the automatic lease-expiry grace window — this action is the explicit purge and cannot be undone. To recover from a missed renewal use `set_tier` instead.",
@@ -33,7 +32,7 @@ export async function handleArchiveProject(args: {
33
32
content: [
34
33
{
35
34
type: "text",
36
-
text: `Project \`${args.project_id}\` entered the soft-delete state (status: purged) and was removed from the local key store. Renewing the tier during the grace window would have reactivated it.`,
35
+
text: `Project \`${args.project_id}\` deleted (status: purged). Schema dropped, functions deleted, subdomains released, mailbox tombstoned. Removed from local key store. This action is irreversible.`,
0 commit comments