{
  "file": "F15-git.md",
  "bullet": "Phantom whitespace diff (`F15.diff-whitespace`), known bug.",
  "ids": [
    "F15.diff-whitespace"
  ],
  "line": 412,
  "script": "mkdir -p \"$F/ws-files\"\ngit -C \"$F/ws-files\" init -q -b main\nprintf '  indented line\\nbody\\n' > \"$F/ws-files/lead.txt\"\nprintf 'body\\n\\n\\n' > \"$F/ws-files/trail.txt\"\nprintf 'one\\r\\ntwo\\r\\n' > \"$F/ws-files/crlf.txt\"\ngit -C \"$F/ws-files\" add -A\ngit -C \"$F/ws-files\" commit -qm 'QA whitespace'\ntest -z \"$(git -C \"$F/ws-files\" status --porcelain)\"\ncontrol-agent-server api GET /api/git/changes --query path=\"$F/ws-files\" --expect 200 --check . len-eq 0\nRC_WHITESPACE=0\nfor name in crlf lead trail; do\n  control-agent-server api GET /api/git/diff --query path=\"$F/ws-files/$name.txt\" --query ref=HEAD --expect 200 \\\n    --check modified len-ge 1 --raw-out \"$F/ws-$name.json\" --save \"F15.diff-whitespace/$name\"\n  python3 -c 'import json,sys; d=json.load(open(sys.argv[1])); assert d[\"original\"] == d[\"modified\"], d' \"$F/ws-$name.json\" || RC_WHITESPACE=1\ndone\ntest \"$RC_WHITESPACE\" = 0  # bug\n",
  "exit_code": 1,
  "elapsed_ms": 1298,
  "failed_line": 16,
  "failed_command": "test \"$RC_WHITESPACE\" = 0",
  "stdout": "{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"GET\",\n    \"path\": \"/api/git/changes\",\n    \"query\": [\n      [\n        \"path\",\n        \"/workspace/verification-artifacts/runs/20261013-031237-2ccf-map-f15/fixtures/qa-f15/ws-files\"\n      ]\n    ],\n    \"auth\": \"header\",\n    \"body\": null,\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"2\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": [],\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 70,\n  \"checks\": [\n    {\n      \"check\": \". len-eq 0\",\n      \"ok\": true,\n      \"actual\": \"[]\"\n    }\n  ]\n}\n{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"GET\",\n    \"path\": \"/api/git/diff\",\n    \"query\": [\n      [\n        \"path\",\n        \"/workspace/verification-artifacts/runs/20261013-031237-2ccf-map-f15/fixtures/qa-f15/ws-files/crlf.txt\"\n      ],\n      [\n        \"ref\",\n        \"HEAD\"\n      ]\n    ],\n    \"auth\": \"header\",\n    \"body\": null,\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"45\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"modified\": \"one\\ntwo\",\n      \"original\": \"one\\ntwo\"\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 53,\n  \"checks\": [\n    {\n      \"check\": \"modified len-ge 1\",\n      \"ok\": true,\n      \"actual\": \"one\\ntwo\"\n    }\n  ],\n  \"raw_out\": \"/workspace/verification-artifacts/runs/20261013-031237-2ccf-map-f15/fixtures/qa-f15/ws-crlf.json\",\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-031237-2ccf-map-f15/evidence/F15.diff-whitespace/crlf.json\"\n}\n{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"GET\",\n    \"path\": \"/api/git/diff\",\n    \"query\": [\n      [\n        \"path\",\n        \"/workspace/verification-artifacts/runs/20261013-031237-2ccf-map-f15/fixtures/qa-f15/ws-files/lead.txt\"\n      ],\n      [\n        \"ref\",\n        \"HEAD\"\n      ]\n    ],\n    \"auth\": \"header\",\n    \"body\": null,\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"69\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"modified\": \"  indented line\\nbody\",\n      \"original\": \"indented line\\nbody\"\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 57,\n  \"checks\": [\n    {\n      \"check\": \"modified len-ge 1\",\n      \"ok\": true,\n      \"actual\": \"  indented line\\nbody\"\n    }\n  ],\n  \"raw_out\": \"/workspace/verification-artifacts/runs/20261013-031237-2ccf-map-f15/fixtures/qa-f15/ws-lead.json\",\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-031237-2ccf-map-f15/evidence/F15.diff-whitespace/lead.json\"\n}\n{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"GET\",\n    \"path\": \"/api/git/diff\",\n    \"query\": [\n      [\n        \"path\",\n        \"/workspace/verification-artifacts/runs/20261013-031237-2ccf-map-f15/fixtures/qa-f15/ws-files/trail.txt\"\n      ],\n      [\n        \"ref\",\n        \"HEAD\"\n      ]\n    ],\n    \"auth\": \"header\",\n    \"body\": null,\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"41\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"modified\": \"body\\n\\n\",\n      \"original\": \"body\"\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 54,\n  \"checks\": [\n    {\n      \"check\": \"modified len-ge 1\",\n      \"ok\": true,\n      \"actual\": \"body\\n\\n\"\n    }\n  ],\n  \"raw_out\": \"/workspace/verification-artifacts/runs/20261013-031237-2ccf-map-f15/fixtures/qa-f15/ws-trail.json\",\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-031237-2ccf-map-f15/evidence/F15.diff-whitespace/trail.json\"\n}\n",
  "stderr": "Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nAssertionError: {'modified': '  indented line\\nbody', 'original': 'indented line\\nbody'}\nTraceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nAssertionError: {'modified': 'body\\n\\n', 'original': 'body'}\n"
}
