@seanyao/roll 2.602.2 → 2.602.3

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.602.3
4
+
5
+ ### 可见性
6
+
7
+ - **deepseek 的 cycle 也能看到 token 和成本(FIX-164)** — 之前 deepseek 跑的 cycle 明明提了 PR、有耗时,token/成本却是空的(压根没采到用量);现在每轮都按当轮实际 agent 落账,deepseek 和 kimi 一样看得见用量和成本 `[loop]`
8
+
9
+ ### 稳定性
10
+
11
+ - **roll update 后不再被反向提示"升级"回旧版本(FIX-166)** — 升级后旧的版本检查缓存没清,偶尔还会冒出叫你装回旧号的提示;现在升级会顺手清掉缓存,这点残留也没了 `[loop]`
12
+
3
13
  ## v2.602.2
4
14
 
5
15
  ### 自动化流水线
package/bin/roll CHANGED
@@ -4,7 +4,7 @@ set -euo pipefail
4
4
  # Roll — AI Agent Convention Manager
5
5
  # Single source of truth for how all AI coding agents behave.
6
6
 
7
- VERSION="2.602.2"
7
+ VERSION="2.602.3"
8
8
  ROLL_HOME="${ROLL_HOME:-${HOME}/.roll}"
9
9
  ROLL_CONFIG="${ROLL_HOME}/config.yaml"
10
10
  ROLL_GLOBAL="${ROLL_HOME}/conventions/global"
@@ -1998,6 +1998,10 @@ cmd_update() {
1998
1998
  _check_installed_version_or_retry
1999
1999
  fi
2000
2000
 
2001
+ # FIX-166: the running version just changed — invalidate the stale update-check
2002
+ # cache so we don't reverse-nag the new version to "upgrade" to the old latest.
2003
+ _invalidate_update_cache
2004
+
2001
2005
  echo ""
2002
2006
  info "$(msg update.re_syncing_to_ai_tools)"
2003
2007
  echo ""
@@ -9022,14 +9026,21 @@ fi
9022
9026
  # first, shared fallback) so the emitter appends to the same file the reader
9023
9027
  # consumes. Dispatch by agent so each emitter reads the right session format
9024
9028
  # (pi.usage_from_session vs kimi.usage_from_session).
9025
- if [ "\$(_project_agent)" != "claude" ]; then
9029
+ # FIX-164: dispatch on the per-cycle ROUTED agent (CYCLE_AGENT), not the project
9030
+ # default (_project_agent). With the project default, a kimi-default project ran
9031
+ # kimi_emit for EVERY cycle — so deepseek/pi cycles emitted no usage event at all
9032
+ # (kimi_emit finds no kimi session for a pi cycle), and the dashboard showed them
9033
+ # with empty token/cost. CYCLE_AGENT (set above by the router) is the agent that
9034
+ # actually ran this cycle, so the right emitter reads the right session format.
9035
+ _emit_agent="\${CYCLE_AGENT:-\$(_project_agent)}"
9036
+ if [ "\$_emit_agent" != "claude" ]; then
9026
9037
  _pi_rt=\$(_loop_runtime_dir "${slug}" 2>/dev/null || echo "")
9027
9038
  if [ -n "\$_pi_rt" ]; then
9028
9039
  _pi_evfile="\${_pi_rt}/events.ndjson"
9029
9040
  else
9030
9041
  _pi_evfile="\${_SHARED_ROOT:-\$HOME/.shared/roll}/loop/events-${slug}.ndjson"
9031
9042
  fi
9032
- case "\$(_project_agent)" in
9043
+ case "\$_emit_agent" in
9033
9044
  kimi)
9034
9045
  if [ -f "${kimi_emit_script}" ]; then
9035
9046
  python3 "${kimi_emit_script}" --cwd "\$WT" --cycle "\${CYCLE_ID}" \\
@@ -11500,7 +11511,12 @@ _loop_check_depends_on() {
11500
11511
  [ -n "$row" ] || return 1
11501
11512
 
11502
11513
  local deps
11503
- deps=$(echo "$row" | grep -oE 'depends-on:[A-Z][A-Z0-9,-]+' | head -1 | sed 's/depends-on://' || true)
11514
+ # FIX-167: include lowercase letters so lettered sub-story ids (the a/b/c
11515
+ # split pattern, e.g. US-LOOP-062c) aren't truncated to their numeric base
11516
+ # (US-LOOP-062). The old class [A-Z0-9,-] stopped at the lowercase suffix,
11517
+ # dropping the suffix AND every dep after it — so a story depending on a Done
11518
+ # sub-story was matched against its (often Hold) parent and wrongly blocked.
11519
+ deps=$(echo "$row" | grep -oE 'depends-on:[A-Za-z][A-Za-z0-9,-]+' | head -1 | sed 's/depends-on://' || true)
11504
11520
  [ -n "$deps" ] || return 0
11505
11521
 
11506
11522
  local unsatisfied=""
@@ -15551,6 +15567,15 @@ _show_changelog() {
15551
15567
  }
15552
15568
 
15553
15569
  # ─── Version check (background, non-blocking, 24h cache) ─────────────────────
15570
+ # FIX-166: drop the cached `latest` so the next run refetches it. Called after a
15571
+ # successful `roll update`: without this, the 24h cache TTL keeps the pre-upgrade
15572
+ # `latest` around, and _notify_update reverse-nags the freshly-installed (newer)
15573
+ # version to "upgrade" to the older cached one for up to a day. With the file
15574
+ # gone, _notify_update stays silent until the async refetch repopulates it.
15575
+ _invalidate_update_cache() {
15576
+ rm -f "${ROLL_HOME}/.update-check"
15577
+ }
15578
+
15554
15579
  _check_update_async() {
15555
15580
  local cache="${ROLL_HOME}/.update-check"
15556
15581
  local now; now=$(date +%s)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seanyao/roll",
3
- "version": "2.602.2",
3
+ "version": "2.602.3",
4
4
  "description": "Roll — Roll out features with AI agents",
5
5
  "scripts": {
6
6
  "test": "bash tests/run.sh"