Repository navigation
Description
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 withpackage_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)
- 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.
- Surface the real instantiation error.
package-entrypoint/host-setupfailures return an opaque "platform failure" with no stack. A stack/trace would make heavy apps debuggable. - 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.
- 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 inpackageStoragevia an owner-gated route. A scoped "read my own package secret's value" capability (for DB URLs / driver credentials) would remove that workaround. - 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
jherr commentedon Dec 2, 2026
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.
cms-triager commentedon Dec 2, 2026
I left the labels alone. The station only triages issues written by a maintainer (OWNER/MEMBER/COLLABORATOR) or labelled
state:needs-triageby one. This issue's author association isCONTRIBUTOR, 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-triageand keeping this as a plain tracking issue linked to #63.