Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion bin/aas.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,15 @@ export function runAct(
const result = runner(process.execPath, [crctl, ...args], {
cwd: join(depsDir, "consequence-rail"),
});
if (result.error || result.status !== 0) throw childProcessError("act", result);
if (result.error) throw childProcessError("act", result);
const payload = parseStageJson("act", result);
if (result.status !== 0) {
// A nonzero exit with parseable JSON is an unsuccessful act (the CLI
// surfaces structured errors as JSON on stdout), not a child-process
// error. Mirror runProve so persistRunBundle and printHuman see the
// structured failure and the GUI can render the stage artifact.
return { ok: false, raw: payload, status: result.status, ...failedStderr(result) };
Comment on lines +525 to +530

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Failed actions still report success

When runAct returns ok: false, the demo marks the action passed and never raises its exit code. A successful proof then reports the failed action as a successful run.

Prompt for agents
Update the act handling in bin/aas.mjs runDemo to consume runAct's new ok/status contract. A result with ok: false must record the act stage as failed, preserve raw and stderr for the bundle and report, set the overall exit code to failure, and avoid presenting the action as passed. Define whether proof still runs for failed actions based on the structured outcome, while ensuring a successful proof cannot erase the action failure. Add coverage for nonzero act JSON through runDemo, including the persisted artifact, stage status, and process exit code.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

}
if (!payload || typeof payload !== "object" || Array.isArray(payload)
|| ![null, "settled", "compensated", "disputed"].includes(payload.outcome)) {
throw attachChildDiagnostics(new Error("act did not return a valid outcome"), {
Expand Down
Loading