fix(TASK-017): bound run_checks runtime and fail-close its node-level death
Adversary conformance-review fixes for the TASK-017 exec-evidence stage:
- run_checks.py: total-runtime deadline (3300s = node timeout minus margin);
each command gets min(900s, remaining budget), commands past the deadline
are recorded as {cmd, skipped: deadline} entries so in-script handling
stays authoritative instead of the node timeout killing the script from
outside. POSIX hardening: per-command process group (start_new_session)
+ killpg on timeout so hung grandchildren cannot linger; non-POSIX
limitation documented in the docstring.
- graph.yaml: run_checks gains fallback: pipeline_fault; check_criterion
treats SKIPPED records as at-best PARTIAL (unproven, never failed).
- pipeline_fault.py: run_checks-stage attribution grounded in real engine
behavior (script-node fallback writes nothing into state, executor.rs
script arm) — nonempty diff_text proves facts completed, so the fault is
the verification runner; emits 'PIPELINE-FAULT: verification runner
killed'. Empty diff_text still attributes to diff resolution.
- verdict.py: renders skipped records as [SKIPPED] instead of a bogus
[FAIL] exit-? line; non-degraded verdict semantics untouched.
- tests: outer-except ENVIRONMENT degradation, deadline timeout+skip (env
seam ADVERSARY_RUN_CHECKS_DEADLINE_SECS), pipeline_fault stage
attribution (parse / facts / run_checks), check_criterion prompt cites
{{exec_results}}, verdict SKIPPED rendering; run_adversary_script_env
helper for env-carrying invocations.
- cargo fmt violations in 3d7dea9 test code fixed (fmt --check exit 0).
This commit is contained in:
5 files changed
+303
-51
No files matched your search
@@ -73,15 +73,22 @@ def append_criterion_complaints(lines, verdicts, extra, start):
|
||||
def render_exec_results(exec_results):
|
||||
"""Lines for the "Verification runs:" report section.
|
||||
|
||||
exec_results is a list of {cmd, exit, duration_s, tail} records from
|
||||
run_checks.py, or a string marker ("none declared —…" / "ENVIRONMENT: …"),
|
||||
or empty when the run never reached the verification stage.
|
||||
exec_results is a list of {cmd, exit, duration_s, tail} records (or
|
||||
{cmd, skipped} for commands the runner's total deadline left no budget
|
||||
for) from run_checks.py, or a string marker ("none declared —…" /
|
||||
"ENVIRONMENT: …"), or empty when the run never reached the stage.
|
||||
"""
|
||||
if isinstance(exec_results, list):
|
||||
out = []
|
||||
for r in exec_results:
|
||||
if not isinstance(r, dict):
|
||||
continue
|
||||
if r.get("skipped"):
|
||||
out.append(
|
||||
f"- [SKIPPED] `{r.get('cmd', '?')}` — never ran: the runner's "
|
||||
"total deadline expired first; covered criteria are unproven"
|
||||
)
|
||||
continue
|
||||
status = "PASS" if r.get("exit") == 0 else "FAIL"
|
||||
out.append(
|
||||
f"- [{status}] `{r.get('cmd', '?')}` — exit {r.get('exit', '?')}, "
|
||||
|
||||
Reference in new issue
Block a user