@jesdi/skills 0.0.73 → 0.0.74

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jesdi/skills",
3
- "version": "0.0.73",
3
+ "version": "0.0.74",
4
4
  "description": "jesdi's agent skills (content package consumed by @jesdi/skills-cli)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -4,12 +4,16 @@ lower the baseline, and (unattended) open the strengthen PR from the base commit
4
4
  from __future__ import annotations
5
5
 
6
6
  import json
7
+ import re
7
8
 
8
9
  from prune_repo import KILLED, SURVIVING, BadInput, Fail, Repo, ratchet_lines
9
10
  from prune_review import check_reviews, equivalents_section, suggestions_section
10
11
  from prune_source import test_sources
11
12
 
12
13
  TRAILER = "Test-Prune-Item"
14
+ # Read from the whole message, not git's trailer block: git only takes trailers from the
15
+ # last paragraph, and a Co-Authored-By paragraph appended after ours would hide it.
16
+ TRAILER_LINE = re.compile(rf"^{TRAILER}:[ \t]*(.*?)[ \t]*$", re.MULTILINE)
13
17
  BASELINE = "backend/mutation_baseline.json"
14
18
 
15
19
 
@@ -52,9 +56,9 @@ def _history(repo, start: str) -> list:
52
56
  """[(sha, trailer values, paths)] for every commit since start, oldest first."""
53
57
  out = []
54
58
  for sha in repo.git("rev-list", "--reverse", f"{start}..HEAD").split():
55
- values = repo.git("log", "-1", f"--format=%(trailers:key={TRAILER},valueonly)", sha).split("\n")
59
+ values = TRAILER_LINE.findall(repo.git("log", "-1", "--format=%B", sha))
56
60
  paths = repo.git("diff-tree", "--no-commit-id", "--name-only", "-r", sha).split()
57
- out.append((sha, [v.strip() for v in values if v.strip()], paths))
61
+ out.append((sha, [v for v in values if v], paths))
58
62
  return out
59
63
 
60
64
 
@@ -144,12 +144,12 @@ class Target:
144
144
  before()
145
145
  return self.ok("batch", "--reviews", str(self.reviews(accept, reasons)), env=env)
146
146
 
147
- def commit_test(self, item, test_source, file="backend/tests/test_rebalancer.py"):
148
- """Strengthen agent: append a test and commit it with the item trailer."""
147
+ def commit_test(self, item, test_source, file="backend/tests/test_rebalancer.py", footer=""):
148
+ """Strengthen agent: append a test and commit it with the item trailer (then footer, if any)."""
149
149
  path = self.root / file
150
150
  path.write_text(path.read_text() + "\n\n" + test_source.strip("\n") + "\n")
151
151
  self.git("add", file)
152
- self.git("commit", "-q", "-m", f"test: strengthen {item}\n\nTest-Prune-Item: {item}")
152
+ self.git("commit", "-q", "-m", f"test: strengthen {item}\n\nTest-Prune-Item: {item}" + footer)
153
153
 
154
154
  # --- observing ---------------------------------------------------------------------
155
155
  def git(self, *args):
@@ -54,13 +54,13 @@ def baseline_at(target, ref):
54
54
  return json.loads(target.show(ref, "backend/mutation_baseline.json"))
55
55
 
56
56
 
57
- def strengthen(target, agent_tests, finish_accept, env=None, before=lambda: None):
57
+ def strengthen(target, agent_tests, finish_accept, env=None, before=lambda: None, footer=""):
58
58
  """strengthen-start → agent commits → strengthen-verify → strengthen-finish; returns the finish run."""
59
59
  before()
60
60
  target.ok("strengthen-start", env=env)
61
61
  assert target.git("rev-parse", "HEAD").strip() == target.base
62
62
  for item, source in agent_tests:
63
- target.commit_test(item, source)
63
+ target.commit_test(item, source, footer=footer)
64
64
  before()
65
65
  target.ok("strengthen-verify", env=env)
66
66
  before()
@@ -109,6 +109,17 @@ def test_strengthen_pr_names_ids_7_and_9_killed_proves_them_surviving_before_and
109
109
  assert target.git("symbolic-ref", "--short", "HEAD").strip() == "main"
110
110
 
111
111
 
112
+ def test_a_co_author_paragraph_after_the_item_trailer_does_not_hide_it(target):
113
+ # Headless Claude Code appends its own last paragraph; git reads trailers from the last one only.
114
+ target.prepare([cand(case(1))], accept=[COMPUTE], groups={COMPUTE: strengthen_group(IDS_7_9)})
115
+
116
+ finish = strengthen(target, [(COMPUTE, COMPUTE_TEST)], [COMPUTE],
117
+ footer="\n\nCo-Authored-By: Claude <noreply@anthropic.com>")
118
+
119
+ assert finish.returncode == 0, finish.stdout + finish.stderr
120
+ assert all(i in strengthen_pr(target) for i in IDS_7_9)
121
+
122
+
112
123
  def test_strengthen_item_whose_ids_are_not_all_killed_is_reverted_and_left_out_of_the_pr(target):
113
124
  drift_ids = ["x_apply_drift__mutmut_2", "x_apply_drift__mutmut_4"]
114
125
  target.prepare([cand(case(1))], accept=[COMPUTE, DRIFT],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-10-28T12:41:08.065Z",
3
+ "generatedAt": "2026-10-29T00:14:15.372Z",
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.1",
104
- "hash": "sha256-d488bcfbe73b8ed13b6743eacd2c85ad65236fb60a9df95f6b3e8a76f10c0bc2",
103
+ "version": "0.1.2",
104
+ "hash": "sha256-d6122a5ad5085f040e331744259896bf84ff7211177fea075747c1b50bf79a0e",
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
  {