Repository navigation
fix(compat): preserve installment collection identity on downgrade on next - #1956
Conversation
Signed-off-by: Aleksander Sekowski <kontakt.sekowski@gmail.com> (cherry picked from commit 5c54e24)
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean forward-port of #1903 (3.2→3.1 installment downgrade).
The PR adds a version-translation downgrade that preserves an installment's parent identity by collapsing canonical collection_ref to the deprecated collection_id shorthand when the product addresses a single publisher namespace, and lets _project drop unrepresentable refs as field_unavailable losses. The reviewer confirmed gating, the single-namespace guard, loss reporting, and the DR-0032/0033 pathway-back obligation are all correct, with 8 tests covering the representable, conflicting, and unrepresentable branches plus an end-to-end MCP path.
Decision trace:
- No critical/high/medium findings (row 1 N/A).
- gated_paths: false (row 2 N/A).
- high_risk: true but only
src/adcp/compat/versions.py (modified), no deletions (row 3 N/A). - No medium findings, so rows 4, 5, 8 N/A.
- No prior decision (row 6 N/A).
- No no-auto-approve team match (row 7 N/A).
- Falls through to row 9 → approve.
The high_risk modified file carries no medium-or-higher finding, so per the high_risk guidance the modification is presumed safe.
Summary
This forward-ports #1903, which is open against
main, tonext, so the #1895 fix also ships in 10.0.The bug. Converting a
get_productsresponse down to AdCP 3.1 dropped an installment'scollection_ref. 3.1 has nocollection_refand the closed schema refuses it, but the parent collection's identity went with it.The fix. When the product's
collectionsall name onepublisher_domain, and the reference names that domain, the downgrade now keepscollection_idon the installment. The step runs at the 3.2 → 3.1 edge, which is also the last hop of a 3.3 → 3.1 conversion onnext.Notes:
5c54e2493withgit cherry-pick -x, keeping its authorship and sign-off. It applied cleanly tonext@30e81501f.tests/test_installment_collection_conversion.pycomes with it: 8 passed locally, run on its own. Its end-to-end case serves an unpinned handler, which is 3.3 onnext, to a 3.1 caller, so it covers the 3.3 → 3.2 → 3.1 chain as well.mainfor 9.x. This PR covers only the 10.x line.Refs #1895
🤖 Generated with Claude Code