Title: codemod: auto-apply mode for mechanically-rewritable findings · Issue #512 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: codemod: auto-apply mode for mechanically-rewritable findings · Issue #512 · adcontextprotocol/adcp-client-python
X Title: codemod: auto-apply mode for mechanically-rewritable findings · Issue #512 · adcontextprotocol/adcp-client-python
Description: 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):...
Open Graph Description: 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.m...
X Description: 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.m...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/512
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"codemod: auto-apply mode for mechanically-rewritable findings","articleBody":"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.\n\nAdopter quote (`SDK_FEEDBACK.md`, items #6, #7, and the aggregate ask):\n\n> Of the 141 findings:\n> - 83 `flag_private` with public-surface aliases → auto-rewritable\n> - 27 `flag_numbered` Assets with documented semantic aliases → auto-rewritable\n> - 31 `flag_removed` (Pricing, BrandManifest, etc.) → genuinely needs human review\n>\n> A `--auto-apply` mode that rewrites the safe 78% and flags the rest would have shaved most of an afternoon off this migration.\n\n## Proposal\n\nExtend `python -m adcp.migrate v3-to-v4 --apply` (or add a new `--auto-apply`) that:\n\n- [ ] Auto-rewrites `flag_private` findings whose target symbol is verifiable via `hasattr(adcp.types, Symbol)`. Flag the rest.\n- [ ] Auto-applies the numbered-Assets renaming table (`Assets5 → VideoFormatAsset`, etc.) — the codemod already knows the mapping.\n- [ ] Leaves `flag_removed` cases as flag-only (genuine semantic decisions).\n\nAdopter wrote a 30-line helper that does roughly this for `flag_private`. The verifier logic belongs in the codemod itself.\n\n## Acceptance\n\n- 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.\n- The unsafe `flag_removed` cases remain flagged with the same diagnostic shape as today.","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-04T01:01:57Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/512"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:86f3d4f3-6190-625c-4f68-0284005ed597 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8192:21BD98:BE9D7:EF5BB:6B00F68B |
| html-safe-nonce | df3994c019c2a875091fc822b5dc19e76c3c47916fd0511229e6ef01cb131918 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTkyOjIxQkQ5ODpCRTlENzpFRjVCQjo2QjAwRjY4QiIsInZpc2l0b3JfaWQiOiI0NTAzOTI2MTI4Mjg0NTk1ODUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b94fa1e6b8bc7e77960b2cfe33a9680b95b14be2ed0d71d9408c2284b4787c81 |
| hovercard-subject-tag | issue:4373475755 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/512/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5208ff5b0421c9bcf6d7dfe4358cb4030d07635b4d22216284f9fb59c90609c7/adcontextprotocol/adcp-client-python/issues/512 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5208ff5b0421c9bcf6d7dfe4358cb4030d07635b4d22216284f9fb59c90609c7/adcontextprotocol/adcp-client-python/issues/512 |
| og:image:alt | 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.m... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bokelley |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git |
| octolytics-dimension-user_id | 221690821 |
| octolytics-dimension-user_login | adcontextprotocol |
| octolytics-dimension-repository_id | 1090305973 |
| octolytics-dimension-repository_nwo | adcontextprotocol/adcp-client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1090305973 |
| octolytics-dimension-repository_network_root_nwo | adcontextprotocol/adcp-client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width