Skip to content

feat(eve): add authenticated session hard delete - #1213

Draft
0xKoller wants to merge 1 commit into
vercel:mainfrom
0xKoller:codex/session-hard-delete
Draft

feat(eve): add authenticated session hard delete#1213
0xKoller wants to merge 1 commit into
vercel:mainfrom
0xKoller:codex/session-hard-delete

Conversation

@0xKoller

Copy link
Copy Markdown

Summary

  • add a framework-owned DELETE /eve/v1/session/:sessionId maintenance route
  • require a separate built-in JWT policy and reject normal/user auth for permanent deletion
  • cancel and purge the root plus $eve.root descendants through the provider-advertised Workflow runTreePurge capability
  • return idempotent 204 for deleted/absent trees, retryable 409 for active conflicts, and keep unsupported deployments unavailable
  • document the route and include an eve patch changeset

Refs #1211.
Depends on vercel/workflow#3115.

Release block

This PR must remain draft and must not be released until the Workflow contract and a real provider implementation are released. In particular, the managed Vercel World cannot advertise runTreePurge until its separately owned backend atomically fences and purges root-plus-descendant state. The capability check deliberately fails closed.

Verification

  • focused unit tests: 124 passed (workflow-runtime.test.ts, eve.test.ts)
  • pnpm --filter eve typecheck
  • pnpm typecheck (32/32 workspace tasks)
  • pnpm build
  • pnpm lint
  • pnpm guard:invariants
  • pnpm docs:check
  • git diff --check

The full workspace unit suite was also attempted twice. Under concurrent workspace load, unrelated 5-second import/dev-server tests timed out (for example load-agent-info-data, subagent-emitter, and wildcard-listener normalization); the changed hard-delete suites remained green. CI is the authoritative full-suite run.

Add a built-in-JWT-only maintenance route that permanently purges an eve session and its Workflow run tree. Gate deletion on the provider-advertised runTreePurge capability and retain retryable conflicts for active trees.

Signed-off-by: Koller <joseluiskoller98@gmail.com>
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

@0xKoller is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

options: {
descendantAttribute: { key: string; value: string };
},
) => Promise<{ purgedRunCount: number; status: "absent" | "purged" }>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsupported Workflow World (no runTreePurge capability) is reported to clients as a retryable 409 Conflict instead of 501 Unavailable, causing maintenance clients to retry a request that can never succeed.

Fix on Vercel

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