Skip to content

🧹 remove duplicate _apply_prefix and _determine_ruri_prefix functions - #87

Merged
chottokun merged 1 commit into
mainfrom
refactor/remove-duplicate-apply-prefix-320161055953050528
Sep 12, 2026
Merged

chottokun merged 1 commit into
mainfrom
refactor/remove-duplicate-apply-prefix-320161055953050528

Conversation

@chottokun

Copy link
Copy Markdown
Owner

🎯 What: Removed duplicate implementations of _apply_prefix and _determine_ruri_prefix in src/app/main.py by re-exporting them from src/app/services/embedding.py.

💡 Why: Having duplicate helper function implementations in main.py and services/embedding.py increased maintenance overhead and potential risk of logic divergence. Re-exporting from the canonical implementation in services/embedding.py maintains backwards compatibility for unit tests while eliminating duplicate code.

✅ Verification:

  • Ran uv run ruff check src/ and uv run ruff format --check src/ to confirm code style and lint compliance.
  • Executed the full test suite with uv run pytest, verifying that all 149 unit and integration tests passed.

✨ Result: Reduced code duplication in src/app/main.py and consolidated prefix handling logic into src/app/services/embedding.py.


PR created automatically by Jules for task 320161055953050528 started by @chottokun

Import _apply_prefix and _determine_ruri_prefix in app.main from
app.services.embedding instead of defining redundant duplicates.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@chottokun

Copy link
Copy Markdown
Owner Author

本PRのリファクタリング内容(プレフィックス重複排除)は、モデル共通化リファクタリングを統合した PR #88 にて包括的にブラッシュアップを進めています。PR #88 のマージ完了後に本PRをクローズ予定です。

@google-labs-jules

Copy link
Copy Markdown
Contributor

本PRのリファクタリング内容(プレフィックス重複排除)は、モデル共通化リファクタリングを統合した PR #88 にて包括的にブラッシュアップを進めています。PR #88 のマージ完了後に本PRをクローズ予定です。

ご共有いただきありがとうございます。PR #88 でのモデル共通化リファクタリングへの統合および本PRのクローズ予定について承知いたしました。

@chottokun
chottokun merged commit 975407d into main Sep 12, 2026
1 check passed
@chottokun
chottokun deleted the refactor/remove-duplicate-apply-prefix-320161055953050528 branch September 12, 2026 07:39
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