125-a-forwarded-line-arrives-whole

A forwarded line arrives whole

Lifecycle approvedImplementation completeVerification unknownQualification unknown

`verify` forwards a command's stdout and stderr to its own stderr from two threads, one write per read. A read ends wherever the pipe's contents did, which is mid-line whenever the command writes faster than the drain, so a line of one stream could be spliced by a chunk of the other. Spec 090's own flood test counts intact lines and caught it intermittently: the post-merge acceptance sweep at `0bf9ff78` failed twice, in two different specs' runs of the same suite, with 8191 of 8192 lines intact. Each drain now delivers whole lines only, holding a partial line until its newline arrives or a bound is reached. Order between the streams is still not promised.

Read the full pinned specification ↗

Relationships

Claimed units

  • extends
    {
      "nature": "additive",
      "spec": "090-the-verdict-is-the-only-thing-on-stdout",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/src/cmd_verify.rs"
      }
    }

Source headings

  1. 125: A forwarded line arrives whole
  2. 1. Purpose
  3. 1.1 Measured, on the default branch
  4. 1.2 Why a line was lost
  5. 2. Territory
  6. 3. Behavior
  7. 3.1 Every delivery is whole lines
  8. 3.2 Bounds, and what arrives at the end
  9. 3.3 Evidence
  10. 4. Out of scope
  11. 5. Resolved decisions
  12. Verification

Frozen anchors

No frozen anchors declared.