mirror of
https://github.com/bdbrown4/peltier.io.git
synced 2026-11-07 10:58:28 +00:00
agent: propose_patch ergonomics from the phase2-comrak-004 audit
- Standalone-proposal semantics: workspace resets to pristine before every apply, so probe patches can't accumulate into a tested tree the ledger's patch field doesn't describe. - Friendly errors: explicit trailing-newline check, and git apply's stderr relayed on refusal instead of a generic message. - Tool docs + task prompt updated to match. - phase2-comrak-004 audited: honest rejected-bench (median 1.0124, CI [1.0011, 1.0267] — real but under the 2% bar), Mutex pre-flagged for human review, cumulative-probe state disclosed in the hypothesis. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EcKPWQ3MQD4NdEHwar96u2
This commit is contained in:
@@ -50,9 +50,12 @@ def read_target_source(target: str, path: str, offset: int = 0, limit: int = 400
|
||||
|
||||
@mcp.tool()
|
||||
def propose_patch(target: str, diff: str, hypothesis: str) -> str:
|
||||
"""Submit a unified git diff (a/ b/ prefixes, paths relative to the target workspace)
|
||||
plus the hypothesis it tests. The harness applies it only after a path-allowlist
|
||||
check. Returns a patch_id, or an error string if refused."""
|
||||
"""Submit a unified git diff (a/ b/ prefixes, paths relative to the target
|
||||
workspace, MUST end with a trailing newline) plus the hypothesis it tests.
|
||||
Each proposal is STANDALONE: the workspace is reset to pristine before the
|
||||
diff is applied, so always submit the complete patch — never an increment
|
||||
on top of an earlier proposal. The harness applies it only after a
|
||||
path-allowlist check. Returns a patch_id, or an error string if refused."""
|
||||
return harness.propose_patch(target, diff, hypothesis)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user