090-the-verdict-is-the-only-thing-on-stdout

The verdict is the only thing on stdout

Lifecycle approvedImplementation completeVerification unknownQualification unknown

Spec 034 3.1 requires that under `--json` a verb write exactly one JSON object to stdout, and `verify --json` does not: it spawns each acceptance command with stdout inherited, so every byte the command prints lands on the parent's stdout ahead of the envelope. The failure is quiet in the worst way, because the envelope is still emitted and still correct and the exit code is still right, so a consumer sees a successful run whose document will not parse. Measured on `5f95613`, a one-command block printing a single line makes `json.load` of the whole stdout fail at character 0 while the process exits 0. `verify` is the verb an orchestrator most needs to read programmatically, which is the third argument spec 043 1.2 used to justify building it, so the one verb that had to be machine-readable is the one that is not. The correction keeps the child's bytes and moves them: under `--json` both child streams are streamed to the parent's stderr as they arrive, and the command and exit transcript spec 043 3.5 requires joins them there, so stdout carries the envelope and nothing else on the report path and on the error path alike. Nothing is captured in memory, no field joins the verdict schema, and without the flag every byte goes where it goes today.

Read the full pinned specification ↗

Relationships

Claimed units

  • establishes
    {
      "kind": "file",
      "path": "crates/spec-spine-cli/tests/verify_streams.rs"
    }
  • establishes
    {
      "kind": "file",
      "path": "scripts/verify-closed-consumer.py"
    }
  • extends
    {
      "nature": "additive",
      "spec": "043-verify-declared-acceptance",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/src/cmd_verify.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "001-compile-registry",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/tests/cli.rs"
      }
    }

Source headings

  1. 090: The verdict is the only thing on stdout
  2. 1. Purpose
  3. 1.1 Measured, on the default branch
  4. 1.2 Why the existing tests could not see it
  5. 1.3 Spec 043 3.5 asks for a transcript and gets none here
  6. 2. Territory
  7. 3. Behavior
  8. 3.1 Under `--json`, stdout carries the envelope and nothing else
  9. 3.2 The bytes are streamed, not accumulated
  10. 3.3 The transcript is a diagnostic, and under `--json` it goes to stderr
  11. 3.4 Everything else is preserved, and that is a requirement
  12. 3.5 Tests (minimum)
  13. 4. Out of scope
  14. 5. Resolved decisions
  15. Verification

Frozen anchors

No frozen anchors declared.