cli: read list views from world.analytics when available#2648
cli: read list views from world.analytics when available#2648karthikscale3 wants to merge 2 commits into
Conversation
inspect list views (runs, steps, events, hooks, sleeps) now read from the optional world.analytics namespace when the active backend provides one, falling back to the runtime storage APIs otherwise. Payload and detail views are unchanged. Deprecate --with-data for list views; payloads are viewable per-resource via 'inspect <resource> <id>'.
🦋 Changeset detectedLatest commit: c96028e The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (55 failed)astro (5 failed):
example (5 failed):
express (5 failed):
fastify (5 failed):
hono (5 failed):
nextjs-turbopack (5 failed):
nextjs-webpack (5 failed):
nitro (5 failed):
nuxt (5 failed):
sveltekit (5 failed):
vite (5 failed):
📋 Other (5 failed)e2e-vercel-prod-tanstack-start (5 failed):
Details by Category❌ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
The analytics read path omits ownerId (and the secret hook token), so routing hook listing through it silently drops the ownerId column. Keep inspect hooks on the runtime APIs, consistent with the web observability UI. Runs, steps, events, and sleeps continue to use the analytics read path when available. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Audited the CLI list paths for the same metadata-vs-payload class of issue the web review surfaced. Findings:
Typecheck diff vs base is empty; biome clean (pre-existing complexity warnings only, and this change removes a branch). |
What changed
workflow inspectlist views now read from the optionalworld.analyticsnamespace when the active backend provides one, and fall back to the runtime
storage APIs otherwise.
inspect runs/steps/events/hooks/sleeps— list pages comefrom
world.analytics.*(metadata-only) when available, else from theruntime
world.*APIs withresolveData: 'none'.run) and bulkcancelmatching also prefer theanalytics read path for their metadata lookups; the cancel mutation itself
is unchanged.
inspect run <id>,inspect step <id>, singlehook/event) are unchanged — they continue to resolve full data via the
runtime APIs.
--with-datadeprecation (list views)--with-datais now deprecated for list views and forces the runtime path sopayloads can still be resolved into the table. Running a list view with
--with-dataprints:Payloads remain fully available per-resource via
workflow inspect <resource> <id>.Field-mapping notes
ownerId; that column isdropped when rendering analytics rows (rather than showing a blank).
world.analytics.waits(keyed bywaitId/status)when analytics is available; the event-reconstruction path is kept as a
fallback for backends without analytics.
Validation
pnpm --filter @workflow/cli typecheckpnpm exec biome checkon all changed files (no errors; only pre-existingcognitive-complexity warnings on functions that already exceeded the limit)
Stacking
Stacked on the analytics-API PR (#2234) — it must merge first. Base branch is
codex/workflow-analytics-apis; this will retarget tomainonce the basemerges.
Merge order
This work lands as a stack of four PRs on the
world.analyticsread-path:world.analyticsnamespace (basemain) — merge firstworld.analytics(stacked on Add workflow analytics world APIs #2234)world.analytics(stacked on Add workflow analytics world APIs #2234)#2648 and #2647 both depend only on #2234 and are independent of each other. #2652 builds on #2647. After #2234 merges to
main, the stacked PRs auto-retarget.