Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions docs/receiving/diff-hunks-6cc6795e89f4/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
diff --git a/sample.py b/sample.py
index 419cbd0..578716e 100644
--- a/sample.py
+++ b/sample.py
@@ -1,3 +1,3 @@
def selected():
- return 1
+ return 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def selected():
return 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"at": "2026-10-08T17:11:42.020979+00:00",
"original_test_path": "/tmp/pytest-of-jacob/pytest-194/test_native_run_cli_refuses_da0",
"copied_after_execution_without_replay": true,
"files": [
{
"path": "damaged.diff",
"bytes": 158,
"sha256": "93e6854a4ae3f14e2b800fa8f93bcf92b11fd3afaf2d70026b7daac6ddc654e0"
},
{
"path": "project/sample.py",
"bytes": 29,
"sha256": "0a39e6db6d5e99a973953cc715febd5036bc8da95a19d78b1f91a26c3361a1ca"
},
{
"path": "script/01_plan.md",
"bytes": 28,
"sha256": "3047ef940de7a0e92dad4a76d76bc5abfcc02619aece28518dff33bac6d735ba"
},
{
"path": "script/02_tests.md",
"bytes": 113,
"sha256": "b47b02e00d70fe8a81da2aae2e86543d28c4286b3b97c38295d566f1bc7e8c2b"
},
{
"path": "result/report.json",
"bytes": 4028,
"sha256": "cdad77c59819bc009605a096de77ff3cba9481945f3b7433cecadd7f74ccd771"
},
{
"path": "result/testpilot.patch",
"bytes": 253,
"sha256": "02912f066519b84d64a9966b216ceef68ecc479720784f53011e8b8b48ecc903"
}
],
"status": "passed",
"test_count": 1,
"final": {
"returncode": 0,
"timed_out": false,
"duration_s": 0.416,
"timeout_s": 60.0,
"output": ". [100%]\n1 passed in 0.02s\n",
"cases": [
{
"nodeid": "tests.test_testpilot_generated::test_selected",
"outcome": "passed",
"message": "",
"generated_file": "tests/test_testpilot_generated.py"
}
],
"coverage": null,
"generated_files": [
"tests/test_testpilot_generated.py"
],
"junit_available": true,
"passed": 1,
"failed": 0,
"errors": 0,
"skipped": 0,
"ok": true,
"summary": "1 passed, 0 failed, 0 errors, 0 skipped (rc=0); generated: 1 passed of 1 collected",
"generated": {
"collected": 1,
"passed": 1,
"failed": 0,
"error": 0,
"skipped": 0
}
},
"ledger": {
"total_tokens": 280,
"total_cost_usd": 0.0,
"cost_is_complete": false,
"tokens_estimated": true,
"by_model": {
"nvidia/nemotron-3-super-120b-a12b": {
"calls": 1,
"prompt_tokens": 93,
"completion_tokens": 7,
"cost_usd": 0.0
},
"nvidia/Nemotron-3_5-Lightning": {
"calls": 1,
"prompt_tokens": 151,
"completion_tokens": 29,
"cost_usd": 0.0
}
},
"entries": [
{
"role": "planner",
"model": "nvidia/nemotron-3-super-120b-a12b",
"prompt_tokens": 93,
"completion_tokens": 7,
"estimated": true,
"cost_usd": 0.0
},
{
"role": "editor",
"model": "nvidia/Nemotron-3_5-Lightning",
"prompt_tokens": 151,
"completion_tokens": 29,
"estimated": true,
"cost_usd": 0.0
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
{
"status": "passed",
"changed_functions": [
{
"path": "sample.py",
"module": "sample",
"qualname": "selected",
"lineno": 1,
"end_lineno": 2,
"changed_lines": [
2
],
"source": "def selected():\n return 2",
"is_method": false
}
],
"repair_rounds_used": 0,
"max_repair_rounds": 0,
"test_files": {
"tests/test_testpilot_generated.py": "from sample import selected\ndef test_selected():\n assert selected() == 2\n"
},
"tests_written": 1,
"final": {
"returncode": 0,
"timed_out": false,
"duration_s": 0.416,
"timeout_s": 60.0,
"output": ". [100%]\n1 passed in 0.02s\n",
"cases": [
{
"nodeid": "tests.test_testpilot_generated::test_selected",
"outcome": "passed",
"message": "",
"generated_file": "tests/test_testpilot_generated.py"
}
],
"coverage": null,
"generated_files": [
"tests/test_testpilot_generated.py"
],
"junit_available": true,
"passed": 1,
"failed": 0,
"errors": 0,
"skipped": 0,
"ok": true,
"summary": "1 passed, 0 failed, 0 errors, 0 skipped (rc=0); generated: 1 passed of 1 collected",
"generated": {
"collected": 1,
"passed": 1,
"failed": 0,
"error": 0,
"skipped": 0
}
},
"patch": "diff --git a/tests/test_testpilot_generated.py b/tests/test_testpilot_generated.py\nnew file mode 100644\n--- /dev/null\n+++ b/tests/test_testpilot_generated.py\n@@ -0,0 +1,3 @@\n+from sample import selected\n+def test_selected():\n+ assert selected() == 2\n",
"coverage": null,
"ledger": {
"total_tokens": 280,
"total_cost_usd": 0.0,
"cost_is_complete": false,
"tokens_estimated": true,
"by_model": {
"nvidia/nemotron-3-super-120b-a12b": {
"calls": 1,
"prompt_tokens": 93,
"completion_tokens": 7,
"cost_usd": 0.0
},
"nvidia/Nemotron-3_5-Lightning": {
"calls": 1,
"prompt_tokens": 151,
"completion_tokens": 29,
"cost_usd": 0.0
}
},
"entries": [
{
"role": "planner",
"model": "nvidia/nemotron-3-super-120b-a12b",
"prompt_tokens": 93,
"completion_tokens": 7,
"estimated": true,
"cost_usd": 0.0
},
{
"role": "editor",
"model": "nvidia/Nemotron-3_5-Lightning",
"prompt_tokens": 151,
"completion_tokens": 29,
"estimated": true,
"cost_usd": 0.0
}
]
},
"rounds": [
{
"round": 0,
"kind": "generate",
"files": [
"tests/test_testpilot_generated.py"
],
"result": {
"returncode": 0,
"timed_out": false,
"duration_s": 0.416,
"timeout_s": 60.0,
"output": ". [100%]\n1 passed in 0.02s\n",
"cases": [
{
"nodeid": "tests.test_testpilot_generated::test_selected",
"outcome": "passed",
"message": "",
"generated_file": "tests/test_testpilot_generated.py"
}
],
"coverage": null,
"generated_files": [
"tests/test_testpilot_generated.py"
],
"junit_available": true,
"passed": 1,
"failed": 0,
"errors": 0,
"skipped": 0,
"ok": true,
"summary": "1 passed, 0 failed, 0 errors, 0 skipped (rc=0); generated: 1 passed of 1 collected",
"generated": {
"collected": 1,
"passed": 1,
"failed": 0,
"error": 0,
"skipped": 0
}
},
"warnings": [],
"contents": {
"tests/test_testpilot_generated.py": "from sample import selected\ndef test_selected():\n assert selected() == 2\n"
}
}
],
"plan": "Check selected returns two.\n",
"message": "",
"ok": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
diff --git a/tests/test_testpilot_generated.py b/tests/test_testpilot_generated.py
new file mode 100644
--- /dev/null
+++ b/tests/test_testpilot_generated.py
@@ -0,0 +1,3 @@
+from sample import selected
+def test_selected():
+ assert selected() == 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"reason": "Keep an inert retained fixture out of TestPilot automatic Python target selection.",
"original_receipt": "receiving.json",
"original_receipt_sha256": "a7856b415faceafd450f683fb5045ec32837a67c01511bc9cfba87b995b4819b",
"original_source_path": "project/sample.py",
"retained_source_path": "project/sample.py.txt",
"sha256": "0a39e6db6d5e99a973953cc715febd5036bc8da95a19d78b1f91a26c3361a1ca",
"source_bytes_unchanged": true,
"original_receipt_unchanged": true,
"original_git_commit": "9265ae42bde5b6bd559584a11cbb7c30b7849743"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Check selected returns two.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
```python tests/test_selected.py
from sample import selected
def test_selected():
assert selected() == 2
```
48 changes: 48 additions & 0 deletions docs/receiving/diff-hunks-6cc6795e89f4/baseline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"at": "2026-10-08T17:09:22.297675+00:00",
"base": "eacb9907f51aeb9360da654c60cbbd7cf99ad877",
"argv": [
"/usr/bin/python3",
"-B",
"-m",
"pytest",
"-q",
"tests/test_diff_hunk_validation.py",
"--tb=short"
],
"exit": 1,
"python": "3.14.4 (main, Aug 20 2026, 10:41:58) [GCC 15.2.0]",
"source_sha256": {
"testpilot/diff.py": "2cf38707ea175bb1f04d55335de344ae943458658055332b4aa68f27763214c0",
"testpilot/__main__.py": "319bc6e8b06615d657530eb35fa2f7f3e6a883a36c98ea1540fdf4c2815eac55",
"tests/test_diff_hunk_validation.py": "1c07374aea3ccdb1245cc24ac322f87fc06ad8f1b4ac87c3ba8e5930b8802085"
},
"result_tail": [
"tests/test_diff_hunk_validation.py:146: in test_native_run_cli_refuses_damaged_file_before_model_tests_or_output",
" assert run.returncode == 2",
"E AssertionError: assert 0 == 2",
"E + where 0 = CompletedProcess(args=['/usr/bin/python3', '-B', '-m', 'testpilot', 'run', '--repo', '/tmp/pytest-of-jacob/pytest-194/...da0/result/report.md, /tmp/pytest-of-jacob/pytest-194/test_native_run_cli_refuses_da0/result/report.html\\n', stderr='').returncode",
"=========================== short test summary info ============================",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[truncated-addition]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[missing-context-at-eof]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[extra-addition]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[extra-deletion]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[extra-context]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[old-range-underflow]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[new-range-underflow]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[context-with-no-old-lines]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[invalid-body-prefix]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[malformed-range]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[missing-file-headers]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[missing-old-header]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[headers-without-hunk]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[next-file-before-end]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[next-hunk-before-end]",
"FAILED tests/test_diff_hunk_validation.py::test_inconsistent_hunks_are_not_partial_success[nonempty-range-at-zero]",
"FAILED tests/test_diff_hunk_validation.py::test_actual_git_patch_and_corrupted_counter_have_distinct_outcomes",
"FAILED tests/test_diff_hunk_validation.py::test_invalid_later_file_rejects_before_source_reads_and_execution",
"FAILED tests/test_diff_hunk_validation.py::test_native_targets_cli_refuses_damaged_stdin_without_success_json",
"FAILED tests/test_diff_hunk_validation.py::test_native_run_cli_refuses_damaged_file_before_model_tests_or_output",
"20 failed, 4 passed in 1.75s"
]
}
Loading
Loading