Skip to content

Document level_classify Other allocation (DSK-138)#179

Merged
daisuke8000 merged 1 commit into
mainfrom
fix/dsk-138-level-classify-other-alloc
Jul 5, 2026
Merged

Document level_classify Other allocation (DSK-138)#179
daisuke8000 merged 1 commit into
mainfrom
fix/dsk-138-level-classify-other-alloc

Conversation

@daisuke8000

@daisuke8000 daisuke8000 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Document that non-standard JSON level tokens allocate LogLevel::Other(String) so --exit-watch-level can match arbitrary values downstream.
  • Add a test covering an unknown level token (notice).

Test plan

  • cargo test -p rustern-core --lib pipeline::level_classify

Made with Cursor

Summary by CodeRabbit

  • Documentation
    • level の解釈ルールを明記し、標準外の値はそのまま保持されることを説明しました。
  • Tests
    • 未定義の level 値でも元の文字列が保持されることを確認するテストを追加しました。

Record why unknown level tokens keep an owned string for exit-watch
matching; add regression test for non-standard level values.

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: e0df3a43-8907-4ee9-bb24-21e177d6094e

📥 Commits

Reviewing files that changed from the base of the PR and between 9d4903c and 8615fc4.

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

📝 Walkthrough

Walkthrough

level_classify.rs に、JSON の level フィールドを LogLevel にマッピングする挙動を説明するドキュメントコメントが追加されました。非標準トークンは LogLevel::Other に分類され、元の文字列を所有することが明記されています。あわせて preserves_unknown_level_token テストが追加され、"notice" のような未定義トークンが LogLevel::Other として元の文字列を保持したまま分類されることを検証します。公開APIの変更はありません。

Changes

分類 内容
ドキュメント levelLogLevel マッピング仕様のコメント追加(重大度: 低)
テスト 未知トークン保持を検証するテストケース追加(重大度: 低)

正しさ・非同期・K8s・セキュリティ観点: 本変更はドキュメントとテストのみで、ロジック変更なし。既存の LogLevel::Other フォールバック挙動を明文化・固定化するだけであり、非同期処理やセキュリティへの影響はない。重大度: 低。

Sequence Diagram(s)

省略(ドキュメント/テストのみの変更のため、観測可能なフロー変化なし)。

Possibly related issues

  • DSK-138: level_classify の LogLevel::Other(String) による未知トークン保持挙動を扱っており、本PRのドキュメント化・テスト追加と直接関連する。
🚥 Pre-merge checks | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning Conventional Commits の prefix(feat:/fix:/chore:/docs:/test:/refactor:)がなく、要件を満たしていません。 先頭に適切な Conventional Commits prefix を付け、変更内容を具体化した 72 文字以内のタイトルにしてください。
Description check ⚠️ Warning テンプレート必須の「概要」「変更理由」見出しがなく、別見出し(Summary/Test plan)になっています。 「## 概要」「## 変更理由」を追加し、各セクションに変更内容と理由を簡潔に記載してください。

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

@daisuke8000
daisuke8000 merged commit 67623f8 into main Jul 5, 2026
3 checks passed
@daisuke8000
daisuke8000 deleted the fix/dsk-138-level-classify-other-alloc branch July 5, 2026 15:25
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