Repository navigation
fix(reporting): preserve canonical consumer status contracts - #2911
Merged
bokelley merged 7 commits intoSep 14, 2026
Merged
Conversation
bokelley
force-pushed
the
conductor/fix-reporting-content-mismatch-sdk-contract
branch
from
September 14, 2026 16:26
f8bee9e to
a6834d6
Compare
bokelley
marked this pull request as ready for review
September 14, 2026 17:17
bokelley
enabled auto-merge (squash)
September 14, 2026 17:19
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean diff, no blocking findings.
Checked:
- Reporting consumer-status Zod constraints are now derived from the pinned canonical schema and fail-closed on unexpected arm shapes.
ReportingLedgerConsumerStatementV1widened to extend the generated wire type — additive, no shipped-shape change on the current rc.2 pin (consistent with witness-not-translator).- Revision-binding check correctly moved from
consumer_status==='received'toobserved_revision_content_sha256!==undefined, covering both received and content_mismatch per the revision_binding invariant. - Changeset (
patch) does not understate impact — no removed/renamed exports, param flips, or response-shape changes. - New paths covered by codegen, validation, and PG roundtrip tests.
No Critical/High/Medium findings. No high-risk paths, no gated paths, no author team gate. Falls through to row 9.
bokelley
deleted the
conductor/fix-reporting-content-mismatch-sdk-contract
branch
September 14, 2026 17:23
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge and reviewed-head CI snapshot
Merged at 2026-09-14 17:23:15 UTC as
8ba12c2ace85a88533ce1d56efd35badea51a97c, following the authorized guarded-merge handoff. Live state was rechecked at 2026-09-14 17:34:43 UTC.a6834d67870253674178d099447af36dd6640b11; base:39b07141d3bdf6ba650f3625db471ab017b89a33.8ba12c2ace85a88533ce1d56efd35badea51a97c. Its tree1771a8ef743b4ddcd89c836cee39563096dac82eis byte-identical to the frozen reviewed head;git diff a6834d67 8ba12c2ais empty.bmilekicwas requested before merge. The recorded approving reviewer isaao-secretariat.Later post-merge metadata failure: editing this already-merged PR triggered commitlint job 104081910896. It checked out merged main
8ba12c2a; PR-title checks passed, then commit-range linting failed withInvalid revision range 39b07141..a6834d67. The historical PR range is unavailable in that post-merge checkout. This failed workflow remains recorded; it is not a source-test or qualification failure. Further metadata edits may trigger the same workflow behavior. No workflow was manually rerun or cancelled, and no source or guard was changed. The current rollup must not be described as entirely green after that failure.The following reproduction, validation, and pre-merge handoff records are retained for provenance. The separate geo/starter adoption work and AdCP #7508 regeneration/release gates remain open; this SDK merge does not close them.
Regenerating the SDK from the current AdCP reporting schema produces
consumer_status: content_mismatch, but the handwritten ledger union rejects it with TS2322. The existing Zod postprocessor also rejectedmismatch_codeand omitted its conditional requirements. This derives ledger wire fields and status rules from the canonical schema, checks the consumed revision binding, and preserves mismatch reasons through JSONB storage, retry, and readback. Unsupported conditional schema shapes fail generation explicitly.Conditional required/forbidden fields are enforced at runtime by Zod. The generated TypeScript interface and ledger type share the accepted fields/status union; compile-only assertions check their agreement. They do not model the conditional combinations as a discriminated union.
The protocol pin remains rc.2. The existing patch changeset applies to the current 14.0.0-rc line; package versions are unchanged by this PR.
Frozen revision and reviewed patch identity
39b07141d3bdf6ba650f3625db471ab017b89a33(feat(account): complete guarded change feed adoption #2910/feat(negotiation): complete schema-derived proposal verification #2909).a6834d67870253674178d099447af36dd6640b11; tree:1771a8ef743b4ddcd89c836cee39563096dac82e.git diff origin/main...HEADSHA-256:3b7ddfa875cf359d3dcfe5aedacd05959822d59cc71e94c614615e74f96935fe.f8bee9e69c60adecb796388e12cc1112d18156cf, base90ad47b67401d35e0a9ffc99fd0e76252e026a9a.=ingit range-diff; the rebased patch SHA-256 remainsbbac1949b154de900e4509d3e7d9ae962b3c80b18be1fef74c324c9fa1af4e9f.524b7a2f7ff309b6256c3571104e82cf0ac5a78dmatches the independently simulated clean merge tree.Key old/new blob identities (identical at both heads):
src/lib/reporting/ledger/types.tsc41fe8cbabbb95eac57d39e99efbee40c1cbcfb5src/lib/reporting/ledger/status-ingest.ts5cff4311279884cf0c4a11fb7d20692d11338df2scripts/generate-zod-from-ts.ts4b50941e7bb8f04fb34e4509c31d85cf06213266src/lib/types/schemas.generated.ts52fb120d8d44d324013d73a5b79d0f1731117ed1The complete blob manifest and range-diff are retained under
.context/rebase-39b07141/. Range-diff SHA-256:dd04174923053df4e420f1afe6d75d441b162590367215033e45c9bb54e5e94d.Change size and production scope
19 files, +878/-82. The handwritten executable change is confined to two ledger files and the Zod generation pass; most added lines are tests, canonical fixture, and evidence.
Cross-repository reproduction
Both exact AdCP candidates independently failed against SDK checkout
90ad47b67401d35e0a9ffc99fd0e76252e026a9awithstatus-ingest.ts(288,13)TS2322: generatedcontent_mismatchis not assignable toReportingLedgerConsumerStatusInputV1.c59427cde5025f273126cc639885f5ce85984df0103521867753bd8ddba0dafc6ecb92864f6bd97d28c7d69ff9d6a700a1596838297cee9be32fc488660c1501d3cb9db71ee3ecfad8316ee924a10356276302; failed at 2026-09-14 15:57:43 UTC82c1932c2d1cc068c6ae99f4ac6710039210332d16ca1e1859cc2849fa029cfcThe full authenticated logs, tarballs, and provenance were downloaded and verified. Current candidate schema/workflow bytes match the preceding versions. The reporting mismatch came from source/rc.3 (#7465), rather than being introduced by either #7508 release candidate.
Original committed evidence and contract audit; additional current-candidate evidence, error excerpt, and hashes.
Exact qualification path
Validate schema PR bundle / Generate TypeScript SDK. The immutable current-candidate workflow step follows
npm ciin disposablesdk/. Use verified artifact in siblingbundle/, setPR_HEAD_SHA=fc488660c1501d3cb9db71ee3ecfad8316ee924a, and supply writableRUNNER_TEMP/GITHUB_STEP_SUMMARY. The local replay matches the job's Node 24.20.0 / npm 11.19.0. No AdCP workflow was rerun or cancelled.Verbatim Generate and build from the PR bundle step
Validation and review gates
test/generate-zod-consumer-status-content-mismatch.test.js,test/generate-zod-consumer-status.test.js,test/lib/reporting-status-ingest-validation.test.js, andtest/lib/reporting-status-ingest-pg.test.js. Canonical field combinations, all mismatch codes, storage/replay/readback, and generated/ledger agreement are covered. These identical selections also passed on the final rebased head: current-pin rc.2 and generated fc488 rc.4 both 47/47, zero failures or skips.f8bee9e69exact-head CI was fully green after one evidence-backed adapter-job rerun (54/54). The original local workflow replay failed on unchanged base with exact TS2322 and passed with the reporting fix. Independent root audit confirmed generation and PostgreSQL validation with no code/security blocker.a6834d67: all applicable checks in fresh CI run 34868616695 and the exact-head check rollup have passed. The final Test & Build aggregate passed at 2026-09-14 17:05:04 UTC; commitlint passed. The automated AI review was skipped while Draft; the readiness transition may trigger its normal review workflow. The independent exact-head delta audit approves with no blockers, and the second-model delta stack reports no new blockers. The complete exact fc488 local qualification passed with exit 0 under Node 24.20.0/npm 11.19.0, followed by explicit typecheck and 47/47 PostgreSQL-backed tests. Exact-head CI, qualification, and independent audit gates are satisfied for human review. Prior-head green results do not qualify this new head.496fe58bf8b413cf4feac147bf5173c6a20b560d0d265f05c836b29d61096310; post-qualification typecheck/test log SHA-256:c99fb6f79386019067364ece3c4127bd3388afade12553a4d3bc10151293c96c. The workflow summary records SDKa6834d67, protocolfc488660, and verified bundle digest82c1932c…. All commands completed with exit 0.The independent delta reviewer approved exact
a6834d67in the separate review session. Prior review included parallel DX/protocol/code/security experts plus the Codex second-model stack. Its conditional-schema drift and inherited object-property findings were fixed and re-reviewed before rebase. The new delta audit re-derived range/blob identities and checked integration with main; the Codex delta stack reviewed supplied source context because its checkout read tools were unavailable, and did not independently execute tests.The additional independent root re-audit of exact
a6834d67also confirmed the main/base and merge tree, reviewed blob/range identity, authenticated fc488 evidence, and an independent pinned fc488 sync/generate/validate/build replay. It found no code, security, or correctness blocker.Rebase/qualification evidence is sealed in
rebased-reporting-qualification-evidence.tgz(SHA-256ed5872cde2a5f17ac8d79489ec5e57e023b5c84de7362cae0ea66253aaa287c3): 55 verified files, including the artifact, provenance, replay logs, and delta review. The archive records its earlier CI-pending snapshot; final CI is recorded separately.Separate geo-null workstream and adoption limits
The wider rc.4 example package check previously reproduced
seller-3.2-starter.ts:102,108errors on unchanged base: the starter spreads nullable purchase input into accepted terms even though it rejects targeting overlays. Accepted snapshots forbid those null clear commands. The separate geo-null workstream owns supported-field snapshot construction, six targeting-array alias collision fixes inscripts/generate-types.ts(four nullable-input aliases plus two enum-versus-array aliases), and their boundary tests; its fix is not absorbed here. It has the final reporting head for disposable composition. No new targeting or generator edits were made during rebase.The canonical “currently required revision” prose condition requires a separate store/producer contract; this handler uses point lookup and verifies identity/content binding. Newer mismatch-issue
opened_atlifecycle and optional escalation remain adoption work. This PR does not claim full rc.3/rc.4 reporting conformance or closure of AdCP #7404 / the reporting framework.Pre-merge human handoff
Historical handoff: maintainer
bmilekicwas requested on frozena6834d67before merge. The user authorized normal guarded auto-merge after reassessing the actual dependency graph. Existing main rules require approving review, last-push approval, applicable code-owner review, resolved review threads, required CI, and CodeQL; those gates remain in force. The completed exact-head source CI and independent qualification/audits are recorded above. Metadata and readiness checks remain visible in the current check rollup.Geo-null is not a prerequisite for this PR. The reporting fix preserves the rc.2 pin and passes the pinned fc488 sync/generate/validate/build replay independently, without the geo patch. The geo owner confirmed no correctness dependency requires landing first and can rebase/qualify after this fix. At the ordering decision, that separate workspace was uncommitted on
39b07141, with no PR or push; its own Draft-only review/adoption gates remain separate.The actual supply-path dependency is this SDK fix → upstream AdCP #7513 qualification and guarded merge → client #2908 pinning the final merged upstream SHA and satisfying its own gates. The exact upstream Generate TypeScript SDK failure at head
38190a864e3585d970869df7cb194e6e582b111bis the same reporting TS2322 atstatus-ingest.ts:288. No supply-path or targeting changes are absorbed here.The committed immutable evidence retains the historical Draft/auto-off authorization at capture time. This current handoff supersedes that process hold; it does not alter the reviewed source, tests, generated blobs, or release gates.
AdCP #7508 must remain Draft until this SDK fix lands on adcp-client main, its release branch is regenerated from current AdCP main, and the exact Generate TypeScript SDK check passes on that release head. Local candidate replay is evidence for this SDK fix, not qualification of a future release head.
Normal auto-merge is authorized only through the existing guarded review/CI process for exact
a6834d67; no administrator bypass is used. npm publication, release, tag, edits to AdCP #7508, AdCP workflow reruns/cancellations, and branch-protection changes remain outside this task. The sole old-head SDK adapter-job retry was evidence-backed and passed; new-head CI follows the authorized rebase push.