Skip to content

resume fallback#656

Merged
khaliqgant merged 3 commits intomainfrom
resume-fallback
Mar 27, 2026
Merged

resume fallback#656
khaliqgant merged 3 commits intomainfrom
resume-fallback

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Mar 26, 2026

Problem

When workflow-runs.jsonl is missing (due to silent write failure in file-db.ts), --resume throws Run "X" not found even though all step outputs exist at .agent-relay/step-outputs/<runId>/. Meanwhile, --start-from works because it scans the filesystem via findMostRecentRunWithSteps() and loadStepOutput().

Solution Overview

Add a filesystem-based fallback to resume() that reconstructs the run and step records from the step-output cache directory when db.getRun() returns null.


Open with Devin

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

runner.ts: fallback to relay.yaml when config undefined in resume()
runner.ts: use fs.statSync mtime instead of synthetic timestamps
runner.ts: add validateRunId() path traversal guard
runner.ts: clarify failedStepName heuristic with comment
runner.ts: scan .report.json files in cache reconstruction
runner.ts: extract matchWorkflowFromCache() from nested ternary
cli.ts: extract FLAGS_WITH_VALUES constant, add config drift warning
cli.ts: simplify error matching with startsWith
file-db.ts: check directory non-empty in hasStepOutputs()

Co-Authored-By: My Senior Dev <dev@myseniordev.com>
devin-ai-integration[bot]

This comment was marked as resolved.

cli.ts: dead error message check fixed by startsWith() (already in 35c81e7)
runner.ts: filter .report.json from cachedStepNames to prevent false cache hits

Co-Authored-By: My Senior Dev <dev@myseniordev.com>
@khaliqgant khaliqgant merged commit 8f5f65d into main Mar 27, 2026
34 checks passed
@khaliqgant khaliqgant deleted the resume-fallback branch March 27, 2026 13:57
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