Skip to content

review-graph: compile successful multiline validation commands without losing identity #151

Closed

Description

@acgetchell

Problem

The review-graph planner and worker-payload publication accept a validation command containing real newlines, but compile-node rejects the successful execution with:

review_graph_runtime: command must be one non-empty line

Observed while reviewing acgetchell/la-stack#275 at 6decbf8e30c5e151738ea148caa8d10797a3a285, using dotfiles 9b2077b. All ten package-validation commands exited zero, but the seventh contained a multiline Python program passed to uv run --locked ... python -I -c. Compilation failed, leaving validation reconciliation and both synthesis nodes blocked.

Cause

agents/.agents/skills/review-graph/scripts/review_graph_runtime.py:2052 renders executions using _required_text(raw, "command"). That helper rejects newline characters. The native execution verifier in review_graph_plan.py also compares the displayed command directly to the raw dispatched command.

Reproduction

  1. Plan/materialize a validation unit containing a shell command such as:
    uv run --locked python -c 'print("first")
    print("second")'
  2. Run it successfully and publish its exact command, exit code 0, and timing in a ValidationPayload.
  3. Compile the node using matching captures and workspace snapshots.
  4. Observe the single-line text error despite accepted planning/publication and successful execution.

No validator rerun should be necessary to recover the existing evidence.

Acceptance criteria

  • Safely render multiline commands on one native-report field line while retaining the exact raw command in payloads and command identity digests.
  • Update native verification consistently; altered commands must still fail exact-identity checks.
  • Preserve compatibility with existing single-line evidence.
  • Cover LF, CRLF, quotes/backslashes, leading/trailing whitespace, and command text resembling report headings or execution records.
  • Add regression coverage through payload publication, compilation and verification.
  • Recompile already successful evidence without changing the dispatched command or rerunning validation.

A draft implementation was explored and then set aside; it is not committed. The full affected test suite was interrupted when deferring this work, so it is not validated as a completed fix.

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

    bugpythonPull requests that update Python code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions