Repository navigation
fix(testing): collect complete wholesale product pages in storyboards - #3515
Conversation
There was a problem hiding this comment.
Ladon verdict: Request changes
Request changes — 1 blocking finding.
Blocking findings
- .changeset/fix-pricing-currency-discovery-invariants.md:2 — Changeset type understates impact: new default-on gating invariants that can flip previously-passing conformance, plus new public API, shipped as
patch. Per the repo's mandatory changeset-vs-wire-impact rule, a changeset whose type understates impact (response-shape/behavior change, new public API) is ahighfinding. This should be at leastminor.
The rest of the PR is solid: the opt-in collect_product_pages wholesale page walker and the two new discovery invariants were reviewed across both large files (runner.ts collection/retention, seeding.ts shared collectWholesaleProductPages loop with cursor/restart/budget handling) and both invariant modules. The logical-vs-physical separation is correctly labeled, per-page invariant grading avoids double-grading via the !result.product_page_collection guard, and restart/budget/dedup paths are exhaustively tested. The conditional ext.adcp.creative_wire change correctly stops forcing canonical mode on legacy 3.1 sellers and is tested. No correctness, security, or witness-not-translator issues found — fix the changeset type to clear this.
Blocking findings
- .changeset/fix-pricing-currency-discovery-invariants.md:2 — Changeset shipped as patch understates impact: new default-on gating invariants that can flip previously-passing conformance plus new public API; repo rule classifies understated changeset as high — should be minor
Medium findings
- .changeset/fix-pricing-currency-discovery-invariants.md:2 — Changeset type understates impact: new default-on invariants + public API shipped as patch
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — additive, well-isolated storyboard testing changes with thorough test coverage.
No blocking findings. Reviewer verdict is LGTM with no Critical/High/Medium findings.
Checks performed:
- Decision table applied top-down. Rows 1 (no critical/high), 2 (gated_paths false — review_decision REVIEW_REQUIRED does not trigger the gate since gated_paths is false), 3–6 (not high_risk, no deletions, no medium findings), 7 (no no-auto-approve team match), 8 (fewer than three medium findings — zero) all do not fire. Falls through to row 9 → approve.
- Witness-not-translator preserved: logical_response kept separate from response/response_record; idempotency_key replayed verbatim; no fabrication at seams.
- Changesets present; both
patch. Reviewer notes the collect-wholesale changeset adds a new public field/exports (minor-worthy), but beta pre-mode makes the label moot — a non-blocking nit, not a changeset-understates-impact High finding under the stated circumstances. - Collection bounds, timeouts (delegated to SDK client), and invariant checks verified safe by reviewer.
Non-blocking nit: changeset type labels are patch where one adds a public field, rendered moot by beta pre-mode.
There was a problem hiding this comment.
Ladon verdict: Approve
Approve.
Reviewed the storyboard collect_product_pages pagination refactor (runner.ts, seeding.ts, types.ts, loader.ts) and the two new discovery invariants. The pagination work is careful: bounded budgets, signal-abort wired through dispatch, logical_response kept distinct from per-page evidence, per-page schema + invariant grading including restart-abandoned pages, and the conditional canonical creative-wire fix for legacy-only 3.1 sellers is well tested. Changeset present and acceptable (patch for additive new exports/step field under beta pre-mode). Coverage complete.
Medium findings
- src/lib/testing/storyboard/pricing-currency-filter.ts:133 — Media-price currency filter uses AND-semantics, fails conformant multi-currency sellers
- src/lib/testing/storyboard/default-invariants.ts:78 — New default:true graded invariants lack cited normative basis (DR-0001)
No critical/high findings. Only two medium findings, neither in data-loss/schema/infra categories. high_risk is false, gated_paths is false, no author-team gate, no prior decision. Rows 1–8 do not fire (2 mediums < 3; medium categories are not escalation-triggering), so the outcome falls through to row 9 = approve. Worth a human glance at the AND vs OR currency-filter semantics, but it does not meet the blocking or comment threshold.
Medium findings
- src/lib/testing/storyboard/pricing-currency-filter.ts:133 — Media-price currency filter uses AND-semantics, fails conformant multi-currency sellers
- src/lib/testing/storyboard/default-invariants.ts:78 — New default:true graded invariants lack cited normative basis (DR-0001)
6cd90ee to
f2f0775
Compare
f2f0775 to
ac55625
Compare
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — subsequent pass, prior blockers resolved, 1 medium remaining (no escalation trigger).
This is a follow-up pass on PR #3515 (prior decision: approve). The developer's prior concerns are addressed: the understated-release harm is averted by the companion collect-wholesale-product-pages.md minor changeset shipping alongside the patch changeset (effective @adcp/sdk release is minor, both bodies disclose the behavior-flipping default-on checks), and the DR-0001 normative-basis medium is resolved via cited schema/doc basis in pricing-currency-filter.ts and required-metric-filters.ts. Reviewer verified the large runner.ts collect_product_pages branch and seeding.ts walker — no correctness/witness-fidelity issues.
Medium findings (1):
- src/lib/testing/storyboard/pricing-currency-filter.ts:140 — Media-price currency filter uses strict AND-semantics; may over-grade conformant multi-currency sellers. Non-blocking (external spec could not be verified; left as a note).
Decision-table walk: No critical/high findings (row 1 no). gated_paths is false (row 2 no). high_risk false (rows 3, 5 no). The single medium is category LLM/testing scope, not data-loss/schema/infra (row 4 no). Prior decision was approve, not escalate (row 6 no). No no-auto-approve team match (row 7 no). Only 1 medium finding (row 8 requires ≥3, no). Falls through to row 9 → approve.
Medium findings
- src/lib/testing/storyboard/pricing-currency-filter.ts:140 — Media-price currency filter uses strict AND-semantics; may over-grade conformant multi-currency sellers
The merge-base changed after approval.
Depends on #3514. This PR is based on final parent
688801b9; review the pagination delta after that commit. It targets main so CI runs in parallel. Do not merge before the parent and exact final-head checks/review pass. Merging the parent with a merge commit preserves this reviewed ancestry.Wholesale discovery checks can miss a seeded product when the seller puts it after page one. Add explicit
collect_product_pages: trueon wholesaleget_productssteps, gated by the intrinsiccollect_product_pages_runnerrequirement so older runners skip before fixture mutations.The runner requires fresh unkeyed wholesale reads and reuses strict fixture feed traversal with the other authored query fields. Authored, built, and runtime-injected idempotency keys are rejected before dispatch, rather than being silently rewritten. It follows cursors, restarts changed feeds, rejects duplicates and broken continuation, and fails bounded budgets without publishing a partial successful snapshot. Every physical page receives negotiated-version schema and enabled invariant checks, including discarded restart pages and pages beyond evidence-retention limits.
Authored checks/captures use an explicitly labeled
product_page_collection.logical_response. Products and advisory errors aggregate over the final stable enumeration; abandoned errors reset on restart. Other envelope fields remain representative first-page metadata. Actual page receipts stay separate;request,response, andresponse_recordidentify a real first-stable/failing exchange. Ordinary steps still make one request. Conditional feeds, raw auth/error probes, parallel dispatch, and response-skip gates are rejected for collection; credentialed functional SDK steps remain supported.Validation for final
821d665f: 35 collector tests pass, including a real MCP read-replay control that returns IDEMPOTENCY_CONFLICT for a reused key with a changed cursor, followed by successful unkeyed collection proving the SDK adds no read key. Authored/runtime/direct-API key refusals happen before dispatch; ordinary one-page keyed reads remain unchanged. An independent expert reviewed and approved this boundary. Normal push hooks passed formatting, TypeScript and the full SDK build; ESLint has 0 errors. Prior complete regression coverage was 500 tests, with 145 focused checks repeated against its final build. Existing coverage includes page-two/page-17 advisories, restarts, explicit/negotiated AdCP3.1 schemas, and matched physical request/response receipts. Both review threads remain resolved. Main collector changeset is minor; inherited invariant corrections remain documented bug-fix patches in the parent.GitHub CI remains the merge gate. This PR has not been merged.