etch-loop 0.4.6__tar.gz → 0.4.7__tar.gz
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.
- {etch_loop-0.4.6 → etch_loop-0.4.7}/PKG-INFO +1 -1
- {etch_loop-0.4.6 → etch_loop-0.4.7}/pyproject.toml +1 -1
- etch_loop-0.4.7/src/etch/__init__.py +1 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/analyze.py +12 -17
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/signals.py +8 -7
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/templates/BREAK.md +3 -5
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/templates/ETCH.md +3 -6
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/templates/RUN.md +7 -10
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/templates/SCAN.md +3 -5
- etch_loop-0.4.6/src/etch/__init__.py +0 -1
- {etch_loop-0.4.6 → etch_loop-0.4.7}/.github/workflows/workflow.yml +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/README.md +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/agent.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/cli.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/display.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/git.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/loop.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/prompt.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/src/etch/report.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/tests/__init__.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/tests/test_git.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/tests/test_loop.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/tests/test_prompt.py +0 -0
- {etch_loop-0.4.6 → etch_loop-0.4.7}/tests/test_signals.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.7"
|
|
@@ -179,9 +179,9 @@ For each issue, include the file path, line number (if known), and a one-line de
|
|
|
179
179
|
5. List each confirmed issue on its own line, e.g.:
|
|
180
180
|
- src/auth.py:42 — crashes with empty token string (no guard)
|
|
181
181
|
- src/api.js:108 — unhandled promise rejection will silently fail
|
|
182
|
-
6. Before the signal token, write this
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
6. Before the signal token, write your summary in this exact format — it appears directly in the terminal:
|
|
183
|
+
`<etch_summary>3 bugs found — null deref in auth.py:42, off-by-one in parser.py:88</etch_summary>`
|
|
184
|
+
`<etch_summary>no confirmed bugs found</etch_summary>`
|
|
185
185
|
7. End with EXACTLY one of these on its own line:
|
|
186
186
|
`ETCH_ISSUES_FOUND`
|
|
187
187
|
`ETCH_ALL_CLEAR`
|
|
@@ -222,12 +222,9 @@ Scan the codebase for:
|
|
|
222
222
|
|
|
223
223
|
## Terminal output (required)
|
|
224
224
|
|
|
225
|
-
After making changes (or deciding there is nothing to fix), write this
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
Examples:
|
|
229
|
-
`ETCH_SUMMARY: fixed 3 issues — null guard in auth.py, bounds check in parser.py, timeout in agent.py`
|
|
230
|
-
`ETCH_SUMMARY: nothing to fix — all reported issues were already handled`
|
|
225
|
+
After making changes (or deciding there is nothing to fix), write your summary in this exact format — it appears in the terminal and is used as the commit message:
|
|
226
|
+
`<etch_summary>fixed 3 issues — null guard in auth.py, bounds check in parser.py, timeout in agent.py</etch_summary>`
|
|
227
|
+
`<etch_summary>nothing to fix — all reported issues were already handled</etch_summary>`
|
|
231
228
|
"""
|
|
232
229
|
|
|
233
230
|
|
|
@@ -256,9 +253,9 @@ Be adversarial — think like someone actively trying to make this code fail.
|
|
|
256
253
|
|
|
257
254
|
1. DO NOT edit any files — read only
|
|
258
255
|
2. Report your findings clearly, one per line
|
|
259
|
-
3. Before the signal token, write this
|
|
260
|
-
|
|
261
|
-
|
|
256
|
+
3. Before the signal token, write your summary in this exact format — it appears directly in the terminal:
|
|
257
|
+
`<etch_summary>2 issues — unguarded empty list in sorter.py:14, exception swallowed in loader.py:67</etch_summary>`
|
|
258
|
+
`<etch_summary>no issues found — code looks solid</etch_summary>`
|
|
262
259
|
4. End with EXACTLY one of these on its own line:
|
|
263
260
|
`ETCH_ISSUES_FOUND`
|
|
264
261
|
`ETCH_ALL_CLEAR`
|
|
@@ -302,11 +299,9 @@ You are a test engineer. The fixer has just made changes. Your job is to write t
|
|
|
302
299
|
1. You MAY edit test files — that is your job
|
|
303
300
|
2. Do NOT touch production code — only tests
|
|
304
301
|
3. If tests fail because of flawed test logic, fix the test and re-run before reporting
|
|
305
|
-
4. When done, write this
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
`ETCH_SUMMARY: wrote 4 tests, all 51 passed`
|
|
309
|
-
`ETCH_SUMMARY: 2 tests failed — TypeError in test_auth.py:38, production bug in token.py:12`
|
|
302
|
+
4. When done, write your summary in this exact format — it appears directly in the terminal:
|
|
303
|
+
`<etch_summary>wrote 4 tests, all 51 passed</etch_summary>`
|
|
304
|
+
`<etch_summary>2 tests failed — TypeError in test_auth.py:38, production bug in token.py:12</etch_summary>`
|
|
310
305
|
5. End with EXACTLY one of these on its own line:
|
|
311
306
|
`ETCH_ALL_CLEAR` — if all tests pass
|
|
312
307
|
`ETCH_ISSUES_FOUND` — if tests reveal a bug in production code
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""Signal parsing for breaker agent output."""
|
|
2
2
|
|
|
3
|
+
import re
|
|
4
|
+
|
|
3
5
|
_TOKEN_CLEAR = "ETCH_ALL_CLEAR"
|
|
4
6
|
_TOKEN_ISSUES = "ETCH_ISSUES_FOUND"
|
|
5
7
|
_PUNCTUATION_ONLY = set("-=*_`~><|")
|
|
@@ -78,19 +80,18 @@ def extract_commit_message(output: str, fallback: str) -> str:
|
|
|
78
80
|
|
|
79
81
|
|
|
80
82
|
def extract_summary(output: str) -> str:
|
|
81
|
-
"""Extract the
|
|
83
|
+
"""Extract the summary from an <etch_summary> tag in agent output.
|
|
82
84
|
|
|
83
|
-
Agents are prompted to write
|
|
84
|
-
|
|
85
|
+
Agents are prompted to write:
|
|
86
|
+
<etch_summary>fixed 3 null-guard issues in auth.py</etch_summary>
|
|
85
87
|
|
|
86
88
|
Returns the summary text, or empty string if not found.
|
|
87
89
|
"""
|
|
88
90
|
if not isinstance(output, str):
|
|
89
91
|
return ""
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return stripped[len("ETCH_SUMMARY:"):].strip()
|
|
92
|
+
m = re.search(r"<etch_summary>(.*?)</etch_summary>", output, re.DOTALL)
|
|
93
|
+
if m:
|
|
94
|
+
return m.group(1).strip()
|
|
94
95
|
return ""
|
|
95
96
|
|
|
96
97
|
|
|
@@ -19,11 +19,9 @@ Be adversarial — think like someone actively trying to make this code fail.
|
|
|
19
19
|
|
|
20
20
|
1. DO NOT edit any files — read only
|
|
21
21
|
2. Report your findings clearly, one per line
|
|
22
|
-
3. Before the signal token, write this
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
`ETCH_SUMMARY: 2 issues — unguarded empty list in sorter.py:14, exception swallowed in loader.py:67`
|
|
26
|
-
`ETCH_SUMMARY: no issues found — code looks solid`
|
|
22
|
+
3. Before the signal token, write your summary in this exact format — it appears directly in the terminal:
|
|
23
|
+
`<etch_summary>2 issues — unguarded empty list in sorter.py:14, exception swallowed in loader.py:67</etch_summary>`
|
|
24
|
+
`<etch_summary>no issues found — code looks solid</etch_summary>`
|
|
27
25
|
4. End with EXACTLY one of these on its own line:
|
|
28
26
|
`ETCH_ISSUES_FOUND`
|
|
29
27
|
`ETCH_ALL_CLEAR`
|
|
@@ -24,9 +24,6 @@ Focus on: [edit this to narrow your scope, e.g. "src/auth/", "the payment module
|
|
|
24
24
|
|
|
25
25
|
## Terminal output (required)
|
|
26
26
|
|
|
27
|
-
After making changes (or deciding there is nothing to fix), write this
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Examples:
|
|
31
|
-
`ETCH_SUMMARY: fixed 3 issues — null guard in auth.py, bounds check in parser.py, timeout in agent.py`
|
|
32
|
-
`ETCH_SUMMARY: nothing to fix — all reported issues were already handled`
|
|
27
|
+
After making changes (or deciding there is nothing to fix), write your summary in this exact format — it appears in the terminal and is used as the commit message:
|
|
28
|
+
`<etch_summary>fixed 3 issues — null guard in auth.py, bounds check in parser.py, timeout in agent.py</etch_summary>`
|
|
29
|
+
`<etch_summary>nothing to fix — all reported issues were already handled</etch_summary>`
|
|
@@ -20,13 +20,10 @@ You are a test engineer. The fixer has just made changes. Your job is to write t
|
|
|
20
20
|
|
|
21
21
|
1. You MAY edit test files — that is your job
|
|
22
22
|
2. Do NOT touch production code — only tests
|
|
23
|
-
3.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- `ETCH_ISSUES_FOUND`
|
|
31
|
-
- If tests fail because the tests themselves are wrong (flawed test logic):
|
|
32
|
-
- Fix the test and re-run before reporting
|
|
23
|
+
3. If tests fail because of flawed test logic, fix the test and re-run before reporting
|
|
24
|
+
4. When done, write your summary in this exact format — it appears directly in the terminal:
|
|
25
|
+
`<etch_summary>wrote 4 tests, all 51 passed</etch_summary>`
|
|
26
|
+
`<etch_summary>2 tests failed — TypeError in test_auth.py:38, production bug in token.py:12</etch_summary>`
|
|
27
|
+
5. End with EXACTLY one of these on its own line:
|
|
28
|
+
`ETCH_ALL_CLEAR` — if all tests pass
|
|
29
|
+
`ETCH_ISSUES_FOUND` — if tests reveal a bug in production code
|
|
@@ -23,11 +23,9 @@ For each issue, include the file path, line number (if known), and a one-line de
|
|
|
23
23
|
5. List each confirmed issue on its own line, e.g.:
|
|
24
24
|
- src/auth.py:42 — crashes with empty token string (no guard)
|
|
25
25
|
- src/api.js:108 — unhandled promise rejection will silently fail
|
|
26
|
-
6. Before the signal token, write this
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`ETCH_SUMMARY: 3 bugs found — null deref in auth.py:42, off-by-one in parser.py:88, missing guard in git.py:31`
|
|
30
|
-
`ETCH_SUMMARY: no confirmed bugs found`
|
|
26
|
+
6. Before the signal token, write your summary in this exact format — it appears directly in the terminal:
|
|
27
|
+
`<etch_summary>3 bugs found — null deref in auth.py:42, off-by-one in parser.py:88</etch_summary>`
|
|
28
|
+
`<etch_summary>no confirmed bugs found</etch_summary>`
|
|
31
29
|
7. End with EXACTLY one of these on its own line:
|
|
32
30
|
`ETCH_ISSUES_FOUND`
|
|
33
31
|
`ETCH_ALL_CLEAR`
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.6"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|