refactor!: remove generated ProviderName and stale generated artifacts - #202
Closed
cunninghamcard-bit wants to merge 9 commits into
Closed
cunninghamcard-bit wants to merge 9 commits into
cunninghamcard-bit wants to merge 9 commits into
Conversation
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
Contributor
Author
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
Cleanup of generated and superseded artifacts (~171k lines deleted, ~3.6k of them real code/doc changes), plus removal of the generated
ProviderNametype. Breaking changes are intentional (RFC-0036 §8.1 deletion list).Removed
docs/quality-audit/round4generated artifacts (lcov/logs);.gitignorenow keeps raw output out, conclusions stay in Markdown.provider-inventory/providers.json+ raw records (superseded; RFC/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].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.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 in the last commit.Test plan
cargo clippy -p aimux-providers -p aimux-web --all-targets -- -D warnings(also with--features ts-export)cargo test -p aimux-web --bins(22 pass; noWire*.tswritten)python3 scripts/gen_ts_types.py --check(144 + 8 files up to date),python3 scripts/gen_providers_doc.py --checkvue-tsc --noEmit,vite build🤖 Generated with Claude Code