feat(compliance): scoping lint exempts ID-scoped tasks (#2577 Option C)#2578
Merged
Conversation
Seven tasks whose request schema requires a globally-unique scope-ID
move from TENANT_SCOPED_TASKS to EXEMPT_FROM_LINT:
- check_governance, report_plan_outcome — required plan_id
- acquire_rights — required rights_id + buyer + campaign
- log_event — required event_source_id
- calibrate_content — required standards_id
- validate_content_delivery — required standards_id
- validate_property_delivery — required list_id (schema also has
optional account)
At the spec level, the seller resolves the ID → tenant via its own lookup —
envelope account is redundant. Per #2577 Option C.
Authoring-guide update (docs/contributing/storyboard-authoring.md)
documents the new rule-of-thumb ("required globally-unique scope-ID ⇒
exempt") and the three exempt sub-buckets, and is explicit that storyboards
should keep carrying envelope identity today because sessionKeyFromArgs
still routes by it — the lint just stops enforcing what the spec doesn't
require. Runtime-side alignment (resolve by ID) remains tracked in #2577.
Parity test + scoping lint + build:compliance + test:schemas pass.
Storyboards unchanged; the 7 exempt tasks already carry identity from
earlier work.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Schema Link Check ResultsCommit:
|
This was referenced Apr 20, 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.
Summary
Implements the lint-classification half of #2577 Option C. Seven tasks whose request schema requires a globally-unique scope-ID move from
TENANT_SCOPED_TASKStoEXEMPT_FROM_LINT.check_governanceplan_idreport_plan_outcomeplan_idacquire_rightsrights_id+buyer+campaignlog_eventevent_source_idcalibrate_contentstandards_idvalidate_content_deliverystandards_idvalidate_property_deliverylist_id(schema also has optionalaccount)At the spec level, the seller resolves the ID → tenant via its own lookup. Envelope
accountis redundant.What this PR does not do
TENANT_SCOPED_TASKS(preview_creative,build_creative,get_plan_audit_logs) don't have a required scope-ID. Whether they should grow an optionalaccountis a spec decision; tracked in Spec gap: tenant-scoped request schemas missing account/brand fields #2577 as a follow-up.sessionKeyFromArgstoday still routes by envelope identity. Storyboards should keep carrying identity on exempt tasks — the lint just stops enforcing it on tasks where the spec doesn't require it. When the runtime learns to resolve by ID, storyboards can drop the identity. Also tracked in Spec gap: tenant-scoped request schemas missing account/brand fields #2577.Why the split matters for future authors
Before this PR the rule was "tenant-scoped at the handler level ⇒ require envelope identity." After: "required globally-unique scope-ID in schema ⇒ seller resolves by ID, lint doesn't require envelope identity."
The second rule maps cleanly to how a production seller works: auth context identifies the principal,
plan_id/rights_id/standards_ididentifies the scoped resource, envelopeaccountis either absent or optional. The first rule was a sandbox artifact.The authoring guide (
docs/contributing/storyboard-authoring.md) documents the rule-of-thumb, the three exempt sub-buckets, and explicitly warns authors not to drop envelope identity on exempt tasks until the runtime side of #2577 lands.Test plan
npm run build:compliance(scoping lint + build)npm run test:storyboard-scoping(parity test — 3/3)npm run test:schemas(7/7)Related
🤖 Generated with Claude Code