@seanyao/roll 2026.522.1 → 2026.523.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## v2026.523.1
4
+
5
+ ### Added
6
+
7
+ - **`roll loop branches`** — 一眼看见本机残留的 loop 分支;每轮入口先 GC 一次,半途中止的 cycle 也会被收掉 `[loop]`
8
+
9
+ ### Changed
10
+
11
+ - **dashboard token 列拆成 input / output / cache 写 / cache 读** — cache 是真花钱的,账单终于解释得清 `[loop]`
12
+
13
+ ### Fixed
14
+
15
+ - **每日 dream / brief 在 macOS 26.4 上从来没真跑过** — 换成 interval 触发,从今天起稳定每天产出 `[loop]`
16
+ - **dashboard 上 tcr 次数、built 列表、ALERT 文案不再显示假零或别故事的旧标签** `[loop]`
17
+ - **选一个故事不再把别的依赖它的故事也标成"在做"** — dashboard 不再骗你说有人在干活 `[loop]`
18
+ - **`roll setup` / `roll update` 不再在隐藏的覆盖提示上无声卡死**
19
+ - **`$roll-notes` 现在写到 `.roll/notes/`** — 和 dream / brief 一致,不再扔到项目根目录 `[loop]`
20
+ - **loop CI 网关不再把"排队中 / 进行中"误判成失败** `[loop]`
21
+
22
+ ## v2026.522.2
23
+
24
+ ### Changed
25
+
26
+ - **Roll 改用 Antigravity (`agy`)** — Google 已退役独立 Gemini CLI,agy 是接班产品;老用户重跑 `roll setup` 即可
27
+
28
+ ### Improved
29
+
30
+ - **dashboard token 列现在只算 input/output,cache 不再混进来虚抬总量** `[loop]`
31
+ - **`roll loop status` 现在分清「没装 / 装了关了 / 正常」三种状态** — 之前看不出 loop 到底有没有起来 `[loop]`
32
+
33
+ ### Fixed
34
+
35
+ - **loop 异常中断时未推送的 commit 不再丢** — 自动开成 PR `[loop]`
36
+ - **loop 每小时弹窗不再抢前台焦点** — 后台开 Terminal,不打断你在干的事
37
+ - **`roll loop` 在非 git 目录下不再静默崩溃** `[loop]`
38
+
3
39
  ## v2026.522.1
4
40
 
5
41
  ### Fixed
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env bash
2
+ # dream-test-quality-scan — ad-hoc helper for roll-.dream Scan 7.
3
+ #
4
+ # Walks bats files and flags ❶-class anti-patterns (hardcoded business data
5
+ # in assertion bodies). Emits structured REFACTOR-shaped lines so the
6
+ # maintainer can sanity-check the rubric against the current suite without
7
+ # waiting for the nightly dream cycle.
8
+ #
9
+ # Usage:
10
+ # dream-test-quality-scan [--category N] [--path PATH] [--max N]
11
+ # dream-test-quality-scan --help
12
+ #
13
+ # Only category 1 (❶ hardcoded business data) is implemented as a deterministic
14
+ # heuristic; categories ❷..❻ stay with the dream skill (AI agent applies the
15
+ # rubric). The helper exists so a smoke test and a maintainer dry-run can
16
+ # confirm ❶ detection keeps working as the suite evolves.
17
+
18
+ set -euo pipefail
19
+
20
+ CATEGORY=1
21
+ TARGET=""
22
+ MAX=5
23
+
24
+ usage() {
25
+ cat <<'EOF'
26
+ dream-test-quality-scan — Scan 7 ❶ dry-run helper
27
+
28
+ Usage:
29
+ dream-test-quality-scan [--category N] [--path PATH] [--max N]
30
+ dream-test-quality-scan --help
31
+
32
+ Options:
33
+ --category N Anti-pattern category (only 1 is implemented; default 1)
34
+ --path PATH File or directory to scan (default: tests/)
35
+ --max N Maximum entries to emit (default: 5; matches dream skill cap)
36
+ --help Show this message
37
+
38
+ Output:
39
+ One line per finding:
40
+ [test-quality:❶] <file>:<line> — <one-line description>
41
+ Exit code is 0 even when nothing is found (dry-run is informational).
42
+ EOF
43
+ }
44
+
45
+ while [[ $# -gt 0 ]]; do
46
+ case "$1" in
47
+ --category) CATEGORY="${2:-1}"; shift 2 ;;
48
+ --path) TARGET="${2:-}"; shift 2 ;;
49
+ --max) MAX="${2:-5}"; shift 2 ;;
50
+ --help|-h) usage; exit 0 ;;
51
+ *) echo "unknown flag: $1" >&2; usage >&2; exit 2 ;;
52
+ esac
53
+ done
54
+
55
+ if [[ "$CATEGORY" -ne 1 ]]; then
56
+ echo "category $CATEGORY not yet implemented — only ❶ is mechanical" >&2
57
+ exit 0
58
+ fi
59
+
60
+ # Default scan root.
61
+ if [[ -z "$TARGET" ]]; then
62
+ repo_root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
63
+ TARGET="${repo_root}/tests"
64
+ fi
65
+
66
+ if [[ ! -e "$TARGET" ]]; then
67
+ echo "path not found: $TARGET" >&2
68
+ exit 2
69
+ fi
70
+
71
+ scan_file() {
72
+ local file="$1"
73
+ # ❶ heuristic — assertion lines whose RHS contains a numeric literal:
74
+ # - lines containing `[[` or `[ ` (bats assertion syntax)
75
+ # - AND containing `==` or `=` (equality)
76
+ # - AND containing a decimal/integer literal of length ≥ 1 inside quotes
77
+ # Emits one entry per file (not per line) to stay under the rate cap.
78
+ local first_hit
79
+ first_hit=$(grep -nE '\[\[.*"[^"]*[0-9]+(\.[0-9]+)?[^"]*"' "$file" 2>/dev/null \
80
+ | head -1 || true)
81
+ [[ -z "$first_hit" ]] && return 1
82
+
83
+ local lineno
84
+ lineno=$(echo "$first_hit" | cut -d: -f1)
85
+ local rel
86
+ rel=$(python3 -c "import os,sys; print(os.path.relpath(sys.argv[1]))" "$file" 2>/dev/null || echo "$file")
87
+ printf '[test-quality:❶] %s:%s — assertion body hardcodes a numeric literal that likely owns its value elsewhere\n' \
88
+ "$rel" "$lineno"
89
+ return 0
90
+ }
91
+
92
+ emitted=0
93
+ if [[ -d "$TARGET" ]]; then
94
+ # Iterate over .bats files under TARGET; stop after MAX hits.
95
+ # Exclude vendored bats-core helpers — those are framework tests, not ours.
96
+ while IFS= read -r f; do
97
+ case "$f" in
98
+ */tests/helpers/bats-*/*) continue ;;
99
+ esac
100
+ if scan_file "$f"; then
101
+ emitted=$((emitted + 1))
102
+ [[ "$emitted" -ge "$MAX" ]] && break
103
+ fi
104
+ done < <(find "$TARGET" -type f -name '*.bats' | sort)
105
+ else
106
+ scan_file "$TARGET" && emitted=1 || true
107
+ fi
108
+
109
+ # Always succeed — dry-run is informational, the dream cycle decides what to do.
110
+ exit 0