Repository navigation
fix(conformance): capability-aware cascade — missing_tool over prerequisite_failed for un-advertised steps - #1171
Merged
Conversation
…isite_failed (#1169) When statefulFailed fires, downstream stateful steps now have their intrinsic skip-eligibility evaluated before the cascade reason is applied. Steps whose task the agent never advertised receive missing_tool (passed: true) instead of prerequisite_failed (passed: false), making storyboard reports honest for reduced-surface agents like LinkedIn and Spotify. Uses resolveTaskName() so $test_kit.* steps are checked against the concrete resolved task name, not the template string. https://claude.ai/code/session_01Ya6Gy5FekjG4pxxyvGE2yE
…ool arm Matches the pattern used by the phaseAbsent cascade arm (line 987) for defensive consistency — future priorStepResults consumers see cascade-skipped missing_tool steps in the map. https://claude.ai/code/session_01Ya6Gy5FekjG4pxxyvGE2yE
Contributor
Author
Admin merge rationaleSame |
Contributor
Author
|
Acknowledged — pre-existing CI failures noted and tracked at #1178. No action needed here. Triaged by Claude Code. Session: https://claude.ai/code/session_01GDuc3yuRhgFqktZdqvzBmk Generated by Claude Code |
5 tasks done
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.
Closes #1169
Summary
When
statefulFailedfires, the runner previously stamped every downstream stateful step withprerequisite_failed(passed: false) without checking whether the step's tool was even in the agent's advertised tool set. For agents with reduced specialism surfaces (LinkedIn, Spotify in the issue's concrete data), this produced misleading cascades:sync_creatives,sync_catalogs,log_event, andget_account_financialsall showedprerequisite_failedwhen the honest diagnostic wasmissing_tool— the agent never claimed those surfaces.The fix: before applying the cascade reason, check intrinsic skip-eligibility via
resolveTaskName(step, options)againstoptions.agentTools. If the task is not advertised, emitmissing_tool / passed: true. If it is advertised (state genuinely never materialized), emitprerequisite_failed / passed: falseas before.Uses
resolveTaskName()(notstep.task) so$test_kit.*steps are checked against the concrete resolved name — the template string would never be inagentToolsand would incorrectly classify every test-kit step asmissing_tool.Also sets
priorStepResults.set(step.id, result)in the new arm for symmetry with thephaseAbsentcascade arm (defensive: futurepriorStepResultsconsumers see cascade-skippedmissing_toolsteps in the map).This fix is orthogonal to #1144 / PR #1146 (sole-stateful-step
not_applicable→ no cascade) and PR #1165 (peer_substitutes_for+AccountToolContext). Both address different code paths in the cascade; both can ship independently.Note on
overall_passedwhen all stateful steps aremissing_tool: The protocol expert flagged that an agent advertising no applicable storyboard tools could getoverall_passed: trueafter this fix. This is a pre-existing design property of the runner — the non-cascadeexecuteSteppath already emitsmissing_tool / passed: truefor unadvertised steps — and is gated by the empty-agentTools abort guard at runner init. No new exposure is introduced here; theoverall_passed: truecase is the honest score for an agent that claims a specialism but doesn't implement any of the storyboard's tools (same behavior as the storyboard-levelrequired_toolscheck).What was tested
npx tsc --project tsconfig.lib.json— pre-existing TS2688/TS5107 only (confirmed onmainbefore this branch)node --test test/lib/storyboard-cascade-skip-on-skip.test.js— 13/13 pass (10 pre-existing + 3 new: primary reclassification case, fall-through guard for advertised tasks,$test_kit.*regression guard)node --test test/lib/storyboard-*.test.jssweep — same 10 suite failures asmainbaseline (numbers shifted +1 by the new describe block); no regressions introducedPre-PR review
priorStepResults.setgap identified as an issue; nit ontask: resolvedTaskvstask: step.taskinconsistency in theprerequisite_failedfall-through noted in PR bodymissing_tool / passed: trueis semantically correct per AdCP spec and consistent withSKIP_DETAILS,RunnerSkipReasonenum, andisHardMissingStateSkipReason;patchchangeset classification is correctSession: https://claude.ai/code/session_01Ya6Gy5FekjG4pxxyvGE2yE
Generated by Claude Code