Skip to content

Storyboard runner: implement the instant_offset_within check (instant + ISO 8601 duration bounds) #3602

Open

Description

@bokelley

Problem

Hold rules in AdCP 3.3 (media_buy.hold_policy, media_buy.hold_extension) bound an instant by another instant plus an ISO 8601 duration:

  • finalize: hold_placed_at + min_duration <= expires_at <= hold_placed_at + max_duration;
  • extension: the successor's expires_at is later than the source's, and no later than hold_placed_at + max_total_duration.

No storyboard check can express this. field_less_than, field_greater_than, field_at_most and field_at_least compare finite numbers only, and nothing parses durations. The hold storyboards in adcontextprotocol/adcp#8182 grade these bounds exactly only under a pinned sandbox clock, where the instants are known in advance. Against any other seller they can't check them.

Proposal

adcontextprotocol/adcp#8182 defines a new authored check kind, instant_offset_within. It is documented in static/compliance/source/universal/storyboard-schema.yaml ("Instant offsets") and listed in runner-output-contract.yaml > authored_check_kinds. The storyboards declare it severity: advisory, expires_after_version: "17.0.0", so it grades not_applicable until the runner ships it.

- check: instant_offset_within
  path: "results[0].proposal.expires_at"          # instant on this response
  base_path: "results[0].proposal.hold_placed_at" # or base_context_key
  min_offset_path: "results[0].proposal.hold_policy.min_duration"  # or min_offset: "P1D"
  max_offset_path: "results[0].proposal.hold_policy.max_duration"  # or max_offset
  exclusive_min: false                            # optional

Semantics:

  • Instants are compared on the UTC timeline.
  • Durations take days, hours, minutes and seconds only, and a day is exactly 86,400 s. This matches core/hold-policy.json and the reference grader tests/helpers/hold-policy-grader.cjs (durationMs).
  • At least one bound must be declared.
  • A missing or unparseable path or base fails the check.
  • A declared *_offset_path that resolves to nothing leaves that bound unapplied and records an offset_absent observation. A value there that isn't a valid duration fails.
  • An absent base_context_key passes with context_key_absent.
  • Failure output: json_pointer of path, the computed bounds as expected, and the observed instant as actual.

Activity

  1. added
    enhancement
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    conformanceenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions