@seanyao/roll 4.714.2 → 4.717.2

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/guide/en/faq.md CHANGED
@@ -619,6 +619,47 @@ when the work is ambiguous or the environment is broken — never guesses.**
619
619
  For deeper operational topics (pause/resume, agent switching, gh scopes), see
620
620
  [loop.md](loop.md) and [configuration.md](configuration.md).
621
621
 
622
+ ### C5b. What do I do when `roll loop on` fails with a launchd bootstrap error?
623
+
624
+ **Short answer:** The loop is unarmed. Repair launchd first; use the
625
+ owner-confirmed process fallback only if launchd cannot be fixed.
626
+
627
+ **Why this happens:** macOS launchd sometimes rejects the bootstrap with
628
+ `Bootstrap failed: 5: Input/output error` (or a similar domain error). Roll
629
+ retries once, verifies the mount with `launchctl print`, and exits non-zero
630
+ rather than pretending the scheduler is active.
631
+
632
+ **Fix launchd first:**
633
+
634
+ ```bash
635
+ UID=$(id -u)
636
+ LABEL=$(launchctl list | awk '$3 ~ /^com\.roll\.loop\./ {print $3; exit}')
637
+ # If launchctl list returns nothing, use the exact label from the error output.
638
+ launchctl bootout gui/$UID/$LABEL
639
+ launchctl bootstrap gui/$UID ~/Library/LaunchAgents/$LABEL.plist
640
+ launchctl print gui/$UID/$LABEL
641
+ roll loop on
642
+ roll loop status
643
+ ```
644
+
645
+ **If launchd cannot be repaired:**
646
+
647
+ ```bash
648
+ roll loop fallback start --confirm
649
+ roll loop fallback status
650
+ ```
651
+
652
+ The fallback is not a launchd replacement — it does not survive reboot/login.
653
+ After a reboot or logout you must re-confirm:
654
+
655
+ ```bash
656
+ roll loop fallback stop
657
+ roll loop fallback start --confirm
658
+ ```
659
+
660
+ See [Recovering from a launchd bootstrap failure](loop.md#recovering-from-a-launchd-bootstrap-failure)
661
+ for a sanitized, non-root verification procedure.
662
+
622
663
  ### C7. I changed loop_schedule but loop still runs at the old frequency
623
664
 
624
665
  **Symptoms:** You updated `.roll/local.yaml` `loop_schedule`, but
@@ -854,3 +895,26 @@ These controls apply to user-facing surfaces only. Agent contracts, code, git
854
895
  metadata, and schemas remain English. Owner conversation follows the language
855
896
  used by the owner in the current task. Run `roll doctor language` to audit docs,
856
897
  conventions, skills, and generated surfaces before release.
898
+
899
+ ### C12. What are the limits of `roll browser interactive`?
900
+
901
+ **Short answer:** It is a foreground, owner-run, single-operation tool against a
902
+ local Chrome debug endpoint — not a background automation or remote browser.
903
+
904
+ **Details:** `roll browser interactive` requires:
905
+
906
+ - An attached TTY and explicit owner approval for every operation.
907
+ - A Chrome you started yourself with a loopback debug port such as
908
+ `--remote-debugging-port=9222` on `127.0.0.1`.
909
+
910
+ It will **never**:
911
+
912
+ - Run from a background scheduler or CI job.
913
+ - Connect to a remote or non-loopback endpoint.
914
+ - Export cookies, storage, or network bodies.
915
+ - Start Chrome automatically.
916
+ - Make CI pass on its own — the result is for **owner-run manual-attest** only.
917
+
918
+ The lease lasts at most 15 minutes and is released immediately after the
919
+ operation. For unattended diagnostics, use the managed lane (`roll browser run`)
920
+ instead.
package/guide/en/loop.md CHANGED
@@ -35,7 +35,7 @@ metadata, and delivery truth. The four targets are:
35
35
 
36
36
  | Metric | Target | Anti-gaming rule | `null` means |
37
37
  |--------|--------|------------------|--------------|
38
- | Autonomy | >=72h autonomous runtime | An effective autonomous day needs at least 6 non-idle attempts; backlog-empty days pause the clock and do not count as missed time. | There is not enough qualifying run history yet, or the backlog was empty for the window. |
38
+ | Autonomy | >=72h autonomous runtime | `current` is the sum of eligible daily hours across the declared 14-day window, not the latest uninterrupted segment. An effective autonomous day needs at least 6 non-idle attempts; backlog-empty days pause the clock and do not count as missed time. | There is not enough qualifying run history yet, or the backlog was empty for the window. |
39
39
  | Delivery rate | >=60% | Delivery is counted from merge truth, not self-reported cycle exits. | No eligible delivery denominator exists yet. |
40
40
  | Fix tax | <1x | The denominator is US cards only; FIX work is not allowed to improve its own ratio. | There is no US-card denominator in the window. |
41
41
  | Attribution errors | =0 | `unknown` is not guessed into env, harness, or card; missing envelopes stay visible. | No attribution sample exists yet. |
@@ -109,6 +109,80 @@ commands; it never leaves a failed bootstrap looking enabled.
109
109
  Active window: 0–24 (always on — the shipped default)
110
110
  ```
111
111
 
112
+ ### Recovering from a launchd bootstrap failure
113
+
114
+ A failed `roll loop on` is **unarmed**. The presence of a plist file in
115
+ `~/Library/LaunchAgents/` does **not** mean autonomous scheduling is active —
116
+ only `launchctl list` showing the loaded label means the loop is armed. Run
117
+ `roll loop status` to see the effective backend (`launchd`,
118
+ `process-fallback`, or `none`).
119
+
120
+ **Repair launchd first.** The error output already prints the exact commands;
121
+ the generic form uses the label reported by `launchctl list`:
122
+
123
+ ```bash
124
+ UID=$(id -u)
125
+ LABEL=$(launchctl list | awk '$3 ~ /^com\.roll\.loop\./ {print $3; exit}')
126
+ # If launchctl list returns nothing, use the exact label from the roll loop on error output.
127
+ launchctl bootout gui/$UID/$LABEL
128
+ launchctl bootstrap gui/$UID ~/Library/LaunchAgents/$LABEL.plist
129
+ launchctl print gui/$UID/$LABEL
130
+ roll loop status
131
+ ```
132
+
133
+ If `launchctl bootstrap` succeeds and `print` shows the job, run `roll loop on`
134
+ again to regenerate the current runner and confirm the schedule.
135
+
136
+ **If launchd cannot be repaired**, Roll provides an owner-confirmed process
137
+ fallback that is started only when you explicitly confirm it:
138
+
139
+ ```bash
140
+ roll loop fallback start --confirm
141
+ roll loop fallback status
142
+ roll loop fallback stop # when you no longer need it
143
+ ```
144
+
145
+ The fallback is **not** a launchd replacement. It does not survive reboot or
146
+ login session exit. After a reboot or logout you must stop any stale lease and
147
+ re-confirm:
148
+
149
+ ```bash
150
+ roll loop fallback stop
151
+ roll loop fallback start --confirm
152
+ ```
153
+
154
+ Prefer repairing launchd; use the fallback only when launchd is unavailable.
155
+
156
+ #### macOS live verification procedure (Bootstrap failed: 5)
157
+
158
+ When `roll loop on` fails with a `Bootstrap failed: 5: Input/output error`
159
+ class error, capture a sanitized, non-root diagnostic bundle:
160
+
161
+ ```bash
162
+ mkdir -p .roll/loop
163
+ TS=$(date +%Y%m%d-%H%M%S)
164
+ OUT=.roll/loop/launchd-verify-$TS.log
165
+ {
166
+ echo "roll version: $(roll version)"
167
+ echo "uid: $(id -u)"
168
+ echo "---"
169
+ echo "roll loop status:"
170
+ roll loop status
171
+ echo "---"
172
+ echo "launchctl list (roll lanes):"
173
+ launchctl list | grep com.roll\. || true
174
+ echo "---"
175
+ echo "plists on disk:"
176
+ ls -1 ~/Library/LaunchAgents/com.roll.loop.*.plist 2>/dev/null || true
177
+ } > "$OUT"
178
+ # Sanitize before sharing: replace the literal home path with ~.
179
+ sed -i.bak "s|$HOME|~|g" "$OUT" && rm -f "$OUT".bak
180
+ ```
181
+
182
+ This procedure uses only user-level (`gui/<uid>`) launchctl commands. It does
183
+ not require `sudo` and does not claim root-only diagnostics such as
184
+ `launchctl dumpstate` are available.
185
+
112
186
  By default the active window is the full day (`loop_active_start=0`,
113
187
  `loop_active_end=24`), so loop fires on every scheduled tick. Narrow it to a
114
188
  working window with `roll config loop-window` — e.g. `roll config loop-window
@@ -267,7 +341,7 @@ roll loop gc --keep-days 14 # Override retention (also: loop_gc.retention_days
267
341
  roll loop events # Show last 20 cycle events
268
342
  roll loop events 50 # Show last 50 events
269
343
 
270
- roll agent # Show scopes, roles, agent pool, and legacy inputs
344
+ roll agent # Show scopes, effective project capability, and agent pool
271
345
  roll agent list # Show agents installed on this machine
272
346
  ```
273
347
 
@@ -314,8 +388,11 @@ Budget and run limits are explicit per `roll loop go`. `--budget`,
314
388
  limit for this run — Roll never silently inherits a budget or cap from a prior
315
389
  session's persisted goal, so a flagless `roll loop go` can neither be capped nor
316
390
  bricked by a limit you set days ago. Scope (`--epic`/`--cards`) and `--review`
317
- still persist when unspecified, because they are the goal's identity, not a
318
- per-run safety knob.
391
+ persist only while the goal is unfinished. When a goal is `complete`, the next
392
+ `roll loop go` archives it under `.roll/loop/goal-archive/`, records
393
+ `goal:archived`, and starts a distinct goal from that invocation's flags. With
394
+ no scope flag, the new goal covers all eligible backlog cards; it never reuses
395
+ the completed goal's scope.
319
396
 
320
397
  Before the first builder cycle, `roll loop go` also has a fallback check for
321
398
  leftover uncommitted Roll bootstrap artifacts such as `AGENTS.md`, `.claude/`,
@@ -419,9 +496,12 @@ defaults:
419
496
  strategy: health-aware
420
497
  ```
421
498
 
422
- `roll agent` shows the effective Machine Scope, Project Scope, resolved roles,
423
- candidate pool, runtime health notes, and any legacy compatibility inputs. Use
424
- `roll agent migrate --dry-run` to preview conversion from old agent files.
499
+ `roll agent` shows the Machine Scope and the effective Project Scope, including
500
+ inherited agents and configured route models. It does not predict the next role
501
+ assignment: dispatch resolves runtime health and least-recent state at spawn.
502
+ Use `roll supervisor route --role builder|evaluator` for a diagnostic runtime
503
+ snapshot. Use `roll agent migrate --dry-run` to preview a one-time conversion
504
+ from old agent files; old agent config is not read during normal execution.
425
505
 
426
506
  Runtime health is not static policy. Quota, auth, network, VPN, account, stall,
427
507
  or missing binary failures suspend only the runtime rig and are recorded as
@@ -656,6 +736,11 @@ ending point. Use the Gate and attest result for pass/fail.
656
736
 
657
737
  `roll loop status` prints a compact dashboard with per-cycle rows and daily rollup totals.
658
738
 
739
+ When every currently eligible card needs a physical terminal capture and macOS
740
+ is locked, the status line says `waiting for screen unlock`. This is a wait
741
+ state, not an idle failure: the next unlocked tick clears the message and
742
+ dispatches normally, without consuming the no-progress breaker.
743
+
659
744
  ### Token column
660
745
 
661
746
  Each cycle row shows token usage in a 4-component format:
@@ -1492,3 +1577,7 @@ retired shapes from older versions (ci/alert/brief) once survived for weeks as
1492
1577
  zombies pointing at deleted engines. `roll doctor` lists every `com.roll.*`
1493
1578
  job on the machine with its target directory and load state; a lane whose
1494
1579
  WorkingDirectory no longer exists is marked STALE in red.
1580
+
1581
+ A plist left on disk after a bootstrap failure or a manual `bootout` is **not**
1582
+ the same as an armed loop. Always trust `roll loop status` (effective scheduler
1583
+ backend) and `launchctl list` over the mere presence of a `.plist` file.
@@ -19,7 +19,7 @@ Project Scope `evaluate` binding.
19
19
 
20
20
  ```bash
21
21
  roll agent # inspect story.evaluate
22
- roll agent migrate --dry-run # convert legacy pairing.yaml if present
22
+ roll agent migrate --dry-run # preview one-time migration of old agent config
23
23
  ```
24
24
 
25
25
  New projects should author the evaluator pool in `.roll/agents.yaml`:
@@ -38,10 +38,9 @@ defaults:
38
38
  strategy: health-aware
39
39
  ```
40
40
 
41
- `.roll/pairing.yaml` remains a legacy compatibility input. When both files are
42
- present, the scoped `evaluate` role is preferred. Static config lists fair
43
- candidates; runtime auth/network/VPN/account failures skip candidates only for
44
- the current resolution.
41
+ `.roll/pairing.yaml` is not a runtime input. The scoped `evaluate` role is the
42
+ only source for pairing candidates. Static config lists fair candidates; runtime
43
+ auth/network/VPN/account failures skip candidates only for the current resolution.
45
44
 
46
45
  ## Seeing what it does — observability
47
46
 
package/guide/en/tools.md CHANGED
@@ -79,6 +79,17 @@ Supported fields:
79
79
 
80
80
  Unknown fields warn but do not reject the policy file, so newer Roll versions can add fields without breaking older project configs.
81
81
 
82
+ ## Owner Chrome: manual interactive lane
83
+
84
+ `roll browser interactive` is a manual, owner-run boundary for one typed low-risk action against an already-open, loopback Chrome DevTools endpoint. It requires an attached TTY and a fresh `y` approval for every invocation. The prompt names the story, approved origin, action summary, 15-minute maximum expiry, and credential-export denial.
85
+
86
+ ```text
87
+ roll browser interactive --story US-BROW-008b --origin https://app.example.test \
88
+ --action navigate --url https://app.example.test/account
89
+ ```
90
+
91
+ It connects only to a tab whose origin matches `--origin`, then disconnects DevTools on approval expiry, cancellation, errors, or process exit. Roll never launches or closes the owner's Chrome. The closed action vocabulary is `navigate`, `click`, `fill`, and `press_key`; cookies, storage, and network bodies have no CLI or adapter surface. A successful interactive result is manual evidence only: it does not make CI pass and cannot become background automation.
92
+
82
93
  ## CLI
83
94
 
84
95
  Use `roll doctor tools status` to inspect the registered tools, input contracts, requirement readiness, and the effective policy state for the current project.
@@ -45,6 +45,11 @@ HTML。那些归档页想看时用 归档重建 按需渲染,它们是便捷/
45
45
 
46
46
  `roll attest` 也可独立运行——没有意图映射时,每条 AC 诚实渲染为 🟧 仅声明。
47
47
 
48
+ 抓到的产物按**实际媒体类型**渲染,不按产生它的采集通道决定。图片文件(`png`、`jpg`、
49
+ `jpeg`、`webp` 或 `gif`,包括无扩展名但能识别出图片签名的产物)显示为图片;`.txt`、
50
+ `.log` 等文本输出会先转义,再以内联、可读的 `<pre>` 块显示。因此,终端采集可能以任一
51
+ 形式出现。
52
+
48
53
  ## 闸口策略
49
54
 
50
55
  验收闸**默认是 hard**。带 AC 的 story 若交付完成却没有新鲜且内容充足的报告,
@@ -92,6 +97,60 @@ roll attest audit --json
92
97
  表示 harness 基于硬盘上强证据做出的确认,明确不同于 agent 亲自确认的 `pass`。
93
98
  "我确认它能跑"这类口头完成,正是被这条红线挡住的东西。
94
99
 
100
+ ## 外部行为验证
101
+
102
+ 有些 AC 描述的是 Roll 在本地无法证明的行为——真实的
103
+ `npm i -g github:owner/repo`、发布后 CLI 的首次启动、线上 OAuth 回调。构建成功
104
+ 或 `npm pack` 通过并**不能**证明这些;模拟不是外部承诺本身。把这类 AC 标为
105
+ manual-only 再呈绿色,等同于用"未执行"替代"通过"。
106
+
107
+ 当一张故事或修复记录了外部安装 / 发布 / 登录渠道时,相关 AC 必须在 Evaluation
108
+ 契约里显式声明**一种**验证路径——Roll 从不从散文里猜"什么算外部":
109
+
110
+ ```yaml
111
+ expected_evidence:
112
+ - kind: external-smoke # 隔离环境里的真实命令
113
+ target: npm i -g github:owner/repo#<commit> && repo --version
114
+ proves: 文档里的 git 安装渠道能在全新目录真实安装并启动
115
+ outward:
116
+ mode: external-smoke
117
+ command: npm i -g github:owner/repo#<commit> && repo --version
118
+ environment: release # ci | nightly | release
119
+ timeout_sec: 180
120
+ - kind: owner-attested # smoke 无法覆盖时的人工签字
121
+ proves: 生产环境 OAuth 回调可往返
122
+ outward:
123
+ mode: owner-attested
124
+ reason: 需要真实第三方账号,没有安全的自动路径
125
+ approvalRef: https://github.com/owner/repo/issues/1343
126
+ ```
127
+
128
+ attest 报告会在靠上位置渲染一个**外部行为验证**横幅与表格。只有真实 smoke 通过
129
+ (或有效、未过期的 owner 认证)才是绿色:
130
+
131
+ | 解析状态 | 报告文案 | 绿色? |
132
+ |----------|----------|--------|
133
+ | `verified` | `VERIFIED (external smoke)` / `VERIFIED (owner-attested)` | 是 |
134
+ | `verified-in-simulation` | `verified-in-simulation — simulation only, NOT accepted` | **否** |
135
+ | `unverified-external` | `UNVERIFIED — external smoke not run`(或 `owner attestation pending`) | **否** |
136
+ | `failed-external` | `FAILED — external smoke` | **否** |
137
+
138
+ 只要有一个外部 AC 不是 `verified`,横幅即转红——交付不能夸大自己的外部行为。
139
+ `npm pack` 之类的模拟证据会保留并标注 `verified-in-simulation`,但绝不替代真实 smoke。
140
+
141
+ ### 发版 / nightly smoke 环境搭建
142
+
143
+ 外部 smoke 在**隔离**环境里运行——全新的临时 `HOME`/`PREFIX`/工作目录,只执行
144
+ spec 中显式声明的命令模板与受控变量。产物记录 exit code、版本、脱敏后的
145
+ stdout/stderr 摘要;凭据从不落盘。
146
+
147
+ 用 `ROLL_SMOKE_ENV=release`(或 `ci` / `nightly`)把运行器指向对应环境;声明的
148
+ `environment` 与当前环境不匹配时会被报为 `unverified`,绝不静默跳过。**任何真实
149
+ 发布或账号操作永不自动执行**:凡是推送包、改动远端账号或产生费用的动作,没有声明
150
+ 的授权(你写进 spec 的 `external-smoke` 命令,或一条 `owner-attested` 批准引用)
151
+ 就不会跑。若没有匹配的 smoke 环境,AC 保持 `unverified`、报告保持非绿——绝不会被
152
+ 自动升级成手工通过。
153
+
95
154
  ## 设计期声明可视证据
96
155
 
97
156
  `roll story validate` 在设计期就检查一张卡是否**生而诚实**——带可视证据 AC,
@@ -20,7 +20,7 @@ Story 的角色,Story 或 Skill 可以在需要时进一步收窄绑定。
20
20
  agent 语义的主配置面。常用命令:
21
21
 
22
22
  ```bash
23
- roll agent # 查看 Machine ScopeProject Scope、角色、pool、legacy 输入
23
+ roll agent # 查看 Machine Scope、有效 Project Scope 与已安装 pool
24
24
  roll agent migrate --dry-run # 预览 legacy 文件迁移
25
25
  roll agent migrate # 写入 roll-agents/v1 文件
26
26
  roll agent list # 查看本机已安装 agent
@@ -156,12 +156,12 @@ roll supervisor health --json # 机器可读的分类结果
156
156
  roll supervisor next # 下一张卡 + agent health 摘要
157
157
  ```
158
158
 
159
- ## Legacy 兼容
159
+ ## Agent 配置迁移
160
160
 
161
161
  旧项目可能还会有 `.roll/local.yaml agent`、`.roll/pairing.yaml`,或者
162
- `.roll/agents.yaml` 里的 v3 route slots。`roll agent` 会把它们显示在
163
- `Legacy compatibility` 区块,`roll agent migrate` 会把仍有用的数据迁进 scoped
164
- 模型。它们仍可读取,但不再是主要 agent 管理模型。
162
+ `.roll/agents.yaml` 里的 v3 route slots。它们不再是运行时输入。先用
163
+ `roll agent migrate --dry-run` 预览一次性迁移,再用 `roll agent migrate`
164
+ 写入 scoped binding。loop 遇到 v3 route slots 会明确失败,不会悄悄启用第二套配置模型。
165
165
 
166
166
  ## 另见
167
167