refactor: derive Dummy for ForgeConfig and remove dead code#2732
Merged
tusharmath merged 1 commit intomainfrom Mar 29, 2026
Merged
refactor: derive Dummy for ForgeConfig and remove dead code#2732tusharmath merged 1 commit intomainfrom
tusharmath merged 1 commit intomainfrom
Conversation
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
Replace the manual
Dummyimplementation forForgeConfigwith a#[derive(Dummy)]macro and remove dead code across domain and provider layers.Context
ForgeConfighad a large hand-rolledimpl Dummy<fake::Faker>block (~50 lines) that manually delegated every field tofake::Faker. This was fragile — any new field added toForgeConfigrequired a matching update in the manual impl. Thefakecrate's derive macro handles this automatically, reducing maintenance burden and keeping the impl in sync with the struct definition by construction.The PR also takes the opportunity to clean up dead code that had accumulated across the domain (
phasefield removal, unused stream extensions) and provider response handling layers.Changes
impl Dummy<fake::Faker> for ForgeConfigwith#[derive(Dummy)]; onlyservices_urlneeds a#[dummy(expr = "...")]attribute since it must be a valid URLphasefield fromTextMessageand updated all call sites in testsforge_domain: unused items inmessage.rsandresult_stream_ext.rsbedrock.rs,openai_responses/request.rs,openai_responses/response.rs, andopenai_responses/repository.rsskill.rsto useTemplateEnginewith proper error propagation instead of raw string replacementprovider.json: removed stale model entries, fixed a model ID (anthropic.claude-opus-4-6-v1→anthropic.claude-opus-4-6-v1:0), and renamed the minimax URL param fromHOSTNAMEtoMINIMAX_DOMAINasync-openaifrom0.34.0to0.33.1to drop an unneeded dependencyTesting
cargo insta test --accept