Repository navigation
fix(compliance): repair refine_frequency_cap_negotiation capability gate - #7795
Merged
Merged
Conversation
The storyboard declared `requires_capability: { all: [...] }`. That is not a
valid gate shape: `requires_capability` is a single predicate with `path`, and
the SDK runner's resolveCapabilityPath called `undefined.split('.')`, aborting
the storyboard with 0 steps on /sales.
- Use `requires_all_capabilities`, the schema's AND gate.
- Require supported_dimensions to contain `criteria` and `product_changes`
(the dimensions the storyboard exercises) instead of `present: true`; an
empty list authoritatively means ask-only, which /sales declares.
- Training agent: treat remove_media_buy_frequency_cap as a typed control so
an accompanying ask no longer downgrades the outcome to `partial`.
- Add a corpus-wide shape check for storyboard/phase capability gates.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean, correctly scoped compliance fix.
The PR moves the storyboard's invalid requires_capability: { all: [...] } gate (which crashed the runner on undefined path.split) to the runner-evaluated requires_all_capabilities AND form using valid contains matchers. The applicability narrowing, training-agent typed-control guard, unit test, and corpus-wide shape check are all correct, and an in-scope patch changeset accompanies the change.
Checks performed:
- No Critical/High/Medium findings from the reviewer.
- No schema changes under
static/schemas/source/**(compliance YAML + TS/tests only), so schema↔docs coherence and oneOf-discriminator gates do not apply. - No released
dist/**artifacts modified. - Changeset present and in scope.
- No no-auto-approve team match;
gated_pathsis false;high_riskis false.
No blocking issues; rows 1–8 do not fire, so this falls through to row 9. Note review_decision is REVIEW_REQUIRED, but since gated_paths is false and no prose hard gate applies, the approve stands.
This was referenced Sep 30, 2026
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
media_buy_seller/refine_frequency_cap_negotiationaborts on the /sales tenant before running any steps, withCannot read properties of undefined (reading 'split'). This blocks the 3.2.1 GA freeze gate.Stack:
resolveCapabilityPath(@adcp/sdk/dist/lib/testing/storyboard/runner.mjs:251) ←evaluateRequiresCapabilityGate←evaluateStoryboardCapabilityGates.Root cause
The storyboard declared
requires_capability: { all: [...] }. That shape isn't valid. Peruniversal/storyboard-schema.yaml,requires_capabilityis a single predicate with apath, and AND gates belong inrequires_all_capabilities. The runner then calledpredicate.path.split('.')withpathundefined. The storyboard is wrong here, not the SDK.Fix
requires_all_capabilities.supported_dimensions present: truetocontains: "criteria"pluscontains: "product_changes", the dimensions the storyboard actually exercises. The capabilities schema says an empty list authoritatively means ask-only, and /sales (ask-only) declares[]. Sopresent: truewould have graded an ask-only seller on typed refinement, which it correctly rejects withUNSUPPORTED_FEATURE. The siblingtyped_proposal_negotiationalready gates the same way (contains: "alternatives").remove_media_buy_frequency_capnow counts as a typed control. Before, a clear-cap refinement that included anaskfell into the "free-text only" branch and came backpartial.tests/sdk-runner-capability-gates.test.cjscovering storyboard- and phase-level gates. It fails on the old YAML.The compliance change is non-normative and ships with a patch changeset.
Verification (local, same env as CI)
⚠ Cannot read properties of undefined (reading 'split'), 0 steps. After,storyboards: 1/1 clean, 0 failed; the storyboard is skipped ascapability_unsupportedbecause the seller declares[]./sales/profiles/typed-negotiation(not in the CI gate): 6 passed, 1 failed. The remainingrevise_exceed_constraintsfailure is a separate storyboard design gap. Thefixtures:products (max_impressions max 10) never end up in the brief-seeded proposal mix, so a cap of 50 falls within the catalog's inherited seller maximum of 50.revise_include_non_participatingpasses only becauseno_fcap_native_q4doesn't exist. This needs a follow-up.test:sdk-runner-capability-gates, the proposal-negotiation unit tests, and servertscall pass.🤖 Generated with Claude Code