feat(substitution): translate universal macros - #1052
Merged
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — purely additive PR introducing a new adcp.substitution public surface (242 lines) for producer-side universal-macro translation, executed against a vendored SHA-256-pinned canonical AdCP 3.2 fixture.
What I checked:
- Control flow traced against golden vectors: empty-query normalization, fragment/query split, fail-closed native C0/DEL guard, repeated-key drop order — all consistent.
- Semver signal correct:
feat(substitution):is the right conventional-commit prefix for additive exports;public_api_snapshot.jsonis updated. src/adcp/__init__.pyis flagged high-risk but the change is a(modified)additive re-export with no medium-or-higher finding on it — presumed safe per the high-risk-flag guidance.- No type-layering, generated-code, forward-compat, or credential concerns triggered.
Medium findings
- AGENTS.md — New
adcp.substitutionpublic surface absent from AGENTS.md handler table.
Decision path: No critical/high findings (row 1 no). gated_paths false (row 2 no). No (deleted) high-risk reason (row 3 no). The single medium finding is a docs/context gap, not data-loss/schema/infra (row 4 no). High-risk reason is (modified) with a medium finding present — however this maps to row 5... note: row 5 fires when high_risk is true AND a (modified) reason exists AND any medium finding is present. That condition is met here, so the outcome is escalate.
Medium findings
- AGENTS.md — New adcp.substitution public surface absent from AGENTS.md
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
adcp.substitutionsurface for RFC 3986 value encoding and producer-side universal-macro translationacc022a53fad8ecab877d374df1760fef756325fwith pinned SHA-256 digestsImpact
Python sellers can now translate pixel URL query-value macros with the same wire shape and policy as the shared compliance contract. Literal values are UTF-8 percent-encoded with the RFC 3986 unreserved whitelist, native ad-server tokens remain raw, unmapped macro parameters are dropped deterministically, and path/query-key/fragment content stays byte-preserved.
Native mappings are an explicit trust boundary. Any U+0000-U+001F or U+007F character in a used or unused native mapping fails closed before a URL is produced. Consent strings supplied as literal values remain advisory, are encoded normally, and appear in
frozen_consent_macros.Validation
make test-fast— 6,650 passed, 40 skipped, 9 deselected, 1 xfailedmake lintmake typecheck-allCloses #956
Progresses adcontextprotocol/adcp#6674