GEMMA DEVELOPER AGENTSAVED EVIDENCE
← Dataset Exploration
ARCHIVED TRAINING / python-tap/tappy

python-tap__tappy-112

This is a preserved training example. Membership in the current training wave has not been verified.
python-tap/tappy · Task 134 of 169

Problem statement

Additional newlines added in YAML blocks for multi-line strings
Hello!

I've observed that `_extract_yaml_block()` performs `"\n".join(raw_yaml)` without having stripped the newline character in each possible line, resulting in unwanted empty lines when parsing multi-line strings in YAML blocks.

I'll give an example. With this file:

```python
#!/usr/bin/python3

import tap.parser

tap_input = """TAP version 13
1..2
ok 1 A passing test
   ---
   message: test
   severity: fail
   output: |+
     this is a multiline
     string but with tap
     somehow blank lines
     are added to it.
"""
parser = tap.parser.Parser()

for i, l in enumerate(parser.parse_text(tap_input)):
    if i == 2:
        print("{!r}".format(l.yaml_block["output"].splitlines()))
```

The output is:

```
['', 'this is a multiline', '', 'string but with tap', '', 'somehow blank lines', '', 'are added to it.']
```

Where as I expected:

```
['this is a multiline', 'string but with tap', 'somehow blank lines', 'are added to it.']
```

I will submit a PR shortly.

## Hints:
codecov-io: # [Codecov](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=h1) Report
> Merging [#112](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=desc) into [master](https://codecov.io/gh/python-tap/tappy/commit/015c21c1a98b88f23844a44e346604f2398b11d5&el=desc) will **not change** coverage.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/python-tap/tappy/pull/112/graphs/tree.svg?width=650&height=150&src=pr&token=ULVfoGuR2p)](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##            master      #112   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines          599       600    +1     
=========================================
+ Hits           599       600    +1     
```


| [Impacted Files](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [tap/parser.py](https://codecov.io/gh/python-tap/tappy/pull/112/diff?src=pr&el=tree#diff-dGFwL3BhcnNlci5weQ==) | `100.00% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=footer). Last update [015c21c...05c6b82](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Training membership

opd_e4b_pure_v6b opd_e4b_pure_v7 opd_e4b_pure_v7b

Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.

Task and snapshot provenance

Snapshot captured 2026-11-12T17:06:59.476467+00:00 · Autoresearch-Arena/gemma-4-developer-agent

{
  "datasets": [
    "opd_e4b_pure_v6b",
    "opd_e4b_pure_v7",
    "opd_e4b_pure_v7b"
  ],
  "examples": 10,
  "instance_id": "python-tap__tappy-112",
  "problem_statement": "Additional newlines added in YAML blocks for multi-line strings\nHello!\r\n\r\nI've observed that `_extract_yaml_block()` performs `\"\\n\".join(raw_yaml)` without having stripped the newline character in each possible line, resulting in unwanted empty lines when parsing multi-line strings in YAML blocks.\r\n\r\nI'll give an example. With this file:\r\n\r\n```python\r\n#!/usr/bin/python3\r\n\r\nimport tap.parser\r\n\r\ntap_input = \"\"\"TAP version 13\r\n1..2\r\nok 1 A passing test\r\n   ---\r\n   message: test\r\n   severity: fail\r\n   output: |+\r\n     this is a multiline\r\n     string but with tap\r\n     somehow blank lines\r\n     are added to it.\r\n\"\"\"\r\nparser = tap.parser.Parser()\r\n\r\nfor i, l in enumerate(parser.parse_text(tap_input)):\r\n    if i == 2:\r\n        print(\"{!r}\".format(l.yaml_block[\"output\"].splitlines()))\r\n```\r\n\r\nThe output is:\r\n\r\n```\r\n['', 'this is a multiline', '', 'string but with tap', '', 'somehow blank lines', '', 'are added to it.']\r\n```\r\n\r\nWhere as I expected:\r\n\r\n```\r\n['this is a multiline', 'string but with tap', 'somehow blank lines', 'are added to it.']\r\n```\r\n\r\nI will submit a PR shortly.\n\n## Hints:\ncodecov-io: # [Codecov](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=h1) Report\n> Merging [#112](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=desc) into [master](https://codecov.io/gh/python-tap/tappy/commit/015c21c1a98b88f23844a44e346604f2398b11d5&el=desc) will **not change** coverage.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/python-tap/tappy/pull/112/graphs/tree.svg?width=650&height=150&src=pr&token=ULVfoGuR2p)](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=tree)\n\n```diff\n@@            Coverage Diff            @@\n##            master      #112   +/-   ##\n=========================================\n  Coverage   100.00%   100.00%           \n=========================================\n  Files           12        12           \n  Lines          599       600    +1     \n=========================================\n+ Hits           599       600    +1     \n```\n\n\n| [Impacted Files](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [tap/parser.py](https://codecov.io/gh/python-tap/tappy/pull/112/diff?src=pr&el=tree#diff-dGFwL3BhcnNlci5weQ==) | `100.00% <100.00%> (ø)` | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=footer). Last update [015c21c...05c6b82](https://codecov.io/gh/python-tap/tappy/pull/112?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).",
  "repo": "python-tap/tappy",
  "source": "v2/experiments/train_data/opd_e4b_pure_v6b/verified_rft_messages.jsonl",
  "source_sha256": "0f62460a9706eea5e1605255896f191ab00cb5706c5f1f2e1c293e9a718218dc"
}
{
  "captured_at": "2026-11-12T17:06:59.476467+00:00",
  "membership": "archived training",
  "membership_evidence": "Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.",
  "name": "Preserved post-training task archive",
  "source": "Autoresearch-Arena/gemma-4-developer-agent",
  "source_revision": "016496de222aaafca0d4ee4c18efc63ba616f76e",
  "sources": [
    {
      "path": "v2/experiments/train_data/opd_e4b_cispo_v5/verified_rft_messages.jsonl",
      "sha256": "a43610ad0dfb6ace95375cfae09000f41afc0338cc925af870a4ade7a9b20c4c"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_hybrid_v3/verified_rft_messages.jsonl",
      "sha256": "bd326303eb127e8e5e08f03daf97bb88d79d19709d59f3f93f348bc56686a8df"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_onpolicy_v3/verified_rft_messages.jsonl",
      "sha256": "960c680e797e823a0d3a22f4b1d5ef60a72971373d703b877340b0c9126aaf68"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v6a/verified_rft_messages.jsonl",
      "sha256": "f045b7ca5b3883a1e2eaee81e1c02a4a1b53dd7b7b36e98bacb2ba5823a15148"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v6b/verified_rft_messages.jsonl",
      "sha256": "0f62460a9706eea5e1605255896f191ab00cb5706c5f1f2e1c293e9a718218dc"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v7/verified_rft_messages.jsonl",
      "sha256": "e37f7bd675322f3f81500b73559d60d5f602ca0537bf19f5cb06332c728c7b72"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v7b/verified_rft_messages.jsonl",
      "sha256": "b864bdc8695183433eef6e31cb8d33fad44ba3aded2170c1ade4ad5b2944ce23"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_self_audit_v4/verified_rft_messages.jsonl",
      "sha256": "0026023745afb8f3dc1c176dc7f7171157b4ad5a66656b524af218e8e19ceee6"
    },
    {
      "path": "v2/experiments/train_data/rft_e4b_aligned_v2/verified_rft_messages.jsonl",
      "sha256": "92a4515fee9d152b0d4c510ee3ce4caaaffe2003ba7584469f8027f174aab18c"
    },
    {
      "path": "v2/experiments/train_data/rft_v1/verified_rft_messages.jsonl",
      "sha256": "a42453ccd7ac7680b0a03865e8e7080bc8bf74c8d9d193b440c441ed46f8512b"
    },
    {
      "path": "v2/experiments/train_data/rft_v2/verified_rft_messages.jsonl",
      "sha256": "18f4b3bd7e651f83c6acab479c9475e3fa50dc652a384f309e97146983ac85ba"
    }
  ]
}