Skip to content

feat(reporting): harden Reliable Reporting for RC1 - #7254

Merged
bokelley merged 3 commits into
mainfrom
reliable-reporting-rc1-hardening
Sep 4, 2026
Merged

bokelley merged 3 commits into
mainfrom
reliable-reporting-rc1-hardening

Conversation

@bokelley

@bokelley bokelley commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Follow-up to externally merged #7228. This carries the expert-reviewed hardening required for the next RC1 adoption without changing the immutable RC0 wire surface.

Scope

  • Preserves the frozen RC0 Core-only reporting capability/status projection and dormant production registration; RC1 source contracts and test-only paths carry the new Reliable Reporting surface.
  • Adds durable, principal/account-bound, paginated Core exact revision reads. The fixed RFC 8785/JCS revision binding is immutable, includes rows and revision metadata, and is independently verified in conformance coverage.
  • Defines receipt replacement/history and immediate evidence-reconciliation semantics, including pending/rejected issue projection and all-applicable-adjustment completion behavior.
  • Clarifies Reconciled Billing as reconciliation of immutable billing-purpose reporting evidence/control totals only. It does not create, approve, modify, settle, or otherwise authorize invoices, taxes, accounting entries, funds transfers, or legal payment obligations.
  • Corrects schedule-derived expected times, IANA civil-time/DST handling, retention boundaries, snapshot stability, account resolution, and receipt-schema/Zod parity.
  • Expands Core and Reconciled Billing storyboards, fixtures, contract tests, and regression coverage.

Verification

  • Focused Reliable Reporting unit, durability, regression, and integration tests
  • Tenant-routing test
  • Reporting cadence gate
  • npm run test:schemas
  • Storyboard/schema validation and link-lint suites
  • npm run typecheck
  • git diff --check origin/main...HEAD

No dist artifacts are included. The local full server integration database run remains environment-limited because PostgreSQL is not available in this workspace; DB-independent reporting regressions and the targeted reporting integration suite pass.

The local pre-push hook began its 213-storyboard full matrix and had completed 83 clean isolated storyboards with no failures before it was stopped to avoid an hour-long local run; remote CI should run the full matrix.

@bokelley
bokelley force-pushed the reliable-reporting-rc1-hardening branch from a85deab to 99443fe Compare September 4, 2026 13:59

bokelley commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Schema-link check addressed in 99443fe. The six released task schema links now use /schemas/v3; each task reference explicitly identifies RC1-only fields as unreleased source under static/schemas/source/media-buy/, so the released endpoint is not represented as containing the candidate-only surface. npm run lint:schema-links and npm run test:schema-links pass.

@bokelley
bokelley force-pushed the reliable-reporting-rc1-hardening branch from 99443fe to fce7ca4 Compare September 4, 2026 14:07

bokelley commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up to the schema-link resolution: browser/HTTP verification showed that /schemas/v3 currently resolves the stable 3.1.20 bundle, where these four Reliable Reporting task schemas are absent. Commit fce7ca4 therefore pins get_reporting_status and sync_reporting_receipts request/response links to the published /schemas/3.2.0-rc.0/... URLs; all four return HTTP 200. The RC1-only additions remain explicitly identified as unreleased source. npm run lint:schema-links and npm run test:schema-links pass.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Sep 4, 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 paths touched without required review approval.

This PR modifies 13 files under static/schemas/source/**, which are under a hard, deterministic approval gate (gated_paths: true). The required review status is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied (decision table row 2).

Review quality: the reviewer confirmed all mandatory gates pass — a minor changeset is correct for the experimental additive/downgraded-Breaking schema changes, schema↔docs↔fixture coherence holds across the invoice→billing-evidence reframing, no undiscriminated oneOf was introduced, and no released dist artifact was mutated. There are no critical/high findings.

Medium findings

  • server/src/training-agent/reporting-reliability.ts — account-omitted exact revision read acquires per-account write locks and rewrites every one of the principal's ledgers with persist:true until a match (non-blocking).

Escalation reasons

  • Modifies protocol schema source files under static/schemas/source/** (e.g. reporting-obligation.json, reporting-receipt.json, get-media-buy-delivery-response.json, 13 files total). These are gated paths requiring human/CODEOWNERS approval; review_decision is REVIEW_REQUIRED. Human review is required before merge.

Why human review

  • Modifies 13 protocol schema source files under static/schemas/source/** (gated paths) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required (decision rule row 2).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/compliance/comply-test-controller-request.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment-receipt.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-config.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-offering.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-obligation.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-receipt.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/**; static/schemas/source/enums/reporting-health.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.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 paths require human/CODEOWNERS approval that is not yet present.

This PR modifies 13 files under static/schemas/source/**, which are under the repo's hard, path-based approval gate (gated_paths: true). The required review_decision is not APPROVED (unknown/none), so decision rule row 2 fires: the gate is not satisfied and the outcome cannot be approve or plain comment.

The reviewer reported no Critical, High, or Medium findings — the diff is additive, experimental (x-status: experimental), RC1-only Reliable Reporting hardening that keeps the released RC0 wire surface frozen. Schema↔docs coherence, a correct minor changeset, no dist mutation, no new undiscriminated oneOf, and DR-0001 normative basis were all verified. Only one Low non-blocking note (singular media_buy_id not in the request exclusion list; handler fail-closes it).

On the merits this diff is clean, but the gate is mechanical: human/CODEOWNERS review of the modified static/schemas/source/** files is required before merge.

Escalation reasons

  • Modifies gated schema files under static/schemas/source/** (13 files, including reporting-* core schemas, media-buy delivery request/response, and comply-test-controller-request) while review_decision is not APPROVED. Human/CODEOWNERS approval required.

Why human review

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate) while review_decision is not APPROVED — human/CODEOWNERS review required before merge
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/compliance/comply-test-controller-request.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment-receipt.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-config.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-offering.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-obligation.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-receipt.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/**; static/schemas/source/enums/reporting-health.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.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 reliable-reporting-rc1-hardening branch from fce7ca4 to 6c89751 Compare September 4, 2026 14:17

bokelley commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Ready for product re-review. The RC0/RC1 boundary is now buyer-visible immediately beside the pinned RC0 request/response schema links in both get_reporting_status and sync_reporting_receipts: those links are explicitly the published RC0 baseline; only content labeled Reliable Reporting 1.0 / RC1 is unreleased source contract to publish with RC1; and RC0 is expressly documented as not supporting changes_after, adjustment_receipts, receipt replacement semantics, or other RC1-only additions. The former hidden-only MDX comments were removed.\n\nVerified on 6c89751d8fd5b7556f412a90a75b4f0c8456cf71: npm run lint:schema-links, npm run test:schema-links, storyboard doc-parity/request-schema/response-schema lints, npm run test:schemas, npm run typecheck, and git diff --check all pass. Mintlify full-repository validation remains blocked by pre-existing malformed versioned files under dist/docs/2.5.3; it is unrelated to these source-MDX edits.

@bokelley
bokelley force-pushed the reliable-reporting-rc1-hardening branch from 6c89751 to 24e5eaa Compare September 4, 2026 14:26

bokelley commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Current head 24e5eaa80d8b8fdb41abfb642b3df974fabaafb4 is ready for fresh human/CODEOWNERS review. Ladon’s account-omitted exact-read finding is fixed with read-only owner probes and a single unique-owner locking/persisting read; its thread is resolved. Focused reporting/durability/integration tests pass 50/50, tenant routing and MCP projection pass, schema/storyboard/schema-link validation and typecheck pass, and the RC0/RC1 boundary is now buyer-visible in both task references. Current-head GitHub CI and independent protocol/product/code expert reruns are still completing; merge will wait for all green gates.

@bokelley
bokelley force-pushed the reliable-reporting-rc1-hardening branch from 24e5eaa to 3e9df80 Compare September 4, 2026 14:31

@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 — hard approval gate on gated schema paths not yet satisfied.

This PR modifies 13 files under static/schemas/source/**, which are under a hard, non-overridable approval gate (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED. Per decision rule row 2, this PR cannot be auto-approved until a human/CODEOWNERS approval is recorded.

The reviewer's pass was clean — no Critical/High/Medium findings. Schema↔docs coherence verified, minor-changeset correctness confirmed on experimental surfaces, no new undiscriminated oneOf (uses not.anyOf), no dist mutations, principal-scoped fail-closed multi-tenant nondisclosure, immutable frozen-cursor exact reads, and PR #7228 regression continuity all check out. The escalation is driven purely by the deterministic path gate, not by any code concern.

This sustains the prior escalate outcome, which remains correct because the gate condition (review not APPROVED) still holds.

Escalation reasons

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required before merge.

Why human review

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/compliance/comply-test-controller-request.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment-receipt.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-config.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-offering.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-obligation.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-receipt.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/**; static/schemas/source/enums/reporting-health.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.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 force-pushed the reliable-reporting-rc1-hardening branch from 3e9df80 to 387efaa Compare September 4, 2026 14:34

@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 13 files under static/schemas/source/**, which are under a hard, non-overridable approval gate (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied and the PR cannot be auto-approved regardless of how clean the diff is (decision table row 2).

Escalation reasons

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required before merge.

Findings
The reviewer's pass was clean: no Critical/High/Medium findings. The change is two coherent movements — a complete revert of the unreleased vendor_relationship/play-denominator/methodology_version surface (schemas + docs + both changesets removed together, no dangling $refs), and an additive Reliable Reporting exact-revision read plus receipt-reconciliation health states on x-status experimental schemas carried by a correct minor changeset. Schema↔docs coherence, changeset scope/type, no new undiscriminated oneOf, and consumer_receipt guarding of pending_adjustment_count were all verified.

No blocking findings exist, but the gated-paths hard rule stands: this needs a recorded human/CODEOWNERS approval before it can merge. The prior escalate outcome is consistent with this run.

Why human review

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required before merge
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/compliance/comply-test-controller-request.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment-receipt.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-config.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-offering.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-obligation.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-receipt.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/**; static/schemas/source/enums/reporting-health.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.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 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Final review-ready head is 387efaace2c47575172a60e2114c48e7faee11d6. Protocol, product/workflow, and independent code expert passes are all Ready on this exact SHA. The final docs delta now preserves published RC0 summary/periods/revision, materializations, pagination, and batched receipts[], while visibly labeling only genuine RC1 deltas (changes_after, post-official adjustments/adjustment receipts, and replacement/supersession/history semantics). All review threads are resolved; current-head CI/Ladon are still running and merge will wait for them plus fresh human approval.

@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 13 files under static/schemas/source/**, which are under a hard, non-overridable approval gate (gated_paths: true), while review_decision is REVIEW_REQUIRED, not APPROVED. Per decision rule row 2, this cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

The reviewer reported a clean pass on the RC1 Reliable Reporting hardening: verified changeset scope/type (minor, present; experimental schemas downgrade Breaking→Normative), schema↔docs coherence across all modified reporting schemas and task-reference pages, no new undiscriminated oneOf, no dist/** mutation, correct scoping of the added pending_adjustment_count complete-branch, and the frozen exact-read cursor walk + DST civil-day math. RC1 surface is gated behind NODE_ENV=test and served-version checks; RC0 wire is preserved. No blocking or Medium findings.

The prior decision was also escalate for the same gated-paths reason. No new findings surfaced, but the gate remains unsatisfied — the escalation persists solely because review_decision is still not APPROVED.

Escalation reasons

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate) while review_decision is REVIEW_REQUIRED — human/CODEOWNERS review required before merge.

Why human review

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/compliance/comply-test-controller-request.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment-receipt.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-config.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-offering.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-obligation.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-receipt.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/**; static/schemas/source/enums/reporting-health.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.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.

@garvitkaushik-123

Copy link
Copy Markdown
Collaborator

I reproduced two remaining issues on 387efaac. Can you look into these before we merge?

  1. Deactivating a daily configuration mid-day drops that day’s owed reporting obligation. The cutoff is rounded down to midnight instead of the next schedule boundary.
  2. The source-calendar offering accepts invalid or mismatched timezones. Not/A_Zone is accepted and then crashes status reads; Asia/Tokyo is also accepted for the offering pinned to America/New_York.

Could you fix these and add regression coverage for both?

@bokelley

bokelley commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Fixed both in d7b12c1. Here's what changed:

Bug 1 — mid-day deactivation drops the in-progress day

recordsFor used civilDayStart(window.end) to compute the last period boundary, which rounds an arbitrary deactivation instant down to the start of that civil day. A 14:00 deactivation silently excluded the very day that was already underway.

Fix: switch to firstCivilDayStartAtOrAfter(window.end). For a mid-day instant it returns the next civil midnight, so the current day's obligation is still owed. For an exact-midnight deactivation it returns that midnight unchanged (deactivation at midnight correctly excludes that day).

Bug 2 — source-calendar offering accepts invalid / mismatched timezones

canonicalCoreConfig validated every schedule field except period_timezone, so Not/A_Zone passed the offering check and crashed later at IANA scheduling time. Asia/Tokyo also passed silently for the America/New_York-pinned offering.

Fix: before the supported check, validate the timezone string with new Intl.DateTimeFormat (throws immediately on an unknown zone). Then add period_timezone to the supported condition — a mismatch with the offering's pinned zone fails with the standard "must exactly select one advertised offering" error.

Regression tests added to reporting-reliability-regressions.test.ts:

  • "deactivating a daily source-calendar config mid-day still owes that day's period" — activates, deactivates at 18:00Z, asserts Sep 3 period is present and Sep 4 is absent.
  • "source-calendar offering rejects invalid and mismatched period_timezone values" — asserts Not/A_Zone throws an IANA error, Asia/Tokyo throws an offering-mismatch error, and America/New_York succeeds.

Generated by Claude Code

@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 paths require human/CODEOWNERS approval before merge.

This PR modifies 13 files under static/schemas/source/**, which is under a hard, non-overridable approval gate (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so decision-table row 2 fires: the gate is not satisfied and the PR cannot be auto-approved regardless of how clean the diff is.

Findings: none. The reviewer's clean delta pass found no Critical/High/Medium issues — the targeted fix in reporting-reliability.ts (finalEnd computation preserving the in-progress day on mid-day deactivation) and the new IANA period_timezone validation are both covered by dedicated regression tests. Schema↔docs coherence, changeset, and oneOf-discriminator gates all pass.

Because there are no blocking findings, this is not request-changes — it is an escalate purely on the gated-paths hard gate. This is consistent with the prior escalate decision on this PR; the gate lifts the moment a human/CODEOWNERS approval is recorded (review_decision: APPROVED), at which point a re-run on this clean diff would fall through to approve.

Escalation reasons:

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge.

Why human review

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/compliance/comply-test-controller-request.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment-receipt.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-config.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-offering.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-obligation.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-receipt.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/**; static/schemas/source/enums/reporting-health.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.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 enabled auto-merge (squash) September 4, 2026 17:24
bokelley and others added 3 commits September 4, 2026 17:28
…dation

Bug 1 (recordsFor): When a daily source-calendar config is deactivated
mid-day, the previous code used civilDayStart(window.end) which rounds
the deactivation instant DOWN to the start of that civil day, silently
dropping the in-progress day's obligation. Switch to
firstCivilDayStartAtOrAfter, which returns the NEXT midnight for any
mid-day instant, so the current day remains owed.

Bug 2 (canonicalCoreConfig): The offering match check did not include
period_timezone, so configs with an invalid IANA zone (Not/A_Zone)
passed validation and then crashed status reads at scheduling time.
A valid-but-wrong zone (e.g. Asia/Tokyo) was also silently accepted
for the America/New_York-pinned offering. Fix: validate the timezone
string via Intl.DateTimeFormat before the supported check, and add the
offering's period_timezone to the supported condition.

Regression coverage added to reporting-reliability-regressions.test.ts
for both bugs.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HcsL3oALQM7jx8ffro9ZV7
@bokelley
bokelley force-pushed the reliable-reporting-rc1-hardening branch from 3a01c2c to 8091015 Compare September 4, 2026 17:28

@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 and this PR introduces a new protocol capability requiring ratification.

Escalation reasons

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate, row 2) while review_decision is REVIEW_REQUIRED, not APPROVED. Human/CODEOWNERS approval is required before merge — Ladon cannot auto-approve regardless of how clean the diff is.
  • This PR ratifies a new protocol capability (Reliable Reporting 1.0). Per the repo constitution's hard gate, introducing a new normative capability is a human act of ratification, not something Ladon can approve autonomously.

Blocking findings

  • None.

Medium findings

  • None.

The reviewer confirmed a clean delta: additive experimental capability with a correct minor changeset, coherent schema↔docs↔fixture story, no new undiscriminated oneOf, and RC1 wire surface gated closed. No Critical/High/Medium code findings. The escalation is driven entirely by the deterministic gated-paths gate and the new-capability ratification requirement — the code itself is sound. Prior decision was also escalate for the same gated-paths reason; that gate remains unsatisfied (review_decision still REVIEW_REQUIRED).

Gated files include: reporting-adjustment.json, reporting-adjustment-receipt.json, reporting-delivery-capabilities.json, reporting-delivery-config.json, reporting-delivery-offering.json, reporting-obligation.json, reporting-receipt.json, reporting-revision.json, reporting-status-issue.json, reporting-health.json (enum), get-media-buy-delivery-request.json, get-media-buy-delivery-response.json, comply-test-controller-request.json.

Why human review

  • Modifies 13 gated files under static/schemas/source/** (hard approval gate, decision-table row 2) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge.
  • Introduces a new protocol capability (Reliable Reporting 1.0); per the repo constitution's hard gate, ratifying a new normative capability is a human act and is never auto-approved unless review_decision is APPROVED.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/compliance/comply-test-controller-request.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment-receipt.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-adjustment.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-config.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-delivery-offering.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-obligation.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-receipt.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/**; static/schemas/source/enums/reporting-health.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.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 disabled auto-merge September 4, 2026 18:56
@bokelley
bokelley merged commit 049bca3 into main Sep 4, 2026
60 checks passed
@bokelley
bokelley deleted the reliable-reporting-rc1-hardening branch September 4, 2026 18:56
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.

3 participants