fix(cost): journalctl 认 --since 为限流(回放里最后 1 条轻微误伤)

回放 4051 条真实命令后 soft 档剩 3 条 DENY,逐条核对:
- `ls -R $B` → 真阳性(真递归)
- `find /d/AI技能 /d/github … -maxdepth 7 -type d` → 真阳性(4 个盘符级根)
- `journalctl -u dshs --since "-2 min" --no-pager` → **轻微误伤**:`--since` 本身就是时间窗限流

⇒ 在 journalctl 规则的否定前瞻里补 `--since`(与 `-n\s*\d` / `head` 同类)。
改后 soft 档 DENY = **2 / 4051 = 0.05%**,两条均为真阳性 ⇒ **对 AI 正常会话零影响**(0 误拦)。
This commit is contained in:
admin committed 2026-09-15 21:21:52 +08:00
1 parent 88aaf98191
commit fff2519ad3
1 file changed
+2 -2
+2 -2
View File
@@ -57,8 +57,8 @@ RULES = [
'`ls -R` 递归全树', '改用 `ls -la 目录 | head -20`,或 `ls 目录 | wc -l`'),
(True, r'\bfind\s+(/[A-Za-z]|[A-Za-z]:)',
'`find` 从盘符/根起全树扫', '改用 `find 具体目录 -maxdepth 3 … | head -20`'),
(True, r'\bjournalctl\b(?!.*(-n\s*\d|head))',
'`journalctl` 无行数限制', '改用 `journalctl -u X -n 50 --no-pager`'),
(True, r'\bjournalctl\b(?!.*(-n\s*\d|head|--since))',
'`journalctl` 无行数/时间限制', '改用 `journalctl -u X -n 50 --no-pager`(`--since` 也算限流,放行)'),
(True, r'\bdmesg\b(?!.*head)',
'`dmesg` 无行数限制', '改用 `dmesg | tail -30`'),
(False, r'(^|[|;&]\s*)rg\b(?!.*\|)',