Skip to content

Delete PackageServiceInstance on kody-runtime - #1560

Merged
kody-bot merged 1 commit into
mainfrom
cursor/runtime-do-delete-class-8713
Aug 19, 2026
Merged

kody-bot merged 1 commit into
mainfrom
cursor/runtime-do-delete-class-8713

Conversation

@kentcdodds

@kentcdodds kentcdodds commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

Intent

Finish the Durable Object cleanup after #1559. Production kody-runtime no longer has the transferred PackageServiceInstance binding, so tag v2 deleted_classes can apply.

Summary

Depends on successful production deploy of #1559: https://github.com/kentcdodds/kody/actions/runs/32245113886

Testing

  • npm run deploy-guardrails:check — pass
  • format / docs temporal / lint — pass
  • Preview success criterion: runtime worker first deploy applies v1 then v2 without 10070/10074
  • Production success criterion: runtime worker deploy applies v2 without 10061/10064

System changes

Destructive Durable Object class deletion. No user-facing API.

System recap — extends existing primitives (medium risk)

Mode: recap · Base: main @ 7928ec6f · Head: 2194f6c1

Classification: extends — this PR deletes the retired runtime Durable Object class after the binding-only deploy.

Primitives touched

Primitive Group Impact
package-runtime runtime extends — delete PackageServiceInstance and remove the stub export

Change flow

#1559 left the class exported as a stub with no binding. This PR deletes the class.

sequenceDiagram
	actor Operator
	participant runtimeWorker as kody-runtime
	participant cloudflare as Cloudflare DO registry
	Operator->>runtimeWorker: merge this PR
	runtimeWorker->>cloudflare: apply v2 deleted_classes
	runtimeWorker->>cloudflare: stop exporting PackageServiceInstance
	Note over cloudflare: binding already gone after #1559
	cloudflare-->>runtimeWorker: class deleted
Loading

Before / after

#1559 production This PR
Binding absent absent
Class export stub removed
Tag v2 omitted deleted_classes

Invariants

Protected v1 transfer / preview new_sqlite_classes stay unchanged. Do not edit tools/ci/durable-object-baseline.json.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Bug Fixes

    • Completed cleanup of the retired package service during deployments.
    • Improved production and preview migration handling to safely remove obsolete runtime state.
    • Clarified deployment errors and migration requirements for preview environments.
  • Documentation

    • Updated architecture and deployment guidance to reflect the revised package service deletion workflow.

… gone.

Restore runtime-worker tag v2 deleted_classes and remove the temporary stub export. Production already dropped the transferred binding in #1559, so this deploy can delete the class without Cloudflare 10061 or 10064.

Co-authored-by: me <me@kentcdodds.com>
@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 67f4dc6d-247a-49c6-8bea-6cb3822183c5

📥 Commits

Reviewing files that changed from the base of the PR and between 7928ec6 and 2194f6c.

📒 Files selected for processing (5)
  • docs/contributing/architecture/runtime-worker-migration-runbook.md
  • docs/contributing/decisions/0025-no-package-services-primitive.md
  • packages/runtime-worker/wrangler.jsonc
  • packages/worker/src/package-service-instance-stub.ts
  • packages/worker/src/runtime-worker.ts
💤 Files with no reviewable changes (2)
  • packages/worker/src/package-service-instance-stub.ts
  • packages/worker/src/runtime-worker.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The PR completes PackageServiceInstance removal. It adds production and preview v2 deletion migrations, removes the temporary stub and runtime export, and updates migration documentation.

Changes

PackageServiceInstance removal

Layer / File(s) Summary
Migration deletion and runtime cleanup
packages/runtime-worker/wrangler.jsonc, packages/worker/src/package-service-instance-stub.ts, packages/worker/src/runtime-worker.ts
Production and preview add v2 migrations that delete PackageServiceInstance. The temporary stub and runtime export are removed.
Deployment guidance
docs/contributing/architecture/runtime-worker-migration-runbook.md, docs/contributing/decisions/0025-no-package-services-primitive.md
The documentation describes the production and preview migration sequence, the deletion allowlist, and preview error 10074 conditions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to 2194f

The PR removes a retired Durable Object export and enables its deletion; the remaining bounded risk is inconsistent preview guidance about deployment order, which could cause migration confusion or failure. It is mergeable with explicit owner verification of the preview sequence.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the primary change: deleting PackageServiceInstance from kody-runtime.
Description check ✅ Passed The description includes Intent, Summary, Testing, and System changes sections with relevant migration details, dependencies, risks, and success criteria.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/runtime-do-delete-class-8713

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kody-bot
kody-bot marked this pull request as ready for review August 19, 2026 11:03
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Preview deployed: https://kody-pr-1560.kody-a99.workers.dev

Worker: kody-pr-1560
Runtime worker: kody-pr-1560-runtime (https://kody-pr-1560-runtime.kody-a99.workers.dev)
D1: kody-pr-1560-db
KV: kody-pr-1560-oauth-kv

Mocks:

@kody-bot
kody-bot merged commit 09f8faa into main Aug 19, 2026
19 checks passed
@kody-bot
kody-bot deleted the cursor/runtime-do-delete-class-8713 branch August 19, 2026 11:08
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.

3 participants