Repository navigation
fix(workflows): preserve run artifacts on invalid startup inputs - #5435
Open
WOLIKIMCHENG wants to merge 1 commit into
Open
WOLIKIMCHENG wants to merge 1 commit into
WOLIKIMCHENG wants to merge 1 commit into
Conversation
Resolve inputs before creating run storage or replacing the workflow snapshot, so rejected startup inputs leave existing runs resumable. Preserve successful run-ID reuse and append-only log behavior. Add engine and CLI regressions for fresh rejection, paused-run preservation and successful reuse. Assisted-by: Codex CLI (model: gpt-6.1-sol, autonomous)
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the artifact-preservation change, though the reported regression checks were not independently rerun.
No open issues 🎉
What changed in this PR
This PR protects Spec Kit workflow run artifacts when startup inputs are invalid, preventing failed starts from damaging paused runs and blocking resume.
Changes:
- Resolves inputs before creating run storage or writing the workflow snapshot.
- Adds regression coverage for artifact preservation, resume, input errors, and successful run-ID reuse.
The PR reports before-and-after regression evidence; those checks were not independently rerun.
| File | Description |
|---|---|
tests/test_workflows.py |
Tests invalid-input cleanup guarantees, run-ID selection, and input resolution behavior. |
tests/specify_cli/workflows/test_command_run.py |
Adds CLI coverage for artifact preservation, resume, and run-ID reuse, including subprocess checks. |
src/specify_cli/workflows/engine.py |
Moves input resolution ahead of run artifact writes. |
Review effort: Balanced (dynamic)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolve workflow inputs before creating run storage or writing the workflow snapshot. Previously, an invalid start using a paused run's ID could overwrite its snapshot and prevent resume. Rejected startup inputs now leave existing run artifacts unchanged and create no fresh run directory, while preserving existing input-error reporting and successful run-ID reuse.
Testing
.venv/bin/specify --helppassed in prior testing; finalgit diff --checkpassed.AI Disclosure
AI disclosure: AI-assisted tools were used to implement the fix and develop tests.