Skip to content

Kody: support heavier server workers so the CMS /admin (write) path can run on a deployment #64

Backlog

Description

@jherr

Tracking issue for an external (Kody platform) dependency. The body below is the write-up to submit to the Kody team; this issue tracks it on our side because it blocks running the CMS /admin (write) path on a Kody deployment.

Summary

We run a TanStack CMS on Kody (*.kody.run). The read path is a perfect fit — an ~8 KB worker (Neon HTTP driver + SQL) serving public pages is 100% reliable. The write/admin path is blocked: it needs the CMS engine (migrations, transactional writes) in the worker, and that worker intermittently fails to boot. We'd like guidance and/or platform changes so /admin can live on the same deployment.

What works great

  • Thin fetch-handler workers, SSR, static client bundles, Neon over HTTP — all solid.
  • Owner-gated routes via metaGetCurrentUser, packageStorage, the internet-visible approval flow.

The blocker (with evidence)

  • An ~8 KB worker: 100% success across hundreds of requests.
  • The same app carrying the full CMS engine (@tanstack/cms-core + store-postgres, ~1 MB bundled): ~40% of requests fail with package_app_package_entrypoint / package_app_host_setup — "the worker failed before its request handler ran… Kody platform failure," duration 0 ms. A cold-start instantiation failure, not app logic (same code serves fine when warm).
  • We disproved "bundle too big": lazy-loading, minify (1.1 MB → 636 KB), and dropping React each had zero effect on the rate. The failure correlates only with the engine graph being present.

Specific asks (priority order)

  1. A larger / observable worker instantiation budget. What is the cold-start CPU/time/memory limit for module instantiation, and can it be raised for heavier apps? It's currently invisible — we can't see why a ~1 MB worker intermittently fails to instantiate.
  2. Surface the real instantiation error. package-entrypoint/host-setup failures return an opaque "platform failure" with no stack. A stack/trace would make heavy apps debuggable.
  3. A "keep-warm" / min-instance option for low-traffic workers. A single-editor admin only cold-starts occasionally; keeping one instance warm would make it a non-issue.
  4. Plaintext secret access for trusted package code. packageSecrets.get() returns an opaque {{secret:…}} ref, never the value — so a DB driver (which authenticates its own connection) can't use a Kody secret. We had to stash the Neon connection string in packageStorage via an owner-gated route. A scoped "read my own package secret's value" capability (for DB URLs / driver credentials) would remove that workaround.
  5. Install non-registry deps, or document the requirement. Publish doesn't install https://pkg.pr.new/... URL dependencies (they end up as unresolved bare imports), so we must pre-bundle. Either support URL/tarball deps or document "pre-bundle non-registry deps."

Repro / refs

package_app_package_entrypoint, path /; app @jherr/blog. We can share the two app variants (thin vs engine) that reliably show 0% vs ~40%.

Activity

  1. added
    enhancement
    state:needs-triage
    on Dec 2, 2026
  2. jherr commented on Dec 2, 2026

    @jherr
    ContributorAuthor

    Companion app-side work (make edge reads not require the engine): #63. Note: the issue body is the write-up to submit to the Kody tracker — this GitHub issue just tracks the dependency on our side.

  3. cms-triager commented on Dec 2, 2026

    @cms-triager
    handoff:
      from: triager
      to: human
      issue: 64
      pr: null
      attempt: 1
      risk: two-way
      risk_reasons: []
      summary: Not triaged; author is not a maintainer and the issue tracks an external (Kody platform) dependency with no in-repo work
      acceptance:
        - "blocked: author association is CONTRIBUTOR and I could not confirm that a maintainer applied state:needs-triage"
        - "blocked: the issue body is a write-up for the Kody platform team, not a change to this repo, so the looper has nothing to implement"
      out_of_scope:
        - Any code change in this repo (the app-side work is tracked in #63)
      notes_for_next: A maintainer should decide whether this stays open as a tracking issue (and drop state:needs-triage) or is closed once it has been filed with Kody. Triage #63 for the in-repo work instead.

    I left the labels alone. The station only triages issues written by a maintainer (OWNER/MEMBER/COLLABORATOR) or labelled state:needs-triage by one. This issue's author association is CONTRIBUTOR, and I couldn't verify who added the label.

    Even if a maintainer re-applies the label, this issue has no unit of work for the looper. Every ask (instantiation budget, error surfacing, keep-warm, secret access, non-registry deps) is a request to the Kody platform. I'd suggest removing state:needs-triage and keeping this as a plain tracking issue linked to #63.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesenhancementstate:needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions