Tags: axisrow/direct-cli
Tags
refactor: reuse _route_cpa_flag in update CPA routing (#491 C11/4a) (#… …546) The TextCampaign and UnifiedCampaign update paths each inlined a 19-line CPA-flag routing closure (`_route_update` / `_u_route_update`) whose body was byte-identical — including the `if value is None: return (None, None)` guard — to the module-level `_route_cpa_flag` helper that the add path already delegates to via thin wrapper closures (`_route` / `_u_route`). Replace both inline closures with the same thin-wrapper pattern, binding each block's captured Search/Network routing subtypes and delegating to `_route_cpa_flag`. The closure names and every call site are unchanged; only the def bodies move to the shared helper. Payload-neutral: the wrapper passes the same captured subtype variables, so `(search_value, network_value)` is identical for every input. Verified byte-identical dry-run payloads (TEXT + UNIFIED), green parity-gate + dry-run snapshots, full pytest 2177 passed, ruff clean. Net -8 lines. Scope note (#544): Finding 2 (per-side fallback blocks) is NOT consolidated — add uses unconditional defaults while update uses `... if value is not None else None` ("don't touch the field"), which is payload-bearing, not duplication. Finding 4b (builder-call kwargs) is NOT consolidated — the 3 differing kwargs (budget_type/include_default/is_update) are payload-bearing and a dispatch table would hide exactly the copy-paste differences the parity-gate guards. Only 4a is genuine, safe duplication. Closes #544 Co-authored-by: axisrow <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
chore(audit): re-run wire-shape scanner + triage 2026-05-30 (#460) (#465 ) Re-ran scripts/audit_wire_shape.py --all after the captcha gate cleared. Findings dropped 174 → 121; captcha-blocked endpoints 33 → 6. - audit_wire_shape.py: recognise a WSDL `docs` base (#463) and record it as v5_wsdl_group_ok instead of deriving malformed `…?wsdl/get` URLs or flagging the 14-21 KB XML as thin/unreachable. Regression test added. - Refresh docs/audits/wire_shape.json + PROJECT_WIRE_SHAPE_AUDIT_2026-05-30.md (replaces the 2026-05-29 snapshot). - Add WIRE_SHAPE_TRIAGE_2026-05-30.md classifying every non-OK finding. Triage result: no real code↔docs drift. All non-OK findings are parser heuristic false-positives (code_field_missing/docs_field_missing/ required_field_missing — fields like Action/CampaignIDS/Currency are real in both CLI and contracts), cosmetic (live4_marker_absent), known group-level pages (agencyclients ×2), a documented 404 (CheckPayment — no public docs), or transient captcha on 5 v4 methods that were verified live via browser at dg-v4/ru/reference/<Method>.html and match their contracts. Closes #460 Co-authored-by: axisrow <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
PreviousNext