@caddis/cli 0.4.90 → 0.4.92
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/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/caddis_budget.py +26 -2
- package/bundles/antigravity-plugin/scripts/caddis_checkout_guard.py +31 -2
- package/bundles/antigravity-plugin/scripts/caddis_docs_pr.py +8 -0
- package/bundles/antigravity-plugin/scripts/caddis_gate.py +8 -8
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +3 -3
- package/bundles/antigravity-plugin/scripts/caddis_handoff.py +73 -45
- package/bundles/antigravity-plugin/scripts/caddis_lanes.py +113 -31
- package/bundles/antigravity-plugin/scripts/caddis_review.py +1 -1
- package/bundles/antigravity-plugin/scripts/caddis_roadmap_run.py +22 -40
- package/bundles/antigravity-plugin/scripts/caddis_routing.py +1 -1
- package/bundles/antigravity-plugin/scripts/caddis_spend.py +121 -138
- package/bundles/antigravity-plugin/scripts/caddis_workstreams.py +60 -17
- package/bundles/antigravity-plugin/scripts/check_doc_coverage.py +17 -0
- package/bundles/antigravity-plugin/scripts/oss_review.py +102 -35
- package/bundles/antigravity-plugin/scripts/roadmap-recheck.ps1 +4 -2
- package/bundles/antigravity-plugin/scripts/schemas/hub-collect.schema.json +6 -0
- package/bundles/antigravity-plugin/scripts/schemas/hub-spend.schema.json +6 -0
- package/bundles/antigravity-plugin/scripts/templates/coordinator.md +1 -1
- package/bundles/antigravity-plugin/skills/coordinate/SKILL.md +17 -4
- package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +18 -6
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +6 -1
- package/bundles/antigravity-plugin/skills/handoff/SKILL.md +12 -2
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +11 -7
- package/bundles/antigravity-plugin/skills/roadmap/SKILL.md +8 -7
- package/bundles/antigravity-plugin/skills/roadmap/assets/plan-resume-prompt.md +2 -2
- package/bundles/antigravity-plugin-extras/plugin.json +1 -1
- package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +5 -5
- package/bundles/codex/.codex/skills/workflow/roadmap/SKILL.md +8 -7
- package/bundles/codex/.codex/skills/workflow/roadmap/assets/plan-resume-prompt.md +2 -2
- package/bundles/manifest.json +3 -3
- package/package.json +1 -1
|
@@ -31,19 +31,29 @@ Exit codes (fail-closed):
|
|
|
31
31
|
1 REVIEW: BLOCKING — one or more blocking issues
|
|
32
32
|
2 unused — advisory is not a review verdict
|
|
33
33
|
3 could not run — REVIEW_API_KEY missing, OR the pre-send secret filter refused (a
|
|
34
|
-
denylisted path / possible secret; see secret_filter.py), OR
|
|
34
|
+
denylisted path / possible secret; see secret_filter.py), OR an explicit
|
|
35
|
+
--range has no changes (a review of nothing is not CLEAN), OR every
|
|
35
36
|
provider failed with a PROVIDER failure: HTTP 429, any 5xx, a timeout, a
|
|
36
|
-
connection error, an empty reply, an agy error status,
|
|
37
|
-
|
|
37
|
+
connection error, an empty reply, an agy error status, caddis_spend
|
|
38
|
+
refused agy (headless depth or log lock), or a one-file prompt too
|
|
39
|
+
long for agy with no other provider
|
|
40
|
+
— actionable message on stderr/stdout either way
|
|
38
41
|
4 error — no diff verdict parsed, git failure, other endpoint/parse failure, or the diff
|
|
39
42
|
exceeds REVIEW_MAX_DIFF_CHARS (see below — never silently downgraded to CLEAN)
|
|
40
43
|
|
|
44
|
+
Verdict: only the LAST non-empty line of each reply counts, and it must be exactly `REVIEW: CLEAN` or
|
|
45
|
+
`REVIEW: BLOCKING` (backticks, asterisks and whitespace around it are allowed). Anything else is no
|
|
46
|
+
verdict (exit 4). When the secret filter drops some files, the output ends with
|
|
47
|
+
`REVIEW-SCOPE: PARTIAL (<n> file(s) excluded by the secret filter: <names>)` and then the overall
|
|
48
|
+
`REVIEW:` line. The exit code is unchanged; a caller that needs the whole change reviewed looks
|
|
49
|
+
for that exact text.
|
|
50
|
+
|
|
41
51
|
Provider chain (owner policy, 2026-10-21; was deepseek first from 2026-10-16): agy-argon -> deepseek -> glm.
|
|
42
52
|
A named --provider goes first, then the rest in policy order; a provider with no key (or no agy on PATH)
|
|
43
53
|
is skipped. With no provider named, the chain starts at the first provider that is available. A provider failure
|
|
44
54
|
moves to the next provider and never splits the diff. On HTTP 429 a `Retry-After` is honoured ONCE per
|
|
45
55
|
provider (capped at 60 s), then the next provider is tried. A provider that failed gets no more calls in
|
|
46
|
-
the same run. agy runs through `caddis_spend.py run` (
|
|
56
|
+
the same run. agy runs through `caddis_spend.py run` (usage log, timeout, depth guard; no EUR cap), in plan mode, with the diff in
|
|
47
57
|
the prompt (no tools needed). The secret filter runs once, before any provider, agy included. The
|
|
48
58
|
provider that gave each verdict is printed.
|
|
49
59
|
|
|
@@ -58,6 +68,12 @@ narrower case: a SINGLE file larger than the ceiling, which cannot be split, or
|
|
|
58
68
|
MAX_REVIEW_BATCHES. Refusal was the original behaviour and is kept for those two - a silent false
|
|
59
69
|
CLEAN is the worst outcome this tool has - but it no longer fires on an ordinary large phase diff.
|
|
60
70
|
|
|
71
|
+
agy limit: when agy-argon is anywhere in the provider chain, each batch is ALSO packed so its whole
|
|
72
|
+
prompt (fixed text, the file list of a multi-batch run, the diff) fits AGY_MAX_PROMPT_CHARS (28,000)
|
|
73
|
+
as quoted on the command line, so batches are smaller (under about 27,000 diff chars; fewer when the diff has many `"`). A single file
|
|
74
|
+
whose prompt cannot fit gets its own batch: agy skips it and the next provider reviews it; with no
|
|
75
|
+
other provider that is exit 3. With no agy in the chain the 60,000 ceiling alone applies.
|
|
76
|
+
|
|
61
77
|
Stdlib-only (urllib) so it runs anywhere with no pip install.
|
|
62
78
|
"""
|
|
63
79
|
from __future__ import annotations
|
|
@@ -126,14 +142,20 @@ AGY_PROVIDER = "agy-argon"
|
|
|
126
142
|
DEFAULT_PROVIDER = AGY_PROVIDER
|
|
127
143
|
REVIEW_ORDER: tuple[str, ...] = (AGY_PROVIDER, "deepseek", "glm")
|
|
128
144
|
|
|
129
|
-
# agy runs headless through
|
|
145
|
+
# agy runs headless through caddis_spend.py run: plan mode (it needs no tools, the diff is in the prompt).
|
|
130
146
|
AGY_MODEL = "gemini-4-argon-high"
|
|
131
147
|
AGY_TIMEOUT_S = 15 * 60
|
|
132
148
|
# The prompt is one command-line argument (`--print=<prompt>`). A Windows command line holds at most
|
|
133
|
-
# 32,767 characters, so a larger prompt skips agy instead of failing to start.
|
|
149
|
+
# 32,767 characters, so a larger prompt skips agy instead of failing to start. The limit applies to the
|
|
150
|
+
# argument AS QUOTED (`agy_prompt_chars`): quoting escapes every `"`, so a diff of string literals costs more
|
|
151
|
+
# than len(prompt). Each hop (oss_review -> caddis_spend -> caddis_hidden_desktop -> agy) quotes the same
|
|
152
|
+
# argument once, not nested, so the cost is the same at every hop. The 4,767 chars left over hold the rest of
|
|
153
|
+
# the longest command line: python, two script paths, the agy path and the fixed flags.
|
|
154
|
+
WINDOWS_CMDLINE_MAX = 32_767
|
|
134
155
|
AGY_MAX_PROMPT_CHARS = 28_000
|
|
135
|
-
# `caddis_spend.py run` refusal
|
|
136
|
-
|
|
156
|
+
# `caddis_spend.py run` refusal code: 75 = headless depth at its limit, or the usage log could not be locked or
|
|
157
|
+
# written. Never agy's own. (78 "cap not configured" is gone with the cap, 1 Nov 2026.)
|
|
158
|
+
SPEND_REFUSED = (75,)
|
|
137
159
|
|
|
138
160
|
# On HTTP 429, wait for `Retry-After` once per provider per run, at most this long.
|
|
139
161
|
RETRY_AFTER_CAP_S = 60.0
|
|
@@ -193,7 +215,7 @@ class ProviderFailure(RuntimeError):
|
|
|
193
215
|
|
|
194
216
|
|
|
195
217
|
class ProviderSkipped(Exception):
|
|
196
|
-
"""The provider is not available for this run (
|
|
218
|
+
"""The provider is not available for this run (caddis_spend refused agy, agy is missing, the prompt
|
|
197
219
|
is too long for the agy command line). The chain moves on; nothing was reviewed. `for_run=False`: skip only
|
|
198
220
|
this prompt (it was too long), so a smaller batch may still use the provider."""
|
|
199
221
|
|
|
@@ -460,9 +482,12 @@ def changed_paths(diff_text: str) -> list[str]:
|
|
|
460
482
|
return paths
|
|
461
483
|
|
|
462
484
|
|
|
463
|
-
def batch_diff(diff_text: str, max_chars: int) -> list[str]:
|
|
485
|
+
def batch_diff(diff_text: str, max_chars: int, fits=None) -> list[str]:
|
|
464
486
|
"""Pack whole files into as few batches as possible, each under `max_chars`.
|
|
465
487
|
|
|
488
|
+
`fits(batch) -> bool`, when given, is a second test every batch must also pass (main() uses it to keep
|
|
489
|
+
each whole agy prompt within the agy command-line limit).
|
|
490
|
+
|
|
466
491
|
A single file larger than the ceiling gets its own batch and is sent anyway — it is
|
|
467
492
|
over the limit either way, and reviewing it is strictly better than skipping it. The
|
|
468
493
|
caller reports how many batches were used so an oversized single file is visible.
|
|
@@ -473,11 +498,12 @@ def batch_diff(diff_text: str, max_chars: int) -> list[str]:
|
|
|
473
498
|
batches: list[str] = []
|
|
474
499
|
current = ""
|
|
475
500
|
for chunk in files:
|
|
476
|
-
|
|
501
|
+
candidate = current + chunk
|
|
502
|
+
if current and (len(candidate) > max_chars or (fits is not None and not fits(candidate))):
|
|
477
503
|
batches.append(current)
|
|
478
504
|
current = chunk
|
|
479
505
|
else:
|
|
480
|
-
current
|
|
506
|
+
current = candidate
|
|
481
507
|
if current:
|
|
482
508
|
batches.append(current)
|
|
483
509
|
return batches
|
|
@@ -530,7 +556,8 @@ def build_review_prompt(diff_text: str, branch: str, rng: str | None,
|
|
|
530
556
|
)
|
|
531
557
|
return part_note + (
|
|
532
558
|
f"Perform an adversarial code review of the changes on branch '{branch}' ({scope}). "
|
|
533
|
-
"The unified diff is provided below.
|
|
559
|
+
"The full unified diff is provided below. Do not run any commands or tools: headless "
|
|
560
|
+
"agy auto-denies them and then returns an empty reply. Judge, in priority order: (1) correctness — logic "
|
|
534
561
|
"bugs, wrong results, missed edge cases; (2) tests — would a test fail without this "
|
|
535
562
|
"change, and are the stated behaviors covered; (3) security — injection, auth, secret "
|
|
536
563
|
"exposure, unvalidated input; (4) conventions — the repo's stated rules; (5) simplicity. "
|
|
@@ -545,13 +572,16 @@ def build_review_prompt(diff_text: str, branch: str, rng: str | None,
|
|
|
545
572
|
|
|
546
573
|
|
|
547
574
|
def classify_verdict(text: str) -> bool | None:
|
|
548
|
-
"""CLEAN→True, BLOCKING→False,
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
575
|
+
"""CLEAN→True, BLOCKING→False, anything else→None (fail-closed: exit 4).
|
|
576
|
+
|
|
577
|
+
Only the LAST non-empty line counts, as the prompt asks, and it must be exactly `REVIEW: CLEAN` or
|
|
578
|
+
`REVIEW: BLOCKING` (surrounding backticks, asterisks and whitespace are allowed). A substring match
|
|
579
|
+
anywhere counted a reply that QUOTES the marker as a verdict (audit, 29 Oct 2026)."""
|
|
580
|
+
lines = [line for line in (text or "").splitlines() if line.strip()]
|
|
581
|
+
if not lines:
|
|
582
|
+
return None
|
|
583
|
+
last = lines[-1].strip().strip("`*").strip()
|
|
584
|
+
return {"REVIEW: CLEAN": True, "REVIEW: BLOCKING": False}.get(last)
|
|
555
585
|
|
|
556
586
|
|
|
557
587
|
def call_llm(base_url: str, api_key: str, model: str, prompt: str, timeout: int = 180) -> str:
|
|
@@ -607,8 +637,8 @@ def _spend_script() -> Path | None:
|
|
|
607
637
|
|
|
608
638
|
|
|
609
639
|
def agy_launcher() -> list[str] | None:
|
|
610
|
-
"""The command prefix that runs agy
|
|
611
|
-
Every agy call goes through `caddis_spend.py run` (
|
|
640
|
+
"""The command prefix that runs agy through `caddis_spend.py run`, or None when agy or caddis_spend is missing.
|
|
641
|
+
Every agy call goes through `caddis_spend.py run` (usage log, timeout and depth guard; there is no EUR cap)."""
|
|
612
642
|
agy = shutil.which("agy")
|
|
613
643
|
spend = _spend_script()
|
|
614
644
|
if not agy or spend is None:
|
|
@@ -670,20 +700,26 @@ def _agy_document(stdout: str) -> dict | None:
|
|
|
670
700
|
return found
|
|
671
701
|
|
|
672
702
|
|
|
703
|
+
def agy_prompt_chars(prompt: str) -> int:
|
|
704
|
+
"""What the prompt costs on the command line: the `--print=<prompt>` argument as subprocess quotes it."""
|
|
705
|
+
return len(subprocess.list2cmdline([f"--print={prompt}"]))
|
|
706
|
+
|
|
707
|
+
|
|
673
708
|
def call_agy(launcher: list[str], prompt: str, timeout: float = AGY_TIMEOUT_S) -> str:
|
|
674
|
-
"""One review by agy Argon through
|
|
709
|
+
"""One review by agy Argon through `caddis_spend.py run` -> the reply text.
|
|
675
710
|
|
|
676
|
-
ProviderSkipped:
|
|
711
|
+
ProviderSkipped: caddis_spend refused (exit 75), agy is missing, or the prompt is too long for one argument.
|
|
677
712
|
ProviderFailure: a non-zero exit, a status other than SUCCESS (ERROR, RESOURCE_EXHAUSTED), no JSON
|
|
678
713
|
document, or an empty reply."""
|
|
679
|
-
|
|
680
|
-
|
|
714
|
+
cost = agy_prompt_chars(prompt)
|
|
715
|
+
if cost > AGY_MAX_PROMPT_CHARS:
|
|
716
|
+
raise ProviderSkipped(f"prompt is {cost:,} chars once quoted, over the {AGY_MAX_PROMPT_CHARS:,}-char "
|
|
681
717
|
"agy command-line limit", for_run=False)
|
|
682
718
|
argv = [*launcher, "--model", AGY_MODEL, "--mode", "plan", "--output-format", "json",
|
|
683
719
|
f"--print={prompt}"]
|
|
684
720
|
code, stdout, stderr = _run_capped(argv, timeout)
|
|
685
721
|
if code in SPEND_REFUSED:
|
|
686
|
-
raise ProviderSkipped(f"
|
|
722
|
+
raise ProviderSkipped(f"caddis_spend refused the agy call (exit {code}): "
|
|
687
723
|
f"{stderr.strip()[-300:]}")
|
|
688
724
|
if code == 127:
|
|
689
725
|
raise ProviderSkipped(f"agy could not start: {stderr.strip()[-300:]}")
|
|
@@ -826,6 +862,11 @@ def main(argv: list[str] | None = None, env: dict[str, str] | None = None) -> in
|
|
|
826
862
|
print("REVIEW: REFUSED — every changed file is excluded")
|
|
827
863
|
return EXIT_CONFIG
|
|
828
864
|
diff_text = filter_result.kept_diff
|
|
865
|
+
# A verdict on the rest of the change is not a verdict on the whole change. This line goes just before
|
|
866
|
+
# the final `REVIEW:` line. Callers look for this exact text (lanes must not accept a partial review).
|
|
867
|
+
dropped = filter_result.dropped_paths
|
|
868
|
+
scope_line = (f"REVIEW-SCOPE: PARTIAL ({len(dropped)} file(s) excluded by the secret filter: "
|
|
869
|
+
f"{', '.join(dropped)})" if dropped else "")
|
|
829
870
|
|
|
830
871
|
named = named_provider(args, env)
|
|
831
872
|
# A custom ENDPOINT names exactly who reviews (REVIEW_BASE_URL/REVIEW_MODEL, the documented
|
|
@@ -878,6 +919,13 @@ def main(argv: list[str] | None = None, env: dict[str, str] | None = None) -> in
|
|
|
878
919
|
sys.stderr.write(f"{exc}\n")
|
|
879
920
|
return EXIT_CONFIG
|
|
880
921
|
|
|
922
|
+
if not diff_text.strip() and args.range:
|
|
923
|
+
# An explicit range with no changes is a wrong range far more often than a finished one (for example
|
|
924
|
+
# HEAD..HEAD after a commit). A review of nothing is not CLEAN: could not run.
|
|
925
|
+
sys.stderr.write(f"could not run: the range {args.range} has no changes, so there is nothing to review. "
|
|
926
|
+
"A review of nothing is not CLEAN. Check the range (for example origin/main..HEAD), "
|
|
927
|
+
"or leave out --range to review the working tree.\n")
|
|
928
|
+
return EXIT_CONFIG
|
|
881
929
|
if not diff_text.strip():
|
|
882
930
|
# Says what was scanned, not just that nothing was found. This branch used to fire
|
|
883
931
|
# on a tree full of NEW files (they are invisible to `git diff HEAD`) and report
|
|
@@ -892,7 +940,18 @@ def main(argv: list[str] | None = None, env: dict[str, str] | None = None) -> in
|
|
|
892
940
|
if max_diff_chars is None:
|
|
893
941
|
env_val = (env.get("REVIEW_MAX_DIFF_CHARS") or "").strip()
|
|
894
942
|
max_diff_chars = int(env_val) if env_val.isdigit() else DEFAULT_MAX_DIFF_CHARS
|
|
895
|
-
|
|
943
|
+
branch = current_branch(args.cwd)
|
|
944
|
+
whole_change = changed_paths(diff_text)
|
|
945
|
+
# With agy in the chain, every batch must also fit agy: the WHOLE prompt (fixed text, the file list of
|
|
946
|
+
# a multi-batch run, the diff) as quoted on the command line. Without this, a 36k phase diff was one
|
|
947
|
+
# 60k-ceiling batch that agy skipped, and a machine with no other key got exit 3 and no review.
|
|
948
|
+
# A single file that cannot fit still gets its own batch: agy skips it, and the next provider reviews it.
|
|
949
|
+
agy_in_chain = any(name == AGY_PROVIDER for name, *_ in chain)
|
|
950
|
+
|
|
951
|
+
def _fits_agy(batch: str) -> bool:
|
|
952
|
+
return agy_prompt_chars(build_review_prompt(batch, branch, args.range, whole_change)) <= AGY_MAX_PROMPT_CHARS
|
|
953
|
+
|
|
954
|
+
batches = batch_diff(diff_text, max_diff_chars, _fits_agy if agy_in_chain else None) or [diff_text]
|
|
896
955
|
# Batching only helps when the diff HAS file boundaries to cut on. A single file (or a
|
|
897
956
|
# blob with no `diff --git` headers) larger than the ceiling cannot be split, and sending
|
|
898
957
|
# it anyway would reintroduce exactly the silent false-CLEAN the ceiling exists to stop.
|
|
@@ -933,18 +992,20 @@ def main(argv: list[str] | None = None, env: dict[str, str] | None = None) -> in
|
|
|
933
992
|
"reporting a verdict that looks whole.\n"
|
|
934
993
|
" Narrow --range to a smaller commit span, or raise --max-diff-chars if you know "
|
|
935
994
|
"your endpoint's real limit.\n"
|
|
995
|
+
+ (f" agy-argon is in the provider chain, so each batch prompt is also kept within "
|
|
996
|
+
f"{AGY_MAX_PROMPT_CHARS:,} command-line chars.\n" if agy_in_chain else "")
|
|
936
997
|
)
|
|
937
998
|
return EXIT_ERROR
|
|
938
999
|
if len(batches) > 1:
|
|
939
1000
|
print(
|
|
940
|
-
f"[cross-review] diff is {len(diff_text):,} chars
|
|
941
|
-
f"
|
|
942
|
-
"
|
|
1001
|
+
f"[cross-review] diff is {len(diff_text):,} chars — reviewing in {len(batches)} batches split on "
|
|
1002
|
+
f"file boundaries (ceiling {max_diff_chars:,} diff chars"
|
|
1003
|
+
+ (f"; agy-argon is in the chain, so each whole prompt also stays within {AGY_MAX_PROMPT_CHARS:,} "
|
|
1004
|
+
"command-line chars" if agy_in_chain else "")
|
|
1005
|
+
+ "). Verdict is CLEAN only if every batch is clean."
|
|
943
1006
|
)
|
|
944
1007
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
# Per run: a provider that failed (429, 5xx, timeout, empty reply, cap refusal) gets no more calls,
|
|
1008
|
+
# Per run: a provider that failed (429, 5xx, timeout, empty reply, caddis_spend refusal) gets no more calls,
|
|
948
1009
|
# and each provider waits for a 429 Retry-After at most once. Hammering a throttled provider with
|
|
949
1010
|
# more, smaller calls is the 18-19 Oct 2026 failure.
|
|
950
1011
|
down: set[str] = set()
|
|
@@ -1024,7 +1085,6 @@ def main(argv: list[str] | None = None, env: dict[str, str] | None = None) -> in
|
|
|
1024
1085
|
out += got
|
|
1025
1086
|
return out, []
|
|
1026
1087
|
|
|
1027
|
-
whole_change = changed_paths(diff_text)
|
|
1028
1088
|
verdicts: list[bool | None] = []
|
|
1029
1089
|
for batch_no, batch in enumerate(batches, 1):
|
|
1030
1090
|
label = f" (batch {batch_no}/{len(batches)})" if len(batches) > 1 else ""
|
|
@@ -1044,6 +1104,8 @@ def main(argv: list[str] | None = None, env: dict[str, str] | None = None) -> in
|
|
|
1044
1104
|
if any(v is False for v in verdicts):
|
|
1045
1105
|
# An earlier batch already found a blocking issue. A later failure must not hide it behind
|
|
1046
1106
|
# NOT_RUN (3), which reads as "nothing found, retry". Fail closed and report the finding.
|
|
1107
|
+
if scope_line:
|
|
1108
|
+
print(scope_line)
|
|
1047
1109
|
print("REVIEW: BLOCKING (an earlier batch blocked; the remaining batches were not reviewed)")
|
|
1048
1110
|
return EXIT_BLOCKING
|
|
1049
1111
|
return EXIT_CONFIG if not_run else EXIT_ERROR
|
|
@@ -1066,6 +1128,11 @@ def main(argv: list[str] | None = None, env: dict[str, str] | None = None) -> in
|
|
|
1066
1128
|
if unparsed:
|
|
1067
1129
|
print("[cross-review] a chunk with no verdict is NOT a pass — the overall result "
|
|
1068
1130
|
"below is fail-closed.")
|
|
1131
|
+
if scope_line and verdict is not None:
|
|
1132
|
+
# The model's own verdict line came earlier (and the ledger may follow it), so restate the overall
|
|
1133
|
+
# verdict here: the scope line sits directly above the last `REVIEW:` line.
|
|
1134
|
+
print(scope_line)
|
|
1135
|
+
print("REVIEW: CLEAN" if verdict else "REVIEW: BLOCKING")
|
|
1069
1136
|
if verdict is True:
|
|
1070
1137
|
return EXIT_CLEAN
|
|
1071
1138
|
if verdict is False:
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
# 3. `caddis_roadmap.py recheck` cleared a blocker (exit 0); in a `merged:`, `freed:` or `rollup-ready:` tick
|
|
10
10
|
# recheck is NOT run (the
|
|
11
11
|
# merge is the change, and a cleared blocker would change the roadmap the restart checks against its hash);
|
|
12
|
-
# 4. agy engine only (the recorded launch options): `caddis_spend.py check` exits 0.
|
|
12
|
+
# 4. agy engine only (the recorded launch options): `caddis_spend.py check` exits 0. There is no spend cap (1 Nov
|
|
13
|
+
# 2026), so check always exits 0 and prints the usage line (with ADVISORY at the advise level); a non-zero
|
|
14
|
+
# exit now means the script itself failed.
|
|
13
15
|
# It restarts with the launch options the last run recorded (`--restart-args`: engine, model, caps), never the
|
|
14
16
|
# defaults. A run that holds the lock records the last stop `running`, so a run killed without a stop (a crash, a
|
|
15
17
|
# reboot) is never restarted here: it needs the owner.
|
|
@@ -72,7 +74,7 @@ $options = @(& $py $runnerPy --roadmap $Roadmap --repo $Repo --restart-args | Wh
|
|
|
72
74
|
if ($LASTEXITCODE -ne 0) { Write-Output "roadmap-recheck: launch options not readable; runner not started"; exit 1 }
|
|
73
75
|
if ($GhAccount -and $options -notcontains '-GhAccount') { $options += @('-GhAccount', $GhAccount) }
|
|
74
76
|
|
|
75
|
-
#
|
|
77
|
+
# agy engine only: print the agy usage line (no cap; check exits 0 unless the script itself fails).
|
|
76
78
|
$engineAt = [array]::IndexOf($options, '-Engine')
|
|
77
79
|
$engine = if ($engineAt -ge 0 -and $engineAt + 1 -lt $options.Count) { $options[$engineAt + 1] } else { 'claude' }
|
|
78
80
|
if ($engine -eq 'agy') {
|
|
@@ -27,7 +27,7 @@ What the keys mean:
|
|
|
27
27
|
| `reviews.count` | How many reviews a PR needs before it is ready. |
|
|
28
28
|
| `reviews.stop_on` | Which review findings stop a merge. `blocking`: only blocking findings. |
|
|
29
29
|
| `peer_ack.warning_min` | Minutes between the merge warning and the merge. |
|
|
30
|
-
| `peer_ack.ack_file` | Where each peer writes its ack: `{head, acked[], at}`. An ack older than 30 minutes does not count. |
|
|
30
|
+
| `peer_ack.ack_file` | Where each peer writes its ack: `{head, acked[], at}`. An ack older than 30 minutes does not count. Only a peer with a stake in the repo must ack: its folder is in the repo or a worktree of it, or the coordinator lists one of its PRs, branches or plan phases, or it sent `ready` or `phase`. A peer with no stake is not warned and is not in `acked[]`. |
|
|
31
31
|
| `deploy.event` | The event that starts the deploy run (for example `push`). |
|
|
32
32
|
| `deploy.jobs` | The number of jobs in the deploy run. |
|
|
33
33
|
| `deploy.tag` | The release tag scheme. With `calver`, the tag must point at the merge SHA. |
|
|
@@ -229,14 +229,26 @@ and 7.3. While the queue is frozen (section 5 step 1), do steps 3.1 to 3.3 only.
|
|
|
229
229
|
`GH_TOKEN=$(gh auth token -u <account>) python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_lanes.py" ci-watch --run <id> --repo <owner/name>`,
|
|
230
230
|
in the background (`run_in_background: true`). When its `RESULT:` line comes, check M1 again.
|
|
231
231
|
9. Send `merge-warning <PR> <watched sha> in 2 min. Reply ack <PR> <sha> or hold.` to every live peer
|
|
232
|
-
(design 7.3), and `queue set --repo <R> --pr <n> --state merging`. Send
|
|
233
|
-
restart and after any new head on a warned PR. Old acks do not count.
|
|
232
|
+
that has a stake in this repo (design 7.3), and `queue set --repo <R> --pr <n> --state merging`. Send
|
|
233
|
+
`re-warn <PR> <sha>` after any coordinator restart and after any new head on a warned PR. Old acks do not count.
|
|
234
|
+
Stake test, run for each live peer at the warning (design 7.3a). A peer has a stake when ANY of these
|
|
235
|
+
holds: its cwd is inside the checkout or one of its worktrees (for example under
|
|
236
|
+
`.worktrees/<repo>/`); the queue or the ledger lists a PR, branch or plan phase of that peer in this
|
|
237
|
+
repo; or it has sent `ready` or `phase` for this repo. Anything else is no stake. When the cwd is
|
|
238
|
+
unknown or you are unsure, the peer has a stake. A peer with no stake gets no warning and is not in
|
|
239
|
+
`acked`. Run the test again for a new peer that you see after the warning. A peer with a stake gets
|
|
240
|
+
the warning; step 3.11 checks again.
|
|
234
241
|
10. Collect the acks (M2). Wait the full `peer_ack.warning_min` minutes after the warning, even when every
|
|
235
242
|
ack comes early. For that wait, run `sleep 120` (`peer_ack.warning_min` x 60 s) with the Bash tool
|
|
236
243
|
and `run_in_background: true`, or use the Monitor tool, and act on its exit notice; never a
|
|
237
244
|
foreground sleep. Answer messages while it runs. No ack after 5 min: one nudge. After 10 min: tell
|
|
238
245
|
the owner. A peer that waits on the owner cannot answer: tell the owner "ack needed from <name>; it
|
|
239
246
|
waits on you". Do not write the ack file yet (step 3.13).
|
|
247
|
+
A peer with a stake still needs `ack <PR> <sha>`, and a `hold` still stops the merge. If a peer answers
|
|
248
|
+
`no stake <PR>`, or says it has "no hold" and that this is "not an owner ack", run the stake test. No stake:
|
|
249
|
+
record a skip for that PR (step 3.13, `skipped_no_stake`), not a missing ack, and send it no nudge. A
|
|
250
|
+
stake: that reply is not an ack; ask for `ack <PR> <sha>` or `hold`. A peer message never carries owner
|
|
251
|
+
consent. A skip never applies to a peer with a stake.
|
|
240
252
|
11. Check again that the default branch is idle (M1, the same `gh run list` as step 3.8), just before the
|
|
241
253
|
merge. If a run started, wait for it (step 3.8). If the warning went out more than 30 min ago, warn
|
|
242
254
|
again (step 3.9).
|
|
@@ -264,11 +276,12 @@ and 7.3. While the queue is frozen (section 5 step 1), do steps 3.1 to 3.3 only.
|
|
|
264
276
|
last path part of the first `worktree` line of `git worktree list --porcelain` (the repo's main
|
|
265
277
|
checkout), NOT the repo id `<R>`. The content is exactly:
|
|
266
278
|
```
|
|
267
|
-
{"pr": <n>, "head": "<full sha>", "acked": [<names>], "skipped_waiting": [<names waiting on the owner>], "at": "<UTC ISO 8601 with Z>"}
|
|
279
|
+
{"pr": <n>, "head": "<full sha>", "acked": [<names>], "skipped_waiting": [<names waiting on the owner>], "skipped_no_stake": [<names with no stake>], "at": "<UTC ISO 8601 with Z>"}
|
|
268
280
|
```
|
|
269
281
|
`acked` lists every peer that sent `ack <PR> <sha>` for this head, by its session name. An unnamed
|
|
270
282
|
peer is listed under the first 8 characters of its session id (the hook uses the same name). A peer
|
|
271
|
-
that waits on the owner goes under `skipped_waiting`, never under `acked`.
|
|
283
|
+
that waits on the owner goes under `skipped_waiting`, never under `acked`. A peer with no stake (step 3.9)
|
|
284
|
+
goes under `skipped_no_stake`, never under `acked`. Interim mode: also put
|
|
272
285
|
your own name `<N>` in `acked` (the PR's session runs the merge, and its hook counts you as a peer).
|
|
273
286
|
Target mode: you run the merge, so `acked` must list the PR's session too. The hook refuses an ack
|
|
274
287
|
file older than 30 min.
|
|
@@ -81,16 +81,27 @@ writes. This line used to prefix the flag itself, which turned that into a doubl
|
|
|
81
81
|
Optional: `--base-url <url>`, `--model <id>` (env always overrides the preset).
|
|
82
82
|
|
|
83
83
|
**A large diff is batched, not refused.** Over `REVIEW_MAX_DIFF_CHARS` (default 60,000) the tool splits
|
|
84
|
-
on whole-file boundaries and reviews each batch, and the verdict is CLEAN only if every batch is.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
on whole-file boundaries and reviews each batch, and the verdict is CLEAN only if every batch is. When agy
|
|
85
|
+
Argon is anywhere in the provider chain, each batch is also kept small enough that its **whole prompt** fits
|
|
86
|
+
the agy command line (28,000 chars once quoted, so under about 27,000 diff chars, fewer when the diff has many `"`). A **single file** too
|
|
87
|
+
big for agy gets its own batch: agy skips it and the next provider reviews it. With no other provider (no
|
|
88
|
+
DeepSeek or GLM key), that file gives exit **3**. Exit **4** means a **single file** over the 60,000 ceiling,
|
|
89
|
+
or more batches than the cap. When you see either, review that one file separately (or add a key for an
|
|
90
|
+
HTTP provider), not a narrower `--range`; don't raise `--max-diff-chars` blind.
|
|
91
|
+
|
|
92
|
+
**The verdict is the last line.** Only the last non-empty line of the reply counts, and it must be
|
|
93
|
+
exactly `REVIEW: CLEAN` or `REVIEW: BLOCKING`. A reply that quotes the marker earlier and ends some other
|
|
94
|
+
way has no verdict (exit 4). An explicit `--range` with no changes is exit **3** (a review of nothing is not
|
|
95
|
+
CLEAN); the working tree with no changes is still CLEAN. When the secret filter drops some files, the
|
|
96
|
+
output ends with `REVIEW-SCOPE: PARTIAL (<n> file(s) excluded by the secret filter: <names>)` and then the
|
|
97
|
+
overall `REVIEW:` line. The exit code does not change, but the excluded files were **not reviewed**: say so,
|
|
98
|
+
and never report the result as a full CLEAN.
|
|
88
99
|
|
|
89
100
|
**Do not alternate providers on a schedule.** The order is the owner policy (21 Oct 2026): **agy Argon,
|
|
90
101
|
then DeepSeek, then GLM** (`REVIEW_ORDER` in `oss_review.py`). A named `--provider` goes first; on a provider failure
|
|
91
102
|
(HTTP 429, any 5xx, a timeout, a connection error, an empty reply) the tool moves to the next one in
|
|
92
103
|
that order and prints which provider gave the verdict. A provider with no key is skipped. agy runs
|
|
93
|
-
through `caddis_spend.py run` (
|
|
104
|
+
through `caddis_spend.py run` (usage log, time limit, depth guard; no spend cap); if it refuses (exit 75), agy is skipped. On a 429 the tool
|
|
94
105
|
waits for `Retry-After` once (at most 60 s); it never splits the diff because of a 429 or an empty
|
|
95
106
|
reply. A custom endpoint (`--base-url`/`--model`) never falls back. Name a provider only when you have
|
|
96
107
|
a reason.
|
|
@@ -103,7 +114,8 @@ a reason.
|
|
|
103
114
|
- **1 — REVIEW: BLOCKING** → read the printed findings, then **FIX each blocking item** (or explicitly
|
|
104
115
|
justify why one is a false positive). Fix it, then re-review only the fix diff. After 3 rounds, ask the owner (rule 3).
|
|
105
116
|
- **4 — error** → no verdict parsed, or a git/endpoint failure. Read stderr; do NOT treat as clean.
|
|
106
|
-
- **3 — could not run** → no key (see Prerequisite), the secret filter refused,
|
|
117
|
+
- **3 — could not run** → no key (see Prerequisite), the secret filter refused, an explicit `--range` has
|
|
118
|
+
no changes, or every provider
|
|
107
119
|
failed (429, 5xx, timeout, empty reply). Read stderr. A provider failure is not a verdict: re-run later.
|
|
108
120
|
|
|
109
121
|
## Three rules: one attempt, one review
|
|
@@ -182,7 +182,7 @@ of that role and write its Lane line as follows:
|
|
|
182
182
|
- `agy`: agy — `python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_spend.py" run --caller lane-pN -- agy --mode accept-edits --dangerously-skip-permissions --add-dir . --print-timeout 20m --output-format json -p "HEADLESS RUN RULES. Read <plan path> and its Constraints. Implement Phase N only in the current checkout. Do not switch or create branches, commit, push, or edit files outside this phase. Run its exit gate and report the literal result."`
|
|
183
183
|
|
|
184
184
|
Replace `<plan path>` and `N` (also in `lane-pN`) with this plan's path and phase number. The agy line
|
|
185
|
-
always starts with `caddis_spend.py run`: it
|
|
185
|
+
always starts with `caddis_spend.py run`: it logs the call's usage and sets its time limit (there is no spend cap), and
|
|
186
186
|
`caddis_gate.py lane-check` refuses a bare `agy` Lane line. If the routing command fails
|
|
187
187
|
or exits 3, use `claude — this session` and state the reason in that phase. When a phase has cards, a
|
|
188
188
|
prompt for one card names it by reference ("then Phase N card B"). Never paste card text into a prompt.
|
|
@@ -422,6 +422,11 @@ Status words (one vocabulary, `scripts/caddis_status.py`): done is `done`, `merg
|
|
|
422
422
|
`in progress`, `blocked` and `moved` name the other states; anything else (`not started`, `☐`) is to do. A cell
|
|
423
423
|
that says `pending` is never done.
|
|
424
424
|
|
|
425
|
+
The plan's frontmatter `status:` is a different axis from these cells. Use only the known words:
|
|
426
|
+
`draft` (being written), `proposed` (written, not agreed), `ready` (agreed, waiting), `current` (work is under
|
|
427
|
+
way), then `done` or `superseded`. Never `in-progress`, `active` or `wip`: `check_doc_coverage.py` warns on
|
|
428
|
+
them and suggests the nearest known word.
|
|
429
|
+
|
|
425
430
|
## Per-symbol grep preflight (before the plan is committed)
|
|
426
431
|
Check every name a card gives: each symbol, file, line number and CSS variable. Use one grep per name
|
|
427
432
|
(Grep, or `git grep -n`) before you commit the plan. Fix the card when a name or a line number differs.
|
|
@@ -24,6 +24,8 @@ them into its commit, so check first, before Step 1.
|
|
|
24
24
|
```
|
|
25
25
|
It prints `SHARED: yes <reason>` or `SHARED: no` and exits 0. It says yes when the root `AGENTS.md`
|
|
26
26
|
has a line `Shared checkout: yes`, or when `git status` lists a path this session did not change.
|
|
27
|
+
Files that caddis writes itself (the generated index `.caddis/relay.md`, `*.jsonl` logs, locks and `.bak`
|
|
28
|
+
copies in `.caddis/`) never count as another session's change.
|
|
27
29
|
3. **On `SHARED: no`,** do the steps below as written.
|
|
28
30
|
4. **On `SHARED: yes`,** write NO tracked file in this checkout. Run:
|
|
29
31
|
```
|
|
@@ -31,6 +33,11 @@ them into its commit, so check first, before Step 1.
|
|
|
31
33
|
```
|
|
32
34
|
It makes a new worktree from `origin/<default>` on a `docs/handoff-<utc>` branch and prints
|
|
33
35
|
`WORKTREE: <path>`. That worktree is this session's only; no other session's edits can enter it.
|
|
36
|
+
**If the repo has no `origin` remote,** it exits 3 and prints
|
|
37
|
+
`no remote: commit explicit paths in place (git add <named files>; git commit)`. A docs PR needs a
|
|
38
|
+
remote, so skip the worktree path: name each file this session changed, `git add` those files only
|
|
39
|
+
(never `-A` or a directory), commit them, and leave every other dirty path alone. The tool commits nothing
|
|
40
|
+
itself. Then do the steps below as written, in this checkout.
|
|
34
41
|
Then, in the steps below:
|
|
35
42
|
- Step 1: tell the `knowledge-transfer` subagent to edit files ONLY under the `WORKTREE:` path.
|
|
36
43
|
- Step 3, point 4: make the plan's Tracker edit in `<worktree>/.caddis/plans/<feature>.md`, and write
|
|
@@ -200,8 +207,11 @@ Nothing to say is the normal answer. Say nothing and move on — this must not b
|
|
|
200
207
|
<!-- /shared:harness-friction-question -->
|
|
201
208
|
|
|
202
209
|
## Step 3 — write the resume doc (overwrite) with exactly these sections
|
|
203
|
-
Write the relay from scratch with the current state only. Never append to the old text
|
|
204
|
-
|
|
210
|
+
Write the relay from scratch with the current state only. Never append to the old text. The relay has a
|
|
211
|
+
4,000-character budget (`caddis_budget.py`), and `put`/`write` refuse a longer relay. `.caddis/relay/` is
|
|
212
|
+
git-ignored, so git keeps no history of it: before you rewrite a long relay, copy it to
|
|
213
|
+
`.caddis/relay/<name>.md.bak`. Keep any other note in `.caddis/relay/` under the same 4,000 characters (the
|
|
214
|
+
budget covers every `*.md` file there); put a longer note elsewhere, for example under `.caddis/kb/`.
|
|
205
215
|
|
|
206
216
|
> **Where to write:** this session's own workstream relay, `.caddis/relay/<name>.md`, through the
|
|
207
217
|
> locked script — never with a plain file edit, which would skip the conflict check. `.caddis/relay.md`
|
|
@@ -122,8 +122,8 @@ not hold the child's work. So these rules keep briefs and replies small:
|
|
|
122
122
|
7. **Merge:** one member at a time into the feature branch. Run the whole test folder after each merge, and
|
|
123
123
|
the phase gates. A conflict stops that member only.
|
|
124
124
|
8. **Cost:** wave cost is the sum of its members, each on the cheapest fitting model from the session table
|
|
125
|
-
(`caddis_routing.py session`).
|
|
126
|
-
|
|
125
|
+
(`caddis_routing.py session`). There is no spend cap: `caddis_spend.py status` shows the agy spend; if it
|
|
126
|
+
ends with ` - ADVISORY`, tell the owner before the wave. Exit 75 means "not run", not "failed".
|
|
127
127
|
9. **No plan-time marker.** Pick the wave from the CURRENT `Files:` lists: at most 3 phases, disjoint, one
|
|
128
128
|
worktree each. Safety comes from this run-time check and the whole test folder after each merge, not
|
|
129
129
|
from the plan: phases often touch files outside their `Files:`. A plan adds only an optional
|
|
@@ -259,7 +259,10 @@ row, visible to any later reader without anyone having to catch it live.
|
|
|
259
259
|
refusal). If you checked the finding and it is false, add
|
|
260
260
|
`--override-review "<why the finding is false>"`. For a `MISSING` review, re-run the review
|
|
261
261
|
first; add the override only if the owner accepts a phase with no vendor verdict. The reason
|
|
262
|
-
must not be empty. The script records it in the packet.
|
|
262
|
+
must not be empty. The script records it in the packet. It also refuses a `PARTIAL` review
|
|
263
|
+
(the secret filter dropped files, so CLEAN covers only part of the diff); review the dropped
|
|
264
|
+
files yourself before you add an override. A lane that committed gets no review
|
|
265
|
+
(`COMMITTED`, `NEXT: redo`), and accept refuses any lane commit, even with an override.
|
|
263
266
|
4. Allow at most **2 attempts** per phase on a non-Claude lane. An out-of-budget switch is not an
|
|
264
267
|
attempt. The owner can request TAKEOVER at any time.
|
|
265
268
|
5. A UI phase needs a `ui-design-reviewer` screenshot review before ACCEPT. This rule applies
|
|
@@ -304,10 +307,11 @@ row, visible to any later reader without anyone having to catch it live.
|
|
|
304
307
|
Re-dispatch the same phase prompt to the printed lane with its direct launch command:
|
|
305
308
|
`codex exec ...` or `python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_spend.py" run --caller lane-pN -- agy ... -p "..."`,
|
|
306
309
|
using the same form that `/feature-plan` writes. Never start agy without the `caddis_spend.py run`
|
|
307
|
-
prefix: it
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
Each refusal also prints a `caddis_spend:` line on stderr.
|
|
310
|
+
prefix: it logs the usage, sets the time limit and guards the headless depth (there is no spend cap).
|
|
311
|
+
Its own exit codes are never agy's: **75** = headless depth at its limit or the usage log could not
|
|
312
|
+
be locked (treat like out of budget: switch lane, not an attempt); **124** = the call ran past its
|
|
313
|
+
time limit and was killed. Each refusal also prints a `caddis_spend:` line on stderr. A
|
|
314
|
+
`caddis_spend: ADVISORY:` line is advice only: the call ran; tell the owner. Any other exit code is agy's own.
|
|
311
315
|
An out-of-budget switch is not an attempt (item 4). Record the fallback in the Tracker
|
|
312
316
|
`Lane` column, for example `sonnet -> agy (claude out of budget)`.
|
|
313
317
|
If `next-lane` exits 3, stop and report that no lane is left. As a last resort, the owner can
|
|
@@ -183,7 +183,8 @@ unattended; `-Plan <slug>` runs one plain plan instead (the two are exclusive).
|
|
|
183
183
|
and deletes the claim.
|
|
184
184
|
CONTINUE with the phase already merged on origin: `rollup` when every phase is merged, then back to 1. CONTINUE
|
|
185
185
|
with no new commits and nothing merged stops FAILED. `STATUS: OWNER-GATE <r>` becomes an `owner-gate` blocker,
|
|
186
|
-
`STATUS: BLOCKED <r>` an `external` one; then back to 1. `STATUS: FAILED` stops.
|
|
186
|
+
`STATUS: BLOCKED <r>` an `external` one; then back to 1. `STATUS: FAILED` stops. A relay the session did not
|
|
187
|
+
change (the same hash as before it, whatever its status line) stops `FAILED no relay written`.
|
|
187
188
|
5. Every `**Risk:** high` phase done on the branch and not yet reviewed clean (record in the runner's own folder:
|
|
188
189
|
`<git common dir>/caddis-runner/roadmap-<slug>/reviewed/<plan>.json`; another runner's record does not count) is
|
|
189
190
|
reviewed BEFORE step 4 writes the claim and publishes
|
|
@@ -192,9 +193,9 @@ unattended; `-Plan <slug>` runs one plain plan instead (the two are exclusive).
|
|
|
192
193
|
code `BLOCKED review not run` (neither restartable); the review cost counts against the USD caps.
|
|
193
194
|
|
|
194
195
|
Stops (each one notifies and releases the lock): a STOP file (`~/.caddis/STOP` or `.local/STOP`), any cap (10 h,
|
|
195
|
-
12 sessions, 120 min and USD 25 per session, USD 150 total; per run, in memory;
|
|
196
|
-
`caddis_spend.py`
|
|
197
|
-
(`BLOCKED claim not written`, before any session),
|
|
196
|
+
12 sessions, 120 min and USD 25 per session, USD 150 total; per run, in memory; there is no agy EUR cap since
|
|
197
|
+
1 Nov 2026, only the usage log of `caddis_spend.py` and its ADVISORY line), a lock or batch claim that cannot be written
|
|
198
|
+
(`BLOCKED claim not written`, before any session), an agy usage log that cannot be locked or written, three sessions
|
|
198
199
|
with no newly merged phase, a roadmap write that fails, and the **snapshot guard**: one baseline for the whole run.
|
|
199
200
|
The Milestones and Blockers tables (every cell of every row, rows added, removed or moved), the `Runner host` line
|
|
200
201
|
and the `**Exit setup:**` line are frozen. Every origin read (each `next`, after the runner's own writes, after each session) is compared with the
|
|
@@ -249,8 +250,8 @@ the owner edits the roadmap during a merge wait, the restart stops `FAILED roadm
|
|
|
249
250
|
recovery: `roadmap-run.ps1 -Roadmap <slug> -AcceptRoadmap` (owner only, refused headless) takes the runner lock (a live
|
|
250
251
|
runner refuses it), prints the diff from the published baseline, asks you to type `accept` (or `--yes`), and accepts
|
|
251
252
|
the origin roadmap as the new baseline of the wait; the next start goes on. With `-DryRun` it prints the diff only. `--last-stop` uses `--gh-account`, else the account the run recorded
|
|
252
|
-
in its launch options. In all cases the lock must be absent or stale; for the agy engine `caddis_spend.py check` must exit 0 too (
|
|
253
|
-
|
|
253
|
+
in its launch options. In all cases the lock must be absent or stale; for the agy engine `caddis_spend.py check` must exit 0 too (it
|
|
254
|
+
always does unless the script fails; there is no spend cap). A restart after a merge writes `pending-rollup.json` in its runner
|
|
254
255
|
folder, runs the rollup first, then removes the claim and the branch, and only then the file. Every stop records
|
|
255
256
|
itself: a failed rollup, a crash or a STOP file before that is not restartable (the owner decides), and the next start
|
|
256
257
|
finds the file and does the rollup first. A merged
|
|
@@ -271,7 +272,7 @@ Sessions are cooperative (our own sessions): the runner guards against mistakes
|
|
|
271
272
|
deliberately hostile session, which runs as the same OS user and could change anything the runner can. The state
|
|
272
273
|
tripwire catches accidents in a runner's own state only. In particular, a session in another worktree of the repo can
|
|
273
274
|
delete or rewrite ANOTHER runner's claim or lock under `<git common dir>/caddis-runner/`; that is not caught while it
|
|
274
|
-
happens, and the victim runner fails closed only at its next restart (own claim missing or changed, orphaned claim). Caps are per run;
|
|
275
|
+
happens, and the victim runner fails closed only at its next restart (own claim missing or changed, orphaned claim). Caps are per run; nothing limits spend across runs (the agy usage log only advises). Each roadmap has one
|
|
275
276
|
worktree, removed when the roadmap is finished and the worktree is clean.
|
|
276
277
|
|
|
277
278
|
Owner-only rules are enforced by this tool; a direct PR that edits `roadmap.md` bypasses them; the runner stops
|
|
@@ -44,8 +44,8 @@ publish a branch that does). Commit the phase there, with its tracker row set to
|
|
|
44
44
|
## 4. Work
|
|
45
45
|
|
|
46
46
|
- Do ONE batch with `/caddis:implement` discipline: tests first, the phase's exit gate, a commit per phase.
|
|
47
|
-
- agy sessions only: run `python {{scripts}}/caddis_spend.py check` before each agy call.
|
|
48
|
-
the
|
|
47
|
+
- agy sessions only: run `python {{scripts}}/caddis_spend.py check` before each agy call. There is no spend cap (it
|
|
48
|
+
always exits 0); if its line ends with ` - ADVISORY`, say so in the relay for the owner.
|
|
49
49
|
- You may do everything except pass an owner gate. Never pass an owner gate. Never raise a cap. Never delete a STOP file.
|
|
50
50
|
- The runner reviews `risk: high` phases. A phase marked `**Risk:** high`: do not halt for it and do not run the
|
|
51
51
|
review yourself. When its exit gate is green, set its row `done` and end with `STATUS: CONTINUE`. The runner then
|