Skip to content

3.3.x: skip ledger_changed for empty first snapshot revisions (backport #9354) - #9397

Merged
bokelley merged 1 commit into
3.3.xfrom
backport/9354-3.3.x
Dec 6, 2026
Merged

bokelley merged 1 commit into
3.3.xfrom
backport/9354-3.3.x

Conversation

@bokelley

@bokelley bokelley commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Backport of #9354 to the 3.3.x maintenance line, for 3.3.4.

Reliable Reporting (experimental): a seller SHOULD NOT fire reporting.ledger_changed for an empty first snapshot revision. That's a snapshot revision with row_count 0 when no earlier revision of the same logical slice was ever committed; first-ness comes from the slice's commit history. Advisory only: no conforming seller becomes non-conforming, so it's patch-safe. Includes the compliance test vector and the changeset.

Gated path (static/schemas/source/**): approved by the maintainer on #9354.

🤖 Generated with Claude Code

…ns (#9354)

* feat(reporting): skip ledger_changed for empty first snapshot revisions

A short-period pacing feed (for example PT5M snapshot periods) commits a
revision for every elapsed period, including empty ones, so a quiet
campaign rang 288 reporting.ledger_changed doorbells per account per day
with nothing changed.

A seller now MUST NOT fire reporting.ledger_changed for a revision that
is the first of its logical slice (no supersedes_reporting_revision_id),
has finality snapshot, and carries no delivery (row_count 0, or a
non-empty control_totals whose values are all zero). Every other
revision still fires, including superseding snapshots and every
official revision (zero-row included), and every adjustment still fires.

Unchanged: every elapsed period still commits its obligation and
revision, changes_after still returns every revision, polling stays
authoritative, and reporting.status_changed still announces late or
missing periods.

The rule is recorded as x-adcp-validation.empty_first_snapshot on the
experimental webhook schema; the notification-type and capability
descriptions and the reporting docs are aligned, and the reporting
status contract test pins the rule with schema-valid revisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(reporting): refine empty snapshot notification rule

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brian O'Kelley <bokelley@scope3.com>
(cherry picked from commit 473cd6d)
@bokelley
bokelley merged commit dac3406 into 3.3.x Dec 6, 2026
57 checks passed
@bokelley
bokelley deleted the backport/9354-3.3.x branch December 6, 2026 12:07
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.

2 participants