feat(cli-push-runner): LINT_SCREEN_ENABLED env var override (順位 115)#147
Merged
Conversation
…hase D D-1 workflow gap 解消) Phase D D-1 (PR #145) 着手時に発見した workflow gap (jj auto-snapshot vs session-only opt-in) を 解消する env var override 経路を cli-push-runner に追加する。post-merge-feedback Tier 1 #1 で再 validate された Tier 1 priority。D-3 (順位 102) 着手前の critical path。 順位 115 (PR #145 post-merge-feedback Tier 1 #1): 実装 (config.rs): - ENV_LINT_SCREEN_ENABLED const = "LINT_SCREEN_ENABLED" - parse_lint_screen_env() pure function: env raw value → LintScreenEnvOverride enum * true / 1 / yes / on (case-insensitive、空白 trim) → ForceEnable * false / 0 / no / off / "" / unset → RespectToml (no-op) * その他 → InvalidValue (warning emit + 安全側で TOML 値尊重) - apply_lint_screen_env_override() side-effect: env をTOML override に適用 * ForceEnable + [lint_screen] section absent → default LintScreenConfig 生成 (enabled=true) * ForceEnable + section present → enabled = true で上書き * RespectToml → no-op (片方向設計、誤って commit しても remote PR は default OFF) - load_config() で TOML parse 後・validate 前に apply_lint_screen_env_override 呼出 unit test 10 件追加: - parse_lint_screen_env_unset_yields_respect_toml - parse_lint_screen_env_force_enable_variants (8 variants) - parse_lint_screen_env_respect_toml_variants (8 variants) - parse_lint_screen_env_invalid_value (5 variants) - apply_env_override_force_enable_on_absent_section_creates_lint_screen_config - apply_env_override_force_enable_overwrites_toml_false - apply_env_override_respect_toml_keeps_toml_enabled_true - apply_env_override_respect_toml_keeps_toml_enabled_false - apply_env_override_unset_keeps_toml_section_absent - apply_env_override_invalid_value_respects_toml docs: - Phase D guide §1 Setup を env var ベースに rewrite (旧 'config 編集' 記述を削除) * PowerShell example: $env:LINT_SCREEN_ENABLED = "true" / Remove-Item env:LINT_SCREEN_ENABLED * 片方向設計の意義 + ADR-039 試験運用標準パターンとの整合 - analysis.md Phase D section を順位 115 land 反映に更新 (D-3 unblock、D-1/D-2 副産物 list 整理) - todo8.md / todo-summary.md から順位 115 entry 削除 cargo test pass: cli-push-runner 67 tests (新規 10 + 既存 57、ZERO regression)。 Phase D 進行: D-1 ✅ / D-2 ✅ / 順位 115 ✅ / D-3 ⏳ (env var workflow で初の実 dogfood)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughこのPRは、 ChangesLINT_SCREEN_ENABLED環境変数オーバーライド機能と関連ドキュメント
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
aloekun
added a commit
that referenced
this pull request
May 12, 2026
…hase D D-3) PR #140 post-merge-feedback Tier 1 #2 採用。lint runner に glob ベースの paths filter を追加し、path-sensitive な lint rule を explicit filter で表現可能にする。 実装 (src/hooks-post-tool-linter/src/main.rs + Cargo.toml): - globset = 0.4 を依存追加 (BurntSushi 製、ripgrep の依存と同じ) - CustomRule::paths: Option<Vec<String>> field 追加 (optional、既存 rule に影響なし) - CompiledRule に paths_glob: Option<GlobSet> を cache (lint 実行時の repeated compile を回避) - compile_paths_glob() helper: None / Some(empty) → None (filter なし)、glob valid → Some(GlobSet)、invalid → Err (rule drop) - rule_matches_path() helper: paths_glob None なら全 path 受容、Some なら GlobSet match で判定 - Windows-style backslash path も に normalize して match - run_custom_rules で extensions × paths を AND 結合 (両方マッチで rule 対象) - 関数長 50 行制限維持のため build_violation_json / collect_violations_for_rule に切り出し - CustomRule doc comment の planned: paths → supported: paths に更新 unit test 7 件追加: - paths_filter_none_accepts_any_path - paths_filter_empty_vec_accepts_any_path - paths_filter_recursive_glob_matches_docs_only - paths_filter_normalizes_windows_separators - paths_filter_multiple_globs_or_semantics - paths_filter_invalid_glob_drops_rule - run_custom_rules_extensions_and_paths_are_anded (AND 結合 E2E) 意図的保留 (順位 118 として todo 化): - rule⑧ への paths = ["docs/**/*.md"] migration は当初計画していたが、D-2 (順位 101) で追加した root-level MD (CLAUDE.md / README.md) からの ../docs/ fire 挙動が scope narrow で壊れるため保留。trade-off 検討は別 PR に分離。 cargo test pass: hooks-post-tool-linter 102 tests (新規 7 + 既存 95、ZERO regression)。 Phase D D-3: 順位 115 (PR #147) land 後の **初の real lint_screen dogfood**。 LINT_SCREEN_ENABLED=true 経路で push pipeline 経由 lint_screen を実行し、metrics (screen_decision / findings / fallback_reason / Diagnostic section / latency) を観測。
Merged
7 tasks
aloekun
added a commit
that referenced
this pull request
May 12, 2026
…hase D D-3) (#148) PR #140 post-merge-feedback Tier 1 #2 採用。lint runner に glob ベースの paths filter を追加し、path-sensitive な lint rule を explicit filter で表現可能にする。 実装 (src/hooks-post-tool-linter/src/main.rs + Cargo.toml): - globset = 0.4 を依存追加 (BurntSushi 製、ripgrep の依存と同じ) - CustomRule::paths: Option<Vec<String>> field 追加 (optional、既存 rule に影響なし) - CompiledRule に paths_glob: Option<GlobSet> を cache (lint 実行時の repeated compile を回避) - compile_paths_glob() helper: None / Some(empty) → None (filter なし)、glob valid → Some(GlobSet)、invalid → Err (rule drop) - rule_matches_path() helper: paths_glob None なら全 path 受容、Some なら GlobSet match で判定 - Windows-style backslash path も に normalize して match - run_custom_rules で extensions × paths を AND 結合 (両方マッチで rule 対象) - 関数長 50 行制限維持のため build_violation_json / collect_violations_for_rule に切り出し - CustomRule doc comment の planned: paths → supported: paths に更新 unit test 7 件追加: - paths_filter_none_accepts_any_path - paths_filter_empty_vec_accepts_any_path - paths_filter_recursive_glob_matches_docs_only - paths_filter_normalizes_windows_separators - paths_filter_multiple_globs_or_semantics - paths_filter_invalid_glob_drops_rule - run_custom_rules_extensions_and_paths_are_anded (AND 結合 E2E) 意図的保留 (順位 118 として todo 化): - rule⑧ への paths = ["docs/**/*.md"] migration は当初計画していたが、D-2 (順位 101) で追加した root-level MD (CLAUDE.md / README.md) からの ../docs/ fire 挙動が scope narrow で壊れるため保留。trade-off 検討は別 PR に分離。 cargo test pass: hooks-post-tool-linter 102 tests (新規 7 + 既存 95、ZERO regression)。 Phase D D-3: 順位 115 (PR #147) land 後の **初の real lint_screen dogfood**。 LINT_SCREEN_ENABLED=true 経路で push pipeline 経由 lint_screen を実行し、metrics (screen_decision / findings / fallback_reason / Diagnostic section / latency) を観測。
4 tasks
aloekun
added a commit
that referenced
this pull request
May 12, 2026
…D 完遂状況反映 (#149) PR #148 (D-3 = paths filter + 初 real lint_screen dogfood) merge 後の post-merge-feedback で 採用された Tier 2-1 を todo 系列に登録 + analysis.md の Phase D section を完遂状況に更新。 順位 119 (PR #148 T2-#1 採用、Tier 2 / Effort S): - MAX_CUSTOM_VIOLATIONS outer/inner loop break scope を explicit test で seal - PR #148 で発見した bug fix (inner break が outer に伝播しない問題) を test net で保護 - takt reviewer が 'Behavioral change: improvement' と評価した動作を regression 防止 analysis.md Phase D section 更新: - 見出し: '🔄 進行中' → '✅ 計画完遂 2026-05-12' - PR 構成 table: 順位 115 (PR #147) / D-3 (PR #148) を land 済に更新 - D-3 dogfood outcome table (7 metrics) を新規追加 = screen_decision auto_fix / findings 1 (false positive) / fallback_reason なし / Diagnostic 不在 / latency 推定 80-120s / kill-switch 0% (基準内) - D-3 観測の意義 5 項目 (env override 実証 / num_ctx 32768 容量実証 / advisory consumption 成立 / Phase b' agreement 整合 / 順位 118/119 副産物) - Phase E 判定材料 (✅ 4 /⚠️ 1 / ⏳ 1) と着手前提 (3-5 PR 累積、D-3 で 1/N 取得済) を追記 Phase E (採否判定 + retirement) は別セッションで実施予定 (本 PR は計画完遂 land のみ)。
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
Phase D D-1 (PR #145) で systemic に発見した workflow gap (jj auto-snapshot vs session-only opt-in) を解消する
LINT_SCREEN_ENABLEDenv var override をcli-push-runnerに追加する。D-3 (順位 102、pathsfilter 実装) 着手前 critical path。post-merge-feedback Tier 1 #1 で再 validate された Tier 1 priority。実装 (
src/cli-push-runner/src/config.rs)ENV_LINT_SCREEN_ENABLEDconst ="LINT_SCREEN_ENABLED"parse_lint_screen_env()pure function: env raw value →LintScreenEnvOverrideenumtrue/1/yes/on(case-insensitive、空白 trim) →ForceEnablefalse/0/no/off/""/ unset →RespectToml(no-op)InvalidValue(warning emit + 安全側で TOML 値尊重)apply_lint_screen_env_override()side-effect: env を TOML override に適用ForceEnable+[lint_screen]section absent → defaultLintScreenConfigを生成 (enabled=true)ForceEnable+ section present → enabled = true で上書きRespectToml→ no-op (片方向設計、誤って commit しても remote PR は default OFF)load_config()で TOML parse 後・validate 前にapply_lint_screen_env_override呼出設計の本質: 片方向設計
env var は force enable のみ で force disable は無し:
LINT_SCREEN_ENABLED=trueで session opt-in、unset で TOML default (= OFF) に自然復帰unit test 10 件
parse_lint_screen_env_*(4 件、enum variant 網羅): unset / ForceEnable variants / RespectToml variants / InvalidValueapply_env_override_*(6 件、副作用検証): absent section + force enable creates default / overwrites toml false / respect toml keeps toml true / respect toml keeps toml false / unset keeps absent / invalid value respects tomldocs
docs/local-llm-offload-phase-d-guide.md§1 Setup を env var ベースに rewrite$env:LINT_SCREEN_ENABLED = "true"/Remove-Item env:LINT_SCREEN_ENABLEDexport/unsetdocs/local-llm-offload-analysis.mdPhase D section を順位 115 land 反映 (D-3 unblock、D-1/D-2 副産物 list 整理)docs/todo8.md/docs/todo-summary.mdから順位 115 entry を削除diff stat
src/cli-push-runner/src/config.rs(impl + 10 tests)docs/local-llm-offload-phase-d-guide.md(§1 rewrite)docs/local-llm-offload-analysis.md(Phase D section 更新)docs/todo-summary.md(順位 115 行削除)docs/todo8.md(順位 115 entry 削除)Test plan
$env:LINT_SCREEN_ENABLED = "true"→ pnpm push → lint_screen 実行確認 → unset で TOML 復帰確認)関連
pathsfilter 実装): 本 PR land で初の実 lint_screen dogfood が成立🤖 Generated with Claude Code
Summary by CodeRabbit
リリースノート
新機能
LINT_SCREEN_ENABLEDによる設定に対応しました。TOML ファイルの手動編集が不要になり、より安全で簡便な操作フローに変更されました。ドキュメント