@openthink/stamp 1.3.0 → 1.3.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/README.md CHANGED
@@ -292,6 +292,33 @@ models pinned, each operator records their own verdict in their own
292
292
  state.db (same as today's reviewer-prompt model). Stamp does not assume
293
293
  verdicts are model-portable.
294
294
 
295
+ ### Reviewer execution budgets
296
+
297
+ Each reviewer subprocess runs under two bounds, set on the operator's
298
+ machine via env vars (they are operator infrastructure, not committed
299
+ policy — different operators on the same repo can pick different values):
300
+
301
+ | Env var | Default | What it caps |
302
+ |---|---|---|
303
+ | `STAMP_REVIEWER_MAX_TURNS` | `8` | Model/tool round-trips per reviewer call. Hitting it surfaces as `reviewer "<name>" run failed (subtype=error_max_turns)`. |
304
+ | `STAMP_REVIEWER_TIMEOUT_MS` | `300000` (5 min) | Wall-clock budget per reviewer. Hitting it surfaces as `reviewer "<name>" exceeded <N>ms wall-clock budget — raise STAMP_REVIEWER_TIMEOUT_MS to extend it`. |
305
+
306
+ The defaults are tight enough that a pathological reviewer gives up in
307
+ single-digit minutes rather than racking up Anthropic spend silently.
308
+ Raise them when a reviewer with legitimately heavy lookup tools (Linear
309
+ MCP, multi-file `Read`, ticket reconciliation) repeatedly trips the cap
310
+ on a non-trivial diff. Example:
311
+
312
+ ```sh
313
+ STAMP_REVIEWER_MAX_TURNS=20 STAMP_REVIEWER_TIMEOUT_MS=600000 \
314
+ stamp review --diff main..HEAD
315
+ ```
316
+
317
+ If a reviewer trips the cap consistently on small diffs too, the prompt
318
+ is probably looping rather than working — diagnose before raising the
319
+ budget. See [`docs/troubleshooting.md`](./docs/troubleshooting.md) for
320
+ the runbook.
321
+
295
322
  ## Deployment shapes
296
323
 
297
324
  Three ways to run stamp-cli in a real setting, trading setup cost for
package/dist/index.js CHANGED
@@ -6629,7 +6629,7 @@ serverRepo.command("restore <name>").description("restore the most recent soft-d
6629
6629
  }
6630
6630
  );
6631
6631
  program.command("review").description(
6632
- "run configured reviewer(s) against a diff. Reviewer config + prompts are sourced from the merge-base tree (security: prevents feature-branch self-review). For lock-file drift checks, use `stamp reviewers verify` (which exits 3 on drift)."
6632
+ "run configured reviewer(s) against a diff. Reviewer config + prompts are sourced from the merge-base tree (security: prevents feature-branch self-review). For lock-file drift checks, use `stamp reviewers verify` (which exits 3 on drift). Reviewer execution budgets are env-tunable: STAMP_REVIEWER_MAX_TURNS (default 8) caps the model/tool round-trip count, STAMP_REVIEWER_TIMEOUT_MS (default 300000) bounds wall-clock time. Raise them when a reviewer with heavy lookup tools (Linear / GitHub MCP, multi-file Read) fails with subtype=error_max_turns or the abort message \u2014 see docs/troubleshooting.md."
6633
6633
  ).requiredOption("--diff <revspec>", "git revspec to review, e.g. main..HEAD").option("--only <reviewer>", "run a single reviewer by name").option(
6634
6634
  "--allow-large",
6635
6635
  "bypass the 200KB diff size cap (raise STAMP_REVIEW_DIFF_CAP_BYTES for a different threshold)"