Skip to content

Fix result cannot express 'tests not run': tests_passed=false renders as 'Tests: failed' on no-op iterations #1944

Open

Description

@fullsend-ai-retro

What happened

On shairevivo/react-shopping-cart#64, fix iteration 2 (run 42817471255, agents@v0.54.0) was dispatched after a review whose remaining findings could not be fixed in code. The fix agent made no file changes (files_changed: [], Pushed: no). Its summary correctly said tests were not run because nothing changed and dependencies were not installed. It then wrote "tests_passed": false in agent-result.json, and its final message noted that this "doesn't mean a test failed". The posted fix comment still showed Tests: failed in bold, just before a human merged the PR. The previous iteration had run the full suite: 19 suites and 40 tests passed.

What could go better

I am highly confident this is a reporting gap. schemas/fix-result.schema.json makes tests_passed a required plain boolean ("Whether all tests passed after the fix"). scripts/process-fix-result.py (line ~32 data.get("tests_passed", False), line ~75 "passed" if tests_passed else "**failed**") renders any non-true value as a bold failure. An agent that skips tests can only choose between two wrong answers. Reporting false raises a false alarm, as here, and makes the comment contradict itself. Reporting true hides a gap, which is the failure in agents#1111. A human reading a PR they are about to merge may conclude the branch is broken, or may learn to ignore the field. Either outcome weakens trust in fix reports. Impact per occurrence is small, but it happens on every no-op or tests-skipped fix iteration, and those are common when only human-gate or metadata findings remain.

Proposed change

  1. In schemas/fix-result.schema.json, add a status field such as tests_status with values passed, failed and not_run, plus an optional tests_not_run_reason string. Alternatively, make tests_passed nullable, with null meaning not run. Keep accepting the old boolean for backward compatibility.
  2. In scripts/process-fix-result.py, render not_run as "Tests: not run ()" instead of "failed". Stop treating a missing value as false: an absent field should render as not run or unknown.
  3. In agents/fix.md, tell the agent to use not_run only when no tests were executed, and to give the reason (for example, no files changed). It must not report passed without running tests, which keeps the honesty requirement from agents#1111.
  4. Optionally, have post-fix default to not_run when files_changed is empty and no test command was run.

Validation criteria

In the next 5 fix iterations that push no changes, across any repo, the fix comment says "Tests: not run" with a reason and never "Tests: failed". A unit test for process-fix-result.py covers all three states and the legacy boolean input. Iterations where tests actually ran still render "passed" or "failed" exactly as before.

Related issues checked

Searched: tests_passed; tests not run failed; process-fix-result; tests skipped fix result; fix agent test execution status; tests failed fix summary not run
Considered: #1111, fullsend-ai/fullsend#2108, fullsend-ai/fullsend#434
#1111 (open) covers the opposite symptom: the agent skipped tests and reported true. It proposes a prompt change to install dependencies, not a not-run state in the schema or renderer. This proposal fixes the shared cause and should link #1111. fullsend#2108 (open) is about review flagging required checks that could not run, which is a different layer. fullsend#434 (closed, completed) added maxLength checks to process-fix-result.py and is unrelated.


Generated by retro agent from fullsend-ai/react-shopping-cart#64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions