refactor!: remove generated ProviderName and stale generated artifacts (ROADMAP A2–A5) - #203
Draft
cunninghamcard-bit wants to merge 10 commits into
Draft
cunninghamcard-bit wants to merge 10 commits into
cunninghamcard-bit wants to merge 10 commits into
Conversation
This was referenced Oct 2, 2026
Contributor
|
这批清理与现有 ROADMAP 的 A2–A5 有重合,可以先明确哪些内容能独立于 #200 推进。
|
Amp-Thread-ID: https://ampcode.com/threads/T-01a0eb91-5e79-775e-975e-b85e2ac49ab6 Co-authored-by: Amp <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-01a0eb91-5e79-775e-975e-b85e2ac49ab6 Co-authored-by: Amp <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-01a0eb91-5e79-775e-975e-b85e2ac49ab6 Co-authored-by: Amp <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-01a0eb91-5e79-775e-975e-b85e2ac49ab6 Co-authored-by: Amp <[email protected]>
Co-authored-by: Amp <[email protected]> Amp-Thread-ID: https://ampcode.com/threads/T-01a0eb91-5e79-775e-975e-b85e2ac49ab6
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ia alias - Wire*.ts were hand-maintained mirrors of wire.rs and had already drifted (WireContentPart lacked provider_executed). Derive TS on the wire structs and export them to web/src/types/generated/ through gen_ts_types.py, which now handles two targets and checks both in CI. - Core types resolve through the @aimux/types tsconfig alias instead of five-level relative paths into bindings/node. - gen_ts_types.py sync no longer rewrites files that differ only by ts-rs end-of-line spaces. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
- Drop the redundant #[must_use] on provider_names(); the returned impl Iterator is already must_use, so clippy::double_must_use failed CI. - Gate the wire types' ts-rs export tests behind a ts-export feature that only gen_ts_types.py enables. A plain cargo test previously wrote Wire*.ts into bindings/node/src/types via the workspace-wide TS_RS_EXPORT_DIR, which made gen_ts_types.py --check fail on stale files. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…e removal - scripts/gen_providers_doc.py: the `provider_name` module no longer exists; the docstrings and the section-header guard now name only `provider`. `--check` output is unchanged. - docs/internal/phase4-audit.md: add a follow-up note (same style as RFC-0020) so the historical audit no longer reads as if the generated ProviderName types and their drift tests still exist. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01WGwanvo9WLU9HWD7sRR8TS
The A2 line said Node would keep a generated string-literal union for completion. It does not: overlay-registered provider names can never be part of a compile-time union, so keeping one would keep the second name path this PR removes. Record the actual A2 scope. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01WGwanvo9WLU9HWD7sRR8TS
cunninghamcard-bit
force-pushed
the
docs/rfc-0036-aisdk-alignment
branch
from
October 3, 2026 16:36
d8c3d15 to
78a2876
Compare
cunninghamcard-bit
force-pushed
the
chore/deletion-batch
branch
from
October 3, 2026 16:36
3521d5d to
793feeb
Compare
cunninghamcard-bit
changed the base branch from
docs/rfc-0036-aisdk-alignment
to
master
October 3, 2026 16:37
2 tasks done
Contributor
Author
|
已按建议解耦:base 改为 Node string-literal union:是有意去掉。ROADMAP 那句是写错的——overlay 注册的 provider 名字进不了编译期联合类型,保留 union 只能覆盖内置子集,等于保留了本 PR 要删掉的第二条路径。末尾加了一个提交把 ROADMAP A2 那行改成实际范围。 这批只做既定的 A2–A5 清理,不依赖 #200;合入不代表接受那套架构。 Generated by Claude Code |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ROADMAP A2–A5 mechanical cleanup, now based on
masterand independent of #200: cleanup of generated and superseded artifacts (~171k lines deleted, ~3.6k of them real code/doc changes), plus removal of the generatedProviderNametype. Supersedes #202 (same commits, rebased).Removed
docs/quality-audit/round4generated artifacts (lcov/logs);.gitignorenow keeps raw output out, conclusions stay in Markdown.provider-inventory/providers.json+ raw records (superseded; doc links now point at the fixed historical commit892a351).ProviderNamein every binding (Rust enum, TS const, Go/Java/Kotlin consts, Swift enum, Dart consts, PythonLiteral) andscripts/gen_provider_names.py. Provider names are plain strings:provider("groq", ...). Built-in and overlay-registered names share one string path. Rust keepsprovider_names()(the web console'sGET /api/providersneeds a runtime list). Recorded in CHANGELOG[Unreleased].provider_namereferences left behind inscripts/gen_providers_doc.pyanddocs/internal/phase4-audit.md.Changed (aimux-web frontend types)
web/src/types/are gone; core types resolve through an@aimux/types/*tsconfig alias (type-only, erased at build).Wire*.tswere hand-maintained mirrors ofwire.rsand had already drifted (WireContentPartlackedprovider_executed). They are now generated by ts-rs intoweb/src/types/generated/.scripts/gen_ts_types.pyhandles two targets (aimux-core →bindings/node/src/types, aimux-web →web/src/types/generated);--checkcovers both. The wire export tests sit behind ats-exportfeature so a plaincargo testnever writes into the node bindings.syncno longer rewrites files that differ only by ts-rs end-of-line spaces.Node string-literal union (review question)
Intentional. ROADMAP's A2 line said Node would keep a generated string-literal union for completion; that sentence was wrong and the last commit corrects it. Overlay-registered provider names can never be part of a compile-time union, so a union would only ever describe the built-in subset and would keep the second name path this PR removes. Node takes plain
stringlike every other binding.Review notes
aimux-providers/src/{lib,provider}.rs,scripts/gen_ts_types.py,tools/aimux-web/src/wire.rs,tools/aimux-web/web/{tsconfig.json,src/**}andbindings/node/{package.json,src/index.ts}.#[must_use]trippingclippy::double_must_use; plaincargo testexporting wire types into the node bindings); both fixed.Test plan
master(72a37b5) without conflicts; CI now runs on this PR.cargo clippy -p aimux-providers -p aimux-web --all-targets -- -D warningscargo test -p aimux-providerspython3 scripts/gen_ts_types.py --check,python3 scripts/gen_providers_doc.py --check🤖 Generated with Claude Code
https://claude.ai/code/session_01WGwanvo9WLU9HWD7sRR8TS