feat(compliance): signals tenant — sync_governance + activate_signal GOVERNANCE_DENIED storyboard coverage#4100
Draft
feat(compliance): signals tenant — sync_governance + activate_signal GOVERNANCE_DENIED storyboard coverage#4100
Conversation
…ERROR_IN_BODY_TOOLS for governance_denied storyboard Registers sync_governance as a custom tool on the /signals training-agent tenant via serverOptions.customTools (same pattern as creative_approval on /brand). Adds activate_signal to ERROR_IN_BODY_TOOLS so GOVERNANCE_DENIED responses surface in the response body for storyboard error_code + field_present validations. Session-sharing by brand.domain already propagates governance plans from /governance to /signals, so no HTTP check_governance call is required. Lifts coverage from 1P/4S to 1P/0S on signal_marketplace/governance_denied (+4 steps). Refs #4094 https://claude.ai/code/session_018Q3qbzpf4Jo2yPpDJY3YL9
… GOVERNANCE_DENIED
On the v6 per-tenant path, translateV5Result converts {errors: [...]} to a thrown
AdcpError before ERROR_IN_BODY_TOOLS is ever consulted. Override in activateSignal:
when errors are present, return them directly in the response body with context
echoed from the request — same semantics as ERROR_IN_BODY_TOOLS on the legacy /mcp
path. Update ERROR_IN_BODY_TOOLS comment to accurately scope it to the legacy path.
https://claude.ai/code/session_018Q3qbzpf4Jo2yPpDJY3YL9
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.
Refs #4094
Register
sync_governanceon the/signalstraining-agent tenant and fix the v6-platform path soactivate_signalGOVERNANCE_DENIED errors surface in the response body for storyboard validation. Liftssignal_marketplace/governance_deniedfrom 1P/4S to 1P/0S (+4 steps).The storyboard skipped all four coverage phases (
sync_accounts,sync_governance,get_signals_list,activate_signal_denied) because/signalshad nosync_governancetool, causing the runner to pre-empt required-tools checks. Three changes fix this:tenants/signals.ts— registerssync_governanceviaserverOptions.customTools(same pattern ascreative_approvalon/brand).handleSyncGovernancestores the governance agent URL per account.v6-platform.ts:activateSignal— bypassestranslateV5Resultwhen errors are present, returning errors in the response body withcontextechoed from the request. Without this,translateV5Resultwould convert{errors: [...]}to a thrownAdcpError(MCP envelope), and the storyboard'serror_code+field_present path:"context"validators would see the envelope instead of the body.ERROR_IN_BODY_TOOLSintask-handlers.tsonly applies to the legacy/mcppath — the v6 per-tenant path needs this bypass directly in the platform method.tenants/tool-catalog.ts— addssync_governance: ['signals']so the catalog drift test stays green.Session-sharing by
brand.domainpropagates governance plans from/governanceto/signalswithout HTTP calls:sync_planson/governanceandactivate_signalon/signalsboth key onopen:acmeoutdoor.example, sosession.governancePlansis already populated whenhandleActivateSignalruns itsif (session.governancePlans.size > 0)guard. This is the same pattern asbrand_rights/governance_denied.Non-breaking justification: adds new tool registration and modifies training-agent internals only; no AdCP protocol schemas, task definitions, or public API surfaces changed.
Pre-PR review:
ERROR_IN_BODY_TOOLSaddition was dead code on the v6 path (fixed by adding errors-in-body bypass inv6-platform.ts:activateSignal). Nits (surfaced, not fixed): tool description says "seller calls via check_governance during signal activation" (check_governance is /governance-owned); "governance-aware-seller pattern" comment not used elsewhere in codebase.activate_signalresponse schema has no structured rejection arm;errors[]placement is correct per spec's GOVERNANCE_DENIED wire-placement rule (case 2,error-code.jsonline 91);.min(1).max(1)ongovernance_agentsconsistent with the one-agent-per-account invariant.Session: https://claude.ai/code/session_018Q3qbzpf4Jo2yPpDJY3YL9
Generated by Claude Code