From the salesagent v3.12 → 4.x migration. Of 141 codemod findings, ~78% are mechanically rewritable; today the codemod refuses to rewrite any of them in --apply mode.
Adopter quote (SDK_FEEDBACK.md, items #6, #7, and the aggregate ask):
Of the 141 findings:
- 83
flag_private with public-surface aliases → auto-rewritable
- 27
flag_numbered Assets with documented semantic aliases → auto-rewritable
- 31
flag_removed (Pricing, BrandManifest, etc.) → genuinely needs human review
A --auto-apply mode that rewrites the safe 78% and flags the rest would have shaved most of an afternoon off this migration.
Proposal
Extend python -m adcp.migrate v3-to-v4 --apply (or add a new --auto-apply) that:
Adopter wrote a 30-line helper that does roughly this for flag_private. The verifier logic belongs in the codemod itself.
Acceptance
- The reference adopter (salesagent) can run
--auto-apply against a clean v3 checkout and have its flag_private+flag_numbered cases rewritten without manual intervention.
- The unsafe
flag_removed cases remain flagged with the same diagnostic shape as today.
From the salesagent v3.12 → 4.x migration. Of 141 codemod findings, ~78% are mechanically rewritable; today the codemod refuses to rewrite any of them in
--applymode.Adopter quote (
SDK_FEEDBACK.md, items #6, #7, and the aggregate ask):Proposal
Extend
python -m adcp.migrate v3-to-v4 --apply(or add a new--auto-apply) that:flag_privatefindings whose target symbol is verifiable viahasattr(adcp.types, Symbol). Flag the rest.Assets5 → VideoFormatAsset, etc.) — the codemod already knows the mapping.flag_removedcases as flag-only (genuine semantic decisions).Adopter wrote a 30-line helper that does roughly this for
flag_private. The verifier logic belongs in the codemod itself.Acceptance
--auto-applyagainst a clean v3 checkout and have itsflag_private+flag_numberedcases rewritten without manual intervention.flag_removedcases remain flagged with the same diagnostic shape as today.