Skip to content

refactor!: remove generated ProviderName and stale generated artifacts - #202

Closed
cunninghamcard-bit wants to merge 9 commits into
arcships:masterfrom
cunninghamcard-bit:chore/deletion-batch
Closed

cunninghamcard-bit wants to merge 9 commits into
arcships:masterfrom
cunninghamcard-bit:chore/deletion-batch

Conversation

@cunninghamcard-bit

Copy link
Copy Markdown
Contributor

Summary

Cleanup of generated and superseded artifacts (~171k lines deleted, ~3.6k of them real code/doc changes), plus removal of the generated ProviderName type. Breaking changes are intentional (RFC-0036 §8.1 deletion list).

Removed

  • docs/quality-audit/round4 generated artifacts (lcov/logs); .gitignore now keeps raw output out, conclusions stay in Markdown.
  • provider-inventory/providers.json + raw records (superseded; RFC/doc links now point at the fixed historical commit 892a351).
  • Flutter example linux/macos/windows runners (unused).
  • Breaking: generated ProviderName in every binding (Rust enum, TS const, Go/Java/Kotlin consts, Swift enum, Dart consts, Python Literal) and scripts/gen_provider_names.py. Provider names are plain strings: provider("groq", ...). Built-in and overlay-registered names share one string path. Rust keeps provider_names() (the web console's GET /api/providers needs a runtime list). Recorded in CHANGELOG [Unreleased].

Changed (aimux-web frontend types)

  • The 139 ts-rs copies under web/src/types/ are gone; core types resolve through an @aimux/types/* tsconfig alias (type-only, erased at build).
  • Wire*.ts were hand-maintained mirrors of wire.rs and had already drifted (WireContentPart lacked provider_executed). They are now generated by ts-rs into web/src/types/generated/.
  • scripts/gen_ts_types.py handles two targets (aimux-core → bindings/node/src/types, aimux-web → web/src/types/generated); --check covers both. The wire export tests sit behind a ts-export feature so a plain cargo test never writes into the node bindings. sync no longer rewrites files that differ only by ts-rs end-of-line spaces.

Review notes

  • Most of the diff is deletions; real logic is in aimux-providers/src/{lib,provider}.rs, scripts/gen_ts_types.py, tools/aimux-web/src/wire.rs, tools/aimux-web/web/{tsconfig.json,src/**} and bindings/node/{package.json,src/index.ts}.
  • Independent Codex review found two issues (redundant #[must_use] tripping clippy::double_must_use; plain cargo test exporting 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; no Wire*.ts written)
  • python3 scripts/gen_ts_types.py --check (144 + 8 files up to date), python3 scripts/gen_providers_doc.py --check
  • vue-tsc --noEmit, vite build
  • CI: full workspace tests, Go/Java/Kotlin/Swift/Flutter/Python binding jobs (not run locally)

🤖 Generated with Claude Code

chenhaonan and others added 9 commits September 29, 2026 14:07
…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
@cunninghamcard-bit

Copy link
Copy Markdown
Contributor Author

Superseded by #203, rebased onto #200 for stacking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant