fix: default verify_feedback to empty string in single-step claimStep path#303
Open
frankleinadsr wants to merge 1 commit intosnarktank:mainfrom
Open
Conversation
… path
The claimStep() function had an asymmetry between its loop and single step
paths. The loop path correctly guarded against missing verify_feedback by
defaulting it to an empty string before calling findMissingTemplateKeys(),
but the single-step path did not.
Any single step whose input_template contains {{verify_feedback}} would
fail on its very first execution when no prior retry had populated the key
in the run context. findMissingTemplateKeys() would report it as a missing
required key and failStepWithMissingInputs() would fire immediately, marking
the step and run as failed before any agent ever executed the step.
This was observed in the bug-fix workflow's 'fix' step:
Step input is not ready: missing required template key(s) verify_feedback
Fix: add the same guard to the single-step path:
if (!context["verify_feedback"]) { context["verify_feedback"] = ""; }
The falsy check correctly handles both absent keys and empty-string values
without overwriting a legitimately populated verify_feedback from a prior
retry cycle.
Also adds a regression test (tests/single-step-verify-feedback.test.ts) with:
- Integration tests proving claimStep succeeds on first pass and preserves
real verify_feedback on retry
- Unit tests demonstrating the guard logic
- Source code presence check ensuring the guard exists in both paths
|
Someone is attempting to deploy a commit to the Ryan Team on Vercel. A member of the Team first needs to authorize it. |
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.
Problem
Single non-loop steps with
{{verify_feedback}}in theirinput_templatefail before first execution when no prior retry has populated that key in the run context.Observed error:
Root Cause
claimStep()has two code paths: one for loop steps and one for single steps. The loop path correctly guards against missingverify_feedbackby defaulting it to an empty string before callingfindMissingTemplateKeys(). The single-step path did not apply the same guard.When a single step's
input_templatecontained{{verify_feedback}}and no prior retry had populated the key in the run context,findMissingTemplateKeys()reported it as a missing required key andfailStepWithMissingInputs()fired immediately — marking the step and run as failed before any agent ever executed the step.Fix
Added the same guard to the single-step path (~line 658 of
src/installer/step-ops.ts):The falsy check correctly handles both absent keys and empty-string values without overwriting a legitimately populated
verify_feedbackfrom a prior retry cycle.Test
Added
tests/single-step-verify-feedback.test.tswith:claimStep()succeeds on first pass for a single step with{{verify_feedback}}and preserves real feedback on retryAll 168 tests pass.