Skip to content

Use Workflow runtime deadlines for intent processing#1054

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/workflow-runtime-deadlines
Jul 21, 2026
Merged

Use Workflow runtime deadlines for intent processing#1054
tannerlinsley merged 1 commit into
mainfrom
taren/workflow-runtime-deadlines

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • upgrade to the published Workflow deadline/yield runtime packages
  • replace intent workflow wall-clock batching with automatic durable yielding
  • apply a 25s runtime budget with a 5s cooperative margin to sweeps and admin runs
  • treat a yielded admin run as continuing instead of an error
  • cover lease release and same-run resume on the next sweep

Verification

  • pnpm test
  • pnpm build

Summary by CodeRabbit

  • New Features

    • Queue processing now reports whether work is continuing or completed.
    • Completed processing displays the number of versions processed, skill counts, and detailed failure messages.
    • Pending work can resume automatically when processing reaches its execution limit.
  • Bug Fixes

    • Updated queue messaging and tooltips to accurately describe downloading and extracting skills.
    • Improved scheduled processing reliability by applying consistent execution limits and resume behavior.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 21, 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 Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com b0c08c8 Commit Preview URL

Branch Preview URL
Jul 21 2026, 03:00 PM

@coderabbitai

coderabbitai Bot commented Jul 21, 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

Run ID: 927fa8d9-1e50-4ab3-a2b1-26c47f8d6104

📥 Commits

Reviewing files that changed from the base of the PR and between 3b4add9 and b0c08c8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • package.json
  • src/routes/admin/intent.tsx
  • src/server/scheduled.server.ts
  • src/utils/intent-admin.server.ts
  • src/utils/intent-workflows.server.ts
  • src/utils/workflow-runtime.server.ts
  • tests/intent-workflow.test.ts

📝 Walkthrough

Walkthrough

Workflow runtime limits are centralized and applied to scheduled and admin-triggered intent processing. Workflows can pause and resume based on remaining runtime, while the admin interface renders completed summaries or continuing status.

Changes

Intent workflow runtime

Layer / File(s) Summary
Runtime budgeting and workflow execution
src/utils/workflow-runtime.server.ts, src/utils/intent-workflows.server.ts, tests/intent-workflow.test.ts, package.json
Shared runtime duration and yield thresholds are introduced; intent processing removes local budget checks, and tests cover paused-run resumption.
Scheduled and admin runtime integration
src/server/scheduled.server.ts, src/utils/intent-admin.server.ts
Scheduled sweeps and admin-triggered runs pass runtime budgets and distinguish paused from completed results.
Processing result presentation
src/routes/admin/intent.tsx
The queue tooltip and result banner now describe extraction work and render completed or continuing processing states.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Admin as Admin queue action
  participant Runtime as workflowRuntime
  participant Workflow as Intent workflow
  participant Scheduler as Scheduled sweep
  Admin->>Runtime: startRun with runtime budgets
  Runtime->>Workflow: process pending versions
  Workflow-->>Runtime: paused with runId or completed summary
  Runtime-->>Admin: continuing or completed payload
  Scheduler->>Runtime: sweep with runtime budgets
  Runtime->>Workflow: resume paused run
  Workflow-->>Scheduler: completed summary
Loading

Possibly related PRs

Suggested reviewers: kevinvandy

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: intent processing now uses Workflow runtime deadlines and yielding.
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 taren/workflow-runtime-deadlines

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

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​tanstack/​workflow-store-drizzle-postgres@​0.0.5781008493100
Added@​tanstack/​workflow-runtime@​0.0.3781007991100
Added@​tanstack/​workflow-core@​0.0.4791009992100

View full report

@tannerlinsley
tannerlinsley merged commit 85a164e into main Jul 21, 2026
7 checks passed
@tannerlinsley
tannerlinsley deleted the taren/workflow-runtime-deadlines branch July 21, 2026 15:06
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