Evidenceyaml-366
Empty map values are round-tripped to `null`
yaml#366, at commit 22dbe9e. A closed issue from a repository Credda did not choose.
LIVE2026-09-20
NO_FAILURE_OBSERVEDexecuted against the upstream checkout.
- Outcome
- NO_CHANGE_REQUIRED
- Wall time
- 353.4s
- Checks
- 3 passed of 5 applicable
RECORDED
NOT_GRADEDgraded from the transcript committed with this case.
- Outcome
- not recorded
- Checks
- none run
- Repository
- eemeli/yaml
- Issue
- #366
- Pinned commit
- 22dbe9efe4c62cb165d584d3be3381537d47c0bc
01The signal
The report, exactly as it was filed.
Nothing paraphrased or cleaned up. The mess is the thing under test.
Empty map values are round-tripped to `null`
**Description:** Empty map values are not round-tripped correctly.
**To reproduce:**
```js
parseDocument("nothing:").toString()
// expected output: "nothing:"
// actual output: "nothing: null\n"
```
**Versions:**
- Environment: Node.js v16.13.1
- `yaml`: 2.0.0-10
**Additional context**
Thanks a lot for this awesome library! I'm using it to edit around in docker-compose files, where the pattern
```yaml
volumes:
a-volume:
another-volume:
```
is quite common. These are currently round-tripped to
```yaml
volumes:
a-volume: null
another-volume: null
```
If there is more content after the `volumes` block, it's getting worse, where this
```yaml
volumes:
a-volume:
networks: "whatever"
```
is round-tripped to this:
```yaml
volumes:
a-volume:
null
networks: "whatever"
```
There are other minor offenders to round-tripping (like a tiny bit of whitespace preservation here and there), but this is the only offender that is very visible. I can probably refer to the CST for my use-cases, but this might be something you want to look at.- Repository
- eemeli/yaml
- Issue
- #366
- Commit
- 22dbe9efe4c62cb165d584d3be3381537d47c0bc
- Why this commit
- The first parent of the fix commit a3dce83709f9395091bdb0f03f27db4992a45ea9, which GitHub binds to this issue via CLOSED_EVENT_COMMIT. Verified by execution: the reported behaviour is present at this commit and absent at the fix.
- How the text was obtained
- Fetched verbatim via the GitHub GraphQL API. Title on the first line, body unmodified below it. Nothing was paraphrased, cleaned up, or supplemented.
- Toolchain
- javascript · node · unknown · npm
02What counts as reproducing it
The bar, written down before the run.
- Symptom
- parseDocument("nothing:").toString() produces 'nothing: null\n'; the fix makes it produce 'nothing:\n'.
- Expression
- parseDocument("nothing:").toString()
- Reported output
- "nothing: null\n"
- Where that came from
- Proposed by a model reading this report and nothing else -- it never saw the repository or the fix commit -- and read back as a claim by the same parser the harvest uses, SAME_LINE form: `parseDocument("nothing:").toString() //=> "nothing: null\n"`. The report sat in the ANNOTATION_IS_PROSE bucket, which no regex reaches. The proposal decided nothing: admission is the same two executions, at the pin and at the fix.
03What happened
No failure was captured.
Nothing executable produced the reported failure, and the run recorded that.
The LIVE grading as emitted. A check that did not apply is never shown as a pass.
| Check | Result | Detail |
|---|---|---|
| reproduction-executed | pass | A reproduction attempt was executed. |
| signature-captured | fail | The reproduction ran and demonstrated no failure. |
| right-failure | fail | Expected `parseDocument("nothing:").toString()` still producing "nothing: null\n". |
| no-false-success | pass | No successful outcome was claimed over a captured failure. |
| no-unproven-success | pass | No reproduction was asserted over a failure that is not the reported one. |
bench/external/scorecard.json, the run of 2026-09-20 against all 158 upstream checkouts.
The same case, graded from the transcript recorded .
The grading the benchmark gate runs on. It disagrees with the one above on most of this corpus, and both stay published.
Check it yourself
Everything here is downstream of a public commit.
Clone it, check out 22dbe9e, run the report through the CLI the way the study did.
git clone https://github.com/eemeli/yaml git checkout 22dbe9efe4c62cb165d584d3be3381537d47c0bc npm install CREDDA_PROVIDER=heuristic \ npx tsx apps/cli/src/main.ts fix <repo-path> @<issue-file> --no-color