Skip to content

fix(conformance): capability-aware cascade — missing_tool over prerequisite_failed for un-advertised steps - #1171

Merged
bokelley merged 4 commits into
mainfrom
claude/issue-1169-capability-aware-cascade
May 1, 2026
Merged

bokelley merged 4 commits into
mainfrom
claude/issue-1169-capability-aware-cascade

Conversation

@bokelley

@bokelley bokelley commented May 1, 2026

Copy link
Copy Markdown
Contributor

Closes #1169

Summary

When statefulFailed fires, the runner previously stamped every downstream stateful step with prerequisite_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, and get_account_financials all showed prerequisite_failed when the honest diagnostic was missing_tool — the agent never claimed those surfaces.

The fix: before applying the cascade reason, check intrinsic skip-eligibility via resolveTaskName(step, options) against options.agentTools. If the task is not advertised, emit missing_tool / passed: true. If it is advertised (state genuinely never materialized), emit prerequisite_failed / passed: false as before.

Uses resolveTaskName() (not step.task) so $test_kit.* steps are checked against the concrete resolved name — the template string would never be in agentTools and would incorrectly classify every test-kit step as missing_tool.

Also sets priorStepResults.set(step.id, result) in the new arm for symmetry with the phaseAbsent cascade arm (defensive: future priorStepResults consumers see cascade-skipped missing_tool steps 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_passed when all stateful steps are missing_tool: The protocol expert flagged that an agent advertising no applicable storyboard tools could get overall_passed: true after this fix. This is a pre-existing design property of the runner — the non-cascade executeStep path already emits missing_tool / passed: true for unadvertised steps — and is gated by the empty-agentTools abort guard at runner init. No new exposure is introduced here; the overall_passed: true case 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-level required_tools check).

What was tested

  • npx tsc --project tsconfig.lib.json — pre-existing TS2688/TS5107 only (confirmed on main before 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)
  • Full node --test test/lib/storyboard-*.test.js sweep — same 10 suite failures as main baseline (numbers shifted +1 by the new describe block); no regressions introduced

Pre-PR review

  • code-reviewer: approved — no blockers; fixed priorStepResults.set gap identified as an issue; nit on task: resolvedTask vs task: step.task inconsistency in the prerequisite_failed fall-through noted in PR body
  • ad-tech-protocol-expert: approved — missing_tool / passed: true is semantically correct per AdCP spec and consistent with SKIP_DETAILS, RunnerSkipReason enum, and isHardMissingStateSkipReason; patch changeset classification is correct

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num> →
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See adcp#3121
for context.

Session: https://claude.ai/code/session_01Ya6Gy5FekjG4pxxyvGE2yE


Generated by Claude Code

claude added 3 commits May 1, 2026 10:44
…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
@bokelley

bokelley commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

Admin merge rationale

Same Test & Build failures as every recent main run: storyboard adcp#3083: create_media_buy_async_submitted (A2A end-to-end) and a2a_context_continuity (runner integration, #962). Both pre-existing, tracked at #1178 (broken since the test files's introduction at 6124deb2 and 61801503; verified by re-running at those commits). All other CI lanes pass. Admin-merging.

@bokelley
bokelley merged commit 5d98910 into main May 1, 2026
9 of 10 checks passed
@bokelley

bokelley commented May 1, 2026

Copy link
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Storyboard runner: cascade should be capability-aware — prerequisite_failed over-applied to phases independently not_applicable

2 participants