Skip to content

fix(dashboard): show skipped step, prerequisite, and reason in storyboard drill-down - #7806

Merged
bokelley merged 2 commits into
mainfrom
fix/7798-storyboard-skip-detail
Sep 30, 2026
Merged

bokelley merged 2 commits into
mainfrom
fix/7798-storyboard-skip-detail

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Fixes #7798

Problem

The agent dashboard drill-down (dashboard/agents → agent card → Test) showed every cascaded skip as "Blocked after earlier failure — N steps skipped after an earlier step failed". It gave no step id, no prerequisite, and no runner reason, and it made that claim even when failure_count === 0. Skip evidence was never persisted, so the dashboard had nothing to show.

Changes

  • server/src/compliance/storyboard-skip-details.ts (new): walks runner output once and collects, per storyboard, up to 5 cascaded prerequisite skips: step id/title/task, runner skip_reason, redacted and length-capped detail (skip.detail, which the SDK projects to warnings[0]), and the nearest earlier step in the same storyboard that did not pass (the likely prerequisite, whether it failed or was skipped for another reason). It uses the same dependency_failed disposition and fixture-abort rule that feed skipped_count.
  • Wired in at the 4 complianceResultToDbInput call sites (heartbeat, owner refresh, single-storyboard retest, Addie owner test) through withStoryboardSkipDetails(...). compliance-testing.ts is untouched.
  • Migration 612: agent_storyboard_status.skipped_steps_jsonb, written by the storyboard upsert and read by the status queries. It is a cheap column, so the card endpoint gets it without the diagnostics join.
  • API: owner-scoped skipped_steps array on storyboard status responses. Non-owners get [], the same gating as first_failure_*. OpenAPI regenerated.
  • Dashboard: each skipped step now gets its own row showing step id/task, reason (for example "Prerequisite step did not pass (prerequisite_failed)"), "Earlier step that did not pass: X — failed / skipped: reason", and the runner detail. All of it goes through escapeHtml because detail can echo third-party agent text. Rows recorded before this change show a plain fallback instead of claiming an earlier failure. The summary reads "Show skip details" when nothing failed, and the old "5 skippeds" pluralization is fixed.

Failure validations (first_failure_validations) were already wired and still render unchanged.

No protocol or schema changes, and no changeset: static/openapi/registry.yaml is registry-release scoped, not protocol scoped.

Tests

  • server/tests/unit/storyboard-skip-details.test.ts: collection (failed prerequisite, the 0-failure case with a not-applicable prerequisite, fixture abort, cap, secret redaction) plus dashboard rendering through vm (XSS escaping, overflow summary, legacy fallback).
  • compliance-db-last-write-wins.test.ts: upsert params and SQL.
  • registry-api-compliance-verdict-source.test.ts (integration): owners see skipped_steps, cross-org callers get [].

🤖 Generated with Claude Code

…oard drill-down

The agent dashboard drill-down labelled every cascaded skip "Blocked after
earlier failure" with no step id, prerequisite, or runner reason -- even when
no step had failed (#7798).

- Capture up to 5 cascaded prerequisite skips per storyboard from runner
  output (step id/title/task, skip reason, redacted detail, nearest earlier
  non-passing step) and persist them in agent_storyboard_status.skipped_steps_jsonb.
- Serialize as owner-scoped `skipped_steps` on storyboard status responses.
- Render reason-aware skip rows in the drill-down, escaping all
  agent-supplied text; fall back honestly for rows recorded before this.

Fixes #7798

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
aao-secretariat[bot]
aao-secretariat Bot previously approved these changes Sep 30, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Approve

Approve — owner-scoped per-storyboard skip evidence (adcp#7798), server/dashboard only.

What I checked

  • No protocol/schema changes: static/openapi/registry.yaml is registry-release scoped, not protocol-scoped (static/schemas/source/** untouched), so the omitted changeset is correct.
  • SQL param indexing, owner-scope gating, XSS escaping, and slugify parity verified sound.
  • Migration 612_storyboard_status_skipped_steps.sql is a new (added) file — inherently low risk; runs on startup but is additive.
  • No REST route allows self-reporting a certification score.
  • No governance/precedent contradictions.

Medium findings (1)

  • server/src/compliance/storyboard-skip-details.ts — collector classifies via classifyComplianceStep while skipped_count derives via classifyRunStep; optional-tool prerequisite skips over-report rows and re-render the misleading "prerequisite did not pass" claim. Posted inline; worth a follow-up but not blocking.

Decision path: No critical/high findings (row 1 n/a). gated_paths false (row 2 n/a). No (deleted) reasons (row 3 n/a). Single medium is not data-loss/schema/infra category (row 4 n/a). High-risk (modified) files present but only 1 medium — row 5 requires the medium; however the medium is on storyboard-skip-details.ts which is NOT a high-risk (modified) file (row 5 keys on the high-risk modified files having the medium; the medium here is on a non-high-risk file), so row 5 does not fire. No prior escalation (row 6 n/a). No team gate (row 7 n/a). Fewer than 3 mediums (row 8 n/a). Falls through to row 9 → approve.

…vidence

Mirror classifyRunStep: a prerequisite_failed skip whose pinned step requires
an optional tool the agent does not advertise grades not_applicable and is not
counted in skipped_count, so it must not appear as a skipped step either.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Approve

Approve — clean pass, no blocking findings.

Checked:

  • The delta adds an optional-tool drop guard to collectStoryboardSkippedSteps so recorded skip evidence matches skipped_count, mirroring classifyRunStep's not_applicable classification (pinned-storyboard lookup, step_id-else-title+task match, fail-closed try/catch). Coherent and tested.
  • Migration 612_storyboard_status_skipped_steps.sql is a new file (added) under server/src/db/migrations/**; high-risk flag is heuristic and additions of new migrations are normal scaffolding. No data-loss/schema finding raised by the reviewer.
  • high_risk is true only from modified files under server/src/addie/** and server/src/routes/** plus the added migration; no medium-or-higher finding on any modified sensitive file, so no escalation trigger.
  • gated_paths is false; no author no-auto-approve team match.
  • Prior decision was approve with no findings; this run also surfaces no critical/high/medium findings.

Decision table: rows 1–8 do not fire (no findings, gated_paths false, no deletions, no team gate, fewer than three mediums). Falls through to row 9 → approve.

@bokelley
bokelley merged commit 402864e into main Sep 30, 2026
32 checks passed
@bokelley
bokelley deleted the fix/7798-storyboard-skip-detail branch September 30, 2026 15:31
bokelley added a commit that referenced this pull request Sep 30, 2026
#7806 took 612 on main.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@gitguardian

gitguardian Bot commented Sep 30, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
37756393 Triggered Bearer Token d1930c9 server/tests/unit/storyboard-skip-details.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

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.

Agent dashboard: skipped/failed storyboard steps show no step id or reason ("Blocked after earlier failure" only)

1 participant