Skip to content

fix(workflows): preserve durable execution across repeated human pauses - #7798

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/hitl-repeat-review
Sep 14, 2026
Merged

fix(workflows): preserve durable execution across repeated human pauses#7798
waleedlatif1 merged 3 commits into
stagingfrom
fix/hitl-repeat-review

Conversation

@mzxchandra

@mzxchandra mzxchandra commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep repeated human-review pauses attached to the original durable execution so subsequent submissions remain resumable.
  • Preserve the existing pause merge/recount behavior to avoid completing a newly opened pause prematurely.

Type of Change

  • Bug fix

Testing

  • Local browser: Run-button start and two review submissions completed on one durable execution. Three rounds with partial/omitted answers and a page reload also passed; the approved file appeared only after the final answer.
  • Original-code negative control reproduced failure on the second browser submission; the corrected version completed.
  • Local API and PostgreSQL: three rounds, single pause, duplicate submission rejection, cancellation followed by a late submission, and partial/omitted answers with native file promotion gating passed.
  • 94 executor tests passed, including regressions for durable identity and counting each answered pause once.
  • Ship generators, repository lint, block-registry audit, all 46 audits, docs-manifest check, and all-workspace type checking passed on the synced staging base.
  • CI passed: application build, lint/test job, both test shards, and both PostgreSQL integration jobs.
  • Hosted verification remains pending deployment; existing stranded executions require recovery.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced

@vercel

vercel Bot commented Sep 13, 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 14, 2026 3:43am UTC

Request Review

@mzxchandra
mzxchandra changed the base branch from main to staging September 13, 2026 01:57
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile review

@greptile-apps

greptile-apps Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the durable execution and per-attempt stream identities remain correctly separated, with no outstanding correctness issue identified.

Summary

  • Keeps pause snapshots and pause-point merge/recount operations attached to the durable run.
  • Retains separate stream identities for individual resume attempts.
  • Cleans user-file base64 cache entries under the durable execution identity that produced them.
  • Adds regression coverage for repeated pauses, pause settlement, and cache cleanup.

Diagram

sequenceDiagram
    participant U as User
    participant M as PauseResumeManager
    participant S as Resume-attempt stream
    participant E as Workflow executor
    participant P as Durable pause record

    U->>M: Submit human-review response
    M->>S: Start stream with resume attempt ID
    M->>E: Resume snapshot with durable execution ID
    E-->>M: Pause again with new pause point
    M->>P: Merge pause points under durable execution ID
    M->>P: Mark answered point resumed
    U->>M: Submit next response
Loading

Reviews (3) · Last reviewed commit: "fix(workflows): clean resume base64 cach..."

@mzxchandra
mzxchandra marked this pull request as ready for review September 13, 2026 07:45
Resumed blocks now write the base64 cache under the durable execution ID, so
cleanup must use that ID too; the per-attempt ID matched no entries and left
cache bytes and budget counters in place until TTL.
@waleedlatif1

Copy link
Copy Markdown
Collaborator

@greptile

@waleedlatif1
waleedlatif1 merged commit 5e7d17a into staging Sep 14, 2026
24 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/hitl-repeat-review branch September 14, 2026 03:46
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.

2 participants