@jesdi/skills 0.0.92 → 0.0.94
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/package.json +1 -1
- package/skills/babysit-pr/SKILL.md +13 -3
- package/skills/babysit-pr/babysit.py +21 -6
- package/skills/babysit-pr/test_session_merge_approval.py +82 -0
- package/skills/implement-spec/README.md +2 -2
- package/skills/implement-spec/driver_agents.py +3 -8
- package/skills/implement-spec/tests/test_agents.py +40 -0
- package/skills/implement-spec/tests/test_cli.py +7 -4
- package/skills/implement-spec/tests/test_driver.py +2 -3
- package/skills-manifest.json +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: babysit-pr
|
|
3
|
-
description: Babysit an open pull request until it is merged or handed to a human. Started by the PostToolUse hook after `gh pr create`, or by hand with `/babysit-pr
|
|
3
|
+
description: Babysit an open pull request until it is merged or handed to a human. Started by the PostToolUse hook after `gh pr create`, or by hand with `/babysit-pr` and a PR URL.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# babysit-pr
|
|
@@ -9,6 +9,16 @@ Run with `/babysit-pr <pr-url>`. The PostToolUse hook in `hooks/post-pr-create.s
|
|
|
9
9
|
|
|
10
10
|
`babysit.py` is next to this file; every state change below goes through it (`python3 babysit.py <cmd> --repo <owner/name> --pr <n> ...`). Work in a checkout of the PR branch. The base is the PR's `baseRefName`, never a fixed `main`.
|
|
11
11
|
|
|
12
|
+
## Merge authorization
|
|
13
|
+
|
|
14
|
+
An explicit instruction in this conversation such as “babysit that PR and merge it when green” authorizes merging that PR. Record its current remote head as the authorized head. The agent obtains the SHA; the user need not type it or repeat the instruction in a GitHub comment.
|
|
15
|
+
|
|
16
|
+
That authorization follows this session's fixes within the original task and clean rebases. Keep the authorized head in session context: before a push, compare the remote head with the last head this session recorded, then advance it only to the exact checked commit this session produced and successfully pushed. Before merging, compare again. A commit author or GitHub login is not provenance: another agent can use the same identity. Unknown remote commits or a scope change require a new user decision: hand off with reason `authorization scope changed`, naming the old and new heads and the unapproved change. Never adopt them by refreshing the recorded head. After lost context, recover this evidence or ask rather than infer authorization.
|
|
17
|
+
|
|
18
|
+
With this authorization, run `merge --session-approved --session <lease-session> --sha <authorized-head> --body <body-file>` after CI is green and the review checks below pass. The merge still pins and rechecks the exact head, base and body, verifies lease ownership, and respects review handoffs, dependent PRs and GitHub branch protections. The session authorization supplies the human decision when risk exceeds the automatic limit; no duplicate approval comment or judge is needed. The success comment records the session and merged SHA.
|
|
19
|
+
|
|
20
|
+
Invoking the skill alone, or a hook starting it, does not grant this explicit authorization: use the automatic gate/judge path. The owner's existing `@babysitter merge <sha>` comment remains a separate, commit-specific approval path.
|
|
21
|
+
|
|
12
22
|
## Before anything
|
|
13
23
|
|
|
14
24
|
- `pr-risk` must be in `.my-skills/pr-risk`, `.agents/skills/pr-risk`, `.claude/skills/pr-risk` or `~/.my-skills/pr-risk`, in this order. If it is in none, stop and print the install command.
|
|
@@ -21,7 +31,7 @@ Run with `/babysit-pr <pr-url>`. The PostToolUse hook in `hooks/post-pr-create.s
|
|
|
21
31
|
2. `update-plan --base <base>` when the base moved; follow its plan (see Base moved). Every step uses `origin/<base>` of the PR (a stacked PR's parent), never `main`.
|
|
22
32
|
3. `checks --wait-minutes <waitMinutes>` until the head is green, red, stalled (`CI stalled`) or empty (`no checks`). Green means every check passed.
|
|
23
33
|
4. Red: `round start --op <id>` (keep the id), then the fix round below. Renew the lease each round and `lease check` before each push.
|
|
24
|
-
5. Green: run the gate (`pr-risk` `merge_risk.py gate`), then `judge`, then `merge-method` and `merge`. Pass the judge's label and risk to `merge --judge agree --judge-risk <risk>` (or `--judge 'same-model agree'` for fallback), never an output file path. The merge pins the head SHA the gate and judge saw, and hands off when the gate's or the judge's risk is above the repo's limit.
|
|
34
|
+
5. Green: with explicit session authorization, use its merge path above. Otherwise, absent an owner commit approval, run the gate (`pr-risk` `merge_risk.py gate`), then `judge`, then `merge-method` and `merge`. Pass the judge's label and risk to `merge --judge agree --judge-risk <risk>` (or `--judge 'same-model agree'` for fallback), never an output file path. The merge pins the head SHA the gate and judge saw, and hands off when the gate's or the judge's risk is above the repo's limit.
|
|
25
35
|
|
|
26
36
|
## A fix round
|
|
27
37
|
|
|
@@ -41,7 +51,7 @@ Hand off when 5 rounds are done and a check still fails (`5 fix rounds`), or the
|
|
|
41
51
|
- `rebase-with-conflict`: rebase and resolve each stop with the `resolving-merge-conflicts` skill. Never `--abort`. Push with the printed lease form.
|
|
42
52
|
- `merge`: `git merge origin/<base>`, resolve with the same skill, push without force. This PR now uses the merge method.
|
|
43
53
|
|
|
44
|
-
Push only after the ladder passes, then wait for CI on the new head. If a resolution changed a file whose categories (the pr-risk path classification, not its directory) are neither `tests` nor `docs`, or a lockfile by hand, the verdict is human: once CI is green, `handoff` with `conflict resolved in code` (no gate, judge or merge).
|
|
54
|
+
Push only after the ladder passes, then wait for CI on the new head. For session-authorized runs, a clean rebase advances the authorized head only from the previously recorded remote head to this session's successfully pushed result; preserve the same scope and check the new SHA. If a resolution changed a file whose categories (the pr-risk path classification, not its directory) are neither `tests` nor `docs`, or a lockfile by hand, the verdict is human: once CI is green, `handoff` with `conflict resolved in code` (no gate, judge or merge).
|
|
45
55
|
|
|
46
56
|
## Handoff
|
|
47
57
|
|
|
@@ -844,7 +844,7 @@ def handoff(repo, number, reason, ci, rounds, gate, judge_line, fix_log, extra="
|
|
|
844
844
|
|
|
845
845
|
|
|
846
846
|
def merge_cmd(repo, number, sha, body_file, policy, judge_label, approved, session=None, base=None,
|
|
847
|
-
judge_risk=None):
|
|
847
|
+
judge_risk=None, session_approved=False):
|
|
848
848
|
pr = json.loads(gh("api", f"repos/{repo}/pulls/{number}"))
|
|
849
849
|
if base not in (None, pr["base"]["ref"]):
|
|
850
850
|
fail(f"--base {base} is not the PR's base {pr['base']['ref']}")
|
|
@@ -861,7 +861,7 @@ def merge_cmd(repo, number, sha, body_file, policy, judge_label, approved, sessi
|
|
|
861
861
|
fail(f"origin/{base} is {tip[:7]} but the PR's base is {pr['base']['sha'][:7]}: fetch and gate again")
|
|
862
862
|
gate = "gate: passed"
|
|
863
863
|
judge_line = f"judge: {judge_label}"
|
|
864
|
-
op = hashlib.sha256(f"{sha} {judge_label} {approved}".encode()).hexdigest()[:12]
|
|
864
|
+
op = hashlib.sha256(f"{sha} {judge_label} {approved} {session_approved}".encode()).hexdigest()[:12]
|
|
865
865
|
|
|
866
866
|
def stop(reason, extra=""):
|
|
867
867
|
handoff(repo, number, reason, "green", None, gate, judge_line, "(none)", extra, session, f"{op}-{reason}")
|
|
@@ -869,7 +869,14 @@ def merge_cmd(repo, number, sha, body_file, policy, judge_label, approved, sessi
|
|
|
869
869
|
|
|
870
870
|
if pr["head"]["sha"] != sha:
|
|
871
871
|
fail(f"head moved to {pr['head']['sha']} since the gate saw {sha}: gate again")
|
|
872
|
-
if
|
|
872
|
+
if session_approved:
|
|
873
|
+
own_lease(repo, number, session)
|
|
874
|
+
gate = "gate: explicit session authorization"
|
|
875
|
+
judge_line = f"session {session} authorized merge"
|
|
876
|
+
found = owner_comments(repo, number)
|
|
877
|
+
if found["handoff"]:
|
|
878
|
+
stop(found["handoff"])
|
|
879
|
+
elif approved is None:
|
|
873
880
|
if judge_label not in ("agree", "same-model agree"):
|
|
874
881
|
stop(f"judge {judge_label}")
|
|
875
882
|
mr = load_merge_risk(base)
|
|
@@ -937,6 +944,7 @@ def merge_cmd(repo, number, sha, body_file, policy, judge_label, approved, sessi
|
|
|
937
944
|
stop(f"merge blocked: {'approval required' if 'approv' in err.lower() else err}")
|
|
938
945
|
pr = Pr(repo, number)
|
|
939
946
|
pr.post("🤖 Merged by babysit-pr: " + (
|
|
947
|
+
f"session {session} authorized merge at {sha}" if session_approved else
|
|
940
948
|
f"{risk_line}gate passed, judge {judge_label}" if approved is None else f"owner approved {approved}"))
|
|
941
949
|
if session:
|
|
942
950
|
release(pr, session)
|
|
@@ -982,6 +990,8 @@ def main():
|
|
|
982
990
|
mg.add_argument("--judge")
|
|
983
991
|
mg.add_argument("--judge-risk", type=int, choices=range(1, 11), metavar="1-10")
|
|
984
992
|
mg.add_argument("--approved-sha")
|
|
993
|
+
mg.add_argument("--session-approved", action="store_true",
|
|
994
|
+
help="the user explicitly instructed this session to merge this PR")
|
|
985
995
|
mg.add_argument("--base")
|
|
986
996
|
for p in (mg, hp):
|
|
987
997
|
p.add_argument("--session", help="release this session's lease")
|
|
@@ -1002,9 +1012,14 @@ def main():
|
|
|
1002
1012
|
elif a.cmd == "merge-method":
|
|
1003
1013
|
print(json.dumps({"method": merge_method(a.repo, a.pr, a.policy)}))
|
|
1004
1014
|
elif a.cmd == "merge":
|
|
1005
|
-
if
|
|
1006
|
-
ap.error("
|
|
1007
|
-
|
|
1015
|
+
if a.session_approved and not a.session:
|
|
1016
|
+
ap.error("--session-approved needs --session")
|
|
1017
|
+
if a.session_approved and (a.approved_sha or a.judge or a.judge_risk):
|
|
1018
|
+
ap.error("--session-approved cannot be combined with --approved-sha or --judge/--judge-risk")
|
|
1019
|
+
if not (a.judge or a.approved_sha or a.session_approved):
|
|
1020
|
+
ap.error("merge needs --judge, --approved-sha or --session-approved")
|
|
1021
|
+
merge_cmd(a.repo, a.pr, a.sha, a.body, a.policy, a.judge, a.approved_sha, a.session, a.base,
|
|
1022
|
+
a.judge_risk, a.session_approved)
|
|
1008
1023
|
elif a.cmd == "handoff":
|
|
1009
1024
|
handoff(a.repo, a.pr, a.reason, a.ci, a.rounds, a.gate, a.judge, Path(a.fix_log).read_text(), session=a.session)
|
|
1010
1025
|
elif a.cmd == "update-plan":
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""In-session merge instructions reach the same pinned, green merge CLI."""
|
|
2
|
+
import pytest
|
|
3
|
+
|
|
4
|
+
from test_merge_and_handoff import commit, comments, handoffs, merge, world
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def session(w):
|
|
8
|
+
assert w.run("acquire", "s1").returncode == 0
|
|
9
|
+
return ("--session", "s1", "--session-approved")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_session_instruction_merges_human_risk_without_a_github_approval(tmp_path):
|
|
13
|
+
w = world(tmp_path, policy={"maxAutoRisk": 0})
|
|
14
|
+
p = merge(w, tmp_path, "a1b2c3d", *session(w))
|
|
15
|
+
assert p.returncode == 0, p.output
|
|
16
|
+
[merged] = w.github()["merges"]
|
|
17
|
+
assert merged["match"] == "a1b2c3d"
|
|
18
|
+
assert handoffs(w) == []
|
|
19
|
+
assert any("session s1 authorized merge" in c for c in comments(w))
|
|
20
|
+
assert w.active_leases() == []
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def test_session_instruction_cannot_merge_a_head_that_moved(tmp_path):
|
|
24
|
+
w = world(tmp_path, head="f0e1d2c", commits=[commit("a1b2c3d"), commit("f0e1d2c")])
|
|
25
|
+
p = merge(w, tmp_path, "a1b2c3d", *session(w))
|
|
26
|
+
assert p.returncode != 0
|
|
27
|
+
assert "head moved" in p.output
|
|
28
|
+
assert not w.github().get("merges")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@pytest.mark.parametrize("checks", [[], [{"name": "ci", "status": "completed", "conclusion": "failure"}]])
|
|
32
|
+
def test_session_instruction_still_requires_green_checks(tmp_path, checks):
|
|
33
|
+
w = world(tmp_path, check_runs={"a1b2c3d": checks})
|
|
34
|
+
p = merge(w, tmp_path, "a1b2c3d", *session(w))
|
|
35
|
+
assert p.returncode != 0
|
|
36
|
+
assert not w.github().get("merges")
|
|
37
|
+
assert len(handoffs(w)) == 1
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def test_session_instruction_requires_the_lease_holder(tmp_path):
|
|
41
|
+
w = world(tmp_path)
|
|
42
|
+
assert w.run("acquire", "s2").returncode == 0
|
|
43
|
+
p = merge(w, tmp_path, "a1b2c3d", "--session", "s1", "--session-approved")
|
|
44
|
+
assert p.returncode != 0
|
|
45
|
+
assert not w.github().get("merges")
|
|
46
|
+
assert w.active_leases()[0][1] == "s2"
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def test_session_instruction_still_hands_off_for_an_unresolved_review(tmp_path):
|
|
50
|
+
w = world(tmp_path, threads=[{"user": {"login": "alice"}, "resolved": False}])
|
|
51
|
+
p = merge(w, tmp_path, "a1b2c3d", *session(w))
|
|
52
|
+
assert p.returncode != 0
|
|
53
|
+
assert not w.github().get("merges")
|
|
54
|
+
assert "review comment from alice" in p.output
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def test_session_instruction_cannot_override_branch_protection(tmp_path):
|
|
58
|
+
w = world(tmp_path, merge_error="At least 1 approving review is required")
|
|
59
|
+
p = merge(w, tmp_path, "a1b2c3d", *session(w))
|
|
60
|
+
assert p.returncode != 0
|
|
61
|
+
assert not w.github().get("merges")
|
|
62
|
+
assert "merge blocked: approval required" in p.output
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def test_session_approval_without_a_session_is_invalid_input(tmp_path):
|
|
66
|
+
w = world(tmp_path)
|
|
67
|
+
before = w.github()
|
|
68
|
+
p = merge(w, tmp_path, "a1b2c3d", "--session-approved")
|
|
69
|
+
assert p.returncode != 0
|
|
70
|
+
assert "--session-approved needs --session" in p.output
|
|
71
|
+
assert w.github() == before
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@pytest.mark.parametrize("other", [("--approved-sha", "a1b2c3d"), ("--judge", "agree"), ("--judge-risk", "1")])
|
|
75
|
+
def test_session_approval_cannot_be_mixed_with_other_approval_paths(tmp_path, other):
|
|
76
|
+
w = world(tmp_path)
|
|
77
|
+
args = session(w)
|
|
78
|
+
before = w.github()
|
|
79
|
+
p = merge(w, tmp_path, "a1b2c3d", *args, *other)
|
|
80
|
+
assert p.returncode != 0
|
|
81
|
+
assert "cannot be combined" in p.output
|
|
82
|
+
assert w.github() == before
|
|
@@ -17,10 +17,10 @@ Before any agent starts, the driver checks these. Each failed check prints one l
|
|
|
17
17
|
- `.agent/` is gitignored and the worktree has no uncommitted change.
|
|
18
18
|
- Each ticket file `NN-name.md` has a title, a **Blocked by** line and a **Seam** line, and the graph has no cycle (`driver_tickets.py`). A ticket needs one criterion or more, unless its Seam is `none — refactor`. A ticket needs a **Touches** line when the set has more than one ticket. The [to-tickets skill](../to-tickets/SKILL.md) has the line format.
|
|
19
19
|
- Each provider config file (see Models) and the `--models` file name only roles of the skill's `models.json`. A `correctness` or `explorer` key is a role that was removed: the error says so, names the file, and says that the key should be deleted from it.
|
|
20
|
-
- Each model entry
|
|
20
|
+
- Each model entry names a known provider, a model and an effort supported by that provider.
|
|
21
21
|
- The `review-diff` skill is installed next to this one, with its `spec.md` and `correctness.md`, and the `deep-quality-review` skill is next to this one, in `${CLAUDE_CONFIG_DIR:-~/.claude}/skills` or in `~/.agents/skills`: the lenses of the final review follow them. One error per lens names its skill and its missing file.
|
|
22
22
|
- With `--push`, `--unattended` or `--base`, the repository has an `origin` remote.
|
|
23
|
-
- Each model entry of every list answers one short test prompt (the preflight), on each invocation. An entry that fails (a model the account cannot use or has no credits for, a CLI that is not signed in) is skipped for that invocation: each role that lists it goes on with its next entry, and one ledger sentence names the entry and the error. Only a role with no entry left stops the run, with one line naming each entry and its error. When no `final-reviewer` entry on another provider than the first `implementer` entry is left, or the config has none, the correctness lens and the scoped review run on the `final-reviewer` entries that are left, on the implementer's provider, and one more sentence says so. The driver prints these sentences and writes them to the ledger. The PR body's Review coverage names the entries that the ticket reviews, the correctness lens and the scoped review ran on, from the agents that ran, and flags an entry on a provider that also wrote code. `--dry-run` skips the preflight.
|
|
23
|
+
- Runtime availability is checked by the preflight: a missing CLI skips that entry just like an unusable model. Each available model entry of every list answers one short test prompt (the preflight), on each invocation. An entry that fails (a model the account cannot use or has no credits for, a CLI that is not signed in) is skipped for that invocation: each role that lists it goes on with its next entry, and one ledger sentence names the entry and the error. Only a role with no entry left stops the run, with one line naming each entry and its error. When no `final-reviewer` entry on another provider than the first `implementer` entry is left, or the config has none, the correctness lens and the scoped review run on the `final-reviewer` entries that are left, on the implementer's provider, and one more sentence says so. The driver prints these sentences and writes them to the ledger. The PR body's Review coverage names the entries that the ticket reviews, the correctness lens and the scoped review ran on, from the agents that ran, and flags an entry on a provider that also wrote code. `--dry-run` skips the preflight.
|
|
24
24
|
|
|
25
25
|
A run that stopped is continued with the same command. `state.json` is the only input of a resume.
|
|
26
26
|
|
|
@@ -65,15 +65,13 @@ def split(entry: str) -> tuple[str, str, str]:
|
|
|
65
65
|
return provider, model, effort
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
def _entry_error(role: str, entry: str
|
|
68
|
+
def _entry_error(role: str, entry: str) -> str | None:
|
|
69
69
|
provider, model, effort = split(entry)
|
|
70
70
|
if provider not in PROVIDERS:
|
|
71
71
|
return f"{role}: model entry {entry} names an unknown provider (known: {', '.join(PROVIDERS)})"
|
|
72
|
-
|
|
72
|
+
_, efforts = PROVIDERS[provider]
|
|
73
73
|
if not model or effort not in efforts:
|
|
74
74
|
return f"{role}: model entry {entry} needs a model and an effort from {', '.join(efforts)}"
|
|
75
|
-
if first and not shutil.which(cli):
|
|
76
|
-
return f"{role}: {cli} is not on PATH (model entry {entry})"
|
|
77
75
|
return None
|
|
78
76
|
|
|
79
77
|
|
|
@@ -156,10 +154,7 @@ def lens_entries(models: dict[str, list[str]], role: str) -> list[str]:
|
|
|
156
154
|
|
|
157
155
|
def _entry_errors(models: dict[str, list[str]]) -> list[str]:
|
|
158
156
|
"""Every entry error of the merged lists."""
|
|
159
|
-
|
|
160
|
-
first = {(role, entries[0]) for role, entries in models.items()} | {
|
|
161
|
-
("final-reviewer", other_provider_entry(models))}
|
|
162
|
-
found = [_entry_error(role, entry, (role, entry) in first) for role, entries in models.items() for entry in entries]
|
|
157
|
+
found = [_entry_error(role, entry) for role, entries in models.items() for entry in entries]
|
|
163
158
|
if len(models["implementer"]) < 2:
|
|
164
159
|
found.append("implementer: a second implementer model entry is required for fix round 2")
|
|
165
160
|
return [error for error in found if error]
|
|
@@ -341,6 +341,46 @@ def test_a_model_the_account_cannot_use_is_skipped_and_its_roles_go_on_with_thei
|
|
|
341
341
|
assert launches(w.tmp, "claude"), "the first agent starts on Anthropic"
|
|
342
342
|
|
|
343
343
|
|
|
344
|
+
def test_a_missing_first_cli_uses_the_available_reviewer_and_discloses_the_fallback(env):
|
|
345
|
+
"""No fake runner, so the driver launches the CLI itself: `bin/claude` is a stub on the restricted PATH of `env`
|
|
346
|
+
that logs its argv like the `env` fakes and writes the reviewer's report, never the real claude."""
|
|
347
|
+
opus, unavailable = "anthropic/claude-opus-5@medium", "openai/gpt-astra@medium"
|
|
348
|
+
w = World(env, reviewer=[unavailable, opus], **{"final-reviewer": [unavailable, opus]})
|
|
349
|
+
(w.tmp / "bin/codex").unlink()
|
|
350
|
+
report = dict(status="DONE", files=[], concerns=[], findings=[])
|
|
351
|
+
(w.tmp / "bin/claude").write_text(f"""#!{sys.executable}
|
|
352
|
+
import re, sys
|
|
353
|
+
from pathlib import Path
|
|
354
|
+
prompt = sys.stdin.read()
|
|
355
|
+
if "implement-spec preflight" not in prompt:
|
|
356
|
+
with open({str(w.tmp / "argv-claude")!r}, "a") as log:
|
|
357
|
+
log.write("".join(arg + "\\0" for arg in sys.argv[1:]) + "\\x1e")
|
|
358
|
+
Path(re.search(r"JSON report at (\\S+?)\\.? ", prompt).group(1)).write_text({json.dumps(report)!r})
|
|
359
|
+
""")
|
|
360
|
+
proc = w.run(None, "--only", "reviewer", runner=False)
|
|
361
|
+
ok(proc)
|
|
362
|
+
assert "codex is not on PATH" in proc.stdout
|
|
363
|
+
argvs = launches(w.tmp, "claude")
|
|
364
|
+
assert argvs and all(value_after(argv, "--model") == "claude-opus-5" for argv in argvs), argvs
|
|
365
|
+
assert not launches(w.tmp, "codex")
|
|
366
|
+
assert "the correctness lens and the scoped review run on" in w.ledger()
|
|
367
|
+
assert f"{opus}, the implementer's provider" in w.ledger()
|
|
368
|
+
assert f"reviewer ran on {opus}" in w.ledger()
|
|
369
|
+
assert json.loads((w.repo / ".agent/implement/01/reviewer-0.json").read_text()) == report
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
def test_a_missing_cli_with_no_reviewer_fallback_fails_before_any_agent(env):
|
|
373
|
+
unavailable = "openai/gpt-astra@medium"
|
|
374
|
+
w = World(env, reviewer=[unavailable])
|
|
375
|
+
(w.tmp / "bin/codex").unlink()
|
|
376
|
+
proc = w.run(None, runner=False)
|
|
377
|
+
assert proc.returncode == 3, proc.stdout + proc.stderr
|
|
378
|
+
assert (f"reviewer: every model entry failed the preflight: model entry {unavailable}: codex is not on PATH"
|
|
379
|
+
in proc.stdout.splitlines())
|
|
380
|
+
assert not launches(w.tmp, "claude") and not launches(w.tmp, "codex")
|
|
381
|
+
assert "ticket/feat%2Fcsv/01" not in git(w.repo, "branch", "--list")
|
|
382
|
+
|
|
383
|
+
|
|
344
384
|
def test_a_cli_that_fails_with_no_report_stops_the_run_with_exit_4_and_the_same_command_resumes(env):
|
|
345
385
|
"""Stop and ask: the first CLI failure stops the run, with no rerun on another entry of the list."""
|
|
346
386
|
w = World(env, refactor=True)
|
|
@@ -223,13 +223,16 @@ def test_dirty_worktree_exits_3_naming_the_paths(env, tmp_path):
|
|
|
223
223
|
assert "demo/export.py" in proc.stdout and "notes.txt" in proc.stdout
|
|
224
224
|
|
|
225
225
|
|
|
226
|
-
def
|
|
227
|
-
|
|
226
|
+
def test_dry_run_checks_models_without_requiring_provider_clis(env, tmp_path):
|
|
227
|
+
for cli in ("claude", "codex"):
|
|
228
|
+
(tmp_path / f"bin/{cli}").unlink()
|
|
228
229
|
repo = make_repo(tmp_path / "demo", three())
|
|
229
230
|
models = models_file(tmp_path, implementer=["openai/gpt-sol@medium"])
|
|
231
|
+
before = snapshot(repo)
|
|
230
232
|
proc = drive(env, repo, "--tickets", ".agent/tickets", "--gate", "make check", "--fast-gate", "make check", "--models", str(models), "--dry-run")
|
|
231
|
-
assert proc.returncode ==
|
|
232
|
-
assert
|
|
233
|
+
assert proc.returncode == 0, proc.stdout + proc.stderr
|
|
234
|
+
assert "max frontier width" in proc.stdout
|
|
235
|
+
assert_untouched(proc, repo, before, tmp_path)
|
|
233
236
|
|
|
234
237
|
|
|
235
238
|
def test_one_implementer_model_is_rejected_before_any_agent(env, tmp_path):
|
|
@@ -82,7 +82,7 @@ def test_outside_a_git_worktree_git_errors_are_reported(tmp_path, monkeypatch, c
|
|
|
82
82
|
assert code == 3 and "git status failed" in out
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
def
|
|
85
|
+
def test_models_file_checks_configuration_without_runtime_availability(repo, capsys, tmp_path, monkeypatch):
|
|
86
86
|
repo(t01=ticket("01"))
|
|
87
87
|
monkeypatch.setattr(driver_agents.shutil, "which", lambda cli: None if cli == "codex" else cli)
|
|
88
88
|
models = tmp_path.parent / f"{tmp_path.name}-models.json"
|
|
@@ -90,8 +90,7 @@ def test_models_file_checks_the_first_entry_of_each_role(repo, capsys, tmp_path,
|
|
|
90
90
|
claude = {"reviewer": ["claude-opus-5-5@medium"], "final-reviewer": ["claude-opus-5-5@medium"]}
|
|
91
91
|
models.write_text(json.dumps({"implementer": ["openai/gpt-sol@medium"], **claude, "fixer": ["other/x@low"]}))
|
|
92
92
|
assert run(capsys, "--models", str(models)) == (
|
|
93
|
-
3, "
|
|
94
|
-
"fixer: model entry other/x@low names an unknown provider (known: anthropic, openai)\n"
|
|
93
|
+
3, "fixer: model entry other/x@low names an unknown provider (known: anthropic, openai)\n"
|
|
95
94
|
"implementer: a second implementer model entry is required for fix round 2\n")
|
|
96
95
|
|
|
97
96
|
|
package/skills-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-09T11:10:12.678Z",
|
|
4
4
|
"skills": [
|
|
5
5
|
{
|
|
6
6
|
"name": "agents-wayfinder",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "babysit-pr",
|
|
13
|
-
"version": "0.1.
|
|
14
|
-
"hash": "sha256-
|
|
15
|
-
"description": "Babysit an open pull request until it is merged or handed to a human. Started by the PostToolUse hook after `gh pr create`, or by hand with `/babysit-pr
|
|
13
|
+
"version": "0.1.6",
|
|
14
|
+
"hash": "sha256-81e4eb55e555b5c56df6f90a83a300d79d859f294a2ebe8f00ed231bc21390c2",
|
|
15
|
+
"description": "Babysit an open pull request until it is merged or handed to a human. Started by the PostToolUse hook after `gh pr create`, or by hand with `/babysit-pr` and a PR URL."
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "backlog",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"name": "implement-spec",
|
|
61
|
-
"version": "0.1.
|
|
62
|
-
"hash": "sha256-
|
|
61
|
+
"version": "0.1.56",
|
|
62
|
+
"hash": "sha256-1f894f578c7ffea9d1de8b0994c94e3d5499612e67ea2b7267f50d14b8162fda",
|
|
63
63
|
"description": "Implement a specification in code."
|
|
64
64
|
},
|
|
65
65
|
{
|