@jesdi/skills 0.0.79 → 0.0.80
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
CHANGED
|
@@ -156,9 +156,10 @@ when `prune` exited 1 (the status keeps that failure, so the job still goes red)
|
|
|
156
156
|
`strengthen-verify` after any new commit); on any exit 2 HEAD stays at the proven head, so fix
|
|
157
157
|
the input and rerun it. It reverts rejected items, reruns the proof cold, runs
|
|
158
158
|
`make mutation-check`, `make test`, `make crap` and `make mutation-baseline`, refuses a
|
|
159
|
-
baseline that gained an equivalent id, and commits the lower baseline. Unattended it
|
|
160
|
-
|
|
161
|
-
commits
|
|
159
|
+
baseline that gained an equivalent id, and commits the lower baseline. Unattended it pushes the
|
|
160
|
+
result as one commit on the base (a `Test-Prune-Item` trailer per kept item; the per-item
|
|
161
|
+
commits and reverts stay local) and opens the strengthen PR listing each changed test with the
|
|
162
|
+
ids it now kills; interactive it leaves the commits on the current branch for the human.
|
|
162
163
|
|
|
163
164
|
## Report
|
|
164
165
|
|
|
@@ -398,6 +398,13 @@ def _lower_baseline(repo, base: dict) -> tuple[str, dict]:
|
|
|
398
398
|
return "\n".join(ratchet_lines({"output": ratchet})), new
|
|
399
399
|
|
|
400
400
|
|
|
401
|
+
def _squash(repo, start: str, title: str, accepted: list) -> str:
|
|
402
|
+
"""One commit on start with the proven head's tree: the PR shows the kept tests and the baseline,
|
|
403
|
+
not the per-item commits and reverts the proof needed."""
|
|
404
|
+
message = "\n\n".join([title, "\n".join(f"{TRAILER}: {i}" for i in accepted)])
|
|
405
|
+
return repo.git("commit-tree", "HEAD^{tree}", "-p", start, "-m", message).strip()
|
|
406
|
+
|
|
407
|
+
|
|
401
408
|
def _finish(ctx, base: dict, st: dict, reviews: dict, unattended: bool) -> int:
|
|
402
409
|
repo = ctx.repo
|
|
403
410
|
proof, accepted = _keep_accepted(ctx, base, st, reviews)
|
|
@@ -412,9 +419,9 @@ def _finish(ctx, base: dict, st: dict, reviews: dict, unattended: bool) -> int:
|
|
|
412
419
|
ctx.state.emit(f"Strengthen commits kept on {repo.branch()}:\n\n{body}")
|
|
413
420
|
return 0
|
|
414
421
|
branch = _branch(ctx)
|
|
415
|
-
repo.git("branch", branch)
|
|
416
|
-
repo.push(branch)
|
|
417
422
|
title = f"test: strengthen {len(accepted)} weak spot{'' if len(accepted) == 1 else 's'}"
|
|
423
|
+
repo.git("branch", branch, _squash(repo, st["start"], title, accepted))
|
|
424
|
+
repo.push(branch)
|
|
418
425
|
path, body = ctx.state.save_body("strengthen-pr.md", body)
|
|
419
426
|
url = repo.open_pr(base["branch"], branch, title, path)
|
|
420
427
|
ctx.state.emit(f"Opened {url}\n\n{body}")
|
|
@@ -429,3 +429,22 @@ def test_a_closed_item_that_changed_more_than_functions_still_stops_the_run_on_a
|
|
|
429
429
|
assert verify.returncode == 1, verify.stdout + verify.stderr
|
|
430
430
|
assert f"changes {TESTS_FILE} beyond adding or editing functions" in verify.stdout + verify.stderr
|
|
431
431
|
assert target.git("status", "--porcelain").strip() == ""
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
def test_the_strengthen_pr_is_one_commit_on_the_base_with_a_trailer_per_kept_item(target):
|
|
435
|
+
drift_ids = ["x_apply_drift__mutmut_2", "x_apply_drift__mutmut_4"]
|
|
436
|
+
target.prepare([cand(case(1))], accept=[COMPUTE, DRIFT],
|
|
437
|
+
groups={COMPUTE: strengthen_group(IDS_7_9), DRIFT: strengthen_group(drift_ids)})
|
|
438
|
+
|
|
439
|
+
finish = strengthen(target, [(DRIFT, DRIFT_TEST), (COMPUTE, COMPUTE_TEST)], [COMPUTE])
|
|
440
|
+
|
|
441
|
+
assert finish.returncode == 0, finish.stdout + finish.stderr
|
|
442
|
+
head = target.remote_sha(STRENGTHEN_BRANCH)
|
|
443
|
+
assert target.git("rev-list", f"{target.base}..{head}").split() == [head]
|
|
444
|
+
assert target.git("rev-parse", f"{head}^").strip() == target.base
|
|
445
|
+
assert target.git("log", "-1", "--format=%s", head).strip() == "test: strengthen 1 weak spot"
|
|
446
|
+
trailers = target.git("log", "-1", "--format=%(trailers:key=Test-Prune-Item,valueonly)", head).split()
|
|
447
|
+
assert trailers == [COMPUTE]
|
|
448
|
+
source = target.show(head, TESTS_FILE)
|
|
449
|
+
assert "def test_compute_trades_rounding(targets):" in source and "test_apply_drift_new" not in source
|
|
450
|
+
assert baseline_at(target, head)["services/rebalancer.py"]["survivors"] == 18
|
package/skills-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-02T09:30:52.266Z",
|
|
4
4
|
"skills": [
|
|
5
5
|
{
|
|
6
6
|
"name": "agents-wayfinder",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"name": "test-prune",
|
|
103
|
-
"version": "0.1.
|
|
104
|
-
"hash": "sha256-
|
|
103
|
+
"version": "0.1.5",
|
|
104
|
+
"hash": "sha256-1a1113c31ac542c375ffb7726c8b7e54f08acd203d699284fc283b5a5d4feaf9",
|
|
105
105
|
"description": "Mutation-guided test pruning: a fixer proposes deleting redundant tests and strengthening weak ones, an independent reviewer accepts or rejects each proposal, and prune.py applies the accepted batch behind a cold mutation run and the ratchet. Use when the user says \"prune tests\", \"test-prune\", \"mutation test pruning\" or \"strengthen weak tests\", or when a scheduled job runs it with `--unattended`."
|
|
106
106
|
},
|
|
107
107
|
{
|