Repository navigation
chore: release package - #58
Closed
github-actions[bot] wants to merge 1 commit into
Closed
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Contributor
|
Closing to combine with creative testing improvements. Will create new Release PR after merging PR #56. |
bokelley
added a commit
that referenced
this pull request
Jun 30, 2026
…per 1/2: code) (#2263) * feat(storyboard): add expect_universal_macro_substituted assertion task Introduce StoryboardStep fields (source, source_path, macro_template, macro_bindings) and the no_preview_surface detailed skip reason to support the new pseudo-task. The handler reads rendered HTML from a prior step's parsed response body via a JSON Pointer, runs SubstitutionObserver.parse_html + match_bindings, and asserts each configured macro binding was substituted with the correct context value. Absence of a preview surface is a neutral skip (not_applicable), not a conformance failure. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(storyboard): wire expect_universal_macro_substituted into the runner dispatch Import and dispatch the new handler after the webhook-assertion branch in executeStep. Export UNIVERSAL_MACRO_ASSERTION_TASKS and executeUniversalMacroAssertionStep from the storyboard index so callers can identify and invoke the task independently. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * test(storyboard): allow expect_universal_macro_substituted in completeness check Add the new task name to the HARNESS_TASKS allowlist so the structural completeness test does not flag it as a missing-schema task when it appears in storyboard YAML files. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(substitution): stop dropping multi-param tracker URLs in residual-entity check The residual-entity check used RESIDUAL_ENTITY_RE with an optional trailing semicolon on the named-entity branch, so a literal query separator like ?mb=1&pkg=2 (after & decoding) matched on &pkg and the whole URL was dropped as a smuggled entity. Browsers render &pkg literally, so this was a false positive. Require a trailing semicolon for the NAMED branch (browsers only decode a fixed legacy no-semicolon set, none of which are the dangerous URL-scheme chars : / \, which need a semicolon: : / \). Keep the NUMERIC branch matching with an optional semicolon, since browsers decode : / : leniently and query keys never start with #. Export __hasResidualEntity for direct unit testing. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(storyboard): cover multi-param tracker URL in identifier-substitution assertion Add two tests that exercise the canonical real-world case where both {MEDIA_BUY_ID} and {PACKAGE_ID} appear in a single tracker URL with & HTML-encoding: a pass case (both macros correct) and a negative case (pkg= wrong, mb= correct) verifying per-binding granularity. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor(storyboard): harden path resolution and prior-step lookup in identifier assertion - resolvePointer now guards against prototype chain traversal using POINTER_FORBIDDEN_KEYS and Object.prototype.hasOwnProperty.call, matching the discipline established in path.ts - getLastPriorResult (renamed getPriorResult) now respects step.triggered_by when set, falling back to the last Map entry otherwise — mirrors the webhook-assertions.ts pattern - Empty/absent macro_bindings now emits a failing ValidationResult explaining the misconfiguration instead of silently grading passed:false with zero validations - __hasResidualEntity removed from the three package-level barrels (observer/index.ts, substitution/index.ts, src/lib/index.ts); tests that need it import via the deep path dist/lib/substitution/observer/html-parser.js Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(substitution): add universal_macro_translation seller helper Implements a query-parameter macro translator that accepts a MacroMapping (native raw or RFC 3986 value) and returns the translated URL with dropped_params/unmapped_macros metadata. Reuses encodeUnreserved from rfc3986.ts so produce and verify share one encoding path. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor(substitution): dedupe macro pattern and document translate result shape Reuse the module-level UNIVERSAL_MACRO constant in the replace() call instead of inlining a duplicate literal; fix the misleading comment to accurately describe String.replace single-pass semantics; expand TranslateResult doc comments to note the dropped_params/unmapped_macros asymmetry; add tests for macro tokens in key position (pass-through) and non-ASCII UTF-8 encoding. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * chore: changeset for universal-macro substitution assertion + helper * style: prettier format new substitution/storyboard files * fix(deps): bump undici to 6.27.0 to resolve high-severity advisories Resolves the high-severity undici advisories (GHSA-p88m-4jfj-68fv, GHSA-vxpw-j846-p89q, GHSA-35p6-xmwp-9g52, GHSA-g8m3-5g58-fq7m) flagged by the Security Audit CI lane. 6.27.0 is within the existing ^6.25.0 range. npm audit --audit-level=high now passes. * refactor(substitution): scope PR to translation helper + parser fix Per maintainer review (#2263), pull the expect_universal_macro_substituted assertion and its runner wiring: it observes a build_creative preview, but {MEDIA_BUY_ID}/{PACKAGE_ID} resolve at serve time and aren't serialized on the wire, so the check skip-dominates for conformant sellers. Deferred to the forthcoming Live Integration (decisioning-roundtrip) check, where the alignment logic is reusable. Keep + polish the helper: - rename universal_macro_translation -> translateUniversalMacros (camelCase, to match the substitution module's free-function convention) - add suspect_native_values to flag value entries shaped like native ad-server tokens (%%..%%, {{..}}, ${..}, [..]) that were likely mapped to the wrong arm - document the value-only scope and the dropped-consent-macro privacy hazard The SubstitutionObserver residual-entity parser fix and undici bump are retained. Co-Authored-By: Claude Opus 4.8 <[email protected]> * refactor(substitution): polish translateUniversalMacros per review - add dropped_consent_macros: surface dropped consent/privacy macros ({GDPR_CONSENT}, {US_PRIVACY}, …) separately from benign drops - tighten NATIVE_TOKEN_SHAPE bracket arm to [UPPER_SNAKE] so ordinary bracketed values ([1,2,3], [redacted]) are no longer flagged suspect - document that suspect_native_values is mapping-scoped (config-lint), and that a bare trailing '?' is dropped Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]> Co-authored-by: Brian O'Kelley <[email protected]>
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@adcp/[email protected]
Minor Changes
329ce6e: Add Zod schema exports for runtime validation with automatic generation
This release adds Zod schema exports alongside existing TypeScript types, enabling runtime validation of AdCP data structures. All core schemas, request schemas, and response schemas are now available as Zod schemas.
New exports:
MediaBuySchema,ProductSchema,CreativeAssetSchema,TargetingSchemaGetProductsRequestSchema,CreateMediaBuyRequestSchema,SyncCreativesRequestSchema, etc.GetProductsResponseSchema,CreateMediaBuyResponseSchema,SyncCreativesResponseSchema, etc.Features:
npm run generate-typesAutomatic workflow:
Usage:
Documentation:
docs/ZOD-SCHEMAS.md- Complete usage guide with NPM distribution detailsdocs/VALIDATION_WORKFLOW.md- CI integration (existing)examples/zod-validation-example.ts- Working examples