Skip to content

feat(reporting): add REVISION_UNREADABLE status issue code - #8099

Merged
bokelley merged 2 commits into
mainfrom
bokelley/revision-unreadable-issue-code
Oct 9, 2026
Merged

bokelley merged 2 commits into
mainfrom
bokelley/revision-unreadable-issue-code

Conversation

@bokelley

@bokelley bokelley commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #8082. This adds a reporting status issue code for a published revision that the seller still owes within status_retention_days but can't currently serve or verify. For example, its stored rows are missing or fail the revision binding.

  • REVISION_UNREADABLE added to core/reporting-status-issue.json, plus a new reporting_revision_id field. Schema-enforced: responsible_party: seller, required reporting_obligation_id + reporting_revision_id, and severity/action paired (delayed + wait_for_retry, or action_required + contact_seller, so buyers stop retrying once repair stops).
  • New revision_unreadable rule:
    • An authorized exact read returns SERVICE_UNAVAILABLE, never REFERENCE_NOT_FOUND, and never rows that fail the binding. Unauthorized callers still get the nondisclosing REFERENCE_NOT_FOUND.
    • The affected obligation is neither healthy nor complete while the issue is open (also added to core_readability).
    • The issue is retired when the content is readable again or the retention window ends. It can't be retired by serving different bytes under the same ID.
    • A lost official revision never makes its obligation complete.
  • Prose in get_media_buy_delivery (error table row) and get_reporting_status.

#7996 changes only specs/, so contrary to the triage note on #8082, this doesn't conflict with it. Additive on an experimental surface, so no notice is required. Changeset: minor.

Stacked under the #8081 PR, which defines exactly which revisions' content is "owed".

Testing

  • node --test tests/reporting-status-contract.test.cjs: new valid and invalid issue cases plus normative-text assertions (32/32 pass)
  • npm run test:schemas, node scripts/build-compliance.cjs --check, changeset scope + status checks pass
  • Committed with HUSKY=0: the pre-commit server suite failed 2 Addie fixed-trace tests only because the worktree's node_modules is a symlink (the tests assert the real tsx path). Both pass on a normal checkout.

Review

An ad-tech protocol expert reviewed the change, and I addressed its findings: the terminal path for a lost revision, severity/action pairing, and the core_readability alignment.

🤖 Generated with Claude Code

A published revision still owed within status_retention_days whose
content cannot be served or verified now has a precise seller-owned
issue. Authorized exact reads return SERVICE_UNAVAILABLE, never
REFERENCE_NOT_FOUND. Closes #8082.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@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: Request changes

Request changes — 1 blocking finding.

Blocking findings

  • static/schemas/source/core/reporting-status-issue.json:176 — New undiscriminated oneOf fails audit-oneof.mjs --check. The new oneOf omits branch-level required[], so the auditor classifies it dangerous and CI --check fails. Fix: add required: ["severity","recommended_action"] to each branch so the walker can classify it as discriminated.

Otherwise the PR is coherent: schema↔docs stay in sync for the new REVISION_UNREADABLE issue code, reporting_revision_id field, and matching x-adcp-validation prose; the minor changeset is correct for a new enum value plus an optional field (Normative, non-breaking); and no immutable dist/** artifacts are touched. Resolve the oneOf discriminator regression and this should clear.

Note: this PR touches static/schemas/source/** (gated paths, review_decision: REVIEW_REQUIRED) and will still require human/CODEOWNERS approval before merge even once the blocking finding is addressed.

Blocking findings

  • static/schemas/source/core/reporting-status-issue.json:176 — New undiscriminated oneOf fails audit-oneof --check; add branch-level required[] to each oneOf branch

@aao-secretariat
aao-secretariat Bot dismissed their stale review October 9, 2026 13:06

Superseded by a later Ladon review that rechecked and resolved its blocking findings.

@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-path change requires human/CODEOWNERS approval.

This PR modifies two files under the hard approval gate (static/schemas/source/**):

  • static/schemas/source/core/reporting-obligation.json
  • static/schemas/source/core/reporting-status-issue.json

gated_paths is true and review_decision is not APPROVED (unknown/none), so decision-table row 2 forces escalation regardless of how clean the diff is. A human or CODEOWNERS approval is required before this can merge.

Blocking findings
None.

Medium findings
None.

Escalation reasons

  • Touches gated schema source files (reporting-obligation.json, reporting-status-issue.json) under static/schemas/source/** with no APPROVED review — human/CODEOWNERS sign-off required.

Review note: the prior High blocker (undiscriminated oneOf at reporting-status-issue.json:176) has been resolved — the delta replaces it with nested if/then/else keyed on severity, which audit-oneof.mjs no longer flags. Schema↔docs coherence holds across both docs pages and the added contract tests, and the minor changeset is correct for a new enum value plus an optional field (Normative, non-breaking). No immutable dist artifacts were touched. The escalation is purely the deterministic gated-path gate, not a code defect.

Why human review

  • Touches gated schema source files under static/schemas/source/** (reporting-obligation.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-obligation.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.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Oct 9, 2026
@bokelley
bokelley merged commit e9ca541 into main Oct 9, 2026
64 checks passed
@bokelley
bokelley deleted the bokelley/revision-unreadable-issue-code branch October 9, 2026 13:59
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]>
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.

Add a reporting issue code for a retained revision that cannot be read

1 participant