Repository navigation
test(permissions): item 21 auto-mode 本地规则分类器测试覆盖 (CC 2.1.210-234, #119) - #120
Merged
Merged
Conversation
安全敏感 bash 权限判定零测试覆盖 (Rule 9 缺口)。本地规则分类器 (autoModeDangerList.ts classifyAllShell + modeValidation.ts auto 模式 wiring, committed c718fbe) 已存在且已连线 bashPermissions.ts:1161, 但 src/__tests__/ 无任何引用。LLM 分类器 (Sonnet 5 模型固定) + 并行 缓存 (CC 2.1.221) 全 ANT-only/OSS-死/纯函数缓存无价值, OSS 无可建。 test-only PR, 最小本地等价 (memory audit "defer 或最小本地等价"): - 81 单测覆盖 classifyAllShell 全分支: hard_deny 16 模式, dangerous ask, safe allow, write-redirect, pipe-to-interpreter, compound, likely-write-base, default-fail-deny (NOT allow), empty safe。 - modeValidation wiring: auto safe→allow/ask→ask/hard_deny→deny, acceptEdits+fs→allow, bypass/dontAsk/default→passthrough, compound first-wins, empty→passthrough。 - 文档化 1 已知 precedence 限制: safe-prefix 在 compound 前, 故 'ls && rm -rf tmp' (rm-rf-tmp 逃逸 /-anchored regex) → safe。 记录防静默回归 (Rule 3 test-only 不改行为)。 验证: 81 新测 pass / 363 全套 pass 无回归 / typecheck 0 / build:dev pass。 surgical: +1 test 文件, 零 prod 改动。 Co-Authored-By: Claude Fable 5 <[email protected]>
dahai80
added a commit
that referenced
this pull request
Aug 22, 2026
Patch release bundling 17 commits since v0.4.23: - item 15(a) MLX OOM auto-recovery gc+retry (#129) - #7 one-click diagnostic fixAction framework (#131) - 维度5 background-default spawn FUSION_SUBAGENT_DEFAULT_BACKGROUND (#127) - #4 proactive MLX OOM detection via /v1/health (#125) - item 17 fullscreen pre-compact history + :598 synthetic decouple (#123) - item 25B workflow stagger fan-out (#122) - item 21 auto-mode local rule classifier test coverage (#120) - item 23 archive plugin source + SHA-256 lock (#118) - item 24 marketplace command source (#116) - item 6 transcript disk trimming + crash-safe checkpoint (#114) - item 5 normalizeMessages secondary normalize cache (#112) - item 19 screen-reader plaintext render (#110) - item 16 compact retry countdown + stall hint (#108) - item 25A workflow execution runtime docs (#106) - item 25A minimal workflow execution runtime (#105) - item 12 subagent auto-background threshold (#103) - item 20 vimInsertModeRemaps dual-key INSERT sequence (#101) Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Closes #119.
缺口
item 21 (auto-mode 权限分类器, CC 2.1.210-234): 本地规则分类器已存在+已连线 (committed c718fbe, wired bashPermissions.ts:1161), LLM 分类器 + 并行缓存全 ANT-only/OSS-死/纯函数缓存无价值。唯一真缺口 = 安全敏感分类逻辑零测试覆盖 (Rule 9)。
改动 (test-only, surgical)
1 新测试文件, 零 prod 改动 (`git diff --stat` = +1 file)。
81 单测覆盖:
验证
Tier 判定
memory audit (tier23-backlog) 判 item 21 "L, 安全敏感, Tier-3 学模式, defer 或最小本地等价"。选最小本地等价 = 测试覆盖闭 Rule 9 缺口。LLM + 缓存缺口全 ANT-only/OSS-死/纯函数无价值, OSS 无可建。标 item 21 ✅ 最小本地等价。
Co-Authored-By: Claude Fable 5 [email protected]