search-with-proof: ecosystem-aware build recipes and stderr in build failures

The agent passes a manifest file or project directory; pip uses -r for
requirements files and the directory for pyproject/setup, npm ci/install runs in
the directory, composer/maven/gradle likewise. Build and verify failures carry
phase, exit code and a sanitised stderr tail.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Marius Ciepluch
2026-10-05 21:37:56 +02:00
co-authored by Claude Fable 5.1
parent bf243e6680
commit 3866e2771b
14 changed files with 543 additions and 60 deletions
+11 -3
View File
@@ -123,7 +123,7 @@ class Pilot:
self.sides = None
self.verifications = []
def failure(self, phase, reason):
def failure(self, phase, reason, command=None):
private = tuple(str(v) for k, v in self.row.items() if k in {"repo", "file", "function", "vulnerable", "fixed"})
private += (str(self.root), self.row["repo"].removeprefix("https://github.com/"))
if isinstance(reason, BaseException):
@@ -135,7 +135,15 @@ class Pilot:
safe = kind + ": " + diagnostic(message, maximum=max(0, 298 - len(kind)), private=private)
else:
safe = diagnostic(reason, private=private)
self.record["failures"].append(dict(phase=phase, reason=safe))
entry = dict(phase=phase, reason=safe)
command = command if command is not None else reason
if hasattr(command, "exit_code"):
entry.update(
command_phase=diagnostic(command.phase),
exit_code=command.exit_code,
stderr=diagnostic(command.stderr, maximum=1500, private=private),
)
self.record["failures"].append(entry)
@contextmanager
def executor(self, revision, deadline=900):
@@ -300,7 +308,7 @@ class Pilot:
for side in result.sides:
if side.outcome != "observed":
self.failure("verify/" + side.outcome, "side_verification_failed")
self.failure("verify/" + side.outcome, side.reason, command=side)
if result.outcome != "demonstrated":
self.failure("verify", "no_consistent_differential" if result.outcome == "inconclusive" else result.outcome)
end = result.outcome