Skip to content

Avoid clone in PipelineSpecBuilder::build (DSK-134)#175

Merged
daisuke8000 merged 1 commit into
mainfrom
fix/dsk-134-pipeline-spec-build
Jul 5, 2026
Merged

Avoid clone in PipelineSpecBuilder::build (DSK-134)#175
daisuke8000 merged 1 commit into
mainfrom
fix/dsk-134-pipeline-spec-build

Conversation

@daisuke8000

@daisuke8000 daisuke8000 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove unnecessary jq/level_key clones in PipelineSpecBuilder::build by computing the bool first, then moving fields.

Test plan

  • cargo test -p rustern-core --lib runtime::spec
  • Local CodeRabbit review (0 findings)

Made with Cursor

Summary by CodeRabbit

  • Refactor
    • パイプライン構成時の内部処理を最適化し、不要なコピーを減らしました。
    • 生成時の判定処理を整理し、より効率的に組み立てられるようになりました。

Compute needs_json_annotation from borrows, then move jq and level_key into PipelineStages.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: eb4f463e-322b-48d8-be65-6348253bd295

📥 Commits

Reviewing files that changed from the base of the PR and between bf50007 and bd776b6.

📒 Files selected for processing (1)
  • crates/rustern-core/src/runtime/spec.rs

📝 Walkthrough

Walkthrough

PipelineSpecBuilder::build を変更し、PipelineStages 構築時の jqlevel_key の代入方法を clone からフィールドのムーブに変更した。needs_json_annotation は構築前にローカル変数として &self.jq&self.level_key の借用を用いて計算し、その結果を PipelineStages に渡すよう変更した。公開APIのシグネチャ変更はなし。

Changes

種別 内容
リファクタリング PipelineStages 構築時の jq/level_key を clone からムーブへ変更、needs_json_annotation の算出タイミング・参照方法を変更

重大度: 低。挙動に影響のない所有権最適化であり、正しさ・非同期処理・K8s・セキュリティへの影響はなし。

Sequence Diagram(s)

該当なし(単純なフィールド代入の最適化のため、フローに教えるべき動きなし)。

Possibly related issues

  • DSK-134: PipelineSpecBuilder::build における jq/level_key の不要な clone を削除し、借用で needs_json_annotation を計算後にムーブする点が本PRの変更内容と直接一致。
🚥 Pre-merge checks | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning Conventional Commits の接頭辞がなく、要件の形式に合っていません。 feat:/fix:/refactor: などの Conventional Commits 接頭辞を付け、72文字以内で具体的にしてください。
Description check ⚠️ Warning 概要はありますが、必須の「変更理由」セクションがなく、テンプレートの見出しも一致していません。 「## 概要」「## 変更理由」を明記し、変更理由を具体化してテンプレートに合わせてください。

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

@daisuke8000

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@daisuke8000

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@daisuke8000

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@daisuke8000
daisuke8000 merged commit 2234a48 into main Jul 5, 2026
3 checks passed
@daisuke8000
daisuke8000 deleted the fix/dsk-134-pipeline-spec-build branch July 5, 2026 09:52
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