Skip to content

feat(runtime): observe native Workflow creation and first do attempts - #110

Merged
tnkuehne merged 2 commits into
mainfrom
feat/workflow-creation-observer
Oct 27, 2026
Merged

tnkuehne merged 2 commits into
mainfrom
feat/workflow-creation-observer

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Adds an optional Cloudflare parent-runtime observer for native workflow creation responses and first step.do callback attempts. It supplies trusted app/version identity and the existing native instance UUID. Completed cache replays and retries do not emit another first-attempt event; explicit restarts can execute first attempts again. The product version advances to 0.4.12.

Creation observations distinguish resolved native creates from ambiguous rejected responses. They run before catalog confirmation. Background delivery never gates app execution; errors, resets and termination can lose observations. Existing creation recovery, read-only lookups, suspension and native results/errors remain unchanged. The hook does not count sleeps/event waits, provider billing totals, state bytes or orchestration CPU, and is not enabled for celld. No application parameters, step names, results or error text are included.

Validation:

  • pnpm check passed (build, workspace typechecks, format and type-aware lint).
  • Native local workerd test covers duplicate/batch creation, recovered and missing native instances, retries, pause/resume, full/partial restart, suspension, terminal errors, stalled/rejected delivery and parent-only extension initialization.
  • All 62 existing local Cloudflare runtime regression tests passed.

No deployment or hosted execution was performed. The local engine tests establish adapter behavior, not provider invoice equivalence.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Adds an optional parent-side observer for native Cloudflare workflow creation and first step.do attempts.

  • Cloudflare workflows can report creation outcomes and first step attempts.

No actionable issues were found. Tests were inspected but not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Catalog create] --> B[Native create]
  B --> C[Queue create observation]
  C --> D[Catalog confirmation or recovery lookup]
  E[Native do callback] --> F{Attempt is 1?}
  F -->|Yes| G[Queue started observation]
  F -->|No| H[Run app callback]
  G --> H
  C -.-> I[Background extension delivery]
  G -.-> I
Loading

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs c3b85ff Oct 27 2026, 06:23 PM

@tnkuehne
tnkuehne merged commit 4e7066f into main Oct 27, 2026
18 checks passed
@tnkuehne
tnkuehne deleted the feat/workflow-creation-observer branch October 27, 2026 18:48
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