Skip to content

feat(reporting): managed delivery of subscription obligations - #3523

Open
bokelley wants to merge 88 commits into
mainfrom
bokelley/reporting-subscription-delivery
Open

bokelley wants to merge 88 commits into
mainfrom
bokelley/reporting-subscription-delivery

Conversation

@bokelley

@bokelley bokelley commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Sixth of the series for #3504. It delivers subscription obligations through managed delivery. It stacks on #3518 (which stacks on #3517 and #3509), so it contains every earlier commit. Review only feat(reporting): managed delivery of subscription obligations (ff2feb6). It targets main because CI runs only for PRs into main.

What ships

1. Destination resolution

  • Binding comes first. createReliableReportingService calls a new reportingSubscriptions.bindManagedGeneration hook, through the planner's new bindGeneration, for each managed generation about to receive its first obligation. The hook runs after the generation is installed and before any obligation is written, because installBinding refuses a configuration that already has obligations.
  • A failed bind writes nothing. That generation's obligations wait for the next cycle instead of becoming undeliverable Core obligations.
  • No hook, no plan. A subscription that resolves a managed offering without the hook fails to plan, with an explicit error.
  • Consumer receipts. A consumer_receipt offering must be managed.
  • The production service supplies the hook. It uses createReportingSubscriptionManagedBindingV1 (@adcp/reporting-storage/managed), built from reportingSubscriptions.principal, the principal runtime. For each generation it:
    1. reads the version's destination.destination_id;
    2. finds the owner's current generation of that destination (get_principal destination_ref; the spec says "The seller binds the current generation");
    3. requires that generation to be delivery-eligible, with the offering's pattern and transport, which must also equal the version's frozen destination_method;
    4. calls ensureDestinationAuthorization, which creates or reuses the account's authorization of that destination_ref;
    5. installs an immutable binding: canonical_digest for consumer_receipt, otherwise the adapter's first verification profile, with resource_retention_days from the service, and path_template frozen.
  • delivery_only without a destination stays Core. Selection never resolves a managed offering for it.

2. Bindings keyed by the configuration

  • REPORTING_MANAGED_DELIVERY_MIGRATION drops the published UNIQUE (account_id, delivery_config_id, delivery_config_version) on adcp_reporting_managed_bindings.
    • It finds the constraint in pg_constraint by its columns, in a guarded DO $$ block.
    • It adds a non-unique lookup index.
    • A fresh schema creates the table without that key.
  • The binding's key is its configuration_id primary key. Core configurations stay unique on (…, subscription_key) from feat(reporting): hold subscription obligations in the reporting ledger #3517, so account bindings keep their uniqueness.
  • There is no memory managed store; managed delivery is PostgreSQL-only.

3. Path templates and account_id

  • Path templates. ReportingManagedDeliveryBindingV1.path_template is immutable and outside account fingerprints. The worker expands it per obligation with expandReportingSubscriptionPathTemplate, filling {account_id}, {subscription_id}, {offering_id} and {period_start}, and passes it to adapter.deliver as delivery_path.
  • Object naming. Object-store names keep the collision-free, account- and generation-scoped prefix, with the template between the prefix and the plan:
    adcp-reporting/{namespace_key}/{scope_key}/{delivery_path}/{plan_id}/{index}
    • reportingObjectWriteName takes the optional path. isReportingObjectWriteName validates it for cleanup and reads.
    • The GCS fence and adapter write there.
    • The GCS adapter's status lookup is now scoped to the owner, since a subscription obligation is invisible otherwise.
    • Documented in REPORTING-LEDGER.md.
  • account_id on rows. Every row of a subscription revision carries it. The producer stamps it before binding the revision, so the digest covers it, and refuses a row that names another account. Account revisions are unchanged.

4. Per-account destinations

The spec allows exactly one per-account mechanism. A destination is principal-level, with generations per destination, not per account. Per-account separation is the path_template {account_id}, which #3508 requires for multi-account scopes and shared destinations. The managed store already keys authorizations per account, so each covered account gets its own authorization of the shared destination_ref. Nothing beyond that is implemented.

5. Authority at each delivery

  • runManagedDeliveryWorker({ authorizeSubscriptionDelivery }) re-checks the owner's account authority twice: after claiming and before delivering, and after delivering and before settling. The production service wires it to the new engine.isAuthorized, and refuses reportingSubscriptions without it.
  • What a loss does. A loss calls the new holdMaterialization. It releases the lease, refunds the claim's attempt, and holds the row for authorityHoldMilliseconds, 60 s by default.
  • The obligation stays owed. The materialization stays pending and is never failed, and the engine reports the loss in accounts_unauthorized.
  • Unchanged. Destination-authority checks are as before. The result gains heldForAuthority only when the check is wired.

6. Subscribers scoped to the owner

  • ReportingLedgerSubscriberV1.principal scopes status subscribers. A subscription obligation's transitions reach only subscribers of its owner; account subscribers get none. Account obligations behave as before.
  • Production notification activity records ownerPrincipalId and emits with principalId, so status_changed, ledger_changed and delivery_ready fan out only to the owner.
  • Production reads now use resolveSubscriptionPrincipal and add subscription_coverage. Before this they used neither.

Tests

  • test/lib/reporting-subscription-delivery.test.js (Core service, memory store):
    • binding before the first obligation, with the destination, template and frozen method
    • no rebind on later cycles
    • account_id on every revision row
    • a failing bind writes nothing and retries next cycle
    • a managed offering without the hook fails loudly
    • owner-scoped status subscribers
  • packages/reporting-storage/test/reporting-subscription-delivery-pg.test.js (production service end to end):
    • two owners × two offerings (match: all) on one account produce 4 bindings under one (account, id, version), each to its owner's destination_ref
    • B's deliveries carry delivery_path = account/offering/period_start and rows with account_id
    • A loses its grant between claim and settle: held, still pending, never delivered again
    • the binding migration on a published schema with an existing binding, run twice
  • Option off. feat(reporting): plan and execute subscription obligations in the service #3518's byte-for-byte golden transcript still passes. reporting-subscription-service.test.js now expects account_id on subscription rows.

Deviations

  • Binding uses the destination's current generation. If the destination later mints a new generation, existing generations stay bound to the old destination_ref, which stays resolvable through prior_destination_refs until revoked. New generations bind the new one.
  • The check before settling runs after the bytes were written. If authority is lost mid-flight, the provider may hold a written but unrecorded object, which is re-delivered after a re-grant.
  • The held row is re-claimed every hold interval while authority stays lost. It never exhausts its attempts.

Spec ambiguities

Local checks

  • typecheck, typecheck:reporting-storage, lint:boundaries, check:package-size and Prettier pass.
  • 554 tests pass across the reporting, service and subscription suites.
  • The new PostgreSQL suite, reporting-ledger-pg, reliable-reporting-production-pg, reporting-managed-router-pg and reporting-subscription-ledger-pg pass against PGlite locally. CI runs them on PostgreSQL 16.

Update: main's beta release (#3521) changed scripts/check-package-size.mjs, which conflicted with the stack. I merged origin/main into bokelley/reporting-subscription-ledger and carried that merge up through the stacked branches. The only conflict was the file-count budget, and I resolved it by keeping both sides' entries. The merge commits change nothing else.

Refs #3504

🤖 Generated with Claude Code

bokelley and others added 22 commits October 29, 2026 09:30
Add the pure expectedSubscriptionPeriods rule for AdCP 3.3 principal-level
reporting subscriptions (experimental media_buy.reporting_subscriptions),
the normative period_generation calendar it uses, selector resolution
(exact, finest, all with byte-order ties), scope membership, and a builder
for the 3.3 registration capabilities (configuration_tasks, the deprecated
configuration_task, and the subscriptions block).

createAdcpServerFromPlatform adds media_buy.reporting_subscriptions to
experimental_features only beside a subscriptions block.

installConfiguration now throws a typed ReportingConfigurationImmutableError
with the unchanged message.

The cross-SDK parity table is
test/fixtures/reporting-subscriptions/coverage-cases.json.

Refs #3504

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…al ships

Advertising media_buy.reporting_subscriptions also requires
adcp.principal.supported_sections to list reporting_subscriptions, which the
SDK does not emit yet. Keep the capability builder pure in this slice and add
the feature id together with the principal block in the runtime slice, so an
adopter can never produce a 3.3-invalid capabilities response.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Adopt the rules adcontextprotocol/adcp#8585 settled:

- Selection reads each offering's published standard_dimensions and
  unmapped_dimensions, and fails closed on an offering without them.
- period_timezone: a utc offering matches only UTC or Etc/UTC; a
  source_timezone offering only its own published zone (never an
  account-resolved one).
- The coverage function takes the readback's inactive_intervals in wire
  shape, per-offering timezone_cutovers with previous_timezone
  (account.timezone is now the current zone), and per-offering gaps.
- The parity table fixes the billing-cycle case's scope (both keys, which
  maxProperties 1 forbids), adds cases for the settled rules, and its
  subscriptions are now schema-validated.

The new wire fields are hand-modeled in subscriptions/wire.ts until
3.3.0-beta.2 ships.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- An empty flight (stop at or before start) overlaps nothing.
- A cutover carries the outgoing stretch's own owing start into E, so two
  cutovers inside one period never owe a period twice.
- Sub-daily periods under a local alignment restart at each local midnight
  on wall-clock multiples (adcp#8588); calendars gain next() and the walk
  iterates by instant with an iteration budget and skip-ahead.
- A billing anchor in a DST fold is interval zero itself.
- A wire authorized_at equal to the chain start continues the chain.
- The start rule lives in one function for the pending owner decision.
- Schema validation accepts unknown reporting-dimension values.
- The parity table grows to 79 cases with obligations on every case and
  non-wire inputs labelled.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The start bound is the first boundary at or after the later of the
version's accepted_at and the account's authorized_at; a buy is owed every
period that ends after its confirmed_at and overlaps its flight, so the
period in which the buy is confirmed is owed in full. The rule stays in
firstOwedBoundary. Parity table: the mid-period confirmed_at and hourly
cases change, plus every case whose first period contains confirmed_at;
new cases for an ASAP buy confirmed mid-day and a monthly billing buy
confirmed on the 12th.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…time

Opt-in support for the AdCP 3.3 sync_principal reporting_subscriptions
section (experimental media_buy.reporting_subscriptions):

- createPrincipalLifecycle({ reportingSubscriptions }) validates, versions
  and reads back subscriptions (core/reporting-subscription-state.json),
  honours dry_run and expected_configuration_version, applies
  replace_account_configs once per version through a host hook, derives
  action_required from the destination, and emits principal.changed with
  reason reporting_subscription_changed. It also exposes the adcp.principal
  capability block.
- createReportingSubscriptionEngineV1 turns three host hooks into grant
  history, max_accounts slots, precedence, exceptions at cutover instants,
  timezone cutovers, re-grant gaps, accounts_unauthorized, the receipt
  roster and the post-loss receipt window, and computes owed periods with
  the same expectedSubscriptionPeriods rule buyers run.
- createReliableReportingService({ reportingSubscriptions }) advertises
  configuration_tasks and the subscriptions block and adds
  subscription_coverage to summary and periods views.
- createAdcpServerFromPlatform passes capabilities.principal and
  capability_changes through, adds protocol.principal and
  media_buy.reporting_subscriptions to experimental_features, refuses
  subscriptions without the reporting_subscriptions section, and strips
  3.3-only fields for callers pinned below 3.3.

Without the options every response is byte-for-byte unchanged; a golden
transcript captured from the pre-change runtime proves it.

Refs #3504

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… by release

- readFacts refuses a roster that does not finish within the page cap, as it
  already did for a repeating cursor: a partial roster would read as
  revocations and fabricate accounts_unauthorized entries.
- Callers pinned below 3.2 no longer see protocol.principal once the
  adcp.principal block is removed for them.
- subscription_coverage is added only for callers served 3.3 or later;
  earlier get_reporting_status response shapes are closed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The placeholder regex backtracked polynomially on runs of '{' (CodeQL).
Tokenize braces in a single pass instead, which also rejects nested and
unbalanced braces explicitly.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… test

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- The principal readback lists inactive_intervals; the engine feeds them
  to the coverage function in wire shape.
- Timezone cutovers carry previous_timezone and gaps are recorded per
  offering_id when covered offerings' boundaries differ.
- authorized_at is the start of the authorization chain: a re-grant inside
  retention keeps it, so the engine stamps the re-grant when authority is
  observed again.
- The service requires standard_dimensions on every offering when
  subscriptions are advertised.
- Responses served at 3.3.0-beta.1 omit the fields its closed schemas do
  not define; they reach callers served 3.3.0-beta.2 or later.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ts, sharded engine state

Addresses the expert review of the subscription runtime:

- Owed periods are frozen as they elapse and never recomputed; pruning past
  status_retention_days never re-owes or drops an elapsed period. A product,
  package or offering change applies from the E of its observation, and
  periods of that buy starting earlier keep resolving from the buy as it was.
- Change instants come from source data (granted_at, timezone_changed_at,
  resolveRevocationInstant, the overriding configuration's active_until).
- The engine store is sharded per principal and per account; the receipt
  roster is tenant-scoped; an unobserved revocation followed by a new chain
  opens a gap.
- replace_account_configs runs after commit and is retried on failure; a
  destination transport change needs a version; inactive_intervals over 64
  is rejected; shared path_templates that can expand to the same path are
  rejected; the delivery-config clash check is required unless opted out;
  coverage recording rejects oversized lists and no longer bumps
  configuration_version.
- Post-beta.1 fields are gated on the served bundle's schema, and an unknown
  served version emits none of them. prior_versions[] carries configuration
  (adcp#8588).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…counts

A small max_accounts against a large roster gives every account past the
cap a capacity exception, which can exceed the readback's 1000-entry
limit. The reconcile used to throw for the whole principal on every pass.
Now that subscription keeps its last published lists, every other
subscription still updates, and the pass reports it in readback_overflow
and through onReadbackOverflow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…criptions

- syncReportingSubscriptionsV1 writes and reads back the
  reporting_subscriptions section through the guarded sync_principal
  lifecycle.
- reportingSubscriptionVersionRecordsV1 rebuilds coverage version records
  from the readback plus the buyer's own per-version configurations, and
  subscriptionExpectedReportingPeriodsV1 maps owed obligations onto the
  consumer runtime's ExpectedReportingPeriod.
- The consumer runtime takes a per-account subscriptionExpectations hook
  fed with the summary view's subscription_coverage, and refreshes on an
  authenticated principal.changed through handleAuthenticatedPrincipalChanged.
- createReportingSubscriptionEngineStateStoreV1 persists engine state as one
  CAS document per principal on any AdcpStateStore; PostgresStateStore makes
  it durable with no further migration. A PostgreSQL restart test joins the
  CI backend-contracts step.

Refs #3504

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ords

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…he buyer side

reportingSubscriptionVersionRecordsV1 no longer takes buyer-recorded
inactive intervals: the readback's inactive_intervals (adcp#8585) pass to
expectedSubscriptionPeriods unchanged. Test offerings publish
standard_dimensions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
listPrincipals feeds the receipt roster, so a list cut short at the page
cap, or a repeating cursor, now throws instead of returning a partial list,
matching the authorized-account walk.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- The engine state store follows the engine's sharded interface: one CAS
  document per principal and per (principal, account), with listKeys and a
  tenant-scoped listPrincipals.
- Subscription expectations get the summary's ledger_as_of (minus an
  optional grace) as now, and the hook is documented as requiring a seller
  that materializes subscription obligations.
- Expectation templates must supply coverage; the old default could never
  match an obligation reporting packages or partial coverage.
- principal.changed redeliveries are dropped by idempotency_key, and a
  burst during a run joins one trailing run.
- syncReportingSubscriptionsV1 refuses a deactivation by omission unless
  allowDeactivation, checked against every configuration read it
  replaces, and verifies the stored configuration field by field.
- reportingSubscriptionVersionRecordsV1 falls back to the readback's
  configuration and prior_versions[].configuration (adcp#8588).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owed-set generations for AdCP 3.3 principal-level reporting subscriptions
(#3504): one generation per (account, owning principal, subscription_id,
subscription_version, resolved offering), with an immutable `subscription`
block and a mutable `owedSet` horizon outside the fingerprint.

- producer.planSubscriptionObligations installs each generation once,
  writes every frozen owed obligation with its own period, media buys and
  constituents (periodOrdinal = start second), and then advances
  owedSet.through on every generation the subscription owns.
- Coverage treats an owed set as complete by construction: gaps are not
  owed, so there is no continuity error, and the scope stays open until
  owedSet.through reaches its end.
- get_reporting_status, get_media_buy_delivery and sync_reporting_status
  scope subscription generations to the caller's principal
  (resolveSubscriptionPrincipal, snapshot `subscription_principal`).
- Status ingest accepts a status without reporting_obligation_id against an
  owed set only for an existing owed obligation.
- PostgreSQL: additive `subscription_key` column and a unique index on
  (account_id, delivery_config_id, delivery_config_version,
  subscription_key) replacing the three-column constraint, found and
  dropped by its columns. Mirrored in the memory test store.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…vice

createReliableReportingService({ reportingSubscriptions }) now writes the
engine's frozen owed sets into the ledger every cycle, before account
configurations, and the worker executes them (#3504).

- engine.frozenOwedSets(principal, { accountId? }) returns each
  subscription's frozen obligations, horizon and version configurations;
  engine.listPrincipals(tenantId) lists principals from the engine store.
- Generations go through the same trusted path as installConfiguration
  (resolveSource, resolveCurrency, resolveCoverage), with seller policy from
  the new resolveSubscriptionConfiguration hook. Each obligation freezes the
  authorized constituents of exactly the media buys it owes.
- New options: listSubscriptionPrincipals (required),
  resolveSubscriptionConfiguration (required), resolveSubscriptionAccount and
  onPlanningError. Planning failures are isolated per subscription.
- resolvePrincipal now also scopes get_reporting_status,
  get_media_buy_delivery and sync_reporting_status to the caller's own
  subscription generations.
- Without reportingSubscriptions the service is byte-for-byte unchanged,
  proven by a golden transcript captured from the service before the change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ntime timezone data

A source-calendar P1D generation freezes the runtime's tzdb and ICU versions
and the install day into its identity, so the golden differed on CI runners.
The transcript now uses a UTC-aligned offering; the golden is recaptured from
#3509's head (800adfc) and still matches byte for byte.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Deliver principal-level reporting subscription obligations (#3504) to the
owner's destination through managed delivery.

- Destination resolution: the Core service calls a new
  reportingSubscriptions.bindManagedGeneration hook (through the planner's
  bindGeneration) before a managed generation's first obligation. The
  production service supplies createReportingSubscriptionManagedBindingV1:
  version destination_id -> the owner's current destination generation
  (delivery-eligible, pattern and transport matching the frozen
  destination_method) -> a per-account authorization of that
  destination_ref (ensureDestinationAuthorization) -> an immutable binding
  that freezes path_template.
- Bindings are keyed by their Core configuration: the managed migration drops
  the published (account, delivery_config_id, delivery_config_version) key,
  found by its columns.
- path_template is expanded per obligation and passed to adapters as
  delivery_path; object-store names place it inside the collision-free
  generation prefix. Subscription revision rows carry account_id inside the
  committed digest.
- The managed worker re-checks the owner's account authority before
  delivering and before settling; a lost grant holds the materialization
  without spending an attempt, so the obligation stays owed.
- Status subscribers and notification activity reach only the owner of a
  subscription obligation. Production reads are scoped to the caller's
  principal and carry subscription_coverage.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@aao-secretariat

Copy link
Copy Markdown

Ladon cannot review this PR until merge conflicts are resolved.

aao-secretariat[bot]
aao-secretariat Bot previously approved these changes Oct 30, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean review, no blocking findings.

The reviewer examined the managed-delivery logic in the top commit: path-template expansion (fails-closed, percent-encodes '/' and '.'/'..' so no segment escape), account_id row stamping (witness-safe, refuses conflicting account), binding immutability (path_template inside managedBindingFingerprint with a new charset/length guard ahead of the fingerprint compare), both constraint-drop migrations (guarded, idempotent, not FK-referenced), version-aware field projection (DR-0033 droppable pathway), and the worker's twice-checked owner authority. Six correct minor changesets accompany the src/lib/** changes, satisfying changeset-vs-wire-impact. Documented deviations are disclosed in the PR body.

No critical/high/medium findings. Decision-table walk: no critical/high (row 1 n/a); gated_paths is false (row 2 n/a); high_risk is false (rows 3/5 n/a); no medium findings at all (rows 4/8 n/a); no prior decision (row 6 n/a); no no-auto-approve team match (row 7 n/a). Falls through to row 9 → approve.

Note: review_decision is REVIEW_REQUIRED, but with gated_paths false this does not force escalation.

bokelley and others added 3 commits October 30, 2026 04:05
…bscription-coverage

# Conflicts:
#	scripts/check-package-size.mjs
…dules after merging main

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…/reporting-subscription-runtime

# Conflicts:
#	scripts/check-package-size.mjs
bokelley and others added 4 commits October 30, 2026 19:27
…-beta.2

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
aao-secretariat[bot]
aao-secretariat Bot previously approved these changes Oct 30, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — subsequent pass on PR #3523, clean.

This is a follow-up pass; the prior decision was also approve with no findings. The 66-file delta is a merge of already-reviewed main commits plus mechanical regeneration: the beta.1→beta.2 bundle bump (#3541) across generated types/wire-spec-fields/docs/version.ts; the typed RequestValidationError/isPreDispatchError work (#3507); the ESM envelope-status loader binding fix (#3529); and the legacy-ref constraint-reconciliation (#3510) in v2/projection/creative-delivery.ts.

The largest delta file (creative-delivery.ts, ~360 added lines) was reviewed: reconcileLegacyAssignmentRefs (L5139-5190) combines per-axis width/height from distinct resolved refs and validates each package's acceptor against the shared size — deliberate, documented, and no correctness defect. Changesets are present and correctly typed (minor for beta.2 adoption and typed error, patch for the reconciliation fix).

No critical/high/medium findings. gated_paths is false; no no-auto-approve team match; high_risk is false. review_decision is REVIEW_REQUIRED, but row 2 only forces escalate when gated_paths is true — it is not here. None of rows 1–8 fire, so the outcome is approve (row 9).

bokelley and others added 6 commits October 30, 2026 20:20
…bscription-coverage

Brings in #3548. The packed-byte cap keeps the higher of main's and this branch's.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…/reporting-subscription-runtime

# Conflicts:
#	scripts/check-package-size.mjs
…reporting-subscription-consumer

# Conflicts:
#	scripts/check-package-size.mjs
…/reporting-subscription-ledger

# Conflicts:
#	scripts/check-package-size.mjs
aao-secretariat[bot]
aao-secretariat Bot previously approved these changes Oct 30, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean delta, no blocking findings.

This is a subsequent review; the prior decision was approve (head 6e11b9c) with no findings. The current reviewer pass found nothing actionable.

What was checked:

  • 67-line delta across 4 CI/test-only files; no src/lib or wire surface touched.
  • Empty-frontmatter changeset — no wire/export impact.
  • check-package-size.mjs tarball budget bump to 26,520,000 bytes with documented measurements (~150 KB headroom).
  • Pre-dispatch test swaps retired 3.3.0-beta.1 pin for live ADCP_VERSION.
  • Cosmetic reformat in coverage test.

No findings. Decision table: no critical/high (row 1 n/a); gated_paths false (row 2 n/a); no deletions (row 3 n/a); no medium findings (rows 4/5/8 n/a); prior decision was approve, so sticky-escalation row 6 n/a; no no-auto-approve team match (row 7 n/a). Falls through to row 9 → approve.

Note: review_decision is REVIEW_REQUIRED, but since gated_paths is false, row 2 does not fire and this does not block auto-approve.

bokelley and others added 8 commits October 30, 2026 22:24
A sub-daily billing_cycle was routed to the local sub-daily calendar,
which aligns to local midnight and ignores period_anchor, so every
boundary was off by the anchor's time of day. adcontextprotocol/adcp#8622
makes a sub-daily billing_cycle invalid; refuse it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nt_configs

A later write that merely omitted replace_account_configs cleared both the
applied marker and a committed-but-unconfirmed replacement, so a failed host
hook was silently abandoned. An omitted flag now leaves both untouched; an
explicit false clears them, so a later true applies again.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t owed period end

- An open action_required exception now takes the host's current
  pending_action (url, message, reason) when it changes, keeps its from, and
  notifies principal.changed. It used to keep the first action forever.
- accounts_unauthorized last_owed_period_end takes the latest frozen
  period_end. Frozen periods are not stored in end order, so the last entry
  could under-state the window.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…eporting-subscription-ledger-service

# Conflicts:
#	src/lib/reporting/subscriptions/engine.ts

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve.

Clean pass with no findings. This is a subsequent review of the new 3.3 reporting-subscriptions feature; the prior decision was also approve. The current delta (229 lines across 6 files) consists of refinements, each with a dedicated new test and covered by existing minor changesets:

  • calendar.ts refuses sub-daily billing_cycle (adcp#8622) before the local-midnight branch.
  • engine.ts refreshes an open action_required exclusion when pending_action changes and computes last_owed_period_end by max scan rather than trusting last-stored.
  • server/principal/reporting-subscriptions.ts narrows the reset to explicit replace_account_configs:false so an omitted flag no longer drops a pending retry.

No critical/high/medium findings. Decision table: rows 1–8 do not fire — no blocking or medium findings, gated_paths is false (row 2 N/A), high_risk is false, no no-auto-approve team match, prior decision was approve (row 6 N/A). Falls through to row 9 → approve.

Note: review_decision is REVIEW_REQUIRED, but since gated_paths is false, the hard gate in row 2 does not apply.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant