Skip to content

Simplify AppBuilder tool initialisation (#47)#202

Draft
leynos wants to merge 1 commit into
mainfrom
issue-47-complex-method-refactor-appbuilder-init-tools-in-src-app-rs
Draft

Simplify AppBuilder tool initialisation (#47)#202
leynos wants to merge 1 commit into
mainfrom
issue-47-complex-method-refactor-appbuilder-init-tools-in-src-app-rs

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented May 25, 2026

Summary

This branch simplifies AppBuilder::init_tools for issue #47 by moving media tool credential and model resolution into a private helper, replacing duplicate image and vision registration wiring with the shared bootstrap helper, and naming the builder-tool registration predicate.

Closes #47.

Review walkthrough

  • Start with src/app.rs to review the extracted resolve_media_tools_config and should_register_builder_tool helpers.
  • Then review the updated AppBuilder::init_tools body in src/app.rs to confirm the media and builder registration flow remains behaviour-preserving.

Validation

  • coderabbit review --agent: passed with 0 findings.
  • make all: passed format checks, clippy, GitHub WASM tool build, 4,146 nextest tests, and 5 GitHub tool tests.

Notes

No public APIs changed. The branch deliberately keeps the refactor inside the application composition root and reuses the existing MediaToolsArgs and register_image_and_vision_tools bootstrap API.

Extract media tool configuration resolution and builder tool gating from
`AppBuilder::init_tools` so the startup phase keeps shallow control flow.
Reuse the shared bootstrap image and vision registration helper to avoid
maintaining duplicate registration wiring in the composition root.
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @leynos, you have reached your weekly rate limit of 2500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c8f23c81-805e-42ad-bc77-11e9e88664c1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-47-complex-method-refactor-appbuilder-init-tools-in-src-app-rs

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size: M 50-199 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: low Changes to docs, tests, or low-risk modules size: M 50-199 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complex Method: refactor AppBuilder::init_tools in src/app.rs

1 participant