Skip to content

feat(reporting): define superseded snapshot content retention - #8100

Merged
bokelley merged 1 commit into
mainfrom
bokelley/superseded-snapshot-retention
Oct 9, 2026
Merged

bokelley merged 1 commit into
mainfrom
bokelley/superseded-snapshot-retention

Conversation

@bokelley

@bokelley bokelley commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #8081 with Option B from the triage. status_retention_days keeps metadata for every revision, but content only for revisions a buyer is likely to read. Older superseded snapshots may be compacted to metadata only, so a 15-minute pacing feed doesn't have to keep around 2,880 full snapshots per obligation.

New normative rule: content_retention in core/reporting-revision.json, referenced from status_retention_days.

When the window starts. No new completed_at field is needed:

  • At the revision's created_at.
  • Once superseded, at the successor's created_at.
  • For an official revision, at the latest created_at among the revision and its adjustments. This keeps billing evidence readable while adjustments arrive.

Content owed through exact reads within the window:

  • (a) the current revision of each logical slice, including every official revision;
  • (b) the snapshot that the current revision immediately supersedes;
  • (c) any superseded snapshot during a recovery grace of max(automated_recovery_window_seconds, 1h), which covers paginated reads in progress and late webhook follow-ups;
  • (d) for the requesting caller only, revisions named by that caller's own receipts or current received / unreadable / content_mismatch statements. This pins disputed bytes, and scoping it to the caller avoids leaking information across callers.

Edge cases:

Experimental breaking-change notice. The old reporting-revision.json description implied that superseded snapshots were preserved. Narrowing that follows the six-week rule: compaction takes effect only in the next eligible minor after November 20, 2026. The notice and a migration note are in 3-2-to-3-3.mdx and experimental-status.mdx. Changeset: minor.

Stacked on #8099.

Testing

  • node --test tests/reporting-status-contract.test.cjs (32/32 pass), with assertions on the normative text
  • npm run test:schemas, build-compliance --check, changeset scope + status checks pass
  • Committed with HUSKY=0 for the same worktree-symlink reason given in feat(reporting): add REVISION_UNREADABLE status issue code #8099

Review

An ad-tech protocol expert reviewed this twice. Its findings are folded in: the recovery grace, caller-pinned revisions, the adjustment-anchored official window, the six-week notice, the coverage rule after the window ends, and reopening a retired issue after a late adjustment.

Decisions for the maintainer

  • The one-hour minimum for the grace period is my choice. The other candidate was the per-offering delivery_sla.
  • If you consider the old description non-normative, the six-week notice can be dropped. I kept it to be safe.

🤖 Generated with Claude Code


Open workspace in Conductor

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Oct 9, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Escalate to human review

Escalate — gated schema paths require human/CODEOWNERS approval.

This PR modifies published protocol source under static/schemas/source/** (reporting-delivery-capabilities.json, reporting-revision.json, reporting-status-issue.json), which the repo declares under a hard, deterministic approval gate. gated_paths is true and review_decision is not APPROVED, so the gate is not satisfied (decision table row 2).

The reviewer found no Critical/High/Medium issues: schema↔docs coherence verified across all four prose locations, every referenced field resolves in source, content_retention sits under x-adcp-validation with a matching test, and a correctly-typed minor changeset is present consistent with the experimental-notice precedent. The diff itself looks clean — but a clean diff cannot override the gated-path requirement for human sign-off.

Escalation reasons

  • Modifies gated schema files static/schemas/source/core/reporting-delivery-capabilities.json, reporting-revision.json, and reporting-status-issue.json; review_decision is not APPROVED. Human/CODEOWNERS approval required before merge.

Why human review

  • Modifies gated schema source files under static/schemas/source/** (reporting-delivery-capabilities.json, reporting-revision.json, reporting-status-issue.json) while review_decision is not APPROVED — human/CODEOWNERS approval required (decision table row 2).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-revision.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-status-issue.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the bokelley/superseded-snapshot-retention branch from 58fa0d6 to bed5ae8 Compare October 9, 2026 12:49

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Escalate to human review

Escalate — gated schema source files modified without a recorded APPROVED review.

This PR adds content_retention for Reliable Reporting (experimental): metadata retained for every revision via status_retention_days, content retained only for four named cases, with superseded snapshots compactable after Nov 20, 2026. The reviewer's pass is clean — schema↔docs coherence holds across all four touched docs, every referenced field and anchor resolves, the changeset is the correct class (experimental breaking downgrades to Normative), and new contract-test assertions match the x-adcp-validation.content_retention text verbatim. No critical/high/medium findings.

Despite the clean diff, decision table row 2 fires: gated_paths: true (three files under static/schemas/source/** modified) AND review_decision is not APPROVED (unknown/none). This is a hard, path-based approval gate — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is. This matches the prior decision (escalate on the same gate). The gate lifts automatically once review_decision becomes APPROVED.

Escalation reasons

  • Modifies gated schema source files under static/schemas/source/** (reporting-delivery-capabilities.json, reporting-revision.json, reporting-status-issue.json) while review_decision is not APPROVED — human/CODEOWNERS approval required (row 2).

Why human review

  • Modifies gated schema source files under static/schemas/source/** (reporting-delivery-capabilities.json, reporting-revision.json, reporting-status-issue.json) while review_decision is not APPROVED — human/CODEOWNERS approval required (decision table row 2).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-revision.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-status-issue.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

Base automatically changed from bokelley/revision-unreadable-issue-code to main October 9, 2026 13:59
status_retention_days keeps metadata for every revision and content for
the current revision, its immediate predecessor, snapshots within the
recovery grace, and caller-pinned revisions. Older superseded snapshots
may compact to metadata only once the six-week notice lapses.
Closes #8081.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@bokelley
bokelley force-pushed the bokelley/superseded-snapshot-retention branch from bed5ae8 to f96aced Compare October 9, 2026 13:59

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Escalate to human review

Escalate — gated schema source files touched and review_decision is not APPROVED, plus a Breaking-class governance gate applies.

The reviewer found no Critical/High/Medium findings — the schema delta is additive annotation only, schema↔docs coherence holds across all six surfaces, all wire fields and anchors resolve, tests pin the new prose, and the minor changeset is correct. That is a clean diff on the mechanical review axes.

However, two hard gates independently force escalation:

  1. Gated paths (decision table row 2): This PR modifies three files under static/schemas/source/** — reporting-delivery-capabilities.json, reporting-revision.json, reporting-status-issue.json — which sit under a hard, non-overridable approval gate. review_decision is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied. Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded.

  2. Breaking-class governance gate: The new content_retention rule permits compaction of older superseded snapshots to metadata-only, returning REFERENCE_NOT_FOUND — a breaking wire behavior (deferred to the next eligible minor after Nov 20, 2026). Per repo context, a Breaking-class change is never auto-approved even with a correct changeset; ratification is a human act. This also requires human review while review_decision ≠ APPROVED.

The prior escalate stands: the gate conditions remain in force and the change still introduces the (deferred) breaking behavior. No blocking findings to request changes on — a human/CODEOWNERS approval lifts both gates and the PR can then fall through to a normal approve.

Escalation reasons

  • Modifies gated schema source files under static/schemas/source/** while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required (row 2).
  • Introduces a Breaking-class protocol behavior (superseded-snapshot compaction → REFERENCE_NOT_FOUND); ratification is a human act, never auto-approved while unapproved.

Why human review

  • Modifies gated schema source files under static/schemas/source/** (reporting-delivery-capabilities.json, reporting-revision.json, reporting-status-issue.json) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required (decision table row 2).
  • Introduces a Breaking-class protocol change: permits compaction of older superseded snapshots to metadata-only, returning REFERENCE_NOT_FOUND. Breaking-class changes are never auto-approved — ratification is a human act — and review_decision is not APPROVED.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-revision.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-status-issue.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Escalate to human review

Escalate — gated schema source change awaiting human/CODEOWNERS approval.

This PR modifies gated schema source files under static/schemas/source/** (reporting-delivery-capabilities.json, reporting-revision.json, reporting-status-issue.json) while review_decision is REVIEW_REQUIRED, not APPROVED. Decision table row 2 forces escalate — a hard, deterministic, path-based approval gate that Ladon cannot lift until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

Escalation reasons

  • Modifies gated schema source files under static/schemas/source/** while review_decision is not APPROVED — human/CODEOWNERS approval required (row 2).

Review quality note
The reviewer returned a clean pass with no critical/high/medium findings. Content-retention semantics for Reliable Reporting (#8081) were verified for schema↔docs coherence: the four named content-guarantee cases (a)-(d) and window-start rules in reporting-revision.json match get_reporting_status.mdx and the 3-2-to-3-3 migration note; additive prose + one x-adcp-validation key with no wire-shape change; all referenced fields exist; minor changeset present (correct for a breaking-on-experimental narrowing); nine new contract-test assertions quote the shipped prose. These are a net positive — the escalation is solely the gated-path approval requirement, not a code concern. The diff is ready to merge the moment a human/CODEOWNERS approval lands.

This escalation carries forward the prior run's gated-path reason (prior outcome was also escalate). No new blocking findings surfaced.

Why human review

  • Modifies gated schema source files under static/schemas/source/** (reporting-delivery-capabilities.json, reporting-revision.json, reporting-status-issue.json) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required (decision table row 2).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-revision.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-status-issue.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley merged commit f591548 into main Oct 9, 2026
76 of 120 checks passed
@bokelley
bokelley deleted the bokelley/superseded-snapshot-retention branch October 9, 2026 15:42
bokelley added a commit that referenced this pull request Oct 9, 2026
Add impressions-optional delivery rows (#8108) to the versioning
exceptions and migration guide, expected_confirmation_at on
refine_proposals (#8104), SDK implementation metadata (#8079),
unsupported-targeting-dimension details (#8052), experimental trust.json
schemas (#8067), the Reliable Reporting compaction notice and
REVISION_UNREADABLE (#8100, #8099), the sales-broadcast-tv 1.1.0
tightening (#8046), new signing and canonicalization vectors (#8068,
#8076), and training-agent fixtures (#8106, #8078, #8012). Regenerate
the In-review table from the 56 open 3.3.0 milestone issues.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
bokelley added a commit to adcontextprotocol/adcp-client that referenced this pull request Oct 11, 2026
…ntent (#3200)

Implements the compaction adcontextprotocol/adcp#8100 permits: drops row
content of superseded snapshots no caller is owed, keeping every revision's
metadata. Off by default; reuses retirement's resumable, fenced deletes.

Co-authored-by: Claude Sonnet <[email protected]>
bokelley added a commit to adcontextprotocol/adcp-client-python that referenced this pull request Oct 11, 2026
)

* feat(reporting): retire expired periods with tombstones and holds

Adds retire_expired_periods (adcontextprotocol/adcp#7996 sections 4.2 and 4.3,
period anchor per adcontextprotocol/adcp#8100): an ordered, resumable, period-aligned
retirement in three phases.

1. Under the account lock, write a retiring tombstone (final revision, digests,
   revision and adjustment counts) and stop serving the period's row sets.
2. Delete the period's recorded object versions; a failure leaves the period
   retiring with every locator intact and the next pass resumes it first.
3. Under the account lock, delete the manifests, bodies and the period's ledger
   records, mark the tombstone retired and append a retirement change.

A period qualifies once max(status_retention_days, ledger_record_retention_days)
has passed since the later of its end, newest revision and newest adjustment. It is
held by pending materializer work, reconciliation records, and registered feed
consumers that have not passed its changes, until max_feed_hold_days. A retired
period is never recreated: commit_obligation refuses it with PERIOD_RETIRED.

Python extension tables guarded by append-only triggers cannot be deleted without
the shared Core layout's retirement exemptions. A period that still has such records
finishes phases 1 and 2, stays retiring and is reported as protected; phase 3 removes
all of a period's records or none.

Part of #1457.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* fix(reporting): retire periods on change-feed hosts that have no row storage

The tombstone insert read adcp_reporting_row_sets unconditionally, so every candidate failed on a host with the change feed but no row storage.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify retention of superseded snapshot revision content and the status_retention_days anchor

1 participant