Skip to content

fix(async-jobs): retain accepted run IDs for immediate lookup - #8490

Merged
icecrasher321 merged 2 commits into
stagingfrom
codex/async-run-visibility
Oct 1, 2026
Merged

icecrasher321 merged 2 commits into
stagingfrom
codex/async-run-visibility

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • Persist the accepted Trigger run ID before a keyed enqueue returns, so immediate workflow polling can resolve the run before Trigger's tag index catches up. Reuse the existing idempotency result table and retain tag lookup for older jobs.
  • Cancel the known root run after verifying its workflow, execution, task type, and active status. Treat receipt-write failures as ambiguous acceptance so callers retain their claim and retry safely.

Type of Change

  • Bug fix

Testing

  • 142 focused queue, cancellation, and execution tests passed; 116 queue/cancellation tests rerun after rebasing onto latest staging.
  • Five real-PostgreSQL regressions passed with bun run test:integration trigger-dev.integration.ts; report: apps/sim/test-results/integration.json. The original code failed immediate lookup and cancellation. Removing each binding, scope, active-status, and deduplication guard also failed its regression.
  • App type-check, repository lint, all 52 CI audits (including API validation), staging-base block registry checks, and generated artifact checks passed.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 30, 2026 11:53pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds job receipt storage to async job queue backend.

The PR appears safe to merge; no outstanding finding or new actionable issue was identified.

Summary

The PR stores accepted Trigger run IDs for immediate keyed lookup and uses the verified root run during execution cancellation. The latest changes let cancellation scans continue after a root lookup or cancellation failure and add regression coverage for those failures.

Reviews (2) · Last reviewed commit: "fix(async-jobs): finish cancellation sca..."

Comment thread apps/sim/lib/core/async-jobs/backends/trigger-dev.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/core/async-jobs/backends/trigger-dev.ts Outdated
Comment thread apps/sim/lib/core/async-jobs/backends/trigger-dev.integration.ts
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@icecrasher321
icecrasher321 merged commit b84828d into staging Oct 1, 2026
32 checks passed
@icecrasher321
icecrasher321 deleted the codex/async-run-visibility branch October 1, 2026 00:05

This branch was previously deployed

1 inactive deployment
Preview — 3c737a50 Deployed Sep 30, 2026 by vercel[bot]
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