diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..87fa552e1c01af83e47469ed48c7111181c89e05 --- /dev/null +++ b/README.md @@ -0,0 +1,95 @@ +--- +license: other +task_categories: + - text-generation +language: + - en +tags: + - code + - software-engineering + - agentic-coding + - benchmark +pretty_name: PatchEval Pilot 20 +size_categories: + - n<1K +--- + +# PatchEval Pilot 20 + +PatchEval is a frozen benchmark for agentic coding. Each task starts from the +parent of a real Python bug-fix commit whose regression test landed with the +fix. The agent receives the reviewed GitHub issue and parent source; scoring is +deterministic from hidden fail-to-pass and regression test exit codes. + +This immutable `pilot-20` release contains 20 tasks mined from recent commits +and validated in four cells: + +1. the hidden regression test fails on the parent; +2. the parent's previously passing regression suite stays green; +3. the hidden regression test passes on the original fix; and +4. the regression suite stays green after the original fix. + +The release publishes no Docker images. BenchKit builds each task runtime +locally from its frozen recipe and removes its task-specific Docker resources +after the run. + +## Contents + +- `dataset.json`: release manifest and task IDs +- `tasks.jsonl`: prompts, commands, runtime recipes, artifact paths, and hashes +- `sources/`: deterministic parent-commit source archives without `.git` +- `hidden-tests/`: grader patches; these remain outside the agent sandbox +- `attestations/`: validation records produced before freezing +- `SHA256SUMS`: checksums for every frozen release artifact +- `miner/`: the source, configuration, schemas, tests, and documentation used + to mine, validate, review, and freeze the release + +## Run with BenchKit + +Download an immutable snapshot, point BenchKit at its root, and run the stock +Pi harness: + +```console +export BENCHKIT_PATCHEVAL_DATASET=/path/to/PatchEval +uv run benchkit --headless --models MODEL --benchmarks patcheval \ + --harness pi --repair-attempts 1 +``` + +The agent sandbox contains only the checksummed parent source and a restricted +inference route. It has no Git history, network egress, hidden tests, gold +patch, host mount, or Docker socket. Hidden grader output is never returned to +the model; a repair attempt receives only generic feedback. + +## Integrity + +Verify the release after download: + +```console +sha256sum --check SHA256SUMS +``` + +`dataset.json` additionally pins the SHA-256 of `tasks.jsonl`. A frozen release +is never regenerated or changed in place; a later mining window becomes a new +version. + +## Reproduce the miner + +The miner is intentionally separate from BenchKit. From `miner/`: + +```console +uv sync +uv run patcheval-mine --help +uv run pytest +``` + +Discovery, automated validation, blind review, and freezing are separate +fail-closed gates. See `miner/README.md` and `miner/docs/review-policy.md` for +the complete method and publication boundary. + +## Licensing + +The miner does not currently declare a standalone software license. Source +snapshots, issue text, and regression-test patches originate from the named +upstream repositories and remain subject to their respective licenses. Consult +each task's `repository` field and upstream project before redistribution or +reuse. diff --git a/SHA256SUMS b/SHA256SUMS new file mode 100644 index 0000000000000000000000000000000000000000..89f0ea58a42f82e50613bb2ba498219a1ec9f0c0 --- /dev/null +++ b/SHA256SUMS @@ -0,0 +1,62 @@ +cdc3e8c3e6b97e8edcf95da4964abf1a7429a85446382849af63730e023c62d4 attestations/attrs-1575.json +13576335e11c03b56f3cf5ec5b17ae17f10a9ed5b73d8d3fbf23009aec9453f1 attestations/city2graph-121.json +5958771de03ca81cd68329fe5861b8243eb092c9d3f8184883ac525aadfaec07 attestations/click-2790.json +0edbc0168ee8d6dc52caa5530033d06cfc7fdb888e646086742ff6b5f656be67 attestations/click-3360.json +1f416f251b7bee20d0a2038320359bec63350142d7f4e28b67a37c5d71604646 attestations/click-3572.json +1414951cfa6fe71f5052de109cc10c7288da3d585d86a5e4ecf8335d1e45d17f attestations/json-repair-191.json +b4f9f6f7abca024dde04af926aa95894919820d20cc3f295b0d23fe411ac7d5c attestations/json-repair-205.json +9c724b0b62326465650613b5d169526e9bec14e92ff02eae4a23527492ae192e attestations/json-repair-207.json +52527e4188d5a11569c9773c46a0174f4f526be5e6c9ebe06ff30cb7354cafca attestations/narwhals-3864.json +9d059f7422972c85295b4a8e21e3d65b8933a590eda19301a0babea0adcdc1c5 attestations/pygments-2816.json +c98dd7dcb682d6102c973bd28f5559eadb5d560596da158ae4e2bcf569243747 attestations/pygments-2828.json +8a560fd8ea9dd98371ce8d19e30168fa00e12519dfbcc63cb5f328b077d0af5f attestations/pypdf-3587.json +138d2ef1a36b9aecc4f557b477cc5a0bea32785d097acae0c0dfd98b2c54a5ff attestations/pypdf-3878.json +b1b9045c4c7ffb65a5999c3370ae7f302d9d443da14864dcd9642f7dc4c014ed attestations/pypdf-3982.json +565af92d3f7f7dcef98c04a5f1ff1a1d86fd07379d09caf83e58a2841f6a2b1a attestations/sqlit-246.json +62d147fc02fd1b6a8a78dc6b335bc965b4e36fbd24ef5731a60f93e4ef33ef1d attestations/sqlit-260.json +3e9032f8c82f2d56ab341aea2db7b2d0646f0febd51711d3e4c8bf6461ef9360 attestations/structlog-710.json +deabc0fda5048062037ce5124a92e68b37b970453aca9d4cb4bd98f1acb9f003 attestations/tomlkit-440.json +31bf047ef761851beae820d532904eb229b41a2fda028809807a3f2eee6698a9 attestations/tomlkit-542.json +76226aca40f217b8d71036841292d94dd8b9877a428310c7137d37768a840190 attestations/typeguard-499.json +0f777f95565a12a4237beeb632449798f558141496c79d867fddf5d6c55fae98 dataset.json +544fb459fb354931c31c5963726d4ab8ed153d8c61fcfc518363300ec1ee327a hidden-tests/attrs-1575.patch +5d0b869d29071084acbc351447cc02a402b938b303d83b817b1a04aa3503d6e6 hidden-tests/city2graph-121.patch +95c637397e9eea58e200e3001f2882f0da4cf99df1e4f5ad3d2cbb1347cc51d3 hidden-tests/click-2790.patch +b492d89726576456570f5a4ec209c61e4e1cae524b470beae226b530f6629118 hidden-tests/click-3360.patch +d6a1ee42b73b16163fb9b35056355ce65749240b87ec3f862805780dc101edd8 hidden-tests/click-3572.patch +96b3b7a6fe4ae4f86f8f42e86af8aedadaa9cfe87b6d5409adf1df05e49a06b0 hidden-tests/json-repair-191.patch +ef001d5bffbb4e4dbd51620fd70532d3d1e6c4373abf7ca1c75e1171b49e68c4 hidden-tests/json-repair-205.patch +6a9e3a7f9307b102bc29764df8b4fe17c956f9227af6533015cb37105f1efbdb hidden-tests/json-repair-207.patch +543c57d1a118280d000165857c1bd5f9e67c0286e4e51dd6eaf364fbd2ce6655 hidden-tests/narwhals-3864.patch +85529df235553cfc030b00769f8a10c2683d12d3eaea0713a48f4716b5be2cd9 hidden-tests/pygments-2816.patch +ac9e1f7355dff0ff69e30c1ea43bdb3b082a0f7b8fb0bf00b0b34ba3ac95f02d hidden-tests/pygments-2828.patch +d7dbc9b6309ee54bbfbe2a7b9075c4320e704e46e3cbc703e7f94c72b546f24d hidden-tests/pypdf-3587.patch +1f35d4edd2497d3568cac113ae07fcb935b5e3454799094fc7180d2ed8b7ca05 hidden-tests/pypdf-3878.patch +24192fe8f49b136426596b99789ca659d4edfbf20542de86e2e2b109aebe8198 hidden-tests/pypdf-3982.patch +8c996d9f14192966e18f5dc48bd08f619ae44ab687594f2a769d57ce119c72c4 hidden-tests/sqlit-246.patch +6744a8637a2c5bfdf8784bba6d48bd1b1f2f8918d4fed945e965be7a6947be01 hidden-tests/sqlit-260.patch +4888a5dc77f47dde9a751411c5c27880ce5948c5e9c8b3648b618286779c9daa hidden-tests/structlog-710.patch +4f54de74b1893428d216906daa3c5d5e667b21a74d913da32cb374d6c06a9f96 hidden-tests/tomlkit-440.patch +483263ef19d363a1236c066b76997f78f1357daa721c28b0da098c1c79d0a054 hidden-tests/tomlkit-542.patch +89bba7c95533fbb25ba5d68804f6734e9b48ec2bae3e7352aca6e43fd0eba1d2 hidden-tests/typeguard-499.patch +64c20a8d14830dcd0a069d65b6bb86ca61251a981da11be7209917ce54bd1830 sources/attrs-1575.tar +baa7c30a4b2e214b7e2cf9b51128f39da05947b7d34f3528139b1a8b19b5db3f sources/city2graph-121.tar +bcf76b9cd560a2fad48982274e8b68ec8bd6a8dc22e48fe93df39d9ff8e89e4d sources/click-2790.tar +d250a5680a151864900ce3271a1dac8057e58ba4be84b8e70f6c418522a72f29 sources/click-3360.tar +a810395f18b7c9d84a7e97c027d312dfbacd8c5fcd9aca9e593fb187c2c93308 sources/click-3572.tar +b81ba71d4e10022a7dd8b0345094c88cf0129f5ed6fe7bd3000c5138260624ae sources/json-repair-191.tar +e87c1fdebeecd474d38376c95c83f625a63b35d5d4f840e47a495121961ef274 sources/json-repair-205.tar +b011f04bdc1346010cc83c3cbdbc48593b62942063464ce4c8db87495a735250 sources/json-repair-207.tar +58ec8ccfdd1e3b00d15715f665de6cb6796e4f9d456d8c0a55d3a9bad7ea25d2 sources/narwhals-3864.tar +ccba4fdd41fd6a2a9796292a27e62babe206910a84f1290391e824371b6e58c0 sources/pygments-2816.tar +c9f794937fa960ed50c1c943691c030b6943a28f075e06a3e8ce70adf0ab6a20 sources/pygments-2828.tar +09eddc9e1688d5cbded2b6e1a8a8a1ff394746af53bd1aa54578b0701d6164c5 sources/pypdf-3587.tar +c6853735f6f494b8202622393418d82192b2000bc91bf9fe133634619e6c47b9 sources/pypdf-3878.tar +5a49bc62c5c37a4aaf8796e82c0bb09ab7dc30b253991aeb9189a2e806cb7119 sources/pypdf-3982.tar +37e92cffd7649eebd9f247d6baaf7ce35b89a3b0e3eab48ed82e04defaf5282f sources/sqlit-246.tar +ad45cceffdbc5e3629a0b1ccd608266f0f0f1e7820fa86557bb51573b6da669f sources/sqlit-260.tar +29cbfb33035b772d26d8ebae36cae0e0e30e606ee228056f2c910b9c55e396a1 sources/structlog-710.tar +a0b40aef624c1113496e08365bc15e70796c2280b3a71df568ec74123d72fab7 sources/tomlkit-440.tar +803d7046ba0b462206c5059327664b75228fd7d00e78f598a62e76e09260b329 sources/tomlkit-542.tar +15eec682771f0af79ba05bae6a97ad7a09c27f45b4e5623261b5e430377361a7 sources/typeguard-499.tar +2efa2f1469aedf0c332ea8a93ff2045e9b49d2f383d4f740ed9afb300bfb4cbc tasks.jsonl diff --git a/attestations/attrs-1575.json b/attestations/attrs-1575.json new file mode 100644 index 0000000000000000000000000000000000000000..ae72ea69102a4e81714c2de6b289fe6d33898e98 --- /dev/null +++ b/attestations/attrs-1575.json @@ -0,0 +1,237 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests/test_annotations.py::TestAnnotations::test_missing_classvar_import" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "cf439ac6a59a93dc8b30ec1f96ddd297b24be4ad41e7fb18e7944d9c1b765b57", + "output_tail": "FF [100%]\n=================================== FAILURES ===================================\n______________ TestAnnotations.test_missing_classvar_import[True] ______________\n\nself = \nslots = True\n\n @pytest.mark.skipif(\n sys.version_info[:2] < (3, 14),\n reason=\"Python 3.14 changed annotation evaluation behavior.\",\n )\n def test_missing_classvar_import(self, slots):\n \"\"\"\n Unimported ClassVars are recognized as ForwardRefs.\n \"\"\"\n \n @attr.s(auto_attribs=True, slots=slots)\n class C:\n cls_var: ClassVar[str] # noqa: F821\n value: int = 1\n \n> assert \"cls_var\" not in attr.fields_dict(C)\nE AssertionError: assert 'cls_var' not in {'cls_var': Attribute(name='cls_var', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, or...=mappingproxy({}), type=, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='value')}\nE + where {'cls_var': Attribute(name='cls_var', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, or...=mappingproxy({}), type=, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='value')} = (.C'>)\nE + where = attr.fields_dict\n\ntests/test_annotations.py:451: AssertionError\n_____________ TestAnnotations.test_missing_classvar_import[False] ______________\n\nself = \nslots = False\n\n @pytest.mark.skipif(\n sys.version_info[:2] < (3, 14),\n reason=\"Python 3.14 changed annotation evaluation behavior.\",\n )\n def test_missing_classvar_import(self, slots):\n \"\"\"\n Unimported ClassVars are recognized as ForwardRefs.\n \"\"\"\n \n @attr.s(auto_attribs=True, slots=slots)\n class C:\n cls_var: ClassVar[str] # noqa: F821\n value: int = 1\n \n> assert \"cls_var\" not in attr.fields_dict(C)\nE AssertionError: assert 'cls_var' not in {'cls_var': Attribute(name='cls_var', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, or...=mappingproxy({}), type=, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='value')}\nE + where {'cls_var': Attribute(name='cls_var', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, or...=mappingproxy({}), type=, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='value')} = (.C'>)\nE + where = attr.fields_dict\n\ntests/test_annotations.py:451: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_annotations.py::TestAnnotations::test_missing_classvar_import[True]\nFAILED tests/test_annotations.py::TestAnnotations::test_missing_classvar_import[False]\n2 failed in 0.09s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "444dc58ba99546185d89ba9b31778263601d4849f8f7af210d33b9968dcfe448", + "output_tail": "........................................................................ [ 5%]\n........................................................................ [ 10%]\n........................................................................ [ 15%]\n........................................................................ [ 20%]\n........................................................................ [ 25%]\n........................................................................ [ 30%]\n........................................................................ [ 36%]\n........................................................................ [ 41%]\n........................................................................ [ 46%]\n........................................................................ [ 51%]\n........................................................................ [ 56%]\n........................................................................ [ 61%]\n........................................................................ [ 67%]\n........................................................................ [ 72%]\n...............................................................s........ [ 77%]\n..............................................sss....................x.. [ 82%]\n..............................s...................x..................... [ 87%]\n........................................................................ [ 92%]\n........................................................................ [ 98%]\n.......................... [100%]\n=========================== short test summary info ============================\nSKIPPED [1] tests/test_make.py:3083: Pre-3.10 only.\nSKIPPED [1] tests/test_pyright.py:35: Requires pyright.\nSKIPPED [1] tests/test_pyright.py:83: Requires pyright.\nSKIPPED [1] tests/test_pyright.py:111: Requires pyright.\nSKIPPED [1] tests/test_slots.py:517: slots without weakref_slot should only work on PyPy\nXFAIL tests/test_setattr.py::TestSetAttr::test_slotted_confused\nXFAIL tests/test_slots.py::test_slots_cached_property_infers_type - 3.14 does not infer the type anymore.\n1387 passed, 5 skipped, 2 xfailed in 9.32s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests/test_annotations.py::TestAnnotations::test_missing_classvar_import" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "d54e562b1b92bd01731ae365858c02df2a697800b44d9fb15cd997542bffcf41", + "output_tail": ".. [100%]\n2 passed in 0.06s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "25ed547cbeef24ccbdba7a99e110faf043992580f4007e9a9ddfa76a0547ddb3", + "output_tail": "........................................................................ [ 5%]\n........................................................................ [ 10%]\n........................................................................ [ 15%]\n........................................................................ [ 20%]\n........................................................................ [ 25%]\n........................................................................ [ 30%]\n........................................................................ [ 36%]\n........................................................................ [ 41%]\n........................................................................ [ 46%]\n........................................................................ [ 51%]\n........................................................................ [ 56%]\n........................................................................ [ 61%]\n........................................................................ [ 67%]\n........................................................................ [ 72%]\n...............................................................s........ [ 77%]\n..............................................sss....................x.. [ 82%]\n..............................s...................x..................... [ 87%]\n........................................................................ [ 92%]\n........................................................................ [ 98%]\n.......................... [100%]\n=========================== short test summary info ============================\nSKIPPED [1] tests/test_make.py:3083: Pre-3.10 only.\nSKIPPED [1] tests/test_pyright.py:35: Requires pyright.\nSKIPPED [1] tests/test_pyright.py:83: Requires pyright.\nSKIPPED [1] tests/test_pyright.py:111: Requires pyright.\nSKIPPED [1] tests/test_slots.py:517: slots without weakref_slot should only work on PyPy\nXFAIL tests/test_setattr.py::TestSetAttr::test_slotted_confused\nXFAIL tests/test_slots.py::test_slots_cached_property_infers_type - 3.14 does not infer the type anymore.\n1387 passed, 5 skipped, 2 xfailed in 9.38s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests/test_annotations.py::TestAnnotations::test_missing_classvar_import" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "673e7f21a0e96c1ed0e473699c3e6cbca5d5ad537655153116158d85a67e6b98", + "output_tail": "FF [100%]\n=================================== FAILURES ===================================\n______________ TestAnnotations.test_missing_classvar_import[True] ______________\n\nself = \nslots = True\n\n @pytest.mark.skipif(\n sys.version_info[:2] < (3, 14),\n reason=\"Python 3.14 changed annotation evaluation behavior.\",\n )\n def test_missing_classvar_import(self, slots):\n \"\"\"\n Unimported ClassVars are recognized as ForwardRefs.\n \"\"\"\n \n @attr.s(auto_attribs=True, slots=slots)\n class C:\n cls_var: ClassVar[str] # noqa: F821\n value: int = 1\n \n> assert \"cls_var\" not in attr.fields_dict(C)\nE AssertionError: assert 'cls_var' not in {'cls_var': Attribute(name='cls_var', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, or...=mappingproxy({}), type=, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='value')}\nE + where {'cls_var': Attribute(name='cls_var', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, or...=mappingproxy({}), type=, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='value')} = (.C'>)\nE + where = attr.fields_dict\n\ntests/test_annotations.py:451: AssertionError\n_____________ TestAnnotations.test_missing_classvar_import[False] ______________\n\nself = \nslots = False\n\n @pytest.mark.skipif(\n sys.version_info[:2] < (3, 14),\n reason=\"Python 3.14 changed annotation evaluation behavior.\",\n )\n def test_missing_classvar_import(self, slots):\n \"\"\"\n Unimported ClassVars are recognized as ForwardRefs.\n \"\"\"\n \n @attr.s(auto_attribs=True, slots=slots)\n class C:\n cls_var: ClassVar[str] # noqa: F821\n value: int = 1\n \n> assert \"cls_var\" not in attr.fields_dict(C)\nE AssertionError: assert 'cls_var' not in {'cls_var': Attribute(name='cls_var', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, or...=mappingproxy({}), type=, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='value')}\nE + where {'cls_var': Attribute(name='cls_var', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, or...=mappingproxy({}), type=, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='value')} = (.C'>)\nE + where = attr.fields_dict\n\ntests/test_annotations.py:451: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_annotations.py::TestAnnotations::test_missing_classvar_import[True]\nFAILED tests/test_annotations.py::TestAnnotations::test_missing_classvar_import[False]\n2 failed in 0.09s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "25ed547cbeef24ccbdba7a99e110faf043992580f4007e9a9ddfa76a0547ddb3", + "output_tail": "........................................................................ [ 5%]\n........................................................................ [ 10%]\n........................................................................ [ 15%]\n........................................................................ [ 20%]\n........................................................................ [ 25%]\n........................................................................ [ 30%]\n........................................................................ [ 36%]\n........................................................................ [ 41%]\n........................................................................ [ 46%]\n........................................................................ [ 51%]\n........................................................................ [ 56%]\n........................................................................ [ 61%]\n........................................................................ [ 67%]\n........................................................................ [ 72%]\n...............................................................s........ [ 77%]\n..............................................sss....................x.. [ 82%]\n..............................s...................x..................... [ 87%]\n........................................................................ [ 92%]\n........................................................................ [ 98%]\n.......................... [100%]\n=========================== short test summary info ============================\nSKIPPED [1] tests/test_make.py:3083: Pre-3.10 only.\nSKIPPED [1] tests/test_pyright.py:35: Requires pyright.\nSKIPPED [1] tests/test_pyright.py:83: Requires pyright.\nSKIPPED [1] tests/test_pyright.py:111: Requires pyright.\nSKIPPED [1] tests/test_slots.py:517: slots without weakref_slot should only work on PyPy\nXFAIL tests/test_setattr.py::TestSetAttr::test_slotted_confused\nXFAIL tests/test_slots.py::test_slots_cached_property_infers_type - 3.14 does not infer the type anymore.\n1387 passed, 5 skipped, 2 xfailed in 9.38s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests/test_annotations.py::TestAnnotations::test_missing_classvar_import" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "d54e562b1b92bd01731ae365858c02df2a697800b44d9fb15cd997542bffcf41", + "output_tail": ".. [100%]\n2 passed in 0.06s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "ff705f1f36b20d718ab6d3fdac7661f7660ed6731658e5ff5531cf4c6050103f", + "output_tail": "........................................................................ [ 5%]\n........................................................................ [ 10%]\n........................................................................ [ 15%]\n........................................................................ [ 20%]\n........................................................................ [ 25%]\n........................................................................ [ 30%]\n........................................................................ [ 36%]\n........................................................................ [ 41%]\n........................................................................ [ 46%]\n........................................................................ [ 51%]\n........................................................................ [ 56%]\n........................................................................ [ 61%]\n........................................................................ [ 67%]\n........................................................................ [ 72%]\n...............................................................s........ [ 77%]\n..............................................sss....................x.. [ 82%]\n..............................s...................x..................... [ 87%]\n........................................................................ [ 92%]\n........................................................................ [ 98%]\n.......................... [100%]\n=========================== short test summary info ============================\nSKIPPED [1] tests/test_make.py:3083: Pre-3.10 only.\nSKIPPED [1] tests/test_pyright.py:35: Requires pyright.\nSKIPPED [1] tests/test_pyright.py:83: Requires pyright.\nSKIPPED [1] tests/test_pyright.py:111: Requires pyright.\nSKIPPED [1] tests/test_slots.py:517: slots without weakref_slot should only work on PyPy\nXFAIL tests/test_setattr.py::TestSetAttr::test_slotted_confused\nXFAIL tests/test_slots.py::test_slots_cached_property_infers_type - 3.14 does not infer the type anymore.\n1387 passed, 5 skipped, 2 xfailed in 9.36s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests/test_annotations.py::TestAnnotations::test_missing_classvar_import" + ], + "fix_sha": "97f8d175656bc03c373a1c9038048a4d312c307c", + "local_image": "patcheval-validate:attrs-1575", + "local_image_id": "sha256:1ecf05dba183c31fdded4e1b92c73181e24d21926b6cb976b5b411ad8e8ba944", + "parent_sha": "6851ab593cd25f3c14393e9355d57d22bec2a074", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests" + ], + "repeats": 2, + "repository": "python-attrs/attrs", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.47.3\nripgrep 14.1.1", + "smoke_output_sha256": "1f9f54eb0528523e3fe1a96cfad2629677cab32bb4348a4eaa6992145e8608fc", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim@sha256:dfe4069fefc02ee4d6097c26f31d0784df09c9b6242fb4a25ad31fbae74ec6aa", + "bootstrap_command": [ + "uv", + "pip", + "install", + "--python", + "/opt/venv/bin/python", + "--only-binary", + ":all:", + "hatchling==1.27.0", + "hatch-vcs==0.5.0", + "hatch-fancy-pypi-readme==25.1.0", + "setuptools-scm==9.2.0", + "editables==0.5" + ], + "environment": [ + "HOME=/home/node", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "UV_CACHE_DIR=/tmp/uv-cache", + "PYTHONPATH=/workspace/repo/src", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONHASHSEED=0", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "UV_OFFLINE=1", + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ATTRS=0.0.0", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TZ=UTC", + "TERM=dumb", + "NO_COLOR=1", + "PYTHON_COLORS=0" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0", + "tests" + ], + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ." + ], + "sync_command": [ + "uv", + "sync", + "--frozen", + "--no-default-groups", + "--group", + "tests", + "--no-install-project" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q", + "--hypothesis-seed=0" + ], + "timeout_s": 900 + }, + "schema_version": 1, + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ." + ], + "task_id": "attrs-1575", + "validated": true +} diff --git a/attestations/city2graph-121.json b/attestations/city2graph-121.json new file mode 100644 index 0000000000000000000000000000000000000000..5dc1856b06ce001fb08eed1102a87996c92dc5a6 --- /dev/null +++ b/attestations/city2graph-121.json @@ -0,0 +1,170 @@ +{ + "cells": [ + { + "command": [ + "pytest", + "-q", + "tests/test_utils.py::TestPlotting::test_plot_graph_homo_with_legend_kwargs_and_title" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "47c68297c3f0046497fd21c3c1edf6454a3c43c806078870885254c92c1021e4", + "output_tail": "s: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n================================ tests coverage ================================\n_______________ coverage: platform linux, python 3.12.11-final-0 _______________\n\nName Stmts Miss Cover Missing\n------------------------------------------------------------\ncity2graph/__init__.py 14 0 100%\ncity2graph/base.py 173 135 22% 82-110, 134, 165-181, 222-225, 251-279, 317-328, 516-549, 589-645, 690-700, 742-746, 784\ncity2graph/data.py 249 217 13% 183-229, 262-282, 337-370, 407-421, 489-561, 596-607, 640-671, 703-722, 757-796, 826-839, 870-894, 930-955, 988-1000\ncity2graph/graph.py 570 506 11% 145-150, 175-177, 215, 240-258, 282-337, 380-415, 439-494, 524-548, 573-610, 649-698, 726-728, 757-792, 823-867, 898-951, 975-979, 1012-1065, 1088-1105, 1129-1134, 1158-1182, 1216-1269, 1295-1308, 1326-1329, 1365-1378, 1414-1443, 1467-1491, 1512-1538, 1557-1561, 1585-1593, 1625-1642, 1767-1778, 1863-1864, 1942-1948, 2052-2058, 2110, 2149-2169, 2210-2265, 2293-2342, 2370-2430\ncity2graph/metapath.py 438 385 12% 124-159, 235-303, 355-413, 457-476, 495-497, 516-518, 543-549, 574-577, 602-605, 627-634, 655-659, 702-794, 822-831, 862-885, 922-958, 986-989, 1025-1036, 1075-1100, 1121-1125, 1169-1187, 1223-1238, 1272, 1314-1316, 1354-1396, 1442-1489, 1546-1598, 1629-1646, 1674-1692, 1745-1772\ncity2graph/mobility.py 272 236 13% 134-282, 309-327, 353-368, 393-400, 435-441, 464, 489-493, 528-537, 569-602, 632, 655-657, 704-730, 762-796, 832-849, 882-887, 921-948, 978-987, 1023-1042, 1065-1076, 1101-1104, 1151-1185, 1208-1235\ncity2graph/morphology.py 338 292 14% 178-233, 306-375, 451-515, 577-616, 701-754, 789-813, 844-846, 878-885, 925-961, 1007-1042, 1089-1159, 1191-1197, 1225-1242, 1279-1317, 1352-1389, 1422-1438, 1471-1487, 1516-1542, 1567-1588, 1614-1626, 1665-1714, 1748-1755, 1793-1801, 1833-1839, 1870\ncity2graph/proximity.py 625 542 13% 101-131, 177-183, 211-217, 241-245, 273-288, 308-310, 330, 350, 371-391, 429-435, 449-469, 478-480, 494-505, 524-555, 579-616, 635, 703-748, 817-834, 889-923, 978-1009, 1077-1105, 1187-1231, 1324-1348, 1379-1387, 1501-1556, 1637-1690, 1790-1828, 1901-1938, 1962-2006, 2026-2067, 2104-2141, 2161-2162, 2194-2204, 2243-2282, 2314-2330, 2354-2362, 2389-2392, 2414, 2448-2464\ncity2graph/transportation.py 245 214 13% 87, 117-126, 158-174, 208-217, 243-264, 309-372, 408-412, 448-465, 517-540, 577-604, 645-667, 700-709, 742-761, 810-850, 924-1004, 1036-1093\ncity2graph/utils.py 1036 859 17% 144, 206, 230, 279-301, 326-338, 357-362, 381-383, 427-440, 460-466, 495-510, 531-552, 578-611, 641-670, 706-719, 746-771, 805-822, 861-886, 918-936, 963-973, 1012-1024, 1065-1077, 1104-1120, 1143-1154, 1179-1186, 1213-1237, 1263-1278, 1305-1358, 1383-1402, 1429-1435, 1464-1471, 1496, 1518-1522, 1547-1552, 1577-1584, 1604, 1626-1637, 1665-1677, 1702-1708, 1788-1878, 1900-1914, 1936-1943, 1977-2017, 2125-2132, 2218-2251, 2315-2375, 2457-2492, 2523-2549, 2574-2582, 2613-2621, 2644-2655, 2675, 2706-2733, 2764-2772, 2798-2800, 2825-2828, 2856, 2881-2895, 2921-2927, 2946-2947, 2966, 2991-3028, 3075-3104, 3142-3175, 3209-3247, 3268-3269, 3294-3300, 3384-3409, 3454-3490, 3515-3518, 3546-3554, 3622-3695, 3743-3748, 3777-3817, 3846-3894, 4052-4053, 4057-4058, 4084, 4090, 4101, 4105, 4129-4133, 4164-4171, 4207, 4227-4228, 4252, 4359, 4395, 4414-4415, 4421, 4449-4473, 4490-4514, 4555-4618, 4642-4656, 4688-4723, 4758-4760, 4781-4788, 4818-4820, 4844-4851, 4882-4905, 4931-4958\n------------------------------------------------------------\nTOTAL 3960 3386 14%\n=========================== short test summary info ============================\nFAILED tests/test_utils.py::TestPlotting::test_plot_graph_homo_with_legend_kwargs_and_title\n1 failed, 3 warnings in 0.90s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "f484523785ba56d570bb925ecb64ea26fcf22c09c61add92d0a500f8fff0ab3c", + "output_tail": "dexes\n /workspace/repo/city2graph/mobility.py:193: UserWarning: 1 labels in adjacency not present in zones_gdf; related edges will be dropped\n adj = _align_adjacency_zones(\n\ntests/test_mobility.py::TestODMatrixToGraph::test_missing_crs_emits_warning\n /workspace/repo/city2graph/mobility.py:135: UserWarning: zones_gdf has no CRS set; outputs will have undefined CRS (requirement 3.1)\n _validate_crs(zones_gdf)\n\ntests/test_morphology.py::TestMorphologicalGraphCore::test_contiguity_options[rook]\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:61: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_basic\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_networkx\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_contiguity[queen]\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_duplicate_index\ntests/test_morphology.py::TestIntegrationAndStress::test_function_consistency\ntests/test_morphology.py::TestIntegrationAndStress::test_function_consistency\ntests/test_morphology.py::TestSpecialScenarios::test_group_column_functionality\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 64 disconnected components.\n There are 28 islands with ids: 0, 1, 2, 3, 10, 18, 19, 20, 21, 34, 44, 65, 66, 82, 83, 84, 86, 91, 92, 93, 94, 96, 109, 135, 185, 251, 254, 255.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_contiguity[rook]\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:61: UserWarning: The weights matrix is not fully connected: \n There are 67 disconnected components.\n There are 30 islands with ids: 0, 1, 2, 3, 10, 18, 19, 20, 21, 31, 32, 34, 44, 65, 66, 82, 83, 84, 86, 91, 92, 93, 94, 96, 109, 135, 185, 251, 254, 255.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestSpecialScenarios::test_empty_adjacency_data_handling\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n There are 2 islands with ids: 1, 2.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_proximity.py::test_contiguity_input_validation_and_empty_neighbors\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n There are 2 islands with ids: 0, 1.\n W.__init__(self, neighbors, ids=ids, **kw)\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n================================ tests coverage ================================\n_______________ coverage: platform linux, python 3.12.11-final-0 _______________\n\nName Stmts Miss Cover Missing\n------------------------------------------------------------\ncity2graph/__init__.py 14 0 100%\ncity2graph/base.py 173 0 100%\ncity2graph/data.py 249 3 99% 544, 646, 875\ncity2graph/graph.py 570 2 99% 1436-1437\ncity2graph/metapath.py 438 0 100%\ncity2graph/mobility.py 272 0 100%\ncity2graph/morphology.py 338 0 100%\ncity2graph/proximity.py 625 7 99% 123-128, 274-275\ncity2graph/transportation.py 245 0 100%\ncity2graph/utils.py 1036 15 99% 2490, 3000, 3479, 4345, 4580-4583, 4616, 4787-4788, 4847, 4851, 4939-4940, 4943\n------------------------------------------------------------\nTOTAL 3960 27 99%\n562 passed, 179 warnings in 26.96s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_utils.py::TestPlotting::test_plot_graph_homo_with_legend_kwargs_and_title" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "fca3133b64d506df0cf416d09af88124cbef7ebca60d09935d7ae432ed97a4d2", + "output_tail": "y:1480\n /opt/venv/lib/python3.12/site-packages/torch/jit/_script.py:1480: DeprecationWarning: `torch.jit.script` is deprecated. Please switch to `torch.compile` or `torch.export`.\n warnings.warn(\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n================================ tests coverage ================================\n_______________ coverage: platform linux, python 3.12.11-final-0 _______________\n\nName Stmts Miss Cover Missing\n------------------------------------------------------------\ncity2graph/__init__.py 14 0 100%\ncity2graph/base.py 173 135 22% 82-110, 134, 165-181, 222-225, 251-279, 317-328, 516-549, 589-645, 690-700, 742-746, 784\ncity2graph/data.py 249 217 13% 183-229, 262-282, 337-370, 407-421, 489-561, 596-607, 640-671, 703-722, 757-796, 826-839, 870-894, 930-955, 988-1000\ncity2graph/graph.py 570 506 11% 145-150, 175-177, 215, 240-258, 282-337, 380-415, 439-494, 524-548, 573-610, 649-698, 726-728, 757-792, 823-867, 898-951, 975-979, 1012-1065, 1088-1105, 1129-1134, 1158-1182, 1216-1269, 1295-1308, 1326-1329, 1365-1378, 1414-1443, 1467-1491, 1512-1538, 1557-1561, 1585-1593, 1625-1642, 1767-1778, 1863-1864, 1942-1948, 2052-2058, 2110, 2149-2169, 2210-2265, 2293-2342, 2370-2430\ncity2graph/metapath.py 438 385 12% 124-159, 235-303, 355-413, 457-476, 495-497, 516-518, 543-549, 574-577, 602-605, 627-634, 655-659, 702-794, 822-831, 862-885, 922-958, 986-989, 1025-1036, 1075-1100, 1121-1125, 1169-1187, 1223-1238, 1272, 1314-1316, 1354-1396, 1442-1489, 1546-1598, 1629-1646, 1674-1692, 1745-1772\ncity2graph/mobility.py 272 236 13% 134-282, 309-327, 353-368, 393-400, 435-441, 464, 489-493, 528-537, 569-602, 632, 655-657, 704-730, 762-796, 832-849, 882-887, 921-948, 978-987, 1023-1042, 1065-1076, 1101-1104, 1151-1185, 1208-1235\ncity2graph/morphology.py 338 292 14% 178-233, 306-375, 451-515, 577-616, 701-754, 789-813, 844-846, 878-885, 925-961, 1007-1042, 1089-1159, 1191-1197, 1225-1242, 1279-1317, 1352-1389, 1422-1438, 1471-1487, 1516-1542, 1567-1588, 1614-1626, 1665-1714, 1748-1755, 1793-1801, 1833-1839, 1870\ncity2graph/proximity.py 625 542 13% 101-131, 177-183, 211-217, 241-245, 273-288, 308-310, 330, 350, 371-391, 429-435, 449-469, 478-480, 494-505, 524-555, 579-616, 635, 703-748, 817-834, 889-923, 978-1009, 1077-1105, 1187-1231, 1324-1348, 1379-1387, 1501-1556, 1637-1690, 1790-1828, 1901-1938, 1962-2006, 2026-2067, 2104-2141, 2161-2162, 2194-2204, 2243-2282, 2314-2330, 2354-2362, 2389-2392, 2414, 2448-2464\ncity2graph/transportation.py 245 214 13% 87, 117-126, 158-174, 208-217, 243-264, 309-372, 408-412, 448-465, 517-540, 577-604, 645-667, 700-709, 742-761, 810-850, 924-1004, 1036-1093\ncity2graph/utils.py 1047 852 19% 144, 206, 230, 279-301, 326-338, 357-362, 381-383, 427-440, 460-466, 495-510, 531-552, 578-611, 641-670, 706-719, 746-771, 805-822, 861-886, 918-936, 963-973, 1012-1024, 1065-1077, 1104-1120, 1143-1154, 1179-1186, 1213-1237, 1263-1278, 1305-1358, 1383-1402, 1429-1435, 1464-1471, 1496, 1518-1522, 1547-1552, 1577-1584, 1604, 1626-1637, 1665-1677, 1702-1708, 1788-1878, 1900-1914, 1936-1943, 1977-2017, 2125-2132, 2218-2251, 2315-2375, 2457-2492, 2523-2549, 2574-2582, 2613-2621, 2644-2655, 2675, 2706-2733, 2764-2772, 2798-2800, 2825-2828, 2856, 2881-2895, 2921-2927, 2946-2947, 2966, 2991-3028, 3075-3104, 3142-3175, 3209-3247, 3268-3269, 3294-3300, 3384-3409, 3454-3490, 3515-3518, 3546-3554, 3622-3695, 3743-3748, 3777-3817, 3846-3894, 4052-4053, 4057-4058, 4084, 4090, 4101, 4129-4133, 4164-4171, 4227-4228, 4252, 4348, 4398, 4424, 4452-4476, 4493-4517, 4558-4621, 4645-4659, 4691-4726, 4800-4807, 4837-4839, 4863-4870, 4901-4924, 4950-4977\n------------------------------------------------------------\nTOTAL 3971 3379 15%\n1 passed, 3 warnings in 0.54s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "810759a79140b5c54b7d8685aae0a950745a445e51dcd86d969fb4e87332954a", + "output_tail": "/city2graph/mobility.py:193: UserWarning: 1 labels in adjacency not present in zones_gdf; related edges will be dropped\n adj = _align_adjacency_zones(\n\ntests/test_mobility.py::TestODMatrixToGraph::test_missing_crs_emits_warning\n /workspace/repo/city2graph/mobility.py:135: UserWarning: zones_gdf has no CRS set; outputs will have undefined CRS (requirement 3.1)\n _validate_crs(zones_gdf)\n\ntests/test_morphology.py::TestMorphologicalGraphCore::test_contiguity_options[rook]\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:61: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_basic\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_networkx\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_contiguity[queen]\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_duplicate_index\ntests/test_morphology.py::TestIntegrationAndStress::test_function_consistency\ntests/test_morphology.py::TestIntegrationAndStress::test_function_consistency\ntests/test_morphology.py::TestSpecialScenarios::test_group_column_functionality\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 64 disconnected components.\n There are 28 islands with ids: 0, 1, 2, 3, 10, 18, 19, 20, 21, 34, 44, 65, 66, 82, 83, 84, 86, 91, 92, 93, 94, 96, 109, 135, 185, 251, 254, 255.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_contiguity[rook]\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:61: UserWarning: The weights matrix is not fully connected: \n There are 67 disconnected components.\n There are 30 islands with ids: 0, 1, 2, 3, 10, 18, 19, 20, 21, 31, 32, 34, 44, 65, 66, 82, 83, 84, 86, 91, 92, 93, 94, 96, 109, 135, 185, 251, 254, 255.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestSpecialScenarios::test_empty_adjacency_data_handling\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n There are 2 islands with ids: 1, 2.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_proximity.py::test_contiguity_input_validation_and_empty_neighbors\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n There are 2 islands with ids: 0, 1.\n W.__init__(self, neighbors, ids=ids, **kw)\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n================================ tests coverage ================================\n_______________ coverage: platform linux, python 3.12.11-final-0 _______________\n\nName Stmts Miss Cover Missing\n------------------------------------------------------------\ncity2graph/__init__.py 14 0 100%\ncity2graph/base.py 173 0 100%\ncity2graph/data.py 249 3 99% 544, 646, 875\ncity2graph/graph.py 570 2 99% 1436-1437\ncity2graph/metapath.py 438 0 100%\ncity2graph/mobility.py 272 0 100%\ncity2graph/morphology.py 338 0 100%\ncity2graph/proximity.py 625 7 99% 123-128, 274-275\ncity2graph/transportation.py 245 0 100%\ncity2graph/utils.py 1047 19 98% 2490, 3000, 3479, 4348, 4583-4586, 4619, 4769, 4771, 4775-4776, 4806-4807, 4866, 4870, 4958-4959, 4962\n------------------------------------------------------------\nTOTAL 3971 31 99%\n562 passed, 179 warnings in 27.13s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_utils.py::TestPlotting::test_plot_graph_homo_with_legend_kwargs_and_title" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "67a3e7eaad1e097091f0df97c2156229298b2959359f75eb5f15321f79d037be", + "output_tail": "s: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n================================ tests coverage ================================\n_______________ coverage: platform linux, python 3.12.11-final-0 _______________\n\nName Stmts Miss Cover Missing\n------------------------------------------------------------\ncity2graph/__init__.py 14 0 100%\ncity2graph/base.py 173 135 22% 82-110, 134, 165-181, 222-225, 251-279, 317-328, 516-549, 589-645, 690-700, 742-746, 784\ncity2graph/data.py 249 217 13% 183-229, 262-282, 337-370, 407-421, 489-561, 596-607, 640-671, 703-722, 757-796, 826-839, 870-894, 930-955, 988-1000\ncity2graph/graph.py 570 506 11% 145-150, 175-177, 215, 240-258, 282-337, 380-415, 439-494, 524-548, 573-610, 649-698, 726-728, 757-792, 823-867, 898-951, 975-979, 1012-1065, 1088-1105, 1129-1134, 1158-1182, 1216-1269, 1295-1308, 1326-1329, 1365-1378, 1414-1443, 1467-1491, 1512-1538, 1557-1561, 1585-1593, 1625-1642, 1767-1778, 1863-1864, 1942-1948, 2052-2058, 2110, 2149-2169, 2210-2265, 2293-2342, 2370-2430\ncity2graph/metapath.py 438 385 12% 124-159, 235-303, 355-413, 457-476, 495-497, 516-518, 543-549, 574-577, 602-605, 627-634, 655-659, 702-794, 822-831, 862-885, 922-958, 986-989, 1025-1036, 1075-1100, 1121-1125, 1169-1187, 1223-1238, 1272, 1314-1316, 1354-1396, 1442-1489, 1546-1598, 1629-1646, 1674-1692, 1745-1772\ncity2graph/mobility.py 272 236 13% 134-282, 309-327, 353-368, 393-400, 435-441, 464, 489-493, 528-537, 569-602, 632, 655-657, 704-730, 762-796, 832-849, 882-887, 921-948, 978-987, 1023-1042, 1065-1076, 1101-1104, 1151-1185, 1208-1235\ncity2graph/morphology.py 338 292 14% 178-233, 306-375, 451-515, 577-616, 701-754, 789-813, 844-846, 878-885, 925-961, 1007-1042, 1089-1159, 1191-1197, 1225-1242, 1279-1317, 1352-1389, 1422-1438, 1471-1487, 1516-1542, 1567-1588, 1614-1626, 1665-1714, 1748-1755, 1793-1801, 1833-1839, 1870\ncity2graph/proximity.py 625 542 13% 101-131, 177-183, 211-217, 241-245, 273-288, 308-310, 330, 350, 371-391, 429-435, 449-469, 478-480, 494-505, 524-555, 579-616, 635, 703-748, 817-834, 889-923, 978-1009, 1077-1105, 1187-1231, 1324-1348, 1379-1387, 1501-1556, 1637-1690, 1790-1828, 1901-1938, 1962-2006, 2026-2067, 2104-2141, 2161-2162, 2194-2204, 2243-2282, 2314-2330, 2354-2362, 2389-2392, 2414, 2448-2464\ncity2graph/transportation.py 245 214 13% 87, 117-126, 158-174, 208-217, 243-264, 309-372, 408-412, 448-465, 517-540, 577-604, 645-667, 700-709, 742-761, 810-850, 924-1004, 1036-1093\ncity2graph/utils.py 1036 859 17% 144, 206, 230, 279-301, 326-338, 357-362, 381-383, 427-440, 460-466, 495-510, 531-552, 578-611, 641-670, 706-719, 746-771, 805-822, 861-886, 918-936, 963-973, 1012-1024, 1065-1077, 1104-1120, 1143-1154, 1179-1186, 1213-1237, 1263-1278, 1305-1358, 1383-1402, 1429-1435, 1464-1471, 1496, 1518-1522, 1547-1552, 1577-1584, 1604, 1626-1637, 1665-1677, 1702-1708, 1788-1878, 1900-1914, 1936-1943, 1977-2017, 2125-2132, 2218-2251, 2315-2375, 2457-2492, 2523-2549, 2574-2582, 2613-2621, 2644-2655, 2675, 2706-2733, 2764-2772, 2798-2800, 2825-2828, 2856, 2881-2895, 2921-2927, 2946-2947, 2966, 2991-3028, 3075-3104, 3142-3175, 3209-3247, 3268-3269, 3294-3300, 3384-3409, 3454-3490, 3515-3518, 3546-3554, 3622-3695, 3743-3748, 3777-3817, 3846-3894, 4052-4053, 4057-4058, 4084, 4090, 4101, 4105, 4129-4133, 4164-4171, 4207, 4227-4228, 4252, 4359, 4395, 4414-4415, 4421, 4449-4473, 4490-4514, 4555-4618, 4642-4656, 4688-4723, 4758-4760, 4781-4788, 4818-4820, 4844-4851, 4882-4905, 4931-4958\n------------------------------------------------------------\nTOTAL 3960 3386 14%\n=========================== short test summary info ============================\nFAILED tests/test_utils.py::TestPlotting::test_plot_graph_homo_with_legend_kwargs_and_title\n1 failed, 3 warnings in 0.91s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "fbcccc53dd34efe2ac76e9679d1b6a26fd8925988797745f6ab234e641adacb4", + "output_tail": "dexes\n /workspace/repo/city2graph/mobility.py:193: UserWarning: 1 labels in adjacency not present in zones_gdf; related edges will be dropped\n adj = _align_adjacency_zones(\n\ntests/test_mobility.py::TestODMatrixToGraph::test_missing_crs_emits_warning\n /workspace/repo/city2graph/mobility.py:135: UserWarning: zones_gdf has no CRS set; outputs will have undefined CRS (requirement 3.1)\n _validate_crs(zones_gdf)\n\ntests/test_morphology.py::TestMorphologicalGraphCore::test_contiguity_options[rook]\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:61: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_basic\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_networkx\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_contiguity[queen]\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_duplicate_index\ntests/test_morphology.py::TestIntegrationAndStress::test_function_consistency\ntests/test_morphology.py::TestIntegrationAndStress::test_function_consistency\ntests/test_morphology.py::TestSpecialScenarios::test_group_column_functionality\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 64 disconnected components.\n There are 28 islands with ids: 0, 1, 2, 3, 10, 18, 19, 20, 21, 34, 44, 65, 66, 82, 83, 84, 86, 91, 92, 93, 94, 96, 109, 135, 185, 251, 254, 255.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_contiguity[rook]\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:61: UserWarning: The weights matrix is not fully connected: \n There are 67 disconnected components.\n There are 30 islands with ids: 0, 1, 2, 3, 10, 18, 19, 20, 21, 31, 32, 34, 44, 65, 66, 82, 83, 84, 86, 91, 92, 93, 94, 96, 109, 135, 185, 251, 254, 255.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestSpecialScenarios::test_empty_adjacency_data_handling\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n There are 2 islands with ids: 1, 2.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_proximity.py::test_contiguity_input_validation_and_empty_neighbors\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n There are 2 islands with ids: 0, 1.\n W.__init__(self, neighbors, ids=ids, **kw)\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n================================ tests coverage ================================\n_______________ coverage: platform linux, python 3.12.11-final-0 _______________\n\nName Stmts Miss Cover Missing\n------------------------------------------------------------\ncity2graph/__init__.py 14 0 100%\ncity2graph/base.py 173 0 100%\ncity2graph/data.py 249 3 99% 544, 646, 875\ncity2graph/graph.py 570 2 99% 1436-1437\ncity2graph/metapath.py 438 0 100%\ncity2graph/mobility.py 272 0 100%\ncity2graph/morphology.py 338 0 100%\ncity2graph/proximity.py 625 7 99% 123-128, 274-275\ncity2graph/transportation.py 245 0 100%\ncity2graph/utils.py 1036 15 99% 2490, 3000, 3479, 4345, 4580-4583, 4616, 4787-4788, 4847, 4851, 4939-4940, 4943\n------------------------------------------------------------\nTOTAL 3960 27 99%\n562 passed, 179 warnings in 27.01s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_utils.py::TestPlotting::test_plot_graph_homo_with_legend_kwargs_and_title" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "c9ddcf234416580fdc96fc14e4695450119b8b7adb603e683a9a8b9b18839133", + "output_tail": "y:1480\n /opt/venv/lib/python3.12/site-packages/torch/jit/_script.py:1480: DeprecationWarning: `torch.jit.script` is deprecated. Please switch to `torch.compile` or `torch.export`.\n warnings.warn(\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n================================ tests coverage ================================\n_______________ coverage: platform linux, python 3.12.11-final-0 _______________\n\nName Stmts Miss Cover Missing\n------------------------------------------------------------\ncity2graph/__init__.py 14 0 100%\ncity2graph/base.py 173 135 22% 82-110, 134, 165-181, 222-225, 251-279, 317-328, 516-549, 589-645, 690-700, 742-746, 784\ncity2graph/data.py 249 217 13% 183-229, 262-282, 337-370, 407-421, 489-561, 596-607, 640-671, 703-722, 757-796, 826-839, 870-894, 930-955, 988-1000\ncity2graph/graph.py 570 506 11% 145-150, 175-177, 215, 240-258, 282-337, 380-415, 439-494, 524-548, 573-610, 649-698, 726-728, 757-792, 823-867, 898-951, 975-979, 1012-1065, 1088-1105, 1129-1134, 1158-1182, 1216-1269, 1295-1308, 1326-1329, 1365-1378, 1414-1443, 1467-1491, 1512-1538, 1557-1561, 1585-1593, 1625-1642, 1767-1778, 1863-1864, 1942-1948, 2052-2058, 2110, 2149-2169, 2210-2265, 2293-2342, 2370-2430\ncity2graph/metapath.py 438 385 12% 124-159, 235-303, 355-413, 457-476, 495-497, 516-518, 543-549, 574-577, 602-605, 627-634, 655-659, 702-794, 822-831, 862-885, 922-958, 986-989, 1025-1036, 1075-1100, 1121-1125, 1169-1187, 1223-1238, 1272, 1314-1316, 1354-1396, 1442-1489, 1546-1598, 1629-1646, 1674-1692, 1745-1772\ncity2graph/mobility.py 272 236 13% 134-282, 309-327, 353-368, 393-400, 435-441, 464, 489-493, 528-537, 569-602, 632, 655-657, 704-730, 762-796, 832-849, 882-887, 921-948, 978-987, 1023-1042, 1065-1076, 1101-1104, 1151-1185, 1208-1235\ncity2graph/morphology.py 338 292 14% 178-233, 306-375, 451-515, 577-616, 701-754, 789-813, 844-846, 878-885, 925-961, 1007-1042, 1089-1159, 1191-1197, 1225-1242, 1279-1317, 1352-1389, 1422-1438, 1471-1487, 1516-1542, 1567-1588, 1614-1626, 1665-1714, 1748-1755, 1793-1801, 1833-1839, 1870\ncity2graph/proximity.py 625 542 13% 101-131, 177-183, 211-217, 241-245, 273-288, 308-310, 330, 350, 371-391, 429-435, 449-469, 478-480, 494-505, 524-555, 579-616, 635, 703-748, 817-834, 889-923, 978-1009, 1077-1105, 1187-1231, 1324-1348, 1379-1387, 1501-1556, 1637-1690, 1790-1828, 1901-1938, 1962-2006, 2026-2067, 2104-2141, 2161-2162, 2194-2204, 2243-2282, 2314-2330, 2354-2362, 2389-2392, 2414, 2448-2464\ncity2graph/transportation.py 245 214 13% 87, 117-126, 158-174, 208-217, 243-264, 309-372, 408-412, 448-465, 517-540, 577-604, 645-667, 700-709, 742-761, 810-850, 924-1004, 1036-1093\ncity2graph/utils.py 1047 852 19% 144, 206, 230, 279-301, 326-338, 357-362, 381-383, 427-440, 460-466, 495-510, 531-552, 578-611, 641-670, 706-719, 746-771, 805-822, 861-886, 918-936, 963-973, 1012-1024, 1065-1077, 1104-1120, 1143-1154, 1179-1186, 1213-1237, 1263-1278, 1305-1358, 1383-1402, 1429-1435, 1464-1471, 1496, 1518-1522, 1547-1552, 1577-1584, 1604, 1626-1637, 1665-1677, 1702-1708, 1788-1878, 1900-1914, 1936-1943, 1977-2017, 2125-2132, 2218-2251, 2315-2375, 2457-2492, 2523-2549, 2574-2582, 2613-2621, 2644-2655, 2675, 2706-2733, 2764-2772, 2798-2800, 2825-2828, 2856, 2881-2895, 2921-2927, 2946-2947, 2966, 2991-3028, 3075-3104, 3142-3175, 3209-3247, 3268-3269, 3294-3300, 3384-3409, 3454-3490, 3515-3518, 3546-3554, 3622-3695, 3743-3748, 3777-3817, 3846-3894, 4052-4053, 4057-4058, 4084, 4090, 4101, 4129-4133, 4164-4171, 4227-4228, 4252, 4348, 4398, 4424, 4452-4476, 4493-4517, 4558-4621, 4645-4659, 4691-4726, 4800-4807, 4837-4839, 4863-4870, 4901-4924, 4950-4977\n------------------------------------------------------------\nTOTAL 3971 3379 15%\n1 passed, 3 warnings in 0.55s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "3d51fff3dbfa77f561ee62adc8154ab208d553a937c98402e6632850e91fef28", + "output_tail": "/city2graph/mobility.py:193: UserWarning: 1 labels in adjacency not present in zones_gdf; related edges will be dropped\n adj = _align_adjacency_zones(\n\ntests/test_mobility.py::TestODMatrixToGraph::test_missing_crs_emits_warning\n /workspace/repo/city2graph/mobility.py:135: UserWarning: zones_gdf has no CRS set; outputs will have undefined CRS (requirement 3.1)\n _validate_crs(zones_gdf)\n\ntests/test_morphology.py::TestMorphologicalGraphCore::test_contiguity_options[rook]\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:61: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_basic\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_networkx\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_contiguity[queen]\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_duplicate_index\ntests/test_morphology.py::TestIntegrationAndStress::test_function_consistency\ntests/test_morphology.py::TestIntegrationAndStress::test_function_consistency\ntests/test_morphology.py::TestSpecialScenarios::test_group_column_functionality\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 64 disconnected components.\n There are 28 islands with ids: 0, 1, 2, 3, 10, 18, 19, 20, 21, 34, 44, 65, 66, 82, 83, 84, 86, 91, 92, 93, 94, 96, 109, 135, 185, 251, 254, 255.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestIndividualGraphFunctions::test_private_to_private_contiguity[rook]\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:61: UserWarning: The weights matrix is not fully connected: \n There are 67 disconnected components.\n There are 30 islands with ids: 0, 1, 2, 3, 10, 18, 19, 20, 21, 31, 32, 34, 44, 65, 66, 82, 83, 84, 86, 91, 92, 93, 94, 96, 109, 135, 185, 251, 254, 255.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_morphology.py::TestSpecialScenarios::test_empty_adjacency_data_handling\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n There are 2 islands with ids: 1, 2.\n W.__init__(self, neighbors, ids=ids, **kw)\n\ntests/test_proximity.py::test_contiguity_input_validation_and_empty_neighbors\n /opt/venv/lib/python3.12/site-packages/libpysal/weights/contiguity.py:347: UserWarning: The weights matrix is not fully connected: \n There are 2 disconnected components.\n There are 2 islands with ids: 0, 1.\n W.__init__(self, neighbors, ids=ids, **kw)\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n================================ tests coverage ================================\n_______________ coverage: platform linux, python 3.12.11-final-0 _______________\n\nName Stmts Miss Cover Missing\n------------------------------------------------------------\ncity2graph/__init__.py 14 0 100%\ncity2graph/base.py 173 0 100%\ncity2graph/data.py 249 3 99% 544, 646, 875\ncity2graph/graph.py 570 2 99% 1436-1437\ncity2graph/metapath.py 438 0 100%\ncity2graph/mobility.py 272 0 100%\ncity2graph/morphology.py 338 0 100%\ncity2graph/proximity.py 625 7 99% 123-128, 274-275\ncity2graph/transportation.py 245 0 100%\ncity2graph/utils.py 1047 19 98% 2490, 3000, 3479, 4348, 4583-4586, 4619, 4769, 4771, 4775-4776, 4806-4807, 4866, 4870, 4958-4959, 4962\n------------------------------------------------------------\nTOTAL 3971 31 99%\n562 passed, 179 warnings in 27.07s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "pytest", + "-q", + "tests/test_utils.py::TestPlotting::test_plot_graph_homo_with_legend_kwargs_and_title" + ], + "fix_sha": "22f8f0342a913f65ff304677724c1bc36c3fd60e", + "local_image": "patcheval-validate:city2graph-121", + "local_image_id": "sha256:c16f243e23d570deb9b3b26f3abafb1450bbccff2550effa71d7fc1130221348", + "parent_sha": "d3b4ed8a2c2f160f70ff3809e0447b42d927bd41", + "regression_command": [ + "pytest", + "-q", + "tests" + ], + "repeats": 2, + "repository": "c2g-dev/city2graph", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm@sha256:6fb6f383deefbf9de105ce6d7a59fce0f8fa65c7afdf5a1222eafae14f81a27b", + "bootstrap_command": [], + "environment": [ + "PYTHONPATH=/workspace/repo", + "MPLBACKEND=Agg", + "MPLCONFIGDIR=/tmp/matplotlib", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "PYTHONDONTWRITEBYTECODE=1", + "UV_CACHE_DIR=/tmp/uv-cache" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "pytest", + "-q" + ], + "setup_command": [], + "sync_command": [ + "uv", + "sync", + "--frozen", + "--extra", + "cpu", + "--group", + "dev", + "--no-install-project" + ], + "test_command": [ + "pytest", + "-q" + ], + "timeout_s": 1200 + }, + "schema_version": 1, + "setup_command": [], + "task_id": "city2graph-121", + "validated": true +} diff --git a/attestations/click-2790.json b/attestations/click-2790.json new file mode 100644 index 0000000000000000000000000000000000000000..a897efa8cf79241a49b7261413bfbd0432e69abf --- /dev/null +++ b/attestations/click-2790.json @@ -0,0 +1,185 @@ +{ + "cells": [ + { + "command": [ + "pytest", + "-q", + "tests/test_formatting.py::test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.]" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "5e16fbfe30990c6cd31b703cd6c31868612a52324b3d743ea4331d48fdaba374", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_ test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.] _\n\nrunner = \nhelp_names = ['-h', '--help']\nextra_options = [.decorator at 0x7f6310985c60>]\nexpected_hint = \"Try 'cli foo --help' for help.\"\n\n @pytest.mark.parametrize(\n (\"help_names\", \"extra_options\", \"expected_hint\"),\n [\n # No shadowing, longest name is picked.\n ([\"-h\", \"--help\"], [], \"Try 'cli foo --help' for help.\"),\n # -h shadowed by a subcommand option, --help still available.\n (\n [\"-h\", \"--help\"],\n [click.option(\"--host\", \"-h\")],\n \"Try 'cli foo --help' for help.\",\n ),\n # --help shadowed, -h still available.\n (\n [\"-h\", \"--help\"],\n [click.option(\"--help-file\", \"--help\")],\n \"Try 'cli foo -h' for help.\",\n ),\n # Both names shadowed: no hint line at all.\n (\n [\"-h\", \"--help\"],\n [click.option(\"--host\", \"-h\"), click.option(\"--help-file\", \"--help\")],\n None,\n ),\n # Single custom help name, not shadowed.\n ([\"--man\"], [], \"Try 'cli foo --man' for help.\"),\n # Three help names, one shadowed, longest survivor picked.\n (\n [\"-h\", \"--help\", \"--info\"],\n [click.option(\"--info-file\", \"--info\")],\n \"Try 'cli foo --help' for help.\",\n ),\n ],\n )\n def test_formatting_usage_error_help_hint(\n runner, help_names, extra_options, expected_hint\n ):\n \"\"\"The error hint should only show non-shadowed help option names,\n picking the longest for readability.\n \n https://github.com/pallets/click/issues/2790\n \"\"\"\n \n @click.group(context_settings={\"help_option_names\": help_names})\n def cli():\n pass\n \n @cli.command()\n @click.argument(\"required_arg\")\n def foo(required_arg, **kwargs):\n pass\n \n for option in extra_options:\n option(foo)\n \n result = runner.invoke(cli, [\"foo\"])\n assert result.exit_code == 2\n lines = result.output.splitlines()\n assert lines[0] == \"Usage: cli foo [OPTIONS] REQUIRED_ARG\"\n assert lines[-1] == \"Error: Missing argument 'REQUIRED_ARG'.\"\n if expected_hint is not None:\n> assert expected_hint in lines\nE assert \"Try 'cli foo --help' for help.\" in ['Usage: cli foo [OPTIONS] REQUIRED_ARG', \"Try 'cli foo -h' for help.\", '', \"Error: Missing argument 'REQUIRED_ARG'.\"]\n\ntests/test_formatting.py:311: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_formatting.py::test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.]\n1 failed in 0.04s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "cfccfb53f9ff1c403f2f55edb59950d2f61f3744d96dfdef315cbec84ef233c0", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 9%]\n..................................................x..................... [ 14%]\n........................................................................ [ 19%]\n........................................................................ [ 24%]\n........................................................................ [ 29%]\n........................................................................ [ 34%]\n........................................................................ [ 39%]\n........................................................................ [ 44%]\n........................................................................ [ 49%]\n........................................................................ [ 54%]\n........................................................................ [ 59%]\n........................................................................ [ 64%]\n........................................................................ [ 69%]\n........................................................................ [ 73%]\n...sssssssssssssssssssss................ss.............................. [ 78%]\n........................................................................ [ 83%]\n........................................................................ [ 88%]\n........................................................................ [ 93%]\n........................................................................ [ 98%]\n.................... [100%]\n1436 passed, 23 skipped, 30000 deselected, 1 xfailed in 3.21s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_formatting.py::test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.]" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "10b6a7fa10b95542fbd108177cacddf3c1b2fba55d5f67427577e9752f495a46", + "output_tail": ". [100%]\n1 passed in 0.02s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "cfccfb53f9ff1c403f2f55edb59950d2f61f3744d96dfdef315cbec84ef233c0", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 9%]\n..................................................x..................... [ 14%]\n........................................................................ [ 19%]\n........................................................................ [ 24%]\n........................................................................ [ 29%]\n........................................................................ [ 34%]\n........................................................................ [ 39%]\n........................................................................ [ 44%]\n........................................................................ [ 49%]\n........................................................................ [ 54%]\n........................................................................ [ 59%]\n........................................................................ [ 64%]\n........................................................................ [ 69%]\n........................................................................ [ 73%]\n...sssssssssssssssssssss................ss.............................. [ 78%]\n........................................................................ [ 83%]\n........................................................................ [ 88%]\n........................................................................ [ 93%]\n........................................................................ [ 98%]\n.................... [100%]\n1436 passed, 23 skipped, 30000 deselected, 1 xfailed in 3.21s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_formatting.py::test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.]" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "b507fb0e830a8d22839a029c8d6e1363858e43135ff39c38f0d6a687d6caa236", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_ test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.] _\n\nrunner = \nhelp_names = ['-h', '--help']\nextra_options = [.decorator at 0x7ff9d5fb9c60>]\nexpected_hint = \"Try 'cli foo --help' for help.\"\n\n @pytest.mark.parametrize(\n (\"help_names\", \"extra_options\", \"expected_hint\"),\n [\n # No shadowing, longest name is picked.\n ([\"-h\", \"--help\"], [], \"Try 'cli foo --help' for help.\"),\n # -h shadowed by a subcommand option, --help still available.\n (\n [\"-h\", \"--help\"],\n [click.option(\"--host\", \"-h\")],\n \"Try 'cli foo --help' for help.\",\n ),\n # --help shadowed, -h still available.\n (\n [\"-h\", \"--help\"],\n [click.option(\"--help-file\", \"--help\")],\n \"Try 'cli foo -h' for help.\",\n ),\n # Both names shadowed: no hint line at all.\n (\n [\"-h\", \"--help\"],\n [click.option(\"--host\", \"-h\"), click.option(\"--help-file\", \"--help\")],\n None,\n ),\n # Single custom help name, not shadowed.\n ([\"--man\"], [], \"Try 'cli foo --man' for help.\"),\n # Three help names, one shadowed, longest survivor picked.\n (\n [\"-h\", \"--help\", \"--info\"],\n [click.option(\"--info-file\", \"--info\")],\n \"Try 'cli foo --help' for help.\",\n ),\n ],\n )\n def test_formatting_usage_error_help_hint(\n runner, help_names, extra_options, expected_hint\n ):\n \"\"\"The error hint should only show non-shadowed help option names,\n picking the longest for readability.\n \n https://github.com/pallets/click/issues/2790\n \"\"\"\n \n @click.group(context_settings={\"help_option_names\": help_names})\n def cli():\n pass\n \n @cli.command()\n @click.argument(\"required_arg\")\n def foo(required_arg, **kwargs):\n pass\n \n for option in extra_options:\n option(foo)\n \n result = runner.invoke(cli, [\"foo\"])\n assert result.exit_code == 2\n lines = result.output.splitlines()\n assert lines[0] == \"Usage: cli foo [OPTIONS] REQUIRED_ARG\"\n assert lines[-1] == \"Error: Missing argument 'REQUIRED_ARG'.\"\n if expected_hint is not None:\n> assert expected_hint in lines\nE assert \"Try 'cli foo --help' for help.\" in ['Usage: cli foo [OPTIONS] REQUIRED_ARG', \"Try 'cli foo -h' for help.\", '', \"Error: Missing argument 'REQUIRED_ARG'.\"]\n\ntests/test_formatting.py:311: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_formatting.py::test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.]\n1 failed in 0.04s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "01f914c951e28fd3f72068206aba405b14050ad3d83be4fd73c7414778af5504", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 9%]\n..................................................x..................... [ 14%]\n........................................................................ [ 19%]\n........................................................................ [ 24%]\n........................................................................ [ 29%]\n........................................................................ [ 34%]\n........................................................................ [ 39%]\n........................................................................ [ 44%]\n........................................................................ [ 49%]\n........................................................................ [ 54%]\n........................................................................ [ 59%]\n........................................................................ [ 64%]\n........................................................................ [ 69%]\n........................................................................ [ 73%]\n...sssssssssssssssssssss................ss.............................. [ 78%]\n........................................................................ [ 83%]\n........................................................................ [ 88%]\n........................................................................ [ 93%]\n........................................................................ [ 98%]\n.................... [100%]\n1436 passed, 23 skipped, 30000 deselected, 1 xfailed in 3.25s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_formatting.py::test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.]" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "0a92bf2f4f32022509e8ef6e5adb2bea698107939a090c62c855b099fad4e096", + "output_tail": ". [100%]\n1 passed in 0.03s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "01f914c951e28fd3f72068206aba405b14050ad3d83be4fd73c7414778af5504", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 9%]\n..................................................x..................... [ 14%]\n........................................................................ [ 19%]\n........................................................................ [ 24%]\n........................................................................ [ 29%]\n........................................................................ [ 34%]\n........................................................................ [ 39%]\n........................................................................ [ 44%]\n........................................................................ [ 49%]\n........................................................................ [ 54%]\n........................................................................ [ 59%]\n........................................................................ [ 64%]\n........................................................................ [ 69%]\n........................................................................ [ 73%]\n...sssssssssssssssssssss................ss.............................. [ 78%]\n........................................................................ [ 83%]\n........................................................................ [ 88%]\n........................................................................ [ 93%]\n........................................................................ [ 98%]\n.................... [100%]\n1436 passed, 23 skipped, 30000 deselected, 1 xfailed in 3.25s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "pytest", + "-q", + "tests/test_formatting.py::test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.]" + ], + "fix_sha": "1241abaed4e441582a21f4bf90c8482de02b92df", + "local_image": "patcheval-validate:click-2790", + "local_image_id": "sha256:b9e4ff0e359dd307b96911dc0f60319cf933bdb0607e838e1696cf50e6e31e67", + "parent_sha": "f1f191ecd2c790b161187c78e7c88440e9524e5c", + "regression_command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "repeats": 2, + "repository": "pallets/click", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim@sha256:b748a09ec61c993083278020a84e16f0c81485c5349b30c64dd29d6a22da7462", + "bootstrap_command": [ + "sh", + "-euxc", + "apt-get update && apt-get install -y --no-install-recommends less=590-2.1~deb12u2 && rm -rf /var/lib/apt/lists/*" + ], + "environment": [ + "PYTHONPATH=/workspace/repo/src", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONHASHSEED=0", + "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TZ=UTC", + "PIP_NO_INDEX=1", + "UV_OFFLINE=1" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "setup_command": [], + "sync_command": [ + "/bin/sh", + "-ec", + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ATTRS=0.0.0 uv sync --frozen --no-default-groups --group tests --no-install-project" + ], + "test_command": [ + "pytest", + "-q" + ], + "timeout_s": 300 + }, + "schema_version": 1, + "setup_command": [], + "task_id": "click-2790", + "validated": true +} diff --git a/attestations/click-3360.json b/attestations/click-3360.json new file mode 100644 index 0000000000000000000000000000000000000000..e3cf01dddb1103fff99e69987d02e8349d80ecd8 --- /dev/null +++ b/attestations/click-3360.json @@ -0,0 +1,185 @@ +{ + "cells": [ + { + "command": [ + "pytest", + "-q", + "tests/test_formatting.py::test_help_formatter_write_usage[empty-args-default-prefix]" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "8569a90244018c78bce3cc7b14c7e332cea4610051fe1c6a9c9fcaf43413a7ef", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n__________ test_help_formatter_write_usage[empty-args-default-prefix] __________\n\nformatter_kwargs = {}, current_indent = 0, prog = 'Program', args = ''\nprefix = None, expected = 'Usage: Program\\n'\n\n @pytest.mark.parametrize(\n (\"formatter_kwargs\", \"current_indent\", \"prog\", \"args\", \"prefix\", \"expected\"),\n [\n # Issue #3360: the default prefix used to emit only\n # a blank line because ``wrap_text(\"\", initial_indent=usage_prefix)``\n # returned ``\"\"`` and discarded the prefix.\n pytest.param(\n {},\n 0,\n \"Program\",\n \"\",\n None,\n \"Usage: Program\\n\",\n id=\"empty-args-default-prefix\",\n ),\n # A caller-supplied prefix is preserved verbatim.\n pytest.param(\n {},\n 0,\n \"Program\",\n \"\",\n \"Run: \",\n \"Run: Program\\n\",\n id=\"empty-args-custom-prefix\",\n ),\n # ``current_indent`` is preserved even with no args to render.\n pytest.param(\n {},\n 4,\n \"Program\",\n \"\",\n None,\n \"Usage: Program\\n\",\n id=\"empty-args-indented\",\n ),\n # Prog too long to share a line with args: the wrap branch must not\n # emit a second line.\n pytest.param(\n {\"width\": 20},\n 0,\n \"VeryLongProgramName\",\n \"\",\n None,\n \"Usage: VeryLongProgramName\\n\",\n id=\"empty-args-long-prog\",\n ),\n # With non-empty args, the separator space between prog and args is preserved.\n pytest.param(\n {},\n 0,\n \"Program\",\n \"[OPTIONS]\",\n None,\n \"Usage: Program [OPTIONS]\\n\",\n id=\"with-args-default-prefix\",\n ),\n ],\n )\n def test_help_formatter_write_usage(\n formatter_kwargs, current_indent, prog, args, prefix, expected\n ):\n \"\"\"``HelpFormatter.write_usage`` renders a single usage line whose\n trailing separator tracks whether ``args`` is non-empty.\n \"\"\"\n f = click.HelpFormatter(**formatter_kwargs)\n f.current_indent = current_indent\n if prefix is None:\n f.write_usage(prog, args)\n else:\n f.write_usage(prog, args, prefix=prefix)\n> assert f.getvalue() == expected\nE AssertionError: assert '\\n' == 'Usage: Program\\n'\nE \nE Strings contain only whitespace, escaping them using repr()\nE - 'Usage: Program\\n'\nE + '\\n'\n\ntests/test_formatting.py:574: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_formatting.py::test_help_formatter_write_usage[empty-args-default-prefix]\n1 failed in 0.05s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "fe50a81c1342a77ae3e91a2bbaaeb0d175276bfb6dc205f85b7a6df2c81ef22b", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 8%]\n..................................................x..................... [ 13%]\n........................................................................ [ 17%]\n........................................................................ [ 22%]\n........................................................................ [ 26%]\n........................................................................ [ 30%]\n........................................................................ [ 35%]\n........................................................................ [ 39%]\n........................................................................ [ 44%]\n........................................................................ [ 48%]\n........................................................................ [ 53%]\n........................................................................ [ 57%]\n........................................................................ [ 61%]\n........................................................................ [ 66%]\n........................................................................ [ 70%]\n................................................................ssssssss [ 75%]\nsssssssssssss................ss......................................... [ 79%]\n........................................................................ [ 84%]\n..........................................................s............. [ 88%]\n........................................................................ [ 92%]\n........................................................................ [ 97%]\n........................................... [100%]\n1602 passed, 24 skipped, 30000 deselected, 1 xfailed in 3.54s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_formatting.py::test_help_formatter_write_usage[empty-args-default-prefix]" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "0a92bf2f4f32022509e8ef6e5adb2bea698107939a090c62c855b099fad4e096", + "output_tail": ". [100%]\n1 passed in 0.03s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "368a06796735e52d378e75586cdb45e4fcc6185f8b4afc731d115996f653e6eb", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 8%]\n..................................................x..................... [ 13%]\n........................................................................ [ 17%]\n........................................................................ [ 22%]\n........................................................................ [ 26%]\n........................................................................ [ 30%]\n........................................................................ [ 35%]\n........................................................................ [ 39%]\n........................................................................ [ 44%]\n........................................................................ [ 48%]\n........................................................................ [ 53%]\n........................................................................ [ 57%]\n........................................................................ [ 61%]\n........................................................................ [ 66%]\n........................................................................ [ 70%]\n................................................................ssssssss [ 75%]\nsssssssssssss................ss......................................... [ 79%]\n........................................................................ [ 84%]\n..........................................................s............. [ 88%]\n........................................................................ [ 92%]\n........................................................................ [ 97%]\n........................................... [100%]\n1602 passed, 24 skipped, 30000 deselected, 1 xfailed in 3.52s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_formatting.py::test_help_formatter_write_usage[empty-args-default-prefix]" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "8569a90244018c78bce3cc7b14c7e332cea4610051fe1c6a9c9fcaf43413a7ef", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n__________ test_help_formatter_write_usage[empty-args-default-prefix] __________\n\nformatter_kwargs = {}, current_indent = 0, prog = 'Program', args = ''\nprefix = None, expected = 'Usage: Program\\n'\n\n @pytest.mark.parametrize(\n (\"formatter_kwargs\", \"current_indent\", \"prog\", \"args\", \"prefix\", \"expected\"),\n [\n # Issue #3360: the default prefix used to emit only\n # a blank line because ``wrap_text(\"\", initial_indent=usage_prefix)``\n # returned ``\"\"`` and discarded the prefix.\n pytest.param(\n {},\n 0,\n \"Program\",\n \"\",\n None,\n \"Usage: Program\\n\",\n id=\"empty-args-default-prefix\",\n ),\n # A caller-supplied prefix is preserved verbatim.\n pytest.param(\n {},\n 0,\n \"Program\",\n \"\",\n \"Run: \",\n \"Run: Program\\n\",\n id=\"empty-args-custom-prefix\",\n ),\n # ``current_indent`` is preserved even with no args to render.\n pytest.param(\n {},\n 4,\n \"Program\",\n \"\",\n None,\n \"Usage: Program\\n\",\n id=\"empty-args-indented\",\n ),\n # Prog too long to share a line with args: the wrap branch must not\n # emit a second line.\n pytest.param(\n {\"width\": 20},\n 0,\n \"VeryLongProgramName\",\n \"\",\n None,\n \"Usage: VeryLongProgramName\\n\",\n id=\"empty-args-long-prog\",\n ),\n # With non-empty args, the separator space between prog and args is preserved.\n pytest.param(\n {},\n 0,\n \"Program\",\n \"[OPTIONS]\",\n None,\n \"Usage: Program [OPTIONS]\\n\",\n id=\"with-args-default-prefix\",\n ),\n ],\n )\n def test_help_formatter_write_usage(\n formatter_kwargs, current_indent, prog, args, prefix, expected\n ):\n \"\"\"``HelpFormatter.write_usage`` renders a single usage line whose\n trailing separator tracks whether ``args`` is non-empty.\n \"\"\"\n f = click.HelpFormatter(**formatter_kwargs)\n f.current_indent = current_indent\n if prefix is None:\n f.write_usage(prog, args)\n else:\n f.write_usage(prog, args, prefix=prefix)\n> assert f.getvalue() == expected\nE AssertionError: assert '\\n' == 'Usage: Program\\n'\nE \nE Strings contain only whitespace, escaping them using repr()\nE - 'Usage: Program\\n'\nE + '\\n'\n\ntests/test_formatting.py:574: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_formatting.py::test_help_formatter_write_usage[empty-args-default-prefix]\n1 failed in 0.05s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "b2145163a7f16996157a14b7bc3050c835fd8c1146a96721788c51c68856a3a0", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 8%]\n..................................................x..................... [ 13%]\n........................................................................ [ 17%]\n........................................................................ [ 22%]\n........................................................................ [ 26%]\n........................................................................ [ 30%]\n........................................................................ [ 35%]\n........................................................................ [ 39%]\n........................................................................ [ 44%]\n........................................................................ [ 48%]\n........................................................................ [ 53%]\n........................................................................ [ 57%]\n........................................................................ [ 61%]\n........................................................................ [ 66%]\n........................................................................ [ 70%]\n................................................................ssssssss [ 75%]\nsssssssssssss................ss......................................... [ 79%]\n........................................................................ [ 84%]\n..........................................................s............. [ 88%]\n........................................................................ [ 92%]\n........................................................................ [ 97%]\n........................................... [100%]\n1602 passed, 24 skipped, 30000 deselected, 1 xfailed in 3.55s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_formatting.py::test_help_formatter_write_usage[empty-args-default-prefix]" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "0a92bf2f4f32022509e8ef6e5adb2bea698107939a090c62c855b099fad4e096", + "output_tail": ". [100%]\n1 passed in 0.03s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "54906c6075520e77903c58e3f9958bd6b61135c2b4c2f05ccfd1cbc80caf9d2a", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 8%]\n..................................................x..................... [ 13%]\n........................................................................ [ 17%]\n........................................................................ [ 22%]\n........................................................................ [ 26%]\n........................................................................ [ 30%]\n........................................................................ [ 35%]\n........................................................................ [ 39%]\n........................................................................ [ 44%]\n........................................................................ [ 48%]\n........................................................................ [ 53%]\n........................................................................ [ 57%]\n........................................................................ [ 61%]\n........................................................................ [ 66%]\n........................................................................ [ 70%]\n................................................................ssssssss [ 75%]\nsssssssssssss................ss......................................... [ 79%]\n........................................................................ [ 84%]\n..........................................................s............. [ 88%]\n........................................................................ [ 92%]\n........................................................................ [ 97%]\n........................................... [100%]\n1602 passed, 24 skipped, 30000 deselected, 1 xfailed in 3.53s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "pytest", + "-q", + "tests/test_formatting.py::test_help_formatter_write_usage[empty-args-default-prefix]" + ], + "fix_sha": "0551bf53588ae87f462d336f24f853a156fefe3a", + "local_image": "patcheval-validate:click-3360", + "local_image_id": "sha256:e808b6e5d9a870893ed8abb6d0eb7d06de485e30b00fc98dd05ed1b30702d983", + "parent_sha": "7c99ebe23b931f27562d926814423cce85fd9766", + "regression_command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "repeats": 2, + "repository": "pallets/click", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim@sha256:b748a09ec61c993083278020a84e16f0c81485c5349b30c64dd29d6a22da7462", + "bootstrap_command": [ + "sh", + "-euxc", + "apt-get update && apt-get install -y --no-install-recommends less=590-2.1~deb12u2 && rm -rf /var/lib/apt/lists/*" + ], + "environment": [ + "PYTHONPATH=/workspace/repo/src", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONHASHSEED=0", + "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TZ=UTC", + "PIP_NO_INDEX=1", + "UV_OFFLINE=1" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "setup_command": [], + "sync_command": [ + "/bin/sh", + "-ec", + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ATTRS=0.0.0 uv sync --frozen --no-default-groups --group tests --no-install-project" + ], + "test_command": [ + "pytest", + "-q" + ], + "timeout_s": 300 + }, + "schema_version": 1, + "setup_command": [], + "task_id": "click-3360", + "validated": true +} diff --git a/attestations/click-3572.json b/attestations/click-3572.json new file mode 100644 index 0000000000000000000000000000000000000000..3d20ff8ecfb78381b065f507ada52bd9e94d24c3 --- /dev/null +++ b/attestations/click-3572.json @@ -0,0 +1,185 @@ +{ + "cells": [ + { + "command": [ + "pytest", + "-q", + "tests/test_termui.py::test_prompt_and_confirm_ansi_respects_color[confirm-no-color]" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "e0b0938e4723a133b7bcc84b5d315cb409337bfaf58bbe4448087688743c2eb7", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n________ test_prompt_and_confirm_ansi_respects_color[confirm-no-color] _________\n\nrunner = \ncall = at 0x7fb98bf9d8a0>, user_input = 'y', color = False\nexpect = 'Hello World! [y/N]: y\\n'\n\n @pytest.mark.parametrize(\n (\"call\", \"user_input\", \"color\", \"expect\"),\n [\n pytest.param(\n lambda: click.confirm(click.style(\"Hello World!\", fg=\"green\")),\n \"y\",\n False,\n \"Hello World! [y/N]: y\\n\",\n id=\"confirm-no-color\",\n ),\n pytest.param(\n lambda: click.confirm(click.style(\"Hello World!\", fg=\"green\")),\n \"y\",\n True,\n \"\\x1b[32mHello World!\\x1b[0m [y/N]: y\\n\",\n id=\"confirm-color\",\n ),\n pytest.param(\n lambda: click.prompt(click.style(\"Name\", fg=\"green\")),\n \"Bob\",\n False,\n \"Name: Bob\\n\",\n id=\"prompt-no-color\",\n ),\n pytest.param(\n lambda: click.prompt(click.style(\"Name\", fg=\"green\")),\n \"Bob\",\n True,\n \"\\x1b[32mName\\x1b[0m: Bob\\n\",\n id=\"prompt-color\",\n ),\n ],\n )\n def test_prompt_and_confirm_ansi_respects_color(\n runner, call, user_input, color, expect\n ):\n \"\"\"``confirm`` and ``prompt`` strip ANSI color and style codes from the\n prompt when color is disabled and keep them when it is enabled, like\n ``echo``. The prompt is written by ``input`` rather than ``echo``, so it\n used to keep the codes regardless (issue 3572).\n \"\"\"\n \n @click.command()\n def cli():\n call()\n \n result = runner.invoke(cli, input=user_input, color=color)\n> assert result.output == expect\nE AssertionError: assert '\\x1b[32mHell...0m [y/N]: y\\n' == 'Hello World! [y/N]: y\\n'\nE \nE - Hello World! [y/N]: y\nE + \u001b[32mHello World!\u001b[0m [y/N]: y\nE ? +++++ ++++\n\ntests/test_termui.py:1072: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_termui.py::test_prompt_and_confirm_ansi_respects_color[confirm-no-color]\n1 failed in 0.16s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "60ecf2eb97ef2842ba13f49d9ae293ca64f0cc8b65ab977db00972435774e207", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 8%]\n........................................................................ [ 12%]\n.x...................................................................... [ 16%]\n........................................................................ [ 21%]\n........................................................................ [ 25%]\n........................................................................ [ 29%]\n........................................................................ [ 33%]\n........................................................................ [ 38%]\n........................................................................ [ 42%]\n........................................................................ [ 46%]\n........................................................................ [ 50%]\n........................................................................ [ 54%]\n........................................................................ [ 59%]\n........................................................................ [ 63%]\n........................................................................ [ 67%]\n........................................................................ [ 71%]\n.................................................sssssssssssssssssssss.. [ 76%]\n..............ss........................................................ [ 80%]\n........................................................................ [ 84%]\n............................................................s........... [ 88%]\n........................................................................ [ 93%]\n........................................................................ [ 97%]\n.............................................. [100%]\n1677 passed, 24 skipped, 31000 deselected, 1 xfailed in 3.71s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_termui.py::test_prompt_and_confirm_ansi_respects_color[confirm-no-color]" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "0db7017d5cbd77907a7c53f6d21e104837cd02bba050eae238a13037fb3148ee", + "output_tail": ". [100%]\n1 passed in 0.14s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "8a405d07d89623474e34fa8371f9b1161071ed92cc43d184dec3d439eb6722fb", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 8%]\n........................................................................ [ 12%]\n.x...................................................................... [ 16%]\n........................................................................ [ 21%]\n........................................................................ [ 25%]\n........................................................................ [ 29%]\n........................................................................ [ 33%]\n........................................................................ [ 38%]\n........................................................................ [ 42%]\n........................................................................ [ 46%]\n........................................................................ [ 50%]\n........................................................................ [ 54%]\n........................................................................ [ 59%]\n........................................................................ [ 63%]\n........................................................................ [ 67%]\n........................................................................ [ 71%]\n.................................................sssssssssssssssssssss.. [ 76%]\n..............ss........................................................ [ 80%]\n........................................................................ [ 84%]\n............................................................s........... [ 88%]\n........................................................................ [ 93%]\n........................................................................ [ 97%]\n.............................................. [100%]\n1677 passed, 24 skipped, 31000 deselected, 1 xfailed in 3.74s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_termui.py::test_prompt_and_confirm_ansi_respects_color[confirm-no-color]" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "0adec67afd4a6de8a5b732c05c6e543f6f57c5fb6d6b60fb07a7abd77fcac0d2", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n________ test_prompt_and_confirm_ansi_respects_color[confirm-no-color] _________\n\nrunner = \ncall = at 0x7f4a36e398a0>, user_input = 'y', color = False\nexpect = 'Hello World! [y/N]: y\\n'\n\n @pytest.mark.parametrize(\n (\"call\", \"user_input\", \"color\", \"expect\"),\n [\n pytest.param(\n lambda: click.confirm(click.style(\"Hello World!\", fg=\"green\")),\n \"y\",\n False,\n \"Hello World! [y/N]: y\\n\",\n id=\"confirm-no-color\",\n ),\n pytest.param(\n lambda: click.confirm(click.style(\"Hello World!\", fg=\"green\")),\n \"y\",\n True,\n \"\\x1b[32mHello World!\\x1b[0m [y/N]: y\\n\",\n id=\"confirm-color\",\n ),\n pytest.param(\n lambda: click.prompt(click.style(\"Name\", fg=\"green\")),\n \"Bob\",\n False,\n \"Name: Bob\\n\",\n id=\"prompt-no-color\",\n ),\n pytest.param(\n lambda: click.prompt(click.style(\"Name\", fg=\"green\")),\n \"Bob\",\n True,\n \"\\x1b[32mName\\x1b[0m: Bob\\n\",\n id=\"prompt-color\",\n ),\n ],\n )\n def test_prompt_and_confirm_ansi_respects_color(\n runner, call, user_input, color, expect\n ):\n \"\"\"``confirm`` and ``prompt`` strip ANSI color and style codes from the\n prompt when color is disabled and keep them when it is enabled, like\n ``echo``. The prompt is written by ``input`` rather than ``echo``, so it\n used to keep the codes regardless (issue 3572).\n \"\"\"\n \n @click.command()\n def cli():\n call()\n \n result = runner.invoke(cli, input=user_input, color=color)\n> assert result.output == expect\nE AssertionError: assert '\\x1b[32mHell...0m [y/N]: y\\n' == 'Hello World! [y/N]: y\\n'\nE \nE - Hello World! [y/N]: y\nE + \u001b[32mHello World!\u001b[0m [y/N]: y\nE ? +++++ ++++\n\ntests/test_termui.py:1072: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_termui.py::test_prompt_and_confirm_ansi_respects_color[confirm-no-color]\n1 failed in 0.17s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "8a405d07d89623474e34fa8371f9b1161071ed92cc43d184dec3d439eb6722fb", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 8%]\n........................................................................ [ 12%]\n.x...................................................................... [ 16%]\n........................................................................ [ 21%]\n........................................................................ [ 25%]\n........................................................................ [ 29%]\n........................................................................ [ 33%]\n........................................................................ [ 38%]\n........................................................................ [ 42%]\n........................................................................ [ 46%]\n........................................................................ [ 50%]\n........................................................................ [ 54%]\n........................................................................ [ 59%]\n........................................................................ [ 63%]\n........................................................................ [ 67%]\n........................................................................ [ 71%]\n.................................................sssssssssssssssssssss.. [ 76%]\n..............ss........................................................ [ 80%]\n........................................................................ [ 84%]\n............................................................s........... [ 88%]\n........................................................................ [ 93%]\n........................................................................ [ 97%]\n.............................................. [100%]\n1677 passed, 24 skipped, 31000 deselected, 1 xfailed in 3.74s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_termui.py::test_prompt_and_confirm_ansi_respects_color[confirm-no-color]" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "0db7017d5cbd77907a7c53f6d21e104837cd02bba050eae238a13037fb3148ee", + "output_tail": ". [100%]\n1 passed in 0.14s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "91d289c2bf3e9b0d4e4b18afac2fd090e1d710b9cd3fb3ceeaba581d8da95d6e", + "output_tail": "........................................................................ [ 4%]\n........................................................................ [ 8%]\n........................................................................ [ 12%]\n.x...................................................................... [ 16%]\n........................................................................ [ 21%]\n........................................................................ [ 25%]\n........................................................................ [ 29%]\n........................................................................ [ 33%]\n........................................................................ [ 38%]\n........................................................................ [ 42%]\n........................................................................ [ 46%]\n........................................................................ [ 50%]\n........................................................................ [ 54%]\n........................................................................ [ 59%]\n........................................................................ [ 63%]\n........................................................................ [ 67%]\n........................................................................ [ 71%]\n.................................................sssssssssssssssssssss.. [ 76%]\n..............ss........................................................ [ 80%]\n........................................................................ [ 84%]\n............................................................s........... [ 88%]\n........................................................................ [ 93%]\n........................................................................ [ 97%]\n.............................................. [100%]\n1677 passed, 24 skipped, 31000 deselected, 1 xfailed in 3.72s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "pytest", + "-q", + "tests/test_termui.py::test_prompt_and_confirm_ansi_respects_color[confirm-no-color]" + ], + "fix_sha": "93ba0075f4881b858b61f89a753c7c10e330027e", + "local_image": "patcheval-validate:click-3572", + "local_image_id": "sha256:d5311f3e92a76d82843c5640be8d60fc8245882900f2c6518787728a4cdc1abc", + "parent_sha": "240603f240a9ff179d834fede836060d897c6980", + "regression_command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "repeats": 2, + "repository": "pallets/click", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim@sha256:b748a09ec61c993083278020a84e16f0c81485c5349b30c64dd29d6a22da7462", + "bootstrap_command": [ + "sh", + "-euxc", + "apt-get update && apt-get install -y --no-install-recommends less=590-2.1~deb12u2 && rm -rf /var/lib/apt/lists/*" + ], + "environment": [ + "PYTHONPATH=/workspace/repo/src", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONHASHSEED=0", + "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TZ=UTC", + "PIP_NO_INDEX=1", + "UV_OFFLINE=1" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "pytest", + "-q", + "-m", + "not stress", + "tests" + ], + "setup_command": [], + "sync_command": [ + "/bin/sh", + "-ec", + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ATTRS=0.0.0 uv sync --frozen --no-default-groups --group tests --no-install-project" + ], + "test_command": [ + "pytest", + "-q" + ], + "timeout_s": 300 + }, + "schema_version": 1, + "setup_command": [], + "task_id": "click-3572", + "validated": true +} diff --git a/attestations/json-repair-191.json b/attestations/json-repair-191.json new file mode 100644 index 0000000000000000000000000000000000000000..348728fd48e15d9b57bd6a3486842a481d1077f3 --- /dev/null +++ b/attestations/json-repair-191.json @@ -0,0 +1,193 @@ +{ + "cells": [ + { + "command": [ + "pytest", + "-q", + "tests/test_json_repair.py::test_parenthesized_prose_does_not_hijack_fenced_json" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "67c151469e33dbbc4dce9530eae20f97a58173b167a97e86f632c918fb108575", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_____________ test_parenthesized_prose_does_not_hijack_fenced_json _____________\n\n def test_parenthesized_prose_does_not_hijack_fenced_json():\n> assert (\n repair_json(\n \"\"\"\n **Decision**: bla, bla (some clarification):\n \n ```json\n {\n \"key\": \"value\"\n }\n ```\n \"\"\"\n )\n == '{\"key\": \"value\"}'\n )\nE assert '[\"some clari...\": \\\\\"value\"]' == '{\"key\": \"value\"}'\nE \nE - {\"key\": \"value\"}\nE + [\"some clarification):\\n\\n ```json\\n {\", \"key\\\": \\\"value\"]\n\ntests/test_json_repair.py:32: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_json_repair.py::test_parenthesized_prose_does_not_hijack_fenced_json\n1 failed in 0.05s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "7599751ef0dd8af52caf65d50dbc55e751878b97ab1a61e675e10c8fde894db4", + "output_tail": "........................................................................ [ 50%]\n....................................................................... [100%]\n143 passed, 1 skipped in 4.14s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_json_repair.py::test_parenthesized_prose_does_not_hijack_fenced_json" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "ea60679e80486d2dd025dd2b21a200bfb76524c9325eccbaf2a64477ec87e5ec", + "output_tail": ". [100%]\n1 passed in 0.05s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "cde5720aa68a70520d400d3b468cb32e4c4b99558be1030df34517a966dc75d6", + "output_tail": "........................................................................ [ 50%]\n....................................................................... [100%]\n143 passed, 1 skipped in 4.07s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_json_repair.py::test_parenthesized_prose_does_not_hijack_fenced_json" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "4331efea2a1f9141a25bf39c22422433be1bed6f673c6bf0dd76efb7c674a7c4", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_____________ test_parenthesized_prose_does_not_hijack_fenced_json _____________\n\n def test_parenthesized_prose_does_not_hijack_fenced_json():\n> assert (\n repair_json(\n \"\"\"\n **Decision**: bla, bla (some clarification):\n \n ```json\n {\n \"key\": \"value\"\n }\n ```\n \"\"\"\n )\n == '{\"key\": \"value\"}'\n )\nE assert '[\"some clari...\": \\\\\"value\"]' == '{\"key\": \"value\"}'\nE \nE - {\"key\": \"value\"}\nE + [\"some clarification):\\n\\n ```json\\n {\", \"key\\\": \\\"value\"]\n\ntests/test_json_repair.py:32: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_json_repair.py::test_parenthesized_prose_does_not_hijack_fenced_json\n1 failed in 0.06s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "a1d4edb68e377a5a090732d02c59943be2e090ec536f3fcb8c6e8e52e0d122c5", + "output_tail": "........................................................................ [ 50%]\n....................................................................... [100%]\n143 passed, 1 skipped in 4.15s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_json_repair.py::test_parenthesized_prose_does_not_hijack_fenced_json" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "774412243a4dd9109d74cac1e88830db06a136051bbdbb28f78f1755be3ed12a", + "output_tail": ". [100%]\n1 passed in 0.04s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "9487055e4424d25e8ed2ea5dff98af55b9e0ff67b28338ef224f5c6125acadb2", + "output_tail": "........................................................................ [ 50%]\n....................................................................... [100%]\n143 passed, 1 skipped in 4.11s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "pytest", + "-q", + "tests/test_json_repair.py::test_parenthesized_prose_does_not_hijack_fenced_json" + ], + "fix_sha": "cd94f1fb39a1479e2e4592727fc7c3e999e73919", + "local_image": "patcheval-validate:json-repair-191", + "local_image_id": "sha256:37c078cdd8a2a19f7e513262da2f0a9fb61d46c52551e4b13c4b2c73c1a2d783", + "parent_sha": "32e654ad979c93612d1af77a7798c03e80486eef", + "regression_command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "repeats": 2, + "repository": "mangiucugna/json_repair", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.13-bookworm-slim@sha256:b91a10015a28c46501a39de9dd4899d65aea11f43be5960c1af9ee7fbe0727dc", + "bootstrap_command": [ + "uv", + "pip", + "install", + "--python", + "/opt/venv/bin/python", + "setuptools==80.9.0" + ], + "environment": [ + "PYTHONPATH=/workspace/repo/src", + "PYTHONDONTWRITEBYTECODE=1", + "UV_CACHE_DIR=/tmp/uv-cache" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "pytest", + "-q" + ], + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "sync_command": [ + "uv", + "sync", + "--frozen", + "--all-groups", + "--no-install-project" + ], + "test_command": [ + "pytest", + "-q" + ], + "timeout_s": 300 + }, + "schema_version": 1, + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "task_id": "json-repair-191", + "validated": true +} diff --git a/attestations/json-repair-205.json b/attestations/json-repair-205.json new file mode 100644 index 0000000000000000000000000000000000000000..9afdf3ffb961c95532d0fa3ce3535566e51d0ff7 --- /dev/null +++ b/attestations/json-repair-205.json @@ -0,0 +1,193 @@ +{ + "cells": [ + { + "command": [ + "pytest", + "-q", + "tests/test_schema_guided_parse.py::test_schema_union_branch_keeps_root_defs_scope_during_repair" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "2cd31113bf44a2616c6a91494602d56feaec4217ca28b8dcfb6be332ff44dd50", + "output_tail": " \"value\": [{\"name\": \"example\"}]\n }\n\ntests/test_schema_guided_parse.py:124: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nsrc/json_repair/json_repair.py:204: in repair_json\n parsed_json = parser.parse_with_schema(repairer, schema_obj)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:108: in parse_with_schema\n return self._parse_top_level(lambda: self.parse_json(schema, \"$\"))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:113: in _parse_top_level\n json = parse_element()\n ^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:108: in \n return self._parse_top_level(lambda: self.parse_json(schema, \"$\"))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:203: in parse_json\n value = self.parse_object(schema, path) if repairer else self.parse_object()\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:42: in parse_object\n return _parse_object(self, schema, path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/parse_object.py:438: in parse_object\n value = _parse_object_value(self, schema_repairer, prop_schema, key_path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/parse_object.py:290: in _parse_object_value\n return self.parse_json(prop_schema, key_path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:209: in parse_json\n return self._finalize_parsed_value(value, repairer, schema, path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:257: in _finalize_parsed_value\n return repairer.repair_value(value, schema, path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/schema_repair.py:262: in repair_value\n return self._repair_union(value, schema[\"anyOf\"], path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/schema_repair.py:290: in _repair_union\n self.validate(candidate, subschema)\nsrc/json_repair/schema_repair.py:171: in validate\n validator.validate(value)\n/opt/venv/lib/python3.13/site-packages/jsonschema/validators.py:449: in validate\n for error in self.iter_errors(*args, **kwargs):\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n/opt/venv/lib/python3.13/site-packages/jsonschema/validators.py:383: in iter_errors\n for error in errors:\n ^^^^^^\n/opt/venv/lib/python3.13/site-packages/jsonschema/_keywords.py:78: in items\n yield from validator.descend(\n/opt/venv/lib/python3.13/site-packages/jsonschema/validators.py:431: in descend\n for error in errors:\n ^^^^^^\n/opt/venv/lib/python3.13/site-packages/jsonschema/_keywords.py:275: in ref\n yield from validator._validate_reference(ref=ref, instance=instance)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = Draft202012Validator(schema={'$ref': '#/$defs/Item'}, format_checker=None)\nref = '#/$defs/Item', instance = {'name': 'example'}\n\n def _validate_reference(self, ref, instance):\n if self._ref_resolver is None:\n try:\n resolved = self._resolver.lookup(ref)\n except referencing.exceptions.Unresolvable as err:\n> raise exceptions._WrappedReferencingError(err) from err\nE jsonschema.exceptions._WrappedReferencingError: PointerToNowhere: '/$defs/Item' does not exist within {'type': 'array', 'items': {'$ref': '#/$defs/Item'}}\n\n/opt/venv/lib/python3.13/site-packages/jsonschema/validators.py:464: _WrappedReferencingError\n=========================== short test summary info ============================\nFAILED tests/test_schema_guided_parse.py::test_schema_union_branch_keeps_root_defs_scope_during_repair\n1 failed in 0.27s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "f48eef489e044beb1c02ad3c6a8b5b294b2d6428c6f3051bf235ee9fd6d86bf2", + "output_tail": "........................................................................ [ 24%]\n........................................................................ [ 49%]\n........................................................................ [ 74%]\n........................................................................ [ 99%]\n. [100%]\n289 passed, 1 skipped in 4.31s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_schema_guided_parse.py::test_schema_union_branch_keeps_root_defs_scope_during_repair" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "019c1f60feeb685244145c4db56f611f8db2961b349fb3184403184794a3c16c", + "output_tail": ". [100%]\n1 passed in 0.15s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "b4e1401eeea2f381b6716348695069a8ccc7adf682abd068209dcc085b3ba9bb", + "output_tail": "........................................................................ [ 24%]\n........................................................................ [ 49%]\n........................................................................ [ 74%]\n........................................................................ [ 99%]\n. [100%]\n289 passed, 1 skipped in 4.16s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_schema_guided_parse.py::test_schema_union_branch_keeps_root_defs_scope_during_repair" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "c7c24425031e826555669216f425f95283e82468a830f7af89080cfa0f5ebb80", + "output_tail": " \"value\": [{\"name\": \"example\"}]\n }\n\ntests/test_schema_guided_parse.py:124: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nsrc/json_repair/json_repair.py:204: in repair_json\n parsed_json = parser.parse_with_schema(repairer, schema_obj)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:108: in parse_with_schema\n return self._parse_top_level(lambda: self.parse_json(schema, \"$\"))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:113: in _parse_top_level\n json = parse_element()\n ^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:108: in \n return self._parse_top_level(lambda: self.parse_json(schema, \"$\"))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:203: in parse_json\n value = self.parse_object(schema, path) if repairer else self.parse_object()\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:42: in parse_object\n return _parse_object(self, schema, path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/parse_object.py:438: in parse_object\n value = _parse_object_value(self, schema_repairer, prop_schema, key_path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/parse_object.py:290: in _parse_object_value\n return self.parse_json(prop_schema, key_path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:209: in parse_json\n return self._finalize_parsed_value(value, repairer, schema, path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/json_parser.py:257: in _finalize_parsed_value\n return repairer.repair_value(value, schema, path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/schema_repair.py:262: in repair_value\n return self._repair_union(value, schema[\"anyOf\"], path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsrc/json_repair/schema_repair.py:290: in _repair_union\n self.validate(candidate, subschema)\nsrc/json_repair/schema_repair.py:171: in validate\n validator.validate(value)\n/opt/venv/lib/python3.13/site-packages/jsonschema/validators.py:449: in validate\n for error in self.iter_errors(*args, **kwargs):\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n/opt/venv/lib/python3.13/site-packages/jsonschema/validators.py:383: in iter_errors\n for error in errors:\n ^^^^^^\n/opt/venv/lib/python3.13/site-packages/jsonschema/_keywords.py:78: in items\n yield from validator.descend(\n/opt/venv/lib/python3.13/site-packages/jsonschema/validators.py:431: in descend\n for error in errors:\n ^^^^^^\n/opt/venv/lib/python3.13/site-packages/jsonschema/_keywords.py:275: in ref\n yield from validator._validate_reference(ref=ref, instance=instance)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = Draft202012Validator(schema={'$ref': '#/$defs/Item'}, format_checker=None)\nref = '#/$defs/Item', instance = {'name': 'example'}\n\n def _validate_reference(self, ref, instance):\n if self._ref_resolver is None:\n try:\n resolved = self._resolver.lookup(ref)\n except referencing.exceptions.Unresolvable as err:\n> raise exceptions._WrappedReferencingError(err) from err\nE jsonschema.exceptions._WrappedReferencingError: PointerToNowhere: '/$defs/Item' does not exist within {'type': 'array', 'items': {'$ref': '#/$defs/Item'}}\n\n/opt/venv/lib/python3.13/site-packages/jsonschema/validators.py:464: _WrappedReferencingError\n=========================== short test summary info ============================\nFAILED tests/test_schema_guided_parse.py::test_schema_union_branch_keeps_root_defs_scope_during_repair\n1 failed in 0.25s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "123d2c35babe83145879da127b0509a5670c603f1259dd00e86c2ee9ba60a457", + "output_tail": "........................................................................ [ 24%]\n........................................................................ [ 49%]\n........................................................................ [ 74%]\n........................................................................ [ 99%]\n. [100%]\n289 passed, 1 skipped in 4.17s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_schema_guided_parse.py::test_schema_union_branch_keeps_root_defs_scope_during_repair" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "019c1f60feeb685244145c4db56f611f8db2961b349fb3184403184794a3c16c", + "output_tail": ". [100%]\n1 passed in 0.15s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "d451e61bcc107510ac16fe00a3395ea3ee05b461bbff3607aeea06594e2788ef", + "output_tail": "........................................................................ [ 24%]\n........................................................................ [ 49%]\n........................................................................ [ 74%]\n........................................................................ [ 99%]\n. [100%]\n289 passed, 1 skipped in 4.27s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "pytest", + "-q", + "tests/test_schema_guided_parse.py::test_schema_union_branch_keeps_root_defs_scope_during_repair" + ], + "fix_sha": "89815cf9c9675a2ff1bd3569f9418fd2be80af35", + "local_image": "patcheval-validate:json-repair-205", + "local_image_id": "sha256:ea7c33ccb2ed811ad43bc42e5b8eb7e48477efecd92bc4dd68102c94a9f88e0a", + "parent_sha": "c6b21d4f2a6513f027b25b5e03e40cf8b6969739", + "regression_command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "repeats": 2, + "repository": "mangiucugna/json_repair", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.13-bookworm-slim@sha256:b91a10015a28c46501a39de9dd4899d65aea11f43be5960c1af9ee7fbe0727dc", + "bootstrap_command": [ + "uv", + "pip", + "install", + "--python", + "/opt/venv/bin/python", + "setuptools==80.9.0" + ], + "environment": [ + "PYTHONPATH=/workspace/repo/src", + "PYTHONDONTWRITEBYTECODE=1", + "UV_CACHE_DIR=/tmp/uv-cache" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "pytest", + "-q" + ], + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "sync_command": [ + "uv", + "sync", + "--frozen", + "--all-groups", + "--no-install-project" + ], + "test_command": [ + "pytest", + "-q" + ], + "timeout_s": 300 + }, + "schema_version": 1, + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "task_id": "json-repair-205", + "validated": true +} diff --git a/attestations/json-repair-207.json b/attestations/json-repair-207.json new file mode 100644 index 0000000000000000000000000000000000000000..3832104eee0dfa174b76959dca7b3c0eaaea8c8f --- /dev/null +++ b/attestations/json-repair-207.json @@ -0,0 +1,193 @@ +{ + "cells": [ + { + "command": [ + "pytest", + "-q", + "tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "b15a9c11adc534b5a7a88710490264e50a5ab94345be06f17a3650b6df0ccf97", + "output_tail": "FF [100%]\n=================================== FAILURES ===================================\n_ test_parse_string_preserves_repeated_escaped_backslashes_during_repair[{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\",}-a\\\\\\\\b\\\\\\\\c-{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\"}] _\n\nraw = '{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\",}', expected = 'a\\\\\\\\b\\\\\\\\c'\nserialized = '{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\"}'\n\n @pytest.mark.parametrize(\n (\"raw\", \"expected\", \"serialized\"),\n [\n (r'{\"key\": \"a\\\\\\\\b\\\\\\\\c\",}', r\"a\\\\b\\\\c\", r'{\"key\": \"a\\\\\\\\b\\\\\\\\c\"}'),\n (r'{\"key\": \"1\\\\\\\\2\\\\\\\\3\",}', r\"1\\\\2\\\\3\", r'{\"key\": \"1\\\\\\\\2\\\\\\\\3\"}'),\n ],\n )\n def test_parse_string_preserves_repeated_escaped_backslashes_during_repair(raw, expected, serialized):\n for skip_json_loads in (False, True):\n> assert repair_json(raw, return_objects=True, skip_json_loads=skip_json_loads) == {\"key\": expected}\nE AssertionError: assert {'key': 'a\\\\b\\\\c'} == {'key': 'a\\\\\\\\b\\\\\\\\c'}\nE \nE Differing items:\nE {'key': 'a\\\\b\\\\c'} != {'key': 'a\\\\\\\\b\\\\\\\\c'}\nE Use -v to get more diff\n\ntests/test_parse_string.py:476: AssertionError\n_ test_parse_string_preserves_repeated_escaped_backslashes_during_repair[{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\",}-1\\\\\\\\2\\\\\\\\3-{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\"}] _\n\nraw = '{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\",}', expected = '1\\\\\\\\2\\\\\\\\3'\nserialized = '{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\"}'\n\n @pytest.mark.parametrize(\n (\"raw\", \"expected\", \"serialized\"),\n [\n (r'{\"key\": \"a\\\\\\\\b\\\\\\\\c\",}', r\"a\\\\b\\\\c\", r'{\"key\": \"a\\\\\\\\b\\\\\\\\c\"}'),\n (r'{\"key\": \"1\\\\\\\\2\\\\\\\\3\",}', r\"1\\\\2\\\\3\", r'{\"key\": \"1\\\\\\\\2\\\\\\\\3\"}'),\n ],\n )\n def test_parse_string_preserves_repeated_escaped_backslashes_during_repair(raw, expected, serialized):\n for skip_json_loads in (False, True):\n> assert repair_json(raw, return_objects=True, skip_json_loads=skip_json_loads) == {\"key\": expected}\nE AssertionError: assert {'key': '1\\\\2\\\\3'} == {'key': '1\\\\\\\\2\\\\\\\\3'}\nE \nE Differing items:\nE {'key': '1\\\\2\\\\3'} != {'key': '1\\\\\\\\2\\\\\\\\3'}\nE Use -v to get more diff\n\ntests/test_parse_string.py:476: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair[{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\",}-a\\\\\\\\b\\\\\\\\c-{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\"}]\nFAILED tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair[{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\",}-1\\\\\\\\2\\\\\\\\3-{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\"}]\n2 failed in 0.13s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "058180272e889287c48d5ba8d65cdf3788a13385ed76bc6aeabc98f4401dc70f", + "output_tail": "........................................................................ [ 24%]\n........................................................................ [ 49%]\n........................................................................ [ 73%]\n........................................................................ [ 98%]\n..... [100%]\n293 passed, 1 skipped in 4.14s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "c1f28f9a3a8ffa423cf8036a6fdc9ee998bf0ee50a0c55088c2ab4eaa77b544c", + "output_tail": ".. [100%]\n2 passed in 0.10s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "058180272e889287c48d5ba8d65cdf3788a13385ed76bc6aeabc98f4401dc70f", + "output_tail": "........................................................................ [ 24%]\n........................................................................ [ 49%]\n........................................................................ [ 73%]\n........................................................................ [ 98%]\n..... [100%]\n293 passed, 1 skipped in 4.14s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "d6bcb048c2928c26fdef6b173061de30fb2217c21a7722673f9e50b610c50238", + "output_tail": "FF [100%]\n=================================== FAILURES ===================================\n_ test_parse_string_preserves_repeated_escaped_backslashes_during_repair[{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\",}-a\\\\\\\\b\\\\\\\\c-{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\"}] _\n\nraw = '{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\",}', expected = 'a\\\\\\\\b\\\\\\\\c'\nserialized = '{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\"}'\n\n @pytest.mark.parametrize(\n (\"raw\", \"expected\", \"serialized\"),\n [\n (r'{\"key\": \"a\\\\\\\\b\\\\\\\\c\",}', r\"a\\\\b\\\\c\", r'{\"key\": \"a\\\\\\\\b\\\\\\\\c\"}'),\n (r'{\"key\": \"1\\\\\\\\2\\\\\\\\3\",}', r\"1\\\\2\\\\3\", r'{\"key\": \"1\\\\\\\\2\\\\\\\\3\"}'),\n ],\n )\n def test_parse_string_preserves_repeated_escaped_backslashes_during_repair(raw, expected, serialized):\n for skip_json_loads in (False, True):\n> assert repair_json(raw, return_objects=True, skip_json_loads=skip_json_loads) == {\"key\": expected}\nE AssertionError: assert {'key': 'a\\\\b\\\\c'} == {'key': 'a\\\\\\\\b\\\\\\\\c'}\nE \nE Differing items:\nE {'key': 'a\\\\b\\\\c'} != {'key': 'a\\\\\\\\b\\\\\\\\c'}\nE Use -v to get more diff\n\ntests/test_parse_string.py:476: AssertionError\n_ test_parse_string_preserves_repeated_escaped_backslashes_during_repair[{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\",}-1\\\\\\\\2\\\\\\\\3-{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\"}] _\n\nraw = '{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\",}', expected = '1\\\\\\\\2\\\\\\\\3'\nserialized = '{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\"}'\n\n @pytest.mark.parametrize(\n (\"raw\", \"expected\", \"serialized\"),\n [\n (r'{\"key\": \"a\\\\\\\\b\\\\\\\\c\",}', r\"a\\\\b\\\\c\", r'{\"key\": \"a\\\\\\\\b\\\\\\\\c\"}'),\n (r'{\"key\": \"1\\\\\\\\2\\\\\\\\3\",}', r\"1\\\\2\\\\3\", r'{\"key\": \"1\\\\\\\\2\\\\\\\\3\"}'),\n ],\n )\n def test_parse_string_preserves_repeated_escaped_backslashes_during_repair(raw, expected, serialized):\n for skip_json_loads in (False, True):\n> assert repair_json(raw, return_objects=True, skip_json_loads=skip_json_loads) == {\"key\": expected}\nE AssertionError: assert {'key': '1\\\\2\\\\3'} == {'key': '1\\\\\\\\2\\\\\\\\3'}\nE \nE Differing items:\nE {'key': '1\\\\2\\\\3'} != {'key': '1\\\\\\\\2\\\\\\\\3'}\nE Use -v to get more diff\n\ntests/test_parse_string.py:476: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair[{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\",}-a\\\\\\\\b\\\\\\\\c-{\"key\": \"a\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\c\"}]\nFAILED tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair[{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\",}-1\\\\\\\\2\\\\\\\\3-{\"key\": \"1\\\\\\\\\\\\\\\\2\\\\\\\\\\\\\\\\3\"}]\n2 failed in 0.12s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "4f8c0aa028a534b5c891460f51e7a422d1594ab6abb718b436ecbd326e121437", + "output_tail": "........................................................................ [ 24%]\n........................................................................ [ 49%]\n........................................................................ [ 73%]\n........................................................................ [ 98%]\n..... [100%]\n293 passed, 1 skipped in 4.23s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "c1f28f9a3a8ffa423cf8036a6fdc9ee998bf0ee50a0c55088c2ab4eaa77b544c", + "output_tail": ".. [100%]\n2 passed in 0.10s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "32e570261e33de0508ce7071dc97ef3856784276fe6a4d5e66fd9b970d0a07af", + "output_tail": "........................................................................ [ 24%]\n........................................................................ [ 49%]\n........................................................................ [ 73%]\n........................................................................ [ 98%]\n..... [100%]\n293 passed, 1 skipped in 4.16s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "pytest", + "-q", + "tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair" + ], + "fix_sha": "600ede6be7d125d14812be3bbd7ef3e0b526a84e", + "local_image": "patcheval-validate:json-repair-207", + "local_image_id": "sha256:9af2333d3b408352ad1229ce272de91ee6e2fd9783e8d12d9fabd1e158cf298c", + "parent_sha": "ae582283b3ad27a4e407af9b1830220d07a16494", + "regression_command": [ + "pytest", + "-q", + "--ignore=tests/test_performance.py" + ], + "repeats": 2, + "repository": "mangiucugna/json_repair", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.13-bookworm-slim@sha256:b91a10015a28c46501a39de9dd4899d65aea11f43be5960c1af9ee7fbe0727dc", + "bootstrap_command": [ + "uv", + "pip", + "install", + "--python", + "/opt/venv/bin/python", + "setuptools==80.9.0" + ], + "environment": [ + "PYTHONPATH=/workspace/repo/src", + "PYTHONDONTWRITEBYTECODE=1", + "UV_CACHE_DIR=/tmp/uv-cache" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "pytest", + "-q" + ], + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "sync_command": [ + "uv", + "sync", + "--frozen", + "--all-groups", + "--no-install-project" + ], + "test_command": [ + "pytest", + "-q" + ], + "timeout_s": 300 + }, + "schema_version": 1, + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "task_id": "json-repair-207", + "validated": true +} diff --git a/attestations/narwhals-3864.json b/attestations/narwhals-3864.json new file mode 100644 index 0000000000000000000000000000000000000000..d9e2bb3e7c7021270a2d8b51ad5cdd9ee8235a3c --- /dev/null +++ b/attestations/narwhals-3864.json @@ -0,0 +1,292 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--constructors=pandas,pandas[nullable]", + "tests/frame/concat_test.py::test_concat_horizontal_pandas_left_hand_rule" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "332ad326af6aa540517e190dcd8fb846bd50b2686c9fd5a9c9881b8c9462f4ee", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_________________ test_concat_horizontal_pandas_left_hand_rule _________________\n\n def test_concat_horizontal_pandas_left_hand_rule() -> None:\n # https://github.com/narwhals-dev/narwhals/issues/3864\n pytest.importorskip(\"pandas\")\n import pandas as pd\n \n df_left = nw.from_native(\n pd.DataFrame({\"a\": [1, 2, 3]}, index=[10, 20, 30]), eager_only=True\n )\n df_right = nw.from_native(\n pd.DataFrame({\"b\": [4, 5, 6]}, index=[0, 1, 2]), eager_only=True\n )\n \n result = nw.concat([df_left, df_right], how=\"horizontal\")\n \n # the index of the left-most argument is preserved, and the other\n # argument is aligned to it positionally, rather than by label.\n> assert result.to_native().index.tolist() == [10, 20, 30]\nE assert [10, 20, 30, 0, 1, 2] == [10, 20, 30]\nE \nE Left contains 3 more items, first extra item: 0\nE Use -v to get more diff\n\ntests/frame/concat_test.py:82: AssertionError\n=========================== short test summary info ============================\nFAILED tests/frame/concat_test.py::test_concat_horizontal_pandas_left_hand_rule\n1 failed in 0.10s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--runslow", + "--constructors=pandas,pandas[nullable]", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "aeaf37e0ff7503cdb81efeb3cc37cfd25291e6f20f4e076c8268d00d2f15c8b1", + "output_tail": "......................... [ 30%]\n..........................................................s......s...... [ 31%]\n..ssss..s......ss..s....................ss..........s.........s.s...s... [ 33%]\n...................................sssss.s.ssss.......................s. [ 34%]\n.s..........xx..................................................s.....ss [ 36%]\n...ss...................................ss.............................. [ 37%]\n........................s.xs....s...sx.....s..........s.........s.s...ss [ 38%]\n.s..s.s.................s..s....s....s................s.....s.....s..... [ 40%]\n..s...xs.s...ss....s.s...ss..ss.s.ss........s..ss.......ss..ss........ss [ 41%]\n.ss..............s.ssss..s...s.s...ss.ss....s..s.s............ssssssssss [ 43%]\nssssssssssssssxxxxxxxx............x..................................... [ 44%]\n..............ss.s.ssssssssss........sss.s....s....s.............s...... [ 46%]\ns.s..s..s.s...sss............x.....x..................s...ss........s.s. [ 47%]\n..........s.......s......s...s.ss...ss.ss.....s.s....s.................. [ 48%]\n........................xx.....xx....................s..ssss............ [ 50%]\n........................................................................ [ 51%]\n................................sss.ss................s................. [ 53%]\n................................ssssssssssss....s..s.................... [ 54%]\n..x......xxx..........................................................s. [ 56%]\n...................................s...................s....ssssssss.... [ 57%]\nss..ss.ssss..s.s....................ssss................................ [ 59%]\n.................................s........ss.s..s.......ssssssss.ssss.ss [ 60%]\nsss.sssssssssss...........s............................................s [ 61%]\n...ss.ssss..sss......s.sss.ss..sss.s.ss...ssssss..s...................s. [ 63%]\ns.sss..sss.ssssssss...s.ssssssssss.sssssss..s.s.ss.ss.ss..sss.s.s.sss... [ 64%]\nss..s.s.sssss................................s..s.s..........s......s..s [ 66%]\n.........s..s.sss..s.ss...............................s.s...ss....s..s.. [ 67%]\n..s.s.sss...ss......s.....s..s.s.ss....s....s.s......sss......s.ss.....s [ 69%]\ns.......s.....s.ss.......s.............................................. [ 70%]\n........................................................................ [ 72%]\n......xxxx.........s.s.................x..xx.x.x..x.xx......x.x.xxxx..x. [ 73%]\nx...x..xx.x..x.x.xx.xx.x...x.....s.....s........s...s..s.......sss.ss... [ 74%]\n..s....sss..sss.s.s......s.............................................. [ 76%]\n...........................ssssssssssssssssssssssss.........s........... [ 77%]\n...........s..................................s.................s....... [ 79%]\n......................................................................s. [ 80%]\n............................................ss..ss...................... [ 82%]\n................s....................................................... [ 83%]\n...........................s...s...................................s.... [ 84%]\n..........s................s....s.............ss.ss.sss.ss.............. [ 86%]\n........................................s............................... [ 87%]\n....................................................s................... [ 89%]\n............s.........s..s.....sss..s..ss.s..ssss....s..ssssss.s.s...... [ 90%]\n......s...........ss.....sx.....xxx.x..x.......x.......x.x.xx...x...x.x. [ 92%]\n.....xxx.x.ss..............................ssssssssssss..x.x.....x...... [ 93%]\n.x.............x......x..x...x.................s...s.....sssssss..s..s.s [ 95%]\ns....s.....s..............sss...................s.....................ss [ 96%]\ns...s...........x.x..xxx.x..x.x...x...xxx.xxxx.....sssssssssssss.s..s... [ 97%]\nsssssss.ssssssssssssss.ssss..........................s.................. [ 99%]\n.......s......s............... [100%]\n4218 passed, 679 skipped, 123 xfailed in 17.65s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--constructors=pandas,pandas[nullable]", + "tests/frame/concat_test.py::test_concat_horizontal_pandas_left_hand_rule" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "8b9044c1bd388710d560ea9f2903a85e49075054ede761c63a9ff029fe8d100d", + "output_tail": ". [100%]\n1 passed in 0.06s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--runslow", + "--constructors=pandas,pandas[nullable]", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "f77abdf3400829834aa653c4d8f70d868a5d02c12754520bab57c33b5100bdef", + "output_tail": "......................... [ 30%]\n..........................................................s......s...... [ 31%]\n..ssss..s......ss..s....................ss..........s.........s.s...s... [ 33%]\n...................................sssss.s.ssss.......................s. [ 34%]\n.s..........xx..................................................s.....ss [ 36%]\n...ss...................................ss.............................. [ 37%]\n........................s.xs....s...sx.....s..........s.........s.s...ss [ 38%]\n.s..s.s.................s..s....s....s................s.....s.....s..... [ 40%]\n..s...xs.s...ss....s.s...ss..ss.s.ss........s..ss.......ss..ss........ss [ 41%]\n.ss..............s.ssss..s...s.s...ss.ss....s..s.s............ssssssssss [ 43%]\nssssssssssssssxxxxxxxx............x..................................... [ 44%]\n..............ss.s.ssssssssss........sss.s....s....s.............s...... [ 46%]\ns.s..s..s.s...sss............x.....x..................s...ss........s.s. [ 47%]\n..........s.......s......s...s.ss...ss.ss.....s.s....s.................. [ 48%]\n........................xx.....xx....................s..ssss............ [ 50%]\n........................................................................ [ 51%]\n................................sss.ss................s................. [ 53%]\n................................ssssssssssss....s..s.................... [ 54%]\n..x......xxx..........................................................s. [ 56%]\n...................................s...................s....ssssssss.... [ 57%]\nss..ss.ssss..s.s....................ssss................................ [ 59%]\n.................................s........ss.s..s.......ssssssss.ssss.ss [ 60%]\nsss.sssssssssss...........s............................................s [ 61%]\n...ss.ssss..sss......s.sss.ss..sss.s.ss...ssssss..s...................s. [ 63%]\ns.sss..sss.ssssssss...s.ssssssssss.sssssss..s.s.ss.ss.ss..sss.s.s.sss... [ 64%]\nss..s.s.sssss................................s..s.s..........s......s..s [ 66%]\n.........s..s.sss..s.ss...............................s.s...ss....s..s.. [ 67%]\n..s.s.sss...ss......s.....s..s.s.ss....s....s.s......sss......s.ss.....s [ 69%]\ns.......s.....s.ss.......s.............................................. [ 70%]\n........................................................................ [ 72%]\n......xxxx.........s.s.................x..xx.x.x..x.xx......x.x.xxxx..x. [ 73%]\nx...x..xx.x..x.x.xx.xx.x...x.....s.....s........s...s..s.......sss.ss... [ 74%]\n..s....sss..sss.s.s......s.............................................. [ 76%]\n...........................ssssssssssssssssssssssss.........s........... [ 77%]\n...........s..................................s.................s....... [ 79%]\n......................................................................s. [ 80%]\n............................................ss..ss...................... [ 82%]\n................s....................................................... [ 83%]\n...........................s...s...................................s.... [ 84%]\n..........s................s....s.............ss.ss.sss.ss.............. [ 86%]\n........................................s............................... [ 87%]\n....................................................s................... [ 89%]\n............s.........s..s.....sss..s..ss.s..ssss....s..ssssss.s.s...... [ 90%]\n......s...........ss.....sx.....xxx.x..x.......x.......x.x.xx...x...x.x. [ 92%]\n.....xxx.x.ss..............................ssssssssssss..x.x.....x...... [ 93%]\n.x.............x......x..x...x.................s...s.....sssssss..s..s.s [ 95%]\ns....s.....s..............sss...................s.....................ss [ 96%]\ns...s...........x.x..xxx.x..x.x...x...xxx.xxxx.....sssssssssssss.s..s... [ 97%]\nsssssss.ssssssssssssss.ssss..........................s.................. [ 99%]\n.......s......s............... [100%]\n4218 passed, 679 skipped, 123 xfailed in 17.98s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--constructors=pandas,pandas[nullable]", + "tests/frame/concat_test.py::test_concat_horizontal_pandas_left_hand_rule" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "332ad326af6aa540517e190dcd8fb846bd50b2686c9fd5a9c9881b8c9462f4ee", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_________________ test_concat_horizontal_pandas_left_hand_rule _________________\n\n def test_concat_horizontal_pandas_left_hand_rule() -> None:\n # https://github.com/narwhals-dev/narwhals/issues/3864\n pytest.importorskip(\"pandas\")\n import pandas as pd\n \n df_left = nw.from_native(\n pd.DataFrame({\"a\": [1, 2, 3]}, index=[10, 20, 30]), eager_only=True\n )\n df_right = nw.from_native(\n pd.DataFrame({\"b\": [4, 5, 6]}, index=[0, 1, 2]), eager_only=True\n )\n \n result = nw.concat([df_left, df_right], how=\"horizontal\")\n \n # the index of the left-most argument is preserved, and the other\n # argument is aligned to it positionally, rather than by label.\n> assert result.to_native().index.tolist() == [10, 20, 30]\nE assert [10, 20, 30, 0, 1, 2] == [10, 20, 30]\nE \nE Left contains 3 more items, first extra item: 0\nE Use -v to get more diff\n\ntests/frame/concat_test.py:82: AssertionError\n=========================== short test summary info ============================\nFAILED tests/frame/concat_test.py::test_concat_horizontal_pandas_left_hand_rule\n1 failed in 0.10s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--runslow", + "--constructors=pandas,pandas[nullable]", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "c32af4b516bfb803f32c2aa733f76bd9a38f8d459879b3820f927f76cbae75c3", + "output_tail": "......................... [ 30%]\n..........................................................s......s...... [ 31%]\n..ssss..s......ss..s....................ss..........s.........s.s...s... [ 33%]\n...................................sssss.s.ssss.......................s. [ 34%]\n.s..........xx..................................................s.....ss [ 36%]\n...ss...................................ss.............................. [ 37%]\n........................s.xs....s...sx.....s..........s.........s.s...ss [ 38%]\n.s..s.s.................s..s....s....s................s.....s.....s..... [ 40%]\n..s...xs.s...ss....s.s...ss..ss.s.ss........s..ss.......ss..ss........ss [ 41%]\n.ss..............s.ssss..s...s.s...ss.ss....s..s.s............ssssssssss [ 43%]\nssssssssssssssxxxxxxxx............x..................................... [ 44%]\n..............ss.s.ssssssssss........sss.s....s....s.............s...... [ 46%]\ns.s..s..s.s...sss............x.....x..................s...ss........s.s. [ 47%]\n..........s.......s......s...s.ss...ss.ss.....s.s....s.................. [ 48%]\n........................xx.....xx....................s..ssss............ [ 50%]\n........................................................................ [ 51%]\n................................sss.ss................s................. [ 53%]\n................................ssssssssssss....s..s.................... [ 54%]\n..x......xxx..........................................................s. [ 56%]\n...................................s...................s....ssssssss.... [ 57%]\nss..ss.ssss..s.s....................ssss................................ [ 59%]\n.................................s........ss.s..s.......ssssssss.ssss.ss [ 60%]\nsss.sssssssssss...........s............................................s [ 61%]\n...ss.ssss..sss......s.sss.ss..sss.s.ss...ssssss..s...................s. [ 63%]\ns.sss..sss.ssssssss...s.ssssssssss.sssssss..s.s.ss.ss.ss..sss.s.s.sss... [ 64%]\nss..s.s.sssss................................s..s.s..........s......s..s [ 66%]\n.........s..s.sss..s.ss...............................s.s...ss....s..s.. [ 67%]\n..s.s.sss...ss......s.....s..s.s.ss....s....s.s......sss......s.ss.....s [ 69%]\ns.......s.....s.ss.......s.............................................. [ 70%]\n........................................................................ [ 72%]\n......xxxx.........s.s.................x..xx.x.x..x.xx......x.x.xxxx..x. [ 73%]\nx...x..xx.x..x.x.xx.xx.x...x.....s.....s........s...s..s.......sss.ss... [ 74%]\n..s....sss..sss.s.s......s.............................................. [ 76%]\n...........................ssssssssssssssssssssssss.........s........... [ 77%]\n...........s..................................s.................s....... [ 79%]\n......................................................................s. [ 80%]\n............................................ss..ss...................... [ 82%]\n................s....................................................... [ 83%]\n...........................s...s...................................s.... [ 84%]\n..........s................s....s.............ss.ss.sss.ss.............. [ 86%]\n........................................s............................... [ 87%]\n....................................................s................... [ 89%]\n............s.........s..s.....sss..s..ss.s..ssss....s..ssssss.s.s...... [ 90%]\n......s...........ss.....sx.....xxx.x..x.......x.......x.x.xx...x...x.x. [ 92%]\n.....xxx.x.ss..............................ssssssssssss..x.x.....x...... [ 93%]\n.x.............x......x..x...x.................s...s.....sssssss..s..s.s [ 95%]\ns....s.....s..............sss...................s.....................ss [ 96%]\ns...s...........x.x..xxx.x..x.x...x...xxx.xxxx.....sssssssssssss.s..s... [ 97%]\nsssssss.ssssssssssssss.ssss..........................s.................. [ 99%]\n.......s......s............... [100%]\n4218 passed, 679 skipped, 123 xfailed in 17.94s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--constructors=pandas,pandas[nullable]", + "tests/frame/concat_test.py::test_concat_horizontal_pandas_left_hand_rule" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "8b9044c1bd388710d560ea9f2903a85e49075054ede761c63a9ff029fe8d100d", + "output_tail": ". [100%]\n1 passed in 0.06s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--runslow", + "--constructors=pandas,pandas[nullable]", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "1311d3f760677fbd66afceabff5ce22989282d42d3daa56e6ce12be5a3947ca2", + "output_tail": "......................... [ 30%]\n..........................................................s......s...... [ 31%]\n..ssss..s......ss..s....................ss..........s.........s.s...s... [ 33%]\n...................................sssss.s.ssss.......................s. [ 34%]\n.s..........xx..................................................s.....ss [ 36%]\n...ss...................................ss.............................. [ 37%]\n........................s.xs....s...sx.....s..........s.........s.s...ss [ 38%]\n.s..s.s.................s..s....s....s................s.....s.....s..... [ 40%]\n..s...xs.s...ss....s.s...ss..ss.s.ss........s..ss.......ss..ss........ss [ 41%]\n.ss..............s.ssss..s...s.s...ss.ss....s..s.s............ssssssssss [ 43%]\nssssssssssssssxxxxxxxx............x..................................... [ 44%]\n..............ss.s.ssssssssss........sss.s....s....s.............s...... [ 46%]\ns.s..s..s.s...sss............x.....x..................s...ss........s.s. [ 47%]\n..........s.......s......s...s.ss...ss.ss.....s.s....s.................. [ 48%]\n........................xx.....xx....................s..ssss............ [ 50%]\n........................................................................ [ 51%]\n................................sss.ss................s................. [ 53%]\n................................ssssssssssss....s..s.................... [ 54%]\n..x......xxx..........................................................s. [ 56%]\n...................................s...................s....ssssssss.... [ 57%]\nss..ss.ssss..s.s....................ssss................................ [ 59%]\n.................................s........ss.s..s.......ssssssss.ssss.ss [ 60%]\nsss.sssssssssss...........s............................................s [ 61%]\n...ss.ssss..sss......s.sss.ss..sss.s.ss...ssssss..s...................s. [ 63%]\ns.sss..sss.ssssssss...s.ssssssssss.sssssss..s.s.ss.ss.ss..sss.s.s.sss... [ 64%]\nss..s.s.sssss................................s..s.s..........s......s..s [ 66%]\n.........s..s.sss..s.ss...............................s.s...ss....s..s.. [ 67%]\n..s.s.sss...ss......s.....s..s.s.ss....s....s.s......sss......s.ss.....s [ 69%]\ns.......s.....s.ss.......s.............................................. [ 70%]\n........................................................................ [ 72%]\n......xxxx.........s.s.................x..xx.x.x..x.xx......x.x.xxxx..x. [ 73%]\nx...x..xx.x..x.x.xx.xx.x...x.....s.....s........s...s..s.......sss.ss... [ 74%]\n..s....sss..sss.s.s......s.............................................. [ 76%]\n...........................ssssssssssssssssssssssss.........s........... [ 77%]\n...........s..................................s.................s....... [ 79%]\n......................................................................s. [ 80%]\n............................................ss..ss...................... [ 82%]\n................s....................................................... [ 83%]\n...........................s...s...................................s.... [ 84%]\n..........s................s....s.............ss.ss.sss.ss.............. [ 86%]\n........................................s............................... [ 87%]\n....................................................s................... [ 89%]\n............s.........s..s.....sss..s..ss.s..ssss....s..ssssss.s.s...... [ 90%]\n......s...........ss.....sx.....xxx.x..x.......x.......x.x.xx...x...x.x. [ 92%]\n.....xxx.x.ss..............................ssssssssssss..x.x.....x...... [ 93%]\n.x.............x......x..x...x.................s...s.....sssssss..s..s.s [ 95%]\ns....s.....s..............sss...................s.....................ss [ 96%]\ns...s...........x.x..xxx.x..x.x...x...xxx.xxxx.....sssssssssssss.s..s... [ 97%]\nsssssss.ssssssssssssss.ssss..........................s.................. [ 99%]\n.......s......s............... [100%]\n4218 passed, 679 skipped, 123 xfailed in 17.51s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--constructors=pandas,pandas[nullable]", + "tests/frame/concat_test.py::test_concat_horizontal_pandas_left_hand_rule" + ], + "fix_sha": "bc34ee7ffd988f335e174075b6685059eef97280", + "local_image": "patcheval-validate:narwhals-3864", + "local_image_id": "sha256:01534111099b82f6647568531df96f2e0540c13f8c7e496450910b7543b26c27", + "parent_sha": "f5ba0911cc7033eaba05824e4d61fdcddd1fcf3e", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--runslow", + "--constructors=pandas,pandas[nullable]", + "tests" + ], + "repeats": 2, + "repository": "narwhals-dev/narwhals", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.47.3\nripgrep 14.1.1", + "smoke_output_sha256": "1f9f54eb0528523e3fe1a96cfad2629677cab32bb4348a4eaa6992145e8608fc", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim@sha256:dfe4069fefc02ee4d6097c26f31d0784df09c9b6242fb4a25ad31fbae74ec6aa", + "bootstrap_command": [ + "uv", + "pip", + "install", + "--python", + "/opt/venv/bin/python", + "--only-binary", + ":all:", + "uv_build==0.11.0" + ], + "environment": [ + "HOME=/home/node", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "UV_CACHE_DIR=/tmp/uv-cache", + "PYTHONPATH=/workspace/repo/src", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONUNBUFFERED=1", + "PYTHONHASHSEED=0", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "UV_OFFLINE=1", + "NARWHALS_DEFAULT_CONSTRUCTORS=pandas,pandas[nullable]", + "MODIN_ENGINE=python", + "PYARROW_IGNORE_TIMEZONE=1", + "TZ=UTC", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TERM=dumb", + "NO_COLOR=1", + "PYTHON_COLORS=0" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--runslow", + "--constructors=pandas,pandas[nullable]", + "tests" + ], + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ." + ], + "sync_command": [ + "uv", + "sync", + "--frozen", + "--no-default-groups", + "--group", + "tests", + "--extra", + "pandas", + "--no-install-project" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q", + "--randomly-seed=0", + "--hypothesis-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "--constructors=pandas,pandas[nullable]" + ], + "timeout_s": 1800 + }, + "schema_version": 1, + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ." + ], + "task_id": "narwhals-3864", + "validated": true +} diff --git a/attestations/pygments-2816.json b/attestations/pygments-2816.json new file mode 100644 index 0000000000000000000000000000000000000000..4432c6530d8811161aa9749ff70b84bcb287308f --- /dev/null +++ b/attestations/pygments-2816.json @@ -0,0 +1,287 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/snippets/jsx/test_apostrophe_text.txt" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "4e805939c8e9de365f5e417610f283025ba813b946d931a8cbc2af24d674537b", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_________________ tests/snippets/jsx/test_apostrophe_text.txt __________________\nThe tokens produced by the \"jsx\" lexer differ from the expected ones in the file \"tests/snippets/jsx/test_apostrophe_text.txt\".\nRun `tox -- tests/snippets --update-goldens` to update it.\n\n \n Skipping 414 identical leading characters in diff, use -v to show\n - Text\n + Error\n 'm' Name.Other\n ' ' Text.Whitespace\n 'the' Name.Other...\n \n ...Full output truncated (12 lines hidden), use '-vv' to show\n=========================== short test summary info ============================\nFAILED tests/snippets/jsx/test_apostrophe_text.txt::\n1 failed in 0.06s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "588dec626a61a0229b017c38083640dabf288c5fe75aa06113e6175633a238f8", + "output_tail": "....................................... [ 33%]\n........................................................................ [ 35%]\n........................................................................ [ 36%]\n........................................................................ [ 37%]\n........................................................................ [ 39%]\n........................................................................ [ 40%]\n........................................................................ [ 41%]\n........................................................................ [ 43%]\n........................................................................ [ 44%]\n........................................................................ [ 45%]\n........................................................................ [ 47%]\n........................................................................ [ 48%]\n........................................................................ [ 50%]\n........................................................................ [ 51%]\n........................................................................ [ 52%]\n........................................................................ [ 54%]\n........................................................................ [ 55%]\n........................................................................ [ 56%]\n........................................................................ [ 58%]\n............................................s........................... [ 59%]\n.........................................s.............................s [ 60%]\n........................................................................ [ 62%]\n........................................................................ [ 63%]\n......................................................................s. [ 64%]\n........................................................................ [ 66%]\n........................................................................ [ 67%]\n........................................................................ [ 68%]\n........................................................................ [ 70%]\n........................................................................ [ 71%]\n........................................................................ [ 73%]\n........................................................................ [ 74%]\n........................................................................ [ 75%]\n........................................................................ [ 77%]\n........................................................................ [ 78%]\n........................................................................ [ 79%]\n........................................................................ [ 81%]\n........................................................................ [ 82%]\n........................................................................ [ 83%]\n........................................................................ [ 85%]\n.........................s.............................................. [ 86%]\n........................................................................ [ 87%]\n........................................................................ [ 89%]\n........................................................................ [ 90%]\n...................................................s.................... [ 91%]\n.............................................s.......s.................. [ 93%]\n........................................................................ [ 94%]\n........................................................................ [ 95%]\n........................................................................ [ 97%]\n........................................................................ [ 98%]\n...................................................................... [100%]\n5310 passed, 16 skipped in 15.85s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/snippets/jsx/test_apostrophe_text.txt" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "8b9044c1bd388710d560ea9f2903a85e49075054ede761c63a9ff029fe8d100d", + "output_tail": ". [100%]\n1 passed in 0.06s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "6aea6c537f3d876a38b4c314a3f20ef359f0232a5c5c769b36ed501816b308a3", + "output_tail": "....................................... [ 33%]\n........................................................................ [ 35%]\n........................................................................ [ 36%]\n........................................................................ [ 37%]\n........................................................................ [ 39%]\n........................................................................ [ 40%]\n........................................................................ [ 41%]\n........................................................................ [ 43%]\n........................................................................ [ 44%]\n........................................................................ [ 45%]\n........................................................................ [ 47%]\n........................................................................ [ 48%]\n........................................................................ [ 50%]\n........................................................................ [ 51%]\n........................................................................ [ 52%]\n........................................................................ [ 54%]\n........................................................................ [ 55%]\n........................................................................ [ 56%]\n........................................................................ [ 58%]\n............................................s........................... [ 59%]\n.........................................s.............................s [ 60%]\n........................................................................ [ 62%]\n........................................................................ [ 63%]\n......................................................................s. [ 64%]\n........................................................................ [ 66%]\n........................................................................ [ 67%]\n........................................................................ [ 68%]\n........................................................................ [ 70%]\n........................................................................ [ 71%]\n........................................................................ [ 73%]\n........................................................................ [ 74%]\n........................................................................ [ 75%]\n........................................................................ [ 77%]\n........................................................................ [ 78%]\n........................................................................ [ 79%]\n........................................................................ [ 81%]\n........................................................................ [ 82%]\n........................................................................ [ 83%]\n........................................................................ [ 85%]\n.........................s.............................................. [ 86%]\n........................................................................ [ 87%]\n........................................................................ [ 89%]\n........................................................................ [ 90%]\n...................................................s.................... [ 91%]\n.............................................s.......s.................. [ 93%]\n........................................................................ [ 94%]\n........................................................................ [ 95%]\n........................................................................ [ 97%]\n........................................................................ [ 98%]\n...................................................................... [100%]\n5310 passed, 16 skipped in 15.67s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/snippets/jsx/test_apostrophe_text.txt" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "880b7028e99a19813ab280af415f8f0799ca103f46efd3c43611ad9917b269d0", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_________________ tests/snippets/jsx/test_apostrophe_text.txt __________________\nThe tokens produced by the \"jsx\" lexer differ from the expected ones in the file \"tests/snippets/jsx/test_apostrophe_text.txt\".\nRun `tox -- tests/snippets --update-goldens` to update it.\n\n \n Skipping 414 identical leading characters in diff, use -v to show\n - Text\n + Error\n 'm' Name.Other\n ' ' Text.Whitespace\n 'the' Name.Other...\n \n ...Full output truncated (12 lines hidden), use '-vv' to show\n=========================== short test summary info ============================\nFAILED tests/snippets/jsx/test_apostrophe_text.txt::\n1 failed in 0.07s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "c6c88b9763398739b59f7a256c098fb55998462c9efe1ab30420a5a58b70684a", + "output_tail": "....................................... [ 33%]\n........................................................................ [ 35%]\n........................................................................ [ 36%]\n........................................................................ [ 37%]\n........................................................................ [ 39%]\n........................................................................ [ 40%]\n........................................................................ [ 41%]\n........................................................................ [ 43%]\n........................................................................ [ 44%]\n........................................................................ [ 45%]\n........................................................................ [ 47%]\n........................................................................ [ 48%]\n........................................................................ [ 50%]\n........................................................................ [ 51%]\n........................................................................ [ 52%]\n........................................................................ [ 54%]\n........................................................................ [ 55%]\n........................................................................ [ 56%]\n........................................................................ [ 58%]\n............................................s........................... [ 59%]\n.........................................s.............................s [ 60%]\n........................................................................ [ 62%]\n........................................................................ [ 63%]\n......................................................................s. [ 64%]\n........................................................................ [ 66%]\n........................................................................ [ 67%]\n........................................................................ [ 68%]\n........................................................................ [ 70%]\n........................................................................ [ 71%]\n........................................................................ [ 73%]\n........................................................................ [ 74%]\n........................................................................ [ 75%]\n........................................................................ [ 77%]\n........................................................................ [ 78%]\n........................................................................ [ 79%]\n........................................................................ [ 81%]\n........................................................................ [ 82%]\n........................................................................ [ 83%]\n........................................................................ [ 85%]\n.........................s.............................................. [ 86%]\n........................................................................ [ 87%]\n........................................................................ [ 89%]\n........................................................................ [ 90%]\n...................................................s.................... [ 91%]\n.............................................s.......s.................. [ 93%]\n........................................................................ [ 94%]\n........................................................................ [ 95%]\n........................................................................ [ 97%]\n........................................................................ [ 98%]\n...................................................................... [100%]\n5310 passed, 16 skipped in 15.76s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/snippets/jsx/test_apostrophe_text.txt" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "2a37651d36018936382bd94a8e3f17608135f2c9feef4137a2bb38c6ee82c899", + "output_tail": ". [100%]\n1 passed in 0.07s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "8b72142dc5a3c6747b1b713032d38af5a0a96181611e1fc2cc90fdafbe12ed74", + "output_tail": "....................................... [ 33%]\n........................................................................ [ 35%]\n........................................................................ [ 36%]\n........................................................................ [ 37%]\n........................................................................ [ 39%]\n........................................................................ [ 40%]\n........................................................................ [ 41%]\n........................................................................ [ 43%]\n........................................................................ [ 44%]\n........................................................................ [ 45%]\n........................................................................ [ 47%]\n........................................................................ [ 48%]\n........................................................................ [ 50%]\n........................................................................ [ 51%]\n........................................................................ [ 52%]\n........................................................................ [ 54%]\n........................................................................ [ 55%]\n........................................................................ [ 56%]\n........................................................................ [ 58%]\n............................................s........................... [ 59%]\n.........................................s.............................s [ 60%]\n........................................................................ [ 62%]\n........................................................................ [ 63%]\n......................................................................s. [ 64%]\n........................................................................ [ 66%]\n........................................................................ [ 67%]\n........................................................................ [ 68%]\n........................................................................ [ 70%]\n........................................................................ [ 71%]\n........................................................................ [ 73%]\n........................................................................ [ 74%]\n........................................................................ [ 75%]\n........................................................................ [ 77%]\n........................................................................ [ 78%]\n........................................................................ [ 79%]\n........................................................................ [ 81%]\n........................................................................ [ 82%]\n........................................................................ [ 83%]\n........................................................................ [ 85%]\n.........................s.............................................. [ 86%]\n........................................................................ [ 87%]\n........................................................................ [ 89%]\n........................................................................ [ 90%]\n...................................................s.................... [ 91%]\n.............................................s.......s.................. [ 93%]\n........................................................................ [ 94%]\n........................................................................ [ 95%]\n........................................................................ [ 97%]\n........................................................................ [ 98%]\n...................................................................... [100%]\n5310 passed, 16 skipped in 15.68s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/snippets/jsx/test_apostrophe_text.txt" + ], + "fix_sha": "5b57beacc2115ff748fdfb7d596faa4f055c51b5", + "local_image": "patcheval-validate:pygments-2816", + "local_image_id": "sha256:92f8b48aaa90917ea48508fecff4e683ae55e0a19bf902b5fa70dc1286bd769b", + "parent_sha": "57c372782935233c45b00c32cc9d40e6cc0a2949", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "repeats": 2, + "repository": "pygments/pygments", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm@sha256:6fb6f383deefbf9de105ce6d7a59fce0f8fa65c7afdf5a1222eafae14f81a27b", + "bootstrap_command": [ + "/bin/sh", + "-ec", + "uv pip install --python /opt/venv/bin/python --only-binary=:all: 'hatchling==1.27.0' 'editables==0.5' && uv pip install --python /opt/venv/bin/python --no-deps --only-binary=:all: 'pytest==8.4.2' 'pytest-randomly==4.0.1' 'iniconfig==2.1.0' && uv pip install --python /opt/venv/bin/python --no-deps 'wcag-contrast-ratio==0.9' && uv pip freeze --python /opt/venv/bin/python > /opt/patcheval-requirements.txt" + ], + "environment": [ + "HOME=/home/node", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "UV_CACHE_DIR=/tmp/uv-cache", + "UV_OFFLINE=1", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "PYTHONPATH=/workspace/repo", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONUNBUFFERED=1", + "PYTHONHASHSEED=0", + "PYTHON_COLORS=0", + "NO_COLOR=1", + "TERM=dumb", + "COLUMNS=80", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TZ=UTC" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable . && uv pip check --python /opt/venv/bin/python" + ], + "sync_command": [ + "uv", + "venv", + "--python", + "/usr/local/bin/python", + "/opt/venv" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache" + ], + "timeout_s": 900 + }, + "schema_version": 1, + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable . && uv pip check --python /opt/venv/bin/python" + ], + "task_id": "pygments-2816", + "validated": true +} diff --git a/attestations/pygments-2828.json b/attestations/pygments-2828.json new file mode 100644 index 0000000000000000000000000000000000000000..bfd28fae3deea1c38ee511f3b0c89119c79e2b9c --- /dev/null +++ b/attestations/pygments-2828.json @@ -0,0 +1,287 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/snippets/jsonnet/test_array_slice.txt" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "429b206650869850f8fcdd4d6ca02aeb27deab6e05c15cc341dc314ec81da163", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_________________ tests/snippets/jsonnet/test_array_slice.txt __________________\nThe tokens produced by the \"jsonnet\" lexer differ from the expected ones in the file \"tests/snippets/jsonnet/test_array_slice.txt\".\nRun `tox -- tests/snippets --update-goldens` to update it.\n\n \n Skipping 1378 identical leading characters in diff, use -v to show\n - Operator\n ? ^^^ ^^\n + Error\n ? ^ ^\n - ':' Operator...\n \n ...Full output truncated (10 lines hidden), use '-vv' to show\n=========================== short test summary info ============================\nFAILED tests/snippets/jsonnet/test_array_slice.txt::\n1 failed in 0.05s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "9e706827ceac6c38980f5faee3e107494588ce9e08e09fa87a239014445be3e1", + "output_tail": "....................................... [ 33%]\n........................................................................ [ 35%]\n........................................................................ [ 36%]\n........................................................................ [ 37%]\n........................................................................ [ 39%]\n........................................................................ [ 40%]\n........................................................................ [ 41%]\n........................................................................ [ 43%]\n........................................................................ [ 44%]\n........................................................................ [ 45%]\n........................................................................ [ 47%]\n........................................................................ [ 48%]\n........................................................................ [ 50%]\n........................................................................ [ 51%]\n........................................................................ [ 52%]\n........................................................................ [ 54%]\n........................................................................ [ 55%]\n........................................................................ [ 56%]\n........................................................................ [ 58%]\n........................................s............................... [ 59%]\n.....................................s.............................s.... [ 60%]\n........................................................................ [ 62%]\n........................................................................ [ 63%]\n..................................................................s..... [ 64%]\n........................................................................ [ 66%]\n........................................................................ [ 67%]\n........................................................................ [ 68%]\n........................................................................ [ 70%]\n........................................................................ [ 71%]\n........................................................................ [ 73%]\n........................................................................ [ 74%]\n........................................................................ [ 75%]\n........................................................................ [ 77%]\n........................................................................ [ 78%]\n........................................................................ [ 79%]\n........................................................................ [ 81%]\n........................................................................ [ 82%]\n........................................................................ [ 83%]\n........................................................................ [ 85%]\n.....................s.................................................. [ 86%]\n........................................................................ [ 87%]\n........................................................................ [ 89%]\n........................................................................ [ 90%]\n...............................................s........................ [ 91%]\n.........................................s.......s...................... [ 93%]\n........................................................................ [ 94%]\n........................................................................ [ 96%]\n........................................................................ [ 97%]\n........................................................................ [ 98%]\n.................................................................. [100%]\n5306 passed, 16 skipped in 15.83s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/snippets/jsonnet/test_array_slice.txt" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "ea60679e80486d2dd025dd2b21a200bfb76524c9325eccbaf2a64477ec87e5ec", + "output_tail": ". [100%]\n1 passed in 0.05s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "deeb14d0c7d9e6295df34d68d95ebbd2dc2028a4dca173cb4bdbed6415402162", + "output_tail": "....................................... [ 33%]\n........................................................................ [ 35%]\n........................................................................ [ 36%]\n........................................................................ [ 37%]\n........................................................................ [ 39%]\n........................................................................ [ 40%]\n........................................................................ [ 41%]\n........................................................................ [ 43%]\n........................................................................ [ 44%]\n........................................................................ [ 45%]\n........................................................................ [ 47%]\n........................................................................ [ 48%]\n........................................................................ [ 50%]\n........................................................................ [ 51%]\n........................................................................ [ 52%]\n........................................................................ [ 54%]\n........................................................................ [ 55%]\n........................................................................ [ 56%]\n........................................................................ [ 58%]\n........................................s............................... [ 59%]\n.....................................s.............................s.... [ 60%]\n........................................................................ [ 62%]\n........................................................................ [ 63%]\n..................................................................s..... [ 64%]\n........................................................................ [ 66%]\n........................................................................ [ 67%]\n........................................................................ [ 68%]\n........................................................................ [ 70%]\n........................................................................ [ 71%]\n........................................................................ [ 73%]\n........................................................................ [ 74%]\n........................................................................ [ 75%]\n........................................................................ [ 77%]\n........................................................................ [ 78%]\n........................................................................ [ 79%]\n........................................................................ [ 81%]\n........................................................................ [ 82%]\n........................................................................ [ 83%]\n........................................................................ [ 85%]\n.....................s.................................................. [ 86%]\n........................................................................ [ 87%]\n........................................................................ [ 89%]\n........................................................................ [ 90%]\n...............................................s........................ [ 91%]\n.........................................s.......s...................... [ 93%]\n........................................................................ [ 94%]\n........................................................................ [ 96%]\n........................................................................ [ 97%]\n........................................................................ [ 98%]\n.................................................................. [100%]\n5306 passed, 16 skipped in 15.75s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/snippets/jsonnet/test_array_slice.txt" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "429b206650869850f8fcdd4d6ca02aeb27deab6e05c15cc341dc314ec81da163", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_________________ tests/snippets/jsonnet/test_array_slice.txt __________________\nThe tokens produced by the \"jsonnet\" lexer differ from the expected ones in the file \"tests/snippets/jsonnet/test_array_slice.txt\".\nRun `tox -- tests/snippets --update-goldens` to update it.\n\n \n Skipping 1378 identical leading characters in diff, use -v to show\n - Operator\n ? ^^^ ^^\n + Error\n ? ^ ^\n - ':' Operator...\n \n ...Full output truncated (10 lines hidden), use '-vv' to show\n=========================== short test summary info ============================\nFAILED tests/snippets/jsonnet/test_array_slice.txt::\n1 failed in 0.05s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "aab97c6ad6bae62c9dd78296c2110190fb964908f83a584c98fecfed104ad938", + "output_tail": "....................................... [ 33%]\n........................................................................ [ 35%]\n........................................................................ [ 36%]\n........................................................................ [ 37%]\n........................................................................ [ 39%]\n........................................................................ [ 40%]\n........................................................................ [ 41%]\n........................................................................ [ 43%]\n........................................................................ [ 44%]\n........................................................................ [ 45%]\n........................................................................ [ 47%]\n........................................................................ [ 48%]\n........................................................................ [ 50%]\n........................................................................ [ 51%]\n........................................................................ [ 52%]\n........................................................................ [ 54%]\n........................................................................ [ 55%]\n........................................................................ [ 56%]\n........................................................................ [ 58%]\n........................................s............................... [ 59%]\n.....................................s.............................s.... [ 60%]\n........................................................................ [ 62%]\n........................................................................ [ 63%]\n..................................................................s..... [ 64%]\n........................................................................ [ 66%]\n........................................................................ [ 67%]\n........................................................................ [ 68%]\n........................................................................ [ 70%]\n........................................................................ [ 71%]\n........................................................................ [ 73%]\n........................................................................ [ 74%]\n........................................................................ [ 75%]\n........................................................................ [ 77%]\n........................................................................ [ 78%]\n........................................................................ [ 79%]\n........................................................................ [ 81%]\n........................................................................ [ 82%]\n........................................................................ [ 83%]\n........................................................................ [ 85%]\n.....................s.................................................. [ 86%]\n........................................................................ [ 87%]\n........................................................................ [ 89%]\n........................................................................ [ 90%]\n...............................................s........................ [ 91%]\n.........................................s.......s...................... [ 93%]\n........................................................................ [ 94%]\n........................................................................ [ 96%]\n........................................................................ [ 97%]\n........................................................................ [ 98%]\n.................................................................. [100%]\n5306 passed, 16 skipped in 15.90s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/snippets/jsonnet/test_array_slice.txt" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "ea60679e80486d2dd025dd2b21a200bfb76524c9325eccbaf2a64477ec87e5ec", + "output_tail": ". [100%]\n1 passed in 0.05s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "b8e9c525fc187e1bb73991d7141bb1a50f505dd226bed789db187730e954d62d", + "output_tail": "....................................... [ 33%]\n........................................................................ [ 35%]\n........................................................................ [ 36%]\n........................................................................ [ 37%]\n........................................................................ [ 39%]\n........................................................................ [ 40%]\n........................................................................ [ 41%]\n........................................................................ [ 43%]\n........................................................................ [ 44%]\n........................................................................ [ 45%]\n........................................................................ [ 47%]\n........................................................................ [ 48%]\n........................................................................ [ 50%]\n........................................................................ [ 51%]\n........................................................................ [ 52%]\n........................................................................ [ 54%]\n........................................................................ [ 55%]\n........................................................................ [ 56%]\n........................................................................ [ 58%]\n........................................s............................... [ 59%]\n.....................................s.............................s.... [ 60%]\n........................................................................ [ 62%]\n........................................................................ [ 63%]\n..................................................................s..... [ 64%]\n........................................................................ [ 66%]\n........................................................................ [ 67%]\n........................................................................ [ 68%]\n........................................................................ [ 70%]\n........................................................................ [ 71%]\n........................................................................ [ 73%]\n........................................................................ [ 74%]\n........................................................................ [ 75%]\n........................................................................ [ 77%]\n........................................................................ [ 78%]\n........................................................................ [ 79%]\n........................................................................ [ 81%]\n........................................................................ [ 82%]\n........................................................................ [ 83%]\n........................................................................ [ 85%]\n.....................s.................................................. [ 86%]\n........................................................................ [ 87%]\n........................................................................ [ 89%]\n........................................................................ [ 90%]\n...............................................s........................ [ 91%]\n.........................................s.......s...................... [ 93%]\n........................................................................ [ 94%]\n........................................................................ [ 96%]\n........................................................................ [ 97%]\n........................................................................ [ 98%]\n.................................................................. [100%]\n5306 passed, 16 skipped in 15.85s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/snippets/jsonnet/test_array_slice.txt" + ], + "fix_sha": "e1d0cd038c7e7d241ff1b0c7c5ee84c210ddbbd8", + "local_image": "patcheval-validate:pygments-2828", + "local_image_id": "sha256:b429995afa96421b6e14a4920c6afecfb07f9540ce5b33917bbdf1d17d201930", + "parent_sha": "86ee7c61a5333c9136f6e12e2b128e17d4f5ef16", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "repeats": 2, + "repository": "pygments/pygments", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm@sha256:6fb6f383deefbf9de105ce6d7a59fce0f8fa65c7afdf5a1222eafae14f81a27b", + "bootstrap_command": [ + "/bin/sh", + "-ec", + "uv pip install --python /opt/venv/bin/python --only-binary=:all: 'hatchling==1.27.0' 'editables==0.5' && uv pip install --python /opt/venv/bin/python --no-deps --only-binary=:all: 'pytest==8.4.2' 'pytest-randomly==4.0.1' 'iniconfig==2.1.0' && uv pip install --python /opt/venv/bin/python --no-deps 'wcag-contrast-ratio==0.9' && uv pip freeze --python /opt/venv/bin/python > /opt/patcheval-requirements.txt" + ], + "environment": [ + "HOME=/home/node", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "UV_CACHE_DIR=/tmp/uv-cache", + "UV_OFFLINE=1", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "PYTHONPATH=/workspace/repo", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONUNBUFFERED=1", + "PYTHONHASHSEED=0", + "PYTHON_COLORS=0", + "NO_COLOR=1", + "TERM=dumb", + "COLUMNS=80", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TZ=UTC" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests" + ], + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable . && uv pip check --python /opt/venv/bin/python" + ], + "sync_command": [ + "uv", + "venv", + "--python", + "/usr/local/bin/python", + "/opt/venv" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q", + "-W", + "error", + "--cache-clear", + "--randomly-seed=0", + "-o", + "cache_dir=/tmp/pytest-cache" + ], + "timeout_s": 900 + }, + "schema_version": 1, + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable . && uv pip check --python /opt/venv/bin/python" + ], + "task_id": "pygments-2828", + "validated": true +} diff --git a/attestations/pypdf-3587.json b/attestations/pypdf-3587.json new file mode 100644 index 0000000000000000000000000000000000000000..24bc8f59c93e7594d2261020a3a458f3d4179947 --- /dev/null +++ b/attestations/pypdf-3587.json @@ -0,0 +1,324 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/generic/test_base.py::test_text_string_object__looks_like_bom" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "3373e2357c2a205a7913ee1abfec8af26e3aeee2eb05dbcd54121fd860acd7ca", + "output_tail": "FF [100%]\n=================================== FAILURES ===================================\n_________ test_text_string_object__looks_like_bom[<00FE00FF>-\\xfe\\xff] _________\n\nsource = b'<00FE00FF>', expected = '\u00fe\u00ff'\n\n @pytest.mark.parametrize(\n (\"source\", \"expected\"),\n [\n (b\"<00FE00FF>\", \"\\xfe\\xff\"),\n (b\"<00FE00FF00D6>\", \"\\xfe\\xff\\xd6\"),\n ]\n )\n def test_text_string_object__looks_like_bom(source: bytes, expected: str) -> None:\n stream = BytesIO(source)\n> result = read_hex_string_from_stream(stream)\n\ntests/generic/test_base.py:20: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \npypdf/generic/_utils.py:35: in read_hex_string_from_stream\n return create_string_object(bytes(arr), forced_encoding)\npypdf/generic/_utils.py:168: in create_string_object\n retval = TextStringObject(string.decode(\"utf-16be\"))\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\ncls = , value = '\u00fe\u00ff'\n\n def __new__(cls, value: Any) -> \"TextStringObject\":\n org = None\n if isinstance(value, bytes):\n org = value\n value = value.decode(\"charmap\")\n o = str.__new__(cls, value)\n o._original_bytes = org\n o.autodetect_utf16 = False\n o.autodetect_pdfdocencoding = False\n o.utf16_bom = b\"\"\n if o.startswith((\"\\xfe\\xff\", \"\\xff\\xfe\")):\n> assert org is not None, \"mypy\"\nE AssertionError: mypy\n\npypdf/generic/_base.py:673: AssertionError\n_____ test_text_string_object__looks_like_bom[<00FE00FF00D6>-\\xfe\\xff\\xd6] _____\n\nsource = b'<00FE00FF00D6>', expected = '\u00fe\u00ff\u00d6'\n\n @pytest.mark.parametrize(\n (\"source\", \"expected\"),\n [\n (b\"<00FE00FF>\", \"\\xfe\\xff\"),\n (b\"<00FE00FF00D6>\", \"\\xfe\\xff\\xd6\"),\n ]\n )\n def test_text_string_object__looks_like_bom(source: bytes, expected: str) -> None:\n stream = BytesIO(source)\n> result = read_hex_string_from_stream(stream)\n\ntests/generic/test_base.py:20: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \npypdf/generic/_utils.py:35: in read_hex_string_from_stream\n return create_string_object(bytes(arr), forced_encoding)\npypdf/generic/_utils.py:168: in create_string_object\n retval = TextStringObject(string.decode(\"utf-16be\"))\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\ncls = , value = '\u00fe\u00ff\u00d6'\n\n def __new__(cls, value: Any) -> \"TextStringObject\":\n org = None\n if isinstance(value, bytes):\n org = value\n value = value.decode(\"charmap\")\n o = str.__new__(cls, value)\n o._original_bytes = org\n o.autodetect_utf16 = False\n o.autodetect_pdfdocencoding = False\n o.utf16_bom = b\"\"\n if o.startswith((\"\\xfe\\xff\", \"\\xff\\xfe\")):\n> assert org is not None, \"mypy\"\nE AssertionError: mypy\n\npypdf/generic/_base.py:673: AssertionError\n=========================== short test summary info ============================\nFAILED tests/generic/test_base.py::test_text_string_object__looks_like_bom[<00FE00FF>-\\xfe\\xff]\nFAILED tests/generic/test_base.py::test_text_string_object__looks_like_bom[<00FE00FF00D6>-\\xfe\\xff\\xd6]\n2 failed in 0.05s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "74f969dc2edff37d7c89d3f3f79e230d48cded9d737aba740f3680c973819650", + "output_tail": "s....................................................................... [ 10%]\ns......................s..............................................s. [ 21%]\n........................................................................ [ 32%]\n........................................................................ [ 42%]\n........................................................................ [ 53%]\n........................................................................ [ 64%]\n........................................................................ [ 74%]\n........................................................................ [ 85%]\n........................................................................ [ 96%]\n.......................... [100%]\n670 passed, 4 skipped, 420 deselected in 9.54s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/generic/test_base.py::test_text_string_object__looks_like_bom" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "2a65b3e70e6bfbb4eb9b9ffb91f4dcd6383e685bd1546efd5b451c200a907c28", + "output_tail": ".. [100%]\n2 passed in 0.01s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "4d15e8291fb2727d0cf66049e01b80f8e02ac2f2556e776df0ace486064de6d5", + "output_tail": "s....................................................................... [ 10%]\ns......................s..............................................s. [ 21%]\n........................................................................ [ 32%]\n........................................................................ [ 42%]\n........................................................................ [ 53%]\n........................................................................ [ 64%]\n........................................................................ [ 74%]\n........................................................................ [ 85%]\n........................................................................ [ 96%]\n.......................... [100%]\n670 passed, 4 skipped, 420 deselected in 9.27s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/generic/test_base.py::test_text_string_object__looks_like_bom" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "3373e2357c2a205a7913ee1abfec8af26e3aeee2eb05dbcd54121fd860acd7ca", + "output_tail": "FF [100%]\n=================================== FAILURES ===================================\n_________ test_text_string_object__looks_like_bom[<00FE00FF>-\\xfe\\xff] _________\n\nsource = b'<00FE00FF>', expected = '\u00fe\u00ff'\n\n @pytest.mark.parametrize(\n (\"source\", \"expected\"),\n [\n (b\"<00FE00FF>\", \"\\xfe\\xff\"),\n (b\"<00FE00FF00D6>\", \"\\xfe\\xff\\xd6\"),\n ]\n )\n def test_text_string_object__looks_like_bom(source: bytes, expected: str) -> None:\n stream = BytesIO(source)\n> result = read_hex_string_from_stream(stream)\n\ntests/generic/test_base.py:20: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \npypdf/generic/_utils.py:35: in read_hex_string_from_stream\n return create_string_object(bytes(arr), forced_encoding)\npypdf/generic/_utils.py:168: in create_string_object\n retval = TextStringObject(string.decode(\"utf-16be\"))\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\ncls = , value = '\u00fe\u00ff'\n\n def __new__(cls, value: Any) -> \"TextStringObject\":\n org = None\n if isinstance(value, bytes):\n org = value\n value = value.decode(\"charmap\")\n o = str.__new__(cls, value)\n o._original_bytes = org\n o.autodetect_utf16 = False\n o.autodetect_pdfdocencoding = False\n o.utf16_bom = b\"\"\n if o.startswith((\"\\xfe\\xff\", \"\\xff\\xfe\")):\n> assert org is not None, \"mypy\"\nE AssertionError: mypy\n\npypdf/generic/_base.py:673: AssertionError\n_____ test_text_string_object__looks_like_bom[<00FE00FF00D6>-\\xfe\\xff\\xd6] _____\n\nsource = b'<00FE00FF00D6>', expected = '\u00fe\u00ff\u00d6'\n\n @pytest.mark.parametrize(\n (\"source\", \"expected\"),\n [\n (b\"<00FE00FF>\", \"\\xfe\\xff\"),\n (b\"<00FE00FF00D6>\", \"\\xfe\\xff\\xd6\"),\n ]\n )\n def test_text_string_object__looks_like_bom(source: bytes, expected: str) -> None:\n stream = BytesIO(source)\n> result = read_hex_string_from_stream(stream)\n\ntests/generic/test_base.py:20: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \npypdf/generic/_utils.py:35: in read_hex_string_from_stream\n return create_string_object(bytes(arr), forced_encoding)\npypdf/generic/_utils.py:168: in create_string_object\n retval = TextStringObject(string.decode(\"utf-16be\"))\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\ncls = , value = '\u00fe\u00ff\u00d6'\n\n def __new__(cls, value: Any) -> \"TextStringObject\":\n org = None\n if isinstance(value, bytes):\n org = value\n value = value.decode(\"charmap\")\n o = str.__new__(cls, value)\n o._original_bytes = org\n o.autodetect_utf16 = False\n o.autodetect_pdfdocencoding = False\n o.utf16_bom = b\"\"\n if o.startswith((\"\\xfe\\xff\", \"\\xff\\xfe\")):\n> assert org is not None, \"mypy\"\nE AssertionError: mypy\n\npypdf/generic/_base.py:673: AssertionError\n=========================== short test summary info ============================\nFAILED tests/generic/test_base.py::test_text_string_object__looks_like_bom[<00FE00FF>-\\xfe\\xff]\nFAILED tests/generic/test_base.py::test_text_string_object__looks_like_bom[<00FE00FF00D6>-\\xfe\\xff\\xd6]\n2 failed in 0.05s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "b71ccfdc049b2e4486cb732e649689654590303e2f68a22c7688e47dc5daad71", + "output_tail": "s....................................................................... [ 10%]\ns......................s..............................................s. [ 21%]\n........................................................................ [ 32%]\n........................................................................ [ 42%]\n........................................................................ [ 53%]\n........................................................................ [ 64%]\n........................................................................ [ 74%]\n........................................................................ [ 85%]\n........................................................................ [ 96%]\n.......................... [100%]\n670 passed, 4 skipped, 420 deselected in 9.29s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/generic/test_base.py::test_text_string_object__looks_like_bom" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "2a65b3e70e6bfbb4eb9b9ffb91f4dcd6383e685bd1546efd5b451c200a907c28", + "output_tail": ".. [100%]\n2 passed in 0.01s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "2ed254912446d77e77b4a51e4abf654761b88c5869f62fadd9e227e961e51e74", + "output_tail": "s....................................................................... [ 10%]\ns......................s..............................................s. [ 21%]\n........................................................................ [ 32%]\n........................................................................ [ 42%]\n........................................................................ [ 53%]\n........................................................................ [ 64%]\n........................................................................ [ 74%]\n........................................................................ [ 85%]\n........................................................................ [ 96%]\n.......................... [100%]\n670 passed, 4 skipped, 420 deselected in 9.34s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/generic/test_base.py::test_text_string_object__looks_like_bom" + ], + "fix_sha": "a29e5326f543f93c4c317cf9f92df54aff68c584", + "local_image": "patcheval-validate:pypdf-3587", + "local_image_id": "sha256:44e05bd6386f4917ead4a3183dfb5bd9db18629238559eefa9748c58b3cb6dcc", + "parent_sha": "d9ce594772717fdcfcd505d0309843461579bbf7", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "repeats": 2, + "repository": "py-pdf/pypdf", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.11-bookworm-slim@sha256:c418e44ef43dd40b5b0c7f03f870271c53af58fce137201c0959386a631cb3a1", + "bootstrap_command": [ + "uv", + "pip", + "install", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--only-binary", + ":all:", + "flit_core==3.11.0", + "pygments==2.19.2" + ], + "environment": [ + "PYTHONPATH=/workspace/repo", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONUNBUFFERED=1", + "PYTHONHASHSEED=0", + "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "TZ=UTC", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "sync_command": [ + "/bin/sh", + "-c", + "python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary :all: -r requirements/ci-3.11.txt" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache" + ], + "timeout_s": 1200 + }, + "schema_version": 1, + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "task_id": "pypdf-3587", + "validated": true +} diff --git a/attestations/pypdf-3878.json b/attestations/pypdf-3878.json new file mode 100644 index 0000000000000000000000000000000000000000..db7c009ac419dd668a542cc8d58f30d2ea5eca32 --- /dev/null +++ b/attestations/pypdf-3878.json @@ -0,0 +1,324 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "a6e57e6690ca3ae2b3cae2b71b447f729ad7afb49fc7551b5de5404be72cbf48", + "output_tail": "[(0, [\"Body\", \"End\"]), (1, [\"Cover\", \"End\"]), (2, [\"Cover\", \"Body\"])],\n )\n def test_remove_from_tree_on_outline_item(index: int, expected: list[str]) -> None:\n \"\"\"\n reader.outline and writer.outline yield detached copies which never carry\n /Parent, so removal has to act on the node they were built from.\n \"\"\"\n writer = PdfWriter(clone_from=PdfReader(_outlined_pdf()))\n \n> _flat_outline(writer.outline)[index].remove_from_tree()\n\ntests/generic/test_data_structures.py:535: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = {'/Title': 'Cover', '/Page': IndirectObject(3, 0, 139786617881488), '/Type': '/Fit', '/Count': 0, '/%is_open%': True}\n\n def remove_from_tree(self) -> None:\n \"\"\"Remove the object from the tree it is in.\"\"\"\n if NameObject(\"/Parent\") not in self:\n> raise ValueError(\"Removed child does not appear to be a tree item\")\nE ValueError: Removed child does not appear to be a tree item\n\npypdf/generic/_data_structures.py:934: ValueError\n______________ test_remove_from_tree_on_outline_item[1-expected1] ______________\n\nindex = 1, expected = ['Cover', 'End']\n\n @pytest.mark.parametrize(\n (\"index\", \"expected\"),\n [(0, [\"Body\", \"End\"]), (1, [\"Cover\", \"End\"]), (2, [\"Cover\", \"Body\"])],\n )\n def test_remove_from_tree_on_outline_item(index: int, expected: list[str]) -> None:\n \"\"\"\n reader.outline and writer.outline yield detached copies which never carry\n /Parent, so removal has to act on the node they were built from.\n \"\"\"\n writer = PdfWriter(clone_from=PdfReader(_outlined_pdf()))\n \n> _flat_outline(writer.outline)[index].remove_from_tree()\n\ntests/generic/test_data_structures.py:535: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = {'/Title': 'Body', '/Page': IndirectObject(4, 0, 139786622383248), '/Type': '/Fit', '/Count': 0, '/%is_open%': True}\n\n def remove_from_tree(self) -> None:\n \"\"\"Remove the object from the tree it is in.\"\"\"\n if NameObject(\"/Parent\") not in self:\n> raise ValueError(\"Removed child does not appear to be a tree item\")\nE ValueError: Removed child does not appear to be a tree item\n\npypdf/generic/_data_structures.py:934: ValueError\n______________ test_remove_from_tree_on_outline_item[2-expected2] ______________\n\nindex = 2, expected = ['Cover', 'Body']\n\n @pytest.mark.parametrize(\n (\"index\", \"expected\"),\n [(0, [\"Body\", \"End\"]), (1, [\"Cover\", \"End\"]), (2, [\"Cover\", \"Body\"])],\n )\n def test_remove_from_tree_on_outline_item(index: int, expected: list[str]) -> None:\n \"\"\"\n reader.outline and writer.outline yield detached copies which never carry\n /Parent, so removal has to act on the node they were built from.\n \"\"\"\n writer = PdfWriter(clone_from=PdfReader(_outlined_pdf()))\n \n> _flat_outline(writer.outline)[index].remove_from_tree()\n\ntests/generic/test_data_structures.py:535: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = {'/Title': 'End', '/Page': IndirectObject(6, 0, 139786617967440), '/Type': '/Fit', '/Count': 0, '/%is_open%': True}\n\n def remove_from_tree(self) -> None:\n \"\"\"Remove the object from the tree it is in.\"\"\"\n if NameObject(\"/Parent\") not in self:\n> raise ValueError(\"Removed child does not appear to be a tree item\")\nE ValueError: Removed child does not appear to be a tree item\n\npypdf/generic/_data_structures.py:934: ValueError\n=========================== short test summary info ============================\nFAILED tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item[0-expected0]\nFAILED tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item[1-expected1]\nFAILED tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item[2-expected2]\n3 failed in 0.41s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "b9926010f5784c3c3d28128e71a69d11effa82721d2eb0f7bd052bc076ac034c", + "output_tail": ".....................s.................................................. [ 7%]\n........................................................................ [ 14%]\n...........................................s............................ [ 21%]\n................s....................................................... [ 28%]\n..................................s..................................... [ 35%]\n........................................................................ [ 42%]\n........................................................................ [ 50%]\n........................................................................ [ 57%]\n........................................................................ [ 64%]\n........................................................................ [ 71%]\n........................................................................ [ 78%]\n........................................................................ [ 85%]\n........................................................................ [ 92%]\n........................................................................ [100%]\n1004 passed, 4 skipped, 447 deselected in 18.57s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "68fe5029d7985751913631b7730a6e03897859b29a729a373d312d55f8290071", + "output_tail": "... [100%]\n3 passed in 0.29s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "283847b152c768e2a04ed241cf594b2ed1b64a213eba3da23ef869a7b9c6c41e", + "output_tail": ".....................s.................................................. [ 7%]\n........................................................................ [ 14%]\n...........................................s............................ [ 21%]\n................s....................................................... [ 28%]\n..................................s..................................... [ 35%]\n........................................................................ [ 42%]\n........................................................................ [ 50%]\n........................................................................ [ 57%]\n........................................................................ [ 64%]\n........................................................................ [ 71%]\n........................................................................ [ 78%]\n........................................................................ [ 85%]\n........................................................................ [ 92%]\n........................................................................ [100%]\n1004 passed, 4 skipped, 447 deselected in 17.87s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "395bcd494deb327fe8cdbfcfb0166900130170e60b9869903094b33df8776c67", + "output_tail": "[(0, [\"Body\", \"End\"]), (1, [\"Cover\", \"End\"]), (2, [\"Cover\", \"Body\"])],\n )\n def test_remove_from_tree_on_outline_item(index: int, expected: list[str]) -> None:\n \"\"\"\n reader.outline and writer.outline yield detached copies which never carry\n /Parent, so removal has to act on the node they were built from.\n \"\"\"\n writer = PdfWriter(clone_from=PdfReader(_outlined_pdf()))\n \n> _flat_outline(writer.outline)[index].remove_from_tree()\n\ntests/generic/test_data_structures.py:535: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = {'/Title': 'Cover', '/Page': IndirectObject(3, 0, 139937189299088), '/Type': '/Fit', '/Count': 0, '/%is_open%': True}\n\n def remove_from_tree(self) -> None:\n \"\"\"Remove the object from the tree it is in.\"\"\"\n if NameObject(\"/Parent\") not in self:\n> raise ValueError(\"Removed child does not appear to be a tree item\")\nE ValueError: Removed child does not appear to be a tree item\n\npypdf/generic/_data_structures.py:934: ValueError\n______________ test_remove_from_tree_on_outline_item[1-expected1] ______________\n\nindex = 1, expected = ['Cover', 'End']\n\n @pytest.mark.parametrize(\n (\"index\", \"expected\"),\n [(0, [\"Body\", \"End\"]), (1, [\"Cover\", \"End\"]), (2, [\"Cover\", \"Body\"])],\n )\n def test_remove_from_tree_on_outline_item(index: int, expected: list[str]) -> None:\n \"\"\"\n reader.outline and writer.outline yield detached copies which never carry\n /Parent, so removal has to act on the node they were built from.\n \"\"\"\n writer = PdfWriter(clone_from=PdfReader(_outlined_pdf()))\n \n> _flat_outline(writer.outline)[index].remove_from_tree()\n\ntests/generic/test_data_structures.py:535: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = {'/Title': 'Body', '/Page': IndirectObject(4, 0, 139937193800848), '/Type': '/Fit', '/Count': 0, '/%is_open%': True}\n\n def remove_from_tree(self) -> None:\n \"\"\"Remove the object from the tree it is in.\"\"\"\n if NameObject(\"/Parent\") not in self:\n> raise ValueError(\"Removed child does not appear to be a tree item\")\nE ValueError: Removed child does not appear to be a tree item\n\npypdf/generic/_data_structures.py:934: ValueError\n______________ test_remove_from_tree_on_outline_item[2-expected2] ______________\n\nindex = 2, expected = ['Cover', 'Body']\n\n @pytest.mark.parametrize(\n (\"index\", \"expected\"),\n [(0, [\"Body\", \"End\"]), (1, [\"Cover\", \"End\"]), (2, [\"Cover\", \"Body\"])],\n )\n def test_remove_from_tree_on_outline_item(index: int, expected: list[str]) -> None:\n \"\"\"\n reader.outline and writer.outline yield detached copies which never carry\n /Parent, so removal has to act on the node they were built from.\n \"\"\"\n writer = PdfWriter(clone_from=PdfReader(_outlined_pdf()))\n \n> _flat_outline(writer.outline)[index].remove_from_tree()\n\ntests/generic/test_data_structures.py:535: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = {'/Title': 'End', '/Page': IndirectObject(6, 0, 139937189385040), '/Type': '/Fit', '/Count': 0, '/%is_open%': True}\n\n def remove_from_tree(self) -> None:\n \"\"\"Remove the object from the tree it is in.\"\"\"\n if NameObject(\"/Parent\") not in self:\n> raise ValueError(\"Removed child does not appear to be a tree item\")\nE ValueError: Removed child does not appear to be a tree item\n\npypdf/generic/_data_structures.py:934: ValueError\n=========================== short test summary info ============================\nFAILED tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item[0-expected0]\nFAILED tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item[1-expected1]\nFAILED tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item[2-expected2]\n3 failed in 0.40s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "d67ca12e6e7248a387a87b93b2373ad56b84d3dfcec539ea644128d5a6c6c289", + "output_tail": ".....................s.................................................. [ 7%]\n........................................................................ [ 14%]\n...........................................s............................ [ 21%]\n................s....................................................... [ 28%]\n..................................s..................................... [ 35%]\n........................................................................ [ 42%]\n........................................................................ [ 50%]\n........................................................................ [ 57%]\n........................................................................ [ 64%]\n........................................................................ [ 71%]\n........................................................................ [ 78%]\n........................................................................ [ 85%]\n........................................................................ [ 92%]\n........................................................................ [100%]\n1004 passed, 4 skipped, 447 deselected in 17.96s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "fd560e5ee111b94d747480462a3602a1a45e8a926e23368a84611992be100029", + "output_tail": "... [100%]\n3 passed in 0.30s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "6fd3f6b19484aa3aa84a0f79e57912e68cda5c2ec6c980693a6aaa651668a1d1", + "output_tail": ".....................s.................................................. [ 7%]\n........................................................................ [ 14%]\n...........................................s............................ [ 21%]\n................s....................................................... [ 28%]\n..................................s..................................... [ 35%]\n........................................................................ [ 42%]\n........................................................................ [ 50%]\n........................................................................ [ 57%]\n........................................................................ [ 64%]\n........................................................................ [ 71%]\n........................................................................ [ 78%]\n........................................................................ [ 85%]\n........................................................................ [ 92%]\n........................................................................ [100%]\n1004 passed, 4 skipped, 447 deselected in 18.05s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item" + ], + "fix_sha": "f6853ccd3ff492309c84060186aabc88ed472ffd", + "local_image": "patcheval-validate:pypdf-3878", + "local_image_id": "sha256:fd2cfcb1ccb83f5f69450ea7e38e06fd52c1304fb00d99634b8158457c0dc16b", + "parent_sha": "c6d38af1c561c629cd6965f611e8afad9b445ab0", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "repeats": 2, + "repository": "py-pdf/pypdf", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.11-bookworm-slim@sha256:c418e44ef43dd40b5b0c7f03f870271c53af58fce137201c0959386a631cb3a1", + "bootstrap_command": [ + "uv", + "pip", + "install", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--only-binary", + ":all:", + "flit_core==3.11.0", + "pygments==2.19.2" + ], + "environment": [ + "PYTHONPATH=/workspace/repo", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONUNBUFFERED=1", + "PYTHONHASHSEED=0", + "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "TZ=UTC", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "sync_command": [ + "/bin/sh", + "-c", + "python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary :all: -r requirements/ci-3.11.txt" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache" + ], + "timeout_s": 1200 + }, + "schema_version": 1, + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "task_id": "pypdf-3878", + "validated": true +} diff --git a/attestations/pypdf-3982.json b/attestations/pypdf-3982.json new file mode 100644 index 0000000000000000000000000000000000000000..56f2a303fa421ac6d1836cc4175253d0b7daddc8 --- /dev/null +++ b/attestations/pypdf-3982.json @@ -0,0 +1,324 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_text_extraction.py::test_text_leading_is_not_scaled_by_font_size" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "8602706ae3c2f48d818cc06857ff67480423052883cbaf3cd856df0f31823b85", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_________________ test_text_leading_is_not_scaled_by_font_size _________________\n\n def test_text_leading_is_not_scaled_by_font_size() -> None:\n \"\"\"Tests for #3982\"\"\"\n buffer = _page_with_helvetica(\n b\"BT /F1 12 Tf 1 0 0 1 72 700 Tm 14 TL \"\n b\"(Line one) Tj T* (Line two) Tj T* (Line three) Tj ET\"\n )\n \n positions = []\n \n def visitor_text(text, cm, tm, font_dict, font_size) -> None:\n if text.strip():\n positions.append(round(tm[5], 2))\n \n text = PdfReader(buffer).pages[0].extract_text(visitor_text=visitor_text)\n \n # T* moves down by the leading itself: 14 units, not 14 * 12 (the font size).\n> assert positions == [700.0, 686.0, 672.0]\nE assert [700.0, 532.0, 364.0] == [700.0, 686.0, 672.0]\nE \nE At index 1 diff: 532.0 != 686.0\nE Use -v to get more diff\n\ntests/test_text_extraction.py:976: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_text_extraction.py::test_text_leading_is_not_scaled_by_font_size\n1 failed in 0.37s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "5a44fc3b00b3c6960cc7dba5f683e6e58dae8bf379b1c2c3af69dbd0df5ab86a", + "output_tail": ".....................s.................................................. [ 7%]\n........................................................................ [ 14%]\n...........................................s............................ [ 21%]\n................s....................................................... [ 28%]\n.............................s.......................................... [ 36%]\n........................................................................ [ 43%]\n........................................................................ [ 50%]\n........................................................................ [ 57%]\n........................................................................ [ 64%]\n........................................................................ [ 72%]\n........................................................................ [ 79%]\n........................................................................ [ 86%]\n........................................................................ [ 93%]\n................................................................ [100%]\n996 passed, 4 skipped, 447 deselected in 18.01s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_text_extraction.py::test_text_leading_is_not_scaled_by_font_size" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "36f9b18cc90a30bad27a166700623fa5c161db333e6c7175147030ec70e79272", + "output_tail": ". [100%]\n1 passed in 0.31s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "2ae49189b262cdda53327498fcd26c643ad1da7aea280a9abb448cd74880abe9", + "output_tail": ".....................s.................................................. [ 7%]\n........................................................................ [ 14%]\n...........................................s............................ [ 21%]\n................s....................................................... [ 28%]\n.............................s.......................................... [ 36%]\n........................................................................ [ 43%]\n........................................................................ [ 50%]\n........................................................................ [ 57%]\n........................................................................ [ 64%]\n........................................................................ [ 72%]\n........................................................................ [ 79%]\n........................................................................ [ 86%]\n........................................................................ [ 93%]\n................................................................ [100%]\n996 passed, 4 skipped, 447 deselected in 16.64s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_text_extraction.py::test_text_leading_is_not_scaled_by_font_size" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "6db2d65a353149466dc95a3e2732186ef9f4e5b519c60c633da7e53c5ef810b9", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_________________ test_text_leading_is_not_scaled_by_font_size _________________\n\n def test_text_leading_is_not_scaled_by_font_size() -> None:\n \"\"\"Tests for #3982\"\"\"\n buffer = _page_with_helvetica(\n b\"BT /F1 12 Tf 1 0 0 1 72 700 Tm 14 TL \"\n b\"(Line one) Tj T* (Line two) Tj T* (Line three) Tj ET\"\n )\n \n positions = []\n \n def visitor_text(text, cm, tm, font_dict, font_size) -> None:\n if text.strip():\n positions.append(round(tm[5], 2))\n \n text = PdfReader(buffer).pages[0].extract_text(visitor_text=visitor_text)\n \n # T* moves down by the leading itself: 14 units, not 14 * 12 (the font size).\n> assert positions == [700.0, 686.0, 672.0]\nE assert [700.0, 532.0, 364.0] == [700.0, 686.0, 672.0]\nE \nE At index 1 diff: 532.0 != 686.0\nE Use -v to get more diff\n\ntests/test_text_extraction.py:976: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_text_extraction.py::test_text_leading_is_not_scaled_by_font_size\n1 failed in 0.34s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "2cb4c5b825a26eddb842bc30a3973826a04bbca1e2cae9ca00cd7ebe8bc183b4", + "output_tail": ".....................s.................................................. [ 7%]\n........................................................................ [ 14%]\n...........................................s............................ [ 21%]\n................s....................................................... [ 28%]\n.............................s.......................................... [ 36%]\n........................................................................ [ 43%]\n........................................................................ [ 50%]\n........................................................................ [ 57%]\n........................................................................ [ 64%]\n........................................................................ [ 72%]\n........................................................................ [ 79%]\n........................................................................ [ 86%]\n........................................................................ [ 93%]\n................................................................ [100%]\n996 passed, 4 skipped, 447 deselected in 16.65s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_text_extraction.py::test_text_leading_is_not_scaled_by_font_size" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "36f9b18cc90a30bad27a166700623fa5c161db333e6c7175147030ec70e79272", + "output_tail": ". [100%]\n1 passed in 0.31s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "28297831dd311caea498ed8b48aa9de52cb9fcbba85d02fa1b361ec8defb9315", + "output_tail": ".....................s.................................................. [ 7%]\n........................................................................ [ 14%]\n...........................................s............................ [ 21%]\n................s....................................................... [ 28%]\n.............................s.......................................... [ 36%]\n........................................................................ [ 43%]\n........................................................................ [ 50%]\n........................................................................ [ 57%]\n........................................................................ [ 64%]\n........................................................................ [ 72%]\n........................................................................ [ 79%]\n........................................................................ [ 86%]\n........................................................................ [ 93%]\n................................................................ [100%]\n996 passed, 4 skipped, 447 deselected in 16.59s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_text_extraction.py::test_text_leading_is_not_scaled_by_font_size" + ], + "fix_sha": "31b32980f85a68c821349b006d7258044717a75e", + "local_image": "patcheval-validate:pypdf-3982", + "local_image_id": "sha256:c3215400dea9cdedbb4c4cc631bbaeb90d2c712a7409b11a892f7d8f1480912e", + "parent_sha": "7595da3201604309ab8d96afdc6f2e8bc661b3cd", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "repeats": 2, + "repository": "py-pdf/pypdf", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.11-bookworm-slim@sha256:c418e44ef43dd40b5b0c7f03f870271c53af58fce137201c0959386a631cb3a1", + "bootstrap_command": [ + "uv", + "pip", + "install", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--only-binary", + ":all:", + "flit_core==3.11.0", + "pygments==2.19.2" + ], + "environment": [ + "PYTHONPATH=/workspace/repo", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONUNBUFFERED=1", + "PYTHONHASHSEED=0", + "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "TZ=UTC", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache", + "-m", + "not enable_socket and not samples", + "tests" + ], + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "sync_command": [ + "/bin/sh", + "-c", + "python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary :all: -r requirements/ci-3.11.txt" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "pytest_socket", + "-p", + "pytest_timeout", + "--timeout=60", + "-o", + "cache_dir=/tmp/pytest-cache" + ], + "timeout_s": 1200 + }, + "schema_version": 1, + "setup_command": [ + "uv", + "pip", + "install", + "--offline", + "--python", + "/opt/venv/bin/python", + "--no-deps", + "--no-build-isolation", + "--editable", + "." + ], + "task_id": "pypdf-3982", + "validated": true +} diff --git a/attestations/sqlit-246.json b/attestations/sqlit-246.json new file mode 100644 index 0000000000000000000000000000000000000000..14700f450b92015e240cb0bc3940dea291389691 --- /dev/null +++ b/attestations/sqlit-246.json @@ -0,0 +1,240 @@ +{ + "cells": [ + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_dollar_quoted_strings", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_named_dollar_quoted_strings", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_dollar_quotes_inside_standard_strings_are_ignored" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "65e3b8057827b5083d99cfef635e8a8d40eb9c9114f2b790dc4c71b2eb542d5b", + "output_tail": "============================= test session starts ==============================\nplatform linux -- Python 3.12.11, pytest-9.0.2, pluggy-1.6.0\nrootdir: /workspace/repo\nconfigfile: pyproject.toml\nplugins: asyncio-1.3.0, timeout-2.4.0, cov-7.0.0\nasyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function\ntimeout: 60.0s\ntimeout method: signal\ntimeout func_only: False\ncollected 3 items\n\ntests/unit/test_multi_statement.py FF. [100%]\n\n=================================== FAILURES ===================================\n__ TestStatementSplitting.test_preserves_semicolons_in_dollar_quoted_strings ___\n\nself = \n\n def test_preserves_semicolons_in_dollar_quoted_strings(self):\n \"\"\"Should not split on semicolons inside dollar-quoted strings.\"\"\"\n from sqlit.domains.query.app.multi_statement import split_statements\n \n query = \"\"\"\n CREATE OR REPLACE FUNCTION example()\n RETURNS void AS $$\n BEGIN\n INSERT INTO t (x) VALUES ('a;b');\n END;\n $$ LANGUAGE plpgsql;\n SELECT 1;\n \"\"\"\n statements = split_statements(query)\n \n> assert len(statements) == 2\nE assert 4 == 2\nE + where 4 = len([\"CREATE OR REPLACE FUNCTION example()\\n RETURNS void AS $$\\n BEGIN\\n INSERT INTO t (x) VALUES ('a;b')\", 'END', '$$ LANGUAGE plpgsql', 'SELECT 1'])\n\ntests/unit/test_multi_statement.py:94: AssertionError\n_ TestStatementSplitting.test_preserves_semicolons_in_named_dollar_quoted_strings _\n\nself = \n\n def test_preserves_semicolons_in_named_dollar_quoted_strings(self):\n \"\"\"Should not split on semicolons inside named dollar-quoted strings.\"\"\"\n from sqlit.domains.query.app.multi_statement import split_statements\n \n query = \"\"\"\n CREATE OR REPLACE FUNCTION example()\n RETURNS void AS $func_tag$\n BEGIN\n INSERT INTO t (x) VALUES ('a;b');\n END;\n $func_tag$ LANGUAGE plpgsql;\n SELECT 1;\n \"\"\"\n statements = split_statements(query)\n \n> assert len(statements) == 2\nE assert 4 == 2\nE + where 4 = len([\"CREATE OR REPLACE FUNCTION example()\\n RETURNS void AS $func_tag$\\n BEGIN\\n INSERT INTO t (x) VALUES ('a;b')\", 'END', '$func_tag$ LANGUAGE plpgsql', 'SELECT 1'])\n\ntests/unit/test_multi_statement.py:113: AssertionError\n=========================== short test summary info ============================\nFAILED tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_dollar_quoted_strings\nFAILED tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_named_dollar_quoted_strings\n========================= 2 failed, 1 passed in 0.11s ==========================", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/", + "--ignore=tests/test_mssql.py", + "--ignore=tests/test_postgresql.py", + "--ignore=tests/test_mysql.py", + "--ignore=tests/test_oracle.py", + "--ignore=tests/test_mariadb.py", + "--ignore=tests/test_cockroachdb.py", + "--ignore=tests/test_turso.py", + "--ignore=tests/test_firebird.py", + "--ignore=tests/test_ssh.py", + "--ignore=tests/test_clickhouse.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "41b803858eae8b7c0414437a1500035b541f6eef55a6827f8becb82d911ad05d", + "output_tail": "ests/unit/test_connection_config_from_dict.py .......... [ 71%]\ntests/unit/test_connection_flow.py .. [ 71%]\ntests/unit/test_connection_mixin_edit.py . [ 71%]\ntests/unit/test_connection_picker_refresh.py ... [ 71%]\ntests/unit/test_docker_credential_parsing.py ........................... [ 72%]\n................................................... [ 75%]\ntests/unit/test_docker_tab_filtering.py ................ [ 76%]\ntests/unit/test_duckdb_data_files.py ................................... [ 78%]\n. [ 78%]\ntests/unit/test_editor_detection.py ........... [ 78%]\ntests/unit/test_executor_reset_on_connection_switch.py ....... [ 79%]\ntests/unit/test_extra_options_passthrough.py ....... [ 79%]\ntests/unit/test_flight_adapter.py ............................ [ 80%]\ntests/unit/test_history_store_file_backed.py ........................... [ 82%]\n [ 82%]\ntests/unit/test_incremental_rendering_numeric_range.py . [ 82%]\ntests/unit/test_install_strategy_uv.py ...... [ 82%]\ntests/unit/test_motherduck_adapter.py ........ [ 82%]\ntests/unit/test_mssql_adapter.py ........................... [ 84%]\ntests/unit/test_mssql_autocommit.py . [ 84%]\ntests/unit/test_multi_statement.py .......................... [ 85%]\ntests/unit/test_open_line.py ........ [ 86%]\ntests/unit/test_oracle_adapter.py .........s [ 86%]\ntests/unit/test_password_command.py ...... [ 86%]\ntests/unit/test_postgresql_adapter.py .. [ 87%]\ntests/unit/test_probe_port.py ..... [ 87%]\ntests/unit/test_process_worker_pickle_safety.py .... [ 87%]\ntests/unit/test_project_dir_routing.py ........................ [ 88%]\ntests/unit/test_query_alerts.py ...... [ 89%]\ntests/unit/test_query_deletion.py ..... [ 89%]\ntests/unit/test_sanitize_row.py .... [ 89%]\ntests/unit/test_schema_config_validator.py ... [ 89%]\ntests/unit/test_select_all.py .... [ 89%]\ntests/unit/test_single_statement_execution.py ............. [ 90%]\ntests/unit/test_snowflake_adapter.py ....... [ 90%]\ntests/unit/test_sqlite_returning.py ..... [ 91%]\ntests/unit/test_starred.py ............... [ 91%]\ntests/unit/test_text_object_menu.py ...... [ 92%]\ntests/unit/test_tls_adapters.py .... [ 92%]\ntests/unit/test_transaction_executor.py .. [ 92%]\ntests/unit/test_transaction_state.py .................. [ 93%]\ntests/unit/test_tunnel_paramiko_version.py .. [ 93%]\ntests/unit/test_undo_history.py ............ [ 94%]\ntests/unit/test_url_parser.py .. [ 94%]\ntests/unit/test_vim_motions.py ......................................... [ 96%]\n.... [ 96%]\ntests/unit/test_vim_operators.py ................. [ 97%]\ntests/unit/test_vim_text_objects.py .............................. [ 98%]\ntests/unit/test_vim_visual_mode.py ...................... [100%]\n\n================ 1561 passed, 408 skipped in 159.81s (0:02:39) =================", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_dollar_quoted_strings", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_named_dollar_quoted_strings", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_dollar_quotes_inside_standard_strings_are_ignored" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "6b466224bd7794c5b86e10e94f6450433e1d35b604c15568967a21f006d4ee94", + "output_tail": "============================= test session starts ==============================\nplatform linux -- Python 3.12.11, pytest-9.0.2, pluggy-1.6.0\nrootdir: /workspace/repo\nconfigfile: pyproject.toml\nplugins: asyncio-1.3.0, timeout-2.4.0, cov-7.0.0\nasyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function\ntimeout: 60.0s\ntimeout method: signal\ntimeout func_only: False\ncollected 3 items\n\ntests/unit/test_multi_statement.py ... [100%]\n\n============================== 3 passed in 0.09s ===============================", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/", + "--ignore=tests/test_mssql.py", + "--ignore=tests/test_postgresql.py", + "--ignore=tests/test_mysql.py", + "--ignore=tests/test_oracle.py", + "--ignore=tests/test_mariadb.py", + "--ignore=tests/test_cockroachdb.py", + "--ignore=tests/test_turso.py", + "--ignore=tests/test_firebird.py", + "--ignore=tests/test_ssh.py", + "--ignore=tests/test_clickhouse.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "9015433579e57163ff836ee77f722de9bcad2cc4d4f5e5646ee787ea633133ff", + "output_tail": "ests/unit/test_connection_config_from_dict.py .......... [ 71%]\ntests/unit/test_connection_flow.py .. [ 71%]\ntests/unit/test_connection_mixin_edit.py . [ 71%]\ntests/unit/test_connection_picker_refresh.py ... [ 71%]\ntests/unit/test_docker_credential_parsing.py ........................... [ 72%]\n................................................... [ 75%]\ntests/unit/test_docker_tab_filtering.py ................ [ 76%]\ntests/unit/test_duckdb_data_files.py ................................... [ 78%]\n. [ 78%]\ntests/unit/test_editor_detection.py ........... [ 78%]\ntests/unit/test_executor_reset_on_connection_switch.py ....... [ 79%]\ntests/unit/test_extra_options_passthrough.py ....... [ 79%]\ntests/unit/test_flight_adapter.py ............................ [ 80%]\ntests/unit/test_history_store_file_backed.py ........................... [ 82%]\n [ 82%]\ntests/unit/test_incremental_rendering_numeric_range.py . [ 82%]\ntests/unit/test_install_strategy_uv.py ...... [ 82%]\ntests/unit/test_motherduck_adapter.py ........ [ 82%]\ntests/unit/test_mssql_adapter.py ........................... [ 84%]\ntests/unit/test_mssql_autocommit.py . [ 84%]\ntests/unit/test_multi_statement.py .......................... [ 85%]\ntests/unit/test_open_line.py ........ [ 86%]\ntests/unit/test_oracle_adapter.py .........s [ 86%]\ntests/unit/test_password_command.py ...... [ 86%]\ntests/unit/test_postgresql_adapter.py .. [ 87%]\ntests/unit/test_probe_port.py ..... [ 87%]\ntests/unit/test_process_worker_pickle_safety.py .... [ 87%]\ntests/unit/test_project_dir_routing.py ........................ [ 88%]\ntests/unit/test_query_alerts.py ...... [ 89%]\ntests/unit/test_query_deletion.py ..... [ 89%]\ntests/unit/test_sanitize_row.py .... [ 89%]\ntests/unit/test_schema_config_validator.py ... [ 89%]\ntests/unit/test_select_all.py .... [ 89%]\ntests/unit/test_single_statement_execution.py ............. [ 90%]\ntests/unit/test_snowflake_adapter.py ....... [ 90%]\ntests/unit/test_sqlite_returning.py ..... [ 91%]\ntests/unit/test_starred.py ............... [ 91%]\ntests/unit/test_text_object_menu.py ...... [ 92%]\ntests/unit/test_tls_adapters.py .... [ 92%]\ntests/unit/test_transaction_executor.py .. [ 92%]\ntests/unit/test_transaction_state.py .................. [ 93%]\ntests/unit/test_tunnel_paramiko_version.py .. [ 93%]\ntests/unit/test_undo_history.py ............ [ 94%]\ntests/unit/test_url_parser.py .. [ 94%]\ntests/unit/test_vim_motions.py ......................................... [ 96%]\n.... [ 96%]\ntests/unit/test_vim_operators.py ................. [ 97%]\ntests/unit/test_vim_text_objects.py .............................. [ 98%]\ntests/unit/test_vim_visual_mode.py ...................... [100%]\n\n================ 1561 passed, 408 skipped in 156.64s (0:02:36) =================", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_dollar_quoted_strings", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_named_dollar_quoted_strings", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_dollar_quotes_inside_standard_strings_are_ignored" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "e988815a93d2937f7bc4d6b680e6db05dffc8ebfb455cec6e7b17d3264c695d5", + "output_tail": "============================= test session starts ==============================\nplatform linux -- Python 3.12.11, pytest-9.0.2, pluggy-1.6.0\nrootdir: /workspace/repo\nconfigfile: pyproject.toml\nplugins: asyncio-1.3.0, timeout-2.4.0, cov-7.0.0\nasyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function\ntimeout: 60.0s\ntimeout method: signal\ntimeout func_only: False\ncollected 3 items\n\ntests/unit/test_multi_statement.py FF. [100%]\n\n=================================== FAILURES ===================================\n__ TestStatementSplitting.test_preserves_semicolons_in_dollar_quoted_strings ___\n\nself = \n\n def test_preserves_semicolons_in_dollar_quoted_strings(self):\n \"\"\"Should not split on semicolons inside dollar-quoted strings.\"\"\"\n from sqlit.domains.query.app.multi_statement import split_statements\n \n query = \"\"\"\n CREATE OR REPLACE FUNCTION example()\n RETURNS void AS $$\n BEGIN\n INSERT INTO t (x) VALUES ('a;b');\n END;\n $$ LANGUAGE plpgsql;\n SELECT 1;\n \"\"\"\n statements = split_statements(query)\n \n> assert len(statements) == 2\nE assert 4 == 2\nE + where 4 = len([\"CREATE OR REPLACE FUNCTION example()\\n RETURNS void AS $$\\n BEGIN\\n INSERT INTO t (x) VALUES ('a;b')\", 'END', '$$ LANGUAGE plpgsql', 'SELECT 1'])\n\ntests/unit/test_multi_statement.py:94: AssertionError\n_ TestStatementSplitting.test_preserves_semicolons_in_named_dollar_quoted_strings _\n\nself = \n\n def test_preserves_semicolons_in_named_dollar_quoted_strings(self):\n \"\"\"Should not split on semicolons inside named dollar-quoted strings.\"\"\"\n from sqlit.domains.query.app.multi_statement import split_statements\n \n query = \"\"\"\n CREATE OR REPLACE FUNCTION example()\n RETURNS void AS $func_tag$\n BEGIN\n INSERT INTO t (x) VALUES ('a;b');\n END;\n $func_tag$ LANGUAGE plpgsql;\n SELECT 1;\n \"\"\"\n statements = split_statements(query)\n \n> assert len(statements) == 2\nE assert 4 == 2\nE + where 4 = len([\"CREATE OR REPLACE FUNCTION example()\\n RETURNS void AS $func_tag$\\n BEGIN\\n INSERT INTO t (x) VALUES ('a;b')\", 'END', '$func_tag$ LANGUAGE plpgsql', 'SELECT 1'])\n\ntests/unit/test_multi_statement.py:113: AssertionError\n=========================== short test summary info ============================\nFAILED tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_dollar_quoted_strings\nFAILED tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_named_dollar_quoted_strings\n========================= 2 failed, 1 passed in 0.11s ==========================", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/", + "--ignore=tests/test_mssql.py", + "--ignore=tests/test_postgresql.py", + "--ignore=tests/test_mysql.py", + "--ignore=tests/test_oracle.py", + "--ignore=tests/test_mariadb.py", + "--ignore=tests/test_cockroachdb.py", + "--ignore=tests/test_turso.py", + "--ignore=tests/test_firebird.py", + "--ignore=tests/test_ssh.py", + "--ignore=tests/test_clickhouse.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "b0279395f719172365fd2873cbcd73ae1c71e0e38626d7af83b29a792d6c6569", + "output_tail": "ests/unit/test_connection_config_from_dict.py .......... [ 71%]\ntests/unit/test_connection_flow.py .. [ 71%]\ntests/unit/test_connection_mixin_edit.py . [ 71%]\ntests/unit/test_connection_picker_refresh.py ... [ 71%]\ntests/unit/test_docker_credential_parsing.py ........................... [ 72%]\n................................................... [ 75%]\ntests/unit/test_docker_tab_filtering.py ................ [ 76%]\ntests/unit/test_duckdb_data_files.py ................................... [ 78%]\n. [ 78%]\ntests/unit/test_editor_detection.py ........... [ 78%]\ntests/unit/test_executor_reset_on_connection_switch.py ....... [ 79%]\ntests/unit/test_extra_options_passthrough.py ....... [ 79%]\ntests/unit/test_flight_adapter.py ............................ [ 80%]\ntests/unit/test_history_store_file_backed.py ........................... [ 82%]\n [ 82%]\ntests/unit/test_incremental_rendering_numeric_range.py . [ 82%]\ntests/unit/test_install_strategy_uv.py ...... [ 82%]\ntests/unit/test_motherduck_adapter.py ........ [ 82%]\ntests/unit/test_mssql_adapter.py ........................... [ 84%]\ntests/unit/test_mssql_autocommit.py . [ 84%]\ntests/unit/test_multi_statement.py .......................... [ 85%]\ntests/unit/test_open_line.py ........ [ 86%]\ntests/unit/test_oracle_adapter.py .........s [ 86%]\ntests/unit/test_password_command.py ...... [ 86%]\ntests/unit/test_postgresql_adapter.py .. [ 87%]\ntests/unit/test_probe_port.py ..... [ 87%]\ntests/unit/test_process_worker_pickle_safety.py .... [ 87%]\ntests/unit/test_project_dir_routing.py ........................ [ 88%]\ntests/unit/test_query_alerts.py ...... [ 89%]\ntests/unit/test_query_deletion.py ..... [ 89%]\ntests/unit/test_sanitize_row.py .... [ 89%]\ntests/unit/test_schema_config_validator.py ... [ 89%]\ntests/unit/test_select_all.py .... [ 89%]\ntests/unit/test_single_statement_execution.py ............. [ 90%]\ntests/unit/test_snowflake_adapter.py ....... [ 90%]\ntests/unit/test_sqlite_returning.py ..... [ 91%]\ntests/unit/test_starred.py ............... [ 91%]\ntests/unit/test_text_object_menu.py ...... [ 92%]\ntests/unit/test_tls_adapters.py .... [ 92%]\ntests/unit/test_transaction_executor.py .. [ 92%]\ntests/unit/test_transaction_state.py .................. [ 93%]\ntests/unit/test_tunnel_paramiko_version.py .. [ 93%]\ntests/unit/test_undo_history.py ............ [ 94%]\ntests/unit/test_url_parser.py .. [ 94%]\ntests/unit/test_vim_motions.py ......................................... [ 96%]\n.... [ 96%]\ntests/unit/test_vim_operators.py ................. [ 97%]\ntests/unit/test_vim_text_objects.py .............................. [ 98%]\ntests/unit/test_vim_visual_mode.py ...................... [100%]\n\n================ 1561 passed, 408 skipped in 157.65s (0:02:37) =================", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_dollar_quoted_strings", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_named_dollar_quoted_strings", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_dollar_quotes_inside_standard_strings_are_ignored" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "6b466224bd7794c5b86e10e94f6450433e1d35b604c15568967a21f006d4ee94", + "output_tail": "============================= test session starts ==============================\nplatform linux -- Python 3.12.11, pytest-9.0.2, pluggy-1.6.0\nrootdir: /workspace/repo\nconfigfile: pyproject.toml\nplugins: asyncio-1.3.0, timeout-2.4.0, cov-7.0.0\nasyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function\ntimeout: 60.0s\ntimeout method: signal\ntimeout func_only: False\ncollected 3 items\n\ntests/unit/test_multi_statement.py ... [100%]\n\n============================== 3 passed in 0.09s ===============================", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/", + "--ignore=tests/test_mssql.py", + "--ignore=tests/test_postgresql.py", + "--ignore=tests/test_mysql.py", + "--ignore=tests/test_oracle.py", + "--ignore=tests/test_mariadb.py", + "--ignore=tests/test_cockroachdb.py", + "--ignore=tests/test_turso.py", + "--ignore=tests/test_firebird.py", + "--ignore=tests/test_ssh.py", + "--ignore=tests/test_clickhouse.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "ac0f855337123cabbf23607f34002ef6197817b5ef32ff1df5bdadffb4dd094d", + "output_tail": "ests/unit/test_connection_config_from_dict.py .......... [ 71%]\ntests/unit/test_connection_flow.py .. [ 71%]\ntests/unit/test_connection_mixin_edit.py . [ 71%]\ntests/unit/test_connection_picker_refresh.py ... [ 71%]\ntests/unit/test_docker_credential_parsing.py ........................... [ 72%]\n................................................... [ 75%]\ntests/unit/test_docker_tab_filtering.py ................ [ 76%]\ntests/unit/test_duckdb_data_files.py ................................... [ 78%]\n. [ 78%]\ntests/unit/test_editor_detection.py ........... [ 78%]\ntests/unit/test_executor_reset_on_connection_switch.py ....... [ 79%]\ntests/unit/test_extra_options_passthrough.py ....... [ 79%]\ntests/unit/test_flight_adapter.py ............................ [ 80%]\ntests/unit/test_history_store_file_backed.py ........................... [ 82%]\n [ 82%]\ntests/unit/test_incremental_rendering_numeric_range.py . [ 82%]\ntests/unit/test_install_strategy_uv.py ...... [ 82%]\ntests/unit/test_motherduck_adapter.py ........ [ 82%]\ntests/unit/test_mssql_adapter.py ........................... [ 84%]\ntests/unit/test_mssql_autocommit.py . [ 84%]\ntests/unit/test_multi_statement.py .......................... [ 85%]\ntests/unit/test_open_line.py ........ [ 86%]\ntests/unit/test_oracle_adapter.py .........s [ 86%]\ntests/unit/test_password_command.py ...... [ 86%]\ntests/unit/test_postgresql_adapter.py .. [ 87%]\ntests/unit/test_probe_port.py ..... [ 87%]\ntests/unit/test_process_worker_pickle_safety.py .... [ 87%]\ntests/unit/test_project_dir_routing.py ........................ [ 88%]\ntests/unit/test_query_alerts.py ...... [ 89%]\ntests/unit/test_query_deletion.py ..... [ 89%]\ntests/unit/test_sanitize_row.py .... [ 89%]\ntests/unit/test_schema_config_validator.py ... [ 89%]\ntests/unit/test_select_all.py .... [ 89%]\ntests/unit/test_single_statement_execution.py ............. [ 90%]\ntests/unit/test_snowflake_adapter.py ....... [ 90%]\ntests/unit/test_sqlite_returning.py ..... [ 91%]\ntests/unit/test_starred.py ............... [ 91%]\ntests/unit/test_text_object_menu.py ...... [ 92%]\ntests/unit/test_tls_adapters.py .... [ 92%]\ntests/unit/test_transaction_executor.py .. [ 92%]\ntests/unit/test_transaction_state.py .................. [ 93%]\ntests/unit/test_tunnel_paramiko_version.py .. [ 93%]\ntests/unit/test_undo_history.py ............ [ 94%]\ntests/unit/test_url_parser.py .. [ 94%]\ntests/unit/test_vim_motions.py ......................................... [ 96%]\n.... [ 96%]\ntests/unit/test_vim_operators.py ................. [ 97%]\ntests/unit/test_vim_text_objects.py .............................. [ 98%]\ntests/unit/test_vim_visual_mode.py ...................... [100%]\n\n================ 1561 passed, 408 skipped in 155.09s (0:02:35) =================", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "pytest", + "-q", + "--timeout=60", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_dollar_quoted_strings", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_named_dollar_quoted_strings", + "tests/unit/test_multi_statement.py::TestStatementSplitting::test_dollar_quotes_inside_standard_strings_are_ignored" + ], + "fix_sha": "61be617020d07111426383d9b1bb4867643619a8", + "local_image": "patcheval-validate:sqlit-246", + "local_image_id": "sha256:1a8ec5b63941aad43d2578566998a55306c1b67376c5cc8231b9a525c7d99f23", + "parent_sha": "73204ea65de23f43dde661efaf2174eb535c3a52", + "regression_command": [ + "pytest", + "-q", + "--timeout=60", + "tests/", + "--ignore=tests/test_mssql.py", + "--ignore=tests/test_postgresql.py", + "--ignore=tests/test_mysql.py", + "--ignore=tests/test_oracle.py", + "--ignore=tests/test_mariadb.py", + "--ignore=tests/test_cockroachdb.py", + "--ignore=tests/test_turso.py", + "--ignore=tests/test_firebird.py", + "--ignore=tests/test_ssh.py", + "--ignore=tests/test_clickhouse.py" + ], + "repeats": 2, + "repository": "Maxteabag/sqlit", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim@sha256:b748a09ec61c993083278020a84e16f0c81485c5349b30c64dd29d6a22da7462", + "bootstrap_command": [], + "environment": [ + "PYTHONPATH=/workspace/repo", + "PYTHONDONTWRITEBYTECODE=1", + "UV_CACHE_DIR=/tmp/uv-cache", + "XDG_CONFIG_HOME=/tmp/patcheval-config", + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SQLIT_TUI=0.0.0" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "pytest", + "-q" + ], + "setup_command": [], + "sync_command": [ + "uv", + "sync", + "--frozen", + "--group", + "test", + "--no-dev", + "--extra", + "duckdb", + "--no-install-project" + ], + "test_command": [ + "pytest", + "-q" + ], + "timeout_s": 900 + }, + "schema_version": 1, + "setup_command": [], + "task_id": "sqlit-246", + "validated": true +} diff --git a/attestations/sqlit-260.json b/attestations/sqlit-260.json new file mode 100644 index 0000000000000000000000000000000000000000..87db2c573ec4cd82f7dc6b012107974179390342 --- /dev/null +++ b/attestations/sqlit-260.json @@ -0,0 +1,240 @@ +{ + "cells": [ + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_removes_sql_statement_terminator", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_preserves_plsql_terminator" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "c5b1c0f3f3d67fcd2c11ac9a67f5152e3814297cd5ad0ad4de7758b53756e1b4", + "output_tail": " % (expected, actual))\n raise AssertionError(error_message)\n \n def _error_message():\n msg = self._format_mock_failure_message(args, kwargs)\n return msg\n expected = self._call_matcher(_Call((args, kwargs), two=True))\n actual = self._call_matcher(self.call_args)\n if actual != expected:\n cause = expected if isinstance(expected, Exception) else None\n> raise AssertionError(_error_message()) from cause\nE AssertionError: expected call not found.\nE Expected: execute('SELECT 1 FROM DUAL')\nE Actual: execute('SELECT 1 FROM DUAL; \\n')\n\n/usr/local/lib/python3.12/unittest/mock.py:949: AssertionError\n___________ test_execute_non_query_removes_sql_statement_terminator ____________\n\nadapter = \nmock_conn = \n\n def test_execute_non_query_removes_sql_statement_terminator(\n adapter: OracleAdapter,\n mock_conn: MagicMock,\n ) -> None:\n \"\"\"Issue #260: ALTER SESSION must reach python-oracledb without ``;``.\"\"\"\n adapter.execute_non_query(mock_conn, \"ALTER SESSION SET EDITION = V0;\")\n \n> mock_conn.cursor.return_value.execute.assert_called_once_with(\"ALTER SESSION SET EDITION = V0\")\n\ntests/connections/providers/oracle/test_statement_execution.py:53: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n/usr/local/lib/python3.12/unittest/mock.py:961: in assert_called_once_with\n return self.assert_called_with(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = \nargs = ('ALTER SESSION SET EDITION = V0',), kwargs = {}\nexpected = call('ALTER SESSION SET EDITION = V0')\nactual = call('ALTER SESSION SET EDITION = V0;')\n_error_message = ._error_message at 0x7f70c44e5b20>\ncause = None\n\n def assert_called_with(self, /, *args, **kwargs):\n \"\"\"assert that the last call was made with the specified arguments.\n \n Raises an AssertionError if the args and keyword args passed in are\n different to the last call to the mock.\"\"\"\n if self.call_args is None:\n expected = self._format_mock_call_signature(args, kwargs)\n actual = 'not called.'\n error_message = ('expected call not found.\\nExpected: %s\\n Actual: %s'\n % (expected, actual))\n raise AssertionError(error_message)\n \n def _error_message():\n msg = self._format_mock_failure_message(args, kwargs)\n return msg\n expected = self._call_matcher(_Call((args, kwargs), two=True))\n actual = self._call_matcher(self.call_args)\n if actual != expected:\n cause = expected if isinstance(expected, Exception) else None\n> raise AssertionError(_error_message()) from cause\nE AssertionError: expected call not found.\nE Expected: execute('ALTER SESSION SET EDITION = V0')\nE Actual: execute('ALTER SESSION SET EDITION = V0;')\n\n/usr/local/lib/python3.12/unittest/mock.py:949: AssertionError\n=========================== short test summary info ============================\nFAILED tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator[SELECT ';' AS value FROM DUAL;-SELECT ';' AS value FROM DUAL]\nFAILED tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator[SELECT 1 FROM DUAL; \\n-SELECT 1 FROM DUAL]\nFAILED tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_removes_sql_statement_terminator\n========================= 3 failed, 7 passed in 0.24s ==========================", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/", + "--ignore=tests/test_mssql.py", + "--ignore=tests/test_postgresql.py", + "--ignore=tests/test_mysql.py", + "--ignore=tests/test_oracle.py", + "--ignore=tests/test_mariadb.py", + "--ignore=tests/test_cockroachdb.py", + "--ignore=tests/test_turso.py", + "--ignore=tests/test_firebird.py", + "--ignore=tests/test_ssh.py", + "--ignore=tests/test_clickhouse.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "b7d78daff8e959426ab997b38cd95232008140016d28d093377d4f93ed9d5af0", + "output_tail": "ests/unit/test_duckdb_data_files.py ................................... [ 76%]\n. [ 76%]\ntests/unit/test_editor_detection.py ........... [ 77%]\ntests/unit/test_executor_reset_on_connection_switch.py ....... [ 77%]\ntests/unit/test_extra_options_passthrough.py ....... [ 77%]\ntests/unit/test_flight_adapter.py ............................ [ 79%]\ntests/unit/test_history_store_file_backed.py ........................... [ 80%]\n [ 80%]\ntests/unit/test_incremental_rendering_numeric_range.py . [ 80%]\ntests/unit/test_install_strategy_uv.py ...... [ 80%]\ntests/unit/test_motherduck_adapter.py ........ [ 81%]\ntests/unit/test_mssql_adapter.py ........................... [ 82%]\ntests/unit/test_mssql_autocommit.py . [ 82%]\ntests/unit/test_multi_statement.py ............................. [ 83%]\ntests/unit/test_open_line.py ........ [ 84%]\ntests/unit/test_oracle_adapter.py .........s [ 84%]\ntests/unit/test_password_command.py ...... [ 85%]\ntests/unit/test_postgresql_adapter.py .. [ 85%]\ntests/unit/test_probe_port.py ..... [ 85%]\ntests/unit/test_process_worker_fallback.py .... [ 85%]\ntests/unit/test_process_worker_pickle_safety.py .... [ 85%]\ntests/unit/test_process_worker_statement_validation.py .. [ 85%]\ntests/unit/test_project_dir_routing.py ........................ [ 86%]\ntests/unit/test_query_alerts.py ...... [ 87%]\ntests/unit/test_query_alerts_hierarchy.py ................... [ 88%]\ntests/unit/test_query_confirm_integration.py ......... [ 88%]\ntests/unit/test_query_deletion.py ..... [ 88%]\ntests/unit/test_query_tab.py ....... [ 89%]\ntests/unit/test_results_copy_markup.py ....... [ 89%]\ntests/unit/test_sanitize_row.py .... [ 89%]\ntests/unit/test_schema_config_validator.py ... [ 89%]\ntests/unit/test_select_all.py .... [ 90%]\ntests/unit/test_single_statement_execution.py ............. [ 90%]\ntests/unit/test_snowflake_adapter.py ....... [ 90%]\ntests/unit/test_sqlite_returning.py ..... [ 91%]\ntests/unit/test_starred.py ............... [ 91%]\ntests/unit/test_stdin_secret.py .......... [ 92%]\ntests/unit/test_text_object_menu.py ...... [ 92%]\ntests/unit/test_tls_adapters.py .... [ 92%]\ntests/unit/test_transaction_executor.py .. [ 92%]\ntests/unit/test_transaction_state.py .................. [ 93%]\ntests/unit/test_tunnel_paramiko_version.py .. [ 93%]\ntests/unit/test_undo_history.py ............ [ 94%]\ntests/unit/test_url_parser.py .. [ 94%]\ntests/unit/test_vim_motions.py ......................................... [ 96%]\n.... [ 96%]\ntests/unit/test_vim_operators.py ................. [ 97%]\ntests/unit/test_vim_text_objects.py .............................. [ 98%]\ntests/unit/test_vim_visual_mode.py ...................... [100%]\n\n================ 1686 passed, 420 skipped in 158.45s (0:02:38) =================", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_removes_sql_statement_terminator", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_preserves_plsql_terminator" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "920c0ba25ce4adb1e99a3c57cd98d618c4d7e1e9290f9b2cbd3f7e191f9c6344", + "output_tail": "============================= test session starts ==============================\nplatform linux -- Python 3.12.11, pytest-9.0.2, pluggy-1.6.0\nrootdir: /workspace/repo\nconfigfile: pyproject.toml\nplugins: asyncio-1.3.0, timeout-2.4.0, cov-7.0.0\nasyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function\ntimeout: 60.0s\ntimeout method: signal\ntimeout func_only: False\ncollected 10 items\n\ntests/connections/providers/oracle/test_statement_execution.py ......... [ 90%]\n. [100%]\n\n============================== 10 passed in 0.08s ==============================", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/", + "--ignore=tests/test_mssql.py", + "--ignore=tests/test_postgresql.py", + "--ignore=tests/test_mysql.py", + "--ignore=tests/test_oracle.py", + "--ignore=tests/test_mariadb.py", + "--ignore=tests/test_cockroachdb.py", + "--ignore=tests/test_turso.py", + "--ignore=tests/test_firebird.py", + "--ignore=tests/test_ssh.py", + "--ignore=tests/test_clickhouse.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "7b701fc64616285bf19b475659c8ea5b61f1477f177148bee312c39c27683a72", + "output_tail": "ests/unit/test_duckdb_data_files.py ................................... [ 76%]\n. [ 76%]\ntests/unit/test_editor_detection.py ........... [ 77%]\ntests/unit/test_executor_reset_on_connection_switch.py ....... [ 77%]\ntests/unit/test_extra_options_passthrough.py ....... [ 77%]\ntests/unit/test_flight_adapter.py ............................ [ 79%]\ntests/unit/test_history_store_file_backed.py ........................... [ 80%]\n [ 80%]\ntests/unit/test_incremental_rendering_numeric_range.py . [ 80%]\ntests/unit/test_install_strategy_uv.py ...... [ 80%]\ntests/unit/test_motherduck_adapter.py ........ [ 81%]\ntests/unit/test_mssql_adapter.py ........................... [ 82%]\ntests/unit/test_mssql_autocommit.py . [ 82%]\ntests/unit/test_multi_statement.py ............................. [ 83%]\ntests/unit/test_open_line.py ........ [ 84%]\ntests/unit/test_oracle_adapter.py .........s [ 84%]\ntests/unit/test_password_command.py ...... [ 85%]\ntests/unit/test_postgresql_adapter.py .. [ 85%]\ntests/unit/test_probe_port.py ..... [ 85%]\ntests/unit/test_process_worker_fallback.py .... [ 85%]\ntests/unit/test_process_worker_pickle_safety.py .... [ 85%]\ntests/unit/test_process_worker_statement_validation.py .. [ 85%]\ntests/unit/test_project_dir_routing.py ........................ [ 86%]\ntests/unit/test_query_alerts.py ...... [ 87%]\ntests/unit/test_query_alerts_hierarchy.py ................... [ 88%]\ntests/unit/test_query_confirm_integration.py ......... [ 88%]\ntests/unit/test_query_deletion.py ..... [ 88%]\ntests/unit/test_query_tab.py ....... [ 89%]\ntests/unit/test_results_copy_markup.py ....... [ 89%]\ntests/unit/test_sanitize_row.py .... [ 89%]\ntests/unit/test_schema_config_validator.py ... [ 89%]\ntests/unit/test_select_all.py .... [ 90%]\ntests/unit/test_single_statement_execution.py ............. [ 90%]\ntests/unit/test_snowflake_adapter.py ....... [ 90%]\ntests/unit/test_sqlite_returning.py ..... [ 91%]\ntests/unit/test_starred.py ............... [ 91%]\ntests/unit/test_stdin_secret.py .......... [ 92%]\ntests/unit/test_text_object_menu.py ...... [ 92%]\ntests/unit/test_tls_adapters.py .... [ 92%]\ntests/unit/test_transaction_executor.py .. [ 92%]\ntests/unit/test_transaction_state.py .................. [ 93%]\ntests/unit/test_tunnel_paramiko_version.py .. [ 93%]\ntests/unit/test_undo_history.py ............ [ 94%]\ntests/unit/test_url_parser.py .. [ 94%]\ntests/unit/test_vim_motions.py ......................................... [ 96%]\n.... [ 96%]\ntests/unit/test_vim_operators.py ................. [ 97%]\ntests/unit/test_vim_text_objects.py .............................. [ 98%]\ntests/unit/test_vim_visual_mode.py ...................... [100%]\n\n================ 1686 passed, 420 skipped in 159.98s (0:02:39) =================", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_removes_sql_statement_terminator", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_preserves_plsql_terminator" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "bc1eca060de371f886d8e45149e0ac723f7b573caa637a67fa670ccbc52ea640", + "output_tail": " % (expected, actual))\n raise AssertionError(error_message)\n \n def _error_message():\n msg = self._format_mock_failure_message(args, kwargs)\n return msg\n expected = self._call_matcher(_Call((args, kwargs), two=True))\n actual = self._call_matcher(self.call_args)\n if actual != expected:\n cause = expected if isinstance(expected, Exception) else None\n> raise AssertionError(_error_message()) from cause\nE AssertionError: expected call not found.\nE Expected: execute('SELECT 1 FROM DUAL')\nE Actual: execute('SELECT 1 FROM DUAL; \\n')\n\n/usr/local/lib/python3.12/unittest/mock.py:949: AssertionError\n___________ test_execute_non_query_removes_sql_statement_terminator ____________\n\nadapter = \nmock_conn = \n\n def test_execute_non_query_removes_sql_statement_terminator(\n adapter: OracleAdapter,\n mock_conn: MagicMock,\n ) -> None:\n \"\"\"Issue #260: ALTER SESSION must reach python-oracledb without ``;``.\"\"\"\n adapter.execute_non_query(mock_conn, \"ALTER SESSION SET EDITION = V0;\")\n \n> mock_conn.cursor.return_value.execute.assert_called_once_with(\"ALTER SESSION SET EDITION = V0\")\n\ntests/connections/providers/oracle/test_statement_execution.py:53: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n/usr/local/lib/python3.12/unittest/mock.py:961: in assert_called_once_with\n return self.assert_called_with(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = \nargs = ('ALTER SESSION SET EDITION = V0',), kwargs = {}\nexpected = call('ALTER SESSION SET EDITION = V0')\nactual = call('ALTER SESSION SET EDITION = V0;')\n_error_message = ._error_message at 0x7f2508b65b20>\ncause = None\n\n def assert_called_with(self, /, *args, **kwargs):\n \"\"\"assert that the last call was made with the specified arguments.\n \n Raises an AssertionError if the args and keyword args passed in are\n different to the last call to the mock.\"\"\"\n if self.call_args is None:\n expected = self._format_mock_call_signature(args, kwargs)\n actual = 'not called.'\n error_message = ('expected call not found.\\nExpected: %s\\n Actual: %s'\n % (expected, actual))\n raise AssertionError(error_message)\n \n def _error_message():\n msg = self._format_mock_failure_message(args, kwargs)\n return msg\n expected = self._call_matcher(_Call((args, kwargs), two=True))\n actual = self._call_matcher(self.call_args)\n if actual != expected:\n cause = expected if isinstance(expected, Exception) else None\n> raise AssertionError(_error_message()) from cause\nE AssertionError: expected call not found.\nE Expected: execute('ALTER SESSION SET EDITION = V0')\nE Actual: execute('ALTER SESSION SET EDITION = V0;')\n\n/usr/local/lib/python3.12/unittest/mock.py:949: AssertionError\n=========================== short test summary info ============================\nFAILED tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator[SELECT ';' AS value FROM DUAL;-SELECT ';' AS value FROM DUAL]\nFAILED tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator[SELECT 1 FROM DUAL; \\n-SELECT 1 FROM DUAL]\nFAILED tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_removes_sql_statement_terminator\n========================= 3 failed, 7 passed in 0.21s ==========================", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/", + "--ignore=tests/test_mssql.py", + "--ignore=tests/test_postgresql.py", + "--ignore=tests/test_mysql.py", + "--ignore=tests/test_oracle.py", + "--ignore=tests/test_mariadb.py", + "--ignore=tests/test_cockroachdb.py", + "--ignore=tests/test_turso.py", + "--ignore=tests/test_firebird.py", + "--ignore=tests/test_ssh.py", + "--ignore=tests/test_clickhouse.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "955fddb860bdf84eb4e0c3d1845331f0fec401a3acf9f08e07666c1ebd0343af", + "output_tail": "ests/unit/test_duckdb_data_files.py ................................... [ 76%]\n. [ 76%]\ntests/unit/test_editor_detection.py ........... [ 77%]\ntests/unit/test_executor_reset_on_connection_switch.py ....... [ 77%]\ntests/unit/test_extra_options_passthrough.py ....... [ 77%]\ntests/unit/test_flight_adapter.py ............................ [ 79%]\ntests/unit/test_history_store_file_backed.py ........................... [ 80%]\n [ 80%]\ntests/unit/test_incremental_rendering_numeric_range.py . [ 80%]\ntests/unit/test_install_strategy_uv.py ...... [ 80%]\ntests/unit/test_motherduck_adapter.py ........ [ 81%]\ntests/unit/test_mssql_adapter.py ........................... [ 82%]\ntests/unit/test_mssql_autocommit.py . [ 82%]\ntests/unit/test_multi_statement.py ............................. [ 83%]\ntests/unit/test_open_line.py ........ [ 84%]\ntests/unit/test_oracle_adapter.py .........s [ 84%]\ntests/unit/test_password_command.py ...... [ 85%]\ntests/unit/test_postgresql_adapter.py .. [ 85%]\ntests/unit/test_probe_port.py ..... [ 85%]\ntests/unit/test_process_worker_fallback.py .... [ 85%]\ntests/unit/test_process_worker_pickle_safety.py .... [ 85%]\ntests/unit/test_process_worker_statement_validation.py .. [ 85%]\ntests/unit/test_project_dir_routing.py ........................ [ 86%]\ntests/unit/test_query_alerts.py ...... [ 87%]\ntests/unit/test_query_alerts_hierarchy.py ................... [ 88%]\ntests/unit/test_query_confirm_integration.py ......... [ 88%]\ntests/unit/test_query_deletion.py ..... [ 88%]\ntests/unit/test_query_tab.py ....... [ 89%]\ntests/unit/test_results_copy_markup.py ....... [ 89%]\ntests/unit/test_sanitize_row.py .... [ 89%]\ntests/unit/test_schema_config_validator.py ... [ 89%]\ntests/unit/test_select_all.py .... [ 90%]\ntests/unit/test_single_statement_execution.py ............. [ 90%]\ntests/unit/test_snowflake_adapter.py ....... [ 90%]\ntests/unit/test_sqlite_returning.py ..... [ 91%]\ntests/unit/test_starred.py ............... [ 91%]\ntests/unit/test_stdin_secret.py .......... [ 92%]\ntests/unit/test_text_object_menu.py ...... [ 92%]\ntests/unit/test_tls_adapters.py .... [ 92%]\ntests/unit/test_transaction_executor.py .. [ 92%]\ntests/unit/test_transaction_state.py .................. [ 93%]\ntests/unit/test_tunnel_paramiko_version.py .. [ 93%]\ntests/unit/test_undo_history.py ............ [ 94%]\ntests/unit/test_url_parser.py .. [ 94%]\ntests/unit/test_vim_motions.py ......................................... [ 96%]\n.... [ 96%]\ntests/unit/test_vim_operators.py ................. [ 97%]\ntests/unit/test_vim_text_objects.py .............................. [ 98%]\ntests/unit/test_vim_visual_mode.py ...................... [100%]\n\n================ 1686 passed, 420 skipped in 160.27s (0:02:40) =================", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_removes_sql_statement_terminator", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_preserves_plsql_terminator" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "96a173a0c6e59f1ac983801fdec98f1e48f874be4c00990bdbb27185cc10c75c", + "output_tail": "============================= test session starts ==============================\nplatform linux -- Python 3.12.11, pytest-9.0.2, pluggy-1.6.0\nrootdir: /workspace/repo\nconfigfile: pyproject.toml\nplugins: asyncio-1.3.0, timeout-2.4.0, cov-7.0.0\nasyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function\ntimeout: 60.0s\ntimeout method: signal\ntimeout func_only: False\ncollected 10 items\n\ntests/connections/providers/oracle/test_statement_execution.py ......... [ 90%]\n. [100%]\n\n============================== 10 passed in 0.09s ==============================", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "pytest", + "-q", + "--timeout=60", + "tests/", + "--ignore=tests/test_mssql.py", + "--ignore=tests/test_postgresql.py", + "--ignore=tests/test_mysql.py", + "--ignore=tests/test_oracle.py", + "--ignore=tests/test_mariadb.py", + "--ignore=tests/test_cockroachdb.py", + "--ignore=tests/test_turso.py", + "--ignore=tests/test_firebird.py", + "--ignore=tests/test_ssh.py", + "--ignore=tests/test_clickhouse.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "23f5ff0399e0f9f92656ff7f6941d98a00243885f40f8e0b0b4e91eeb3164438", + "output_tail": "ests/unit/test_duckdb_data_files.py ................................... [ 76%]\n. [ 76%]\ntests/unit/test_editor_detection.py ........... [ 77%]\ntests/unit/test_executor_reset_on_connection_switch.py ....... [ 77%]\ntests/unit/test_extra_options_passthrough.py ....... [ 77%]\ntests/unit/test_flight_adapter.py ............................ [ 79%]\ntests/unit/test_history_store_file_backed.py ........................... [ 80%]\n [ 80%]\ntests/unit/test_incremental_rendering_numeric_range.py . [ 80%]\ntests/unit/test_install_strategy_uv.py ...... [ 80%]\ntests/unit/test_motherduck_adapter.py ........ [ 81%]\ntests/unit/test_mssql_adapter.py ........................... [ 82%]\ntests/unit/test_mssql_autocommit.py . [ 82%]\ntests/unit/test_multi_statement.py ............................. [ 83%]\ntests/unit/test_open_line.py ........ [ 84%]\ntests/unit/test_oracle_adapter.py .........s [ 84%]\ntests/unit/test_password_command.py ...... [ 85%]\ntests/unit/test_postgresql_adapter.py .. [ 85%]\ntests/unit/test_probe_port.py ..... [ 85%]\ntests/unit/test_process_worker_fallback.py .... [ 85%]\ntests/unit/test_process_worker_pickle_safety.py .... [ 85%]\ntests/unit/test_process_worker_statement_validation.py .. [ 85%]\ntests/unit/test_project_dir_routing.py ........................ [ 86%]\ntests/unit/test_query_alerts.py ...... [ 87%]\ntests/unit/test_query_alerts_hierarchy.py ................... [ 88%]\ntests/unit/test_query_confirm_integration.py ......... [ 88%]\ntests/unit/test_query_deletion.py ..... [ 88%]\ntests/unit/test_query_tab.py ....... [ 89%]\ntests/unit/test_results_copy_markup.py ....... [ 89%]\ntests/unit/test_sanitize_row.py .... [ 89%]\ntests/unit/test_schema_config_validator.py ... [ 89%]\ntests/unit/test_select_all.py .... [ 90%]\ntests/unit/test_single_statement_execution.py ............. [ 90%]\ntests/unit/test_snowflake_adapter.py ....... [ 90%]\ntests/unit/test_sqlite_returning.py ..... [ 91%]\ntests/unit/test_starred.py ............... [ 91%]\ntests/unit/test_stdin_secret.py .......... [ 92%]\ntests/unit/test_text_object_menu.py ...... [ 92%]\ntests/unit/test_tls_adapters.py .... [ 92%]\ntests/unit/test_transaction_executor.py .. [ 92%]\ntests/unit/test_transaction_state.py .................. [ 93%]\ntests/unit/test_tunnel_paramiko_version.py .. [ 93%]\ntests/unit/test_undo_history.py ............ [ 94%]\ntests/unit/test_url_parser.py .. [ 94%]\ntests/unit/test_vim_motions.py ......................................... [ 96%]\n.... [ 96%]\ntests/unit/test_vim_operators.py ................. [ 97%]\ntests/unit/test_vim_text_objects.py .............................. [ 98%]\ntests/unit/test_vim_visual_mode.py ...................... [100%]\n\n================ 1686 passed, 420 skipped in 160.70s (0:02:40) =================", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "pytest", + "-q", + "--timeout=60", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_removes_sql_statement_terminator", + "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_preserves_plsql_terminator" + ], + "fix_sha": "15835dce61c8a57671ae87061f95c362e5d59d49", + "local_image": "patcheval-validate:sqlit-260", + "local_image_id": "sha256:d75d54f60c7826281fe5a18ddb4600a04409f0c080607d1b5ffdc2bc65272036", + "parent_sha": "74dea205d2f9dac94218df26ac45bad8a6c73e5f", + "regression_command": [ + "pytest", + "-q", + "--timeout=60", + "tests/", + "--ignore=tests/test_mssql.py", + "--ignore=tests/test_postgresql.py", + "--ignore=tests/test_mysql.py", + "--ignore=tests/test_oracle.py", + "--ignore=tests/test_mariadb.py", + "--ignore=tests/test_cockroachdb.py", + "--ignore=tests/test_turso.py", + "--ignore=tests/test_firebird.py", + "--ignore=tests/test_ssh.py", + "--ignore=tests/test_clickhouse.py" + ], + "repeats": 2, + "repository": "Maxteabag/sqlit", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim@sha256:b748a09ec61c993083278020a84e16f0c81485c5349b30c64dd29d6a22da7462", + "bootstrap_command": [], + "environment": [ + "PYTHONPATH=/workspace/repo", + "PYTHONDONTWRITEBYTECODE=1", + "UV_CACHE_DIR=/tmp/uv-cache", + "XDG_CONFIG_HOME=/tmp/patcheval-config", + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SQLIT_TUI=0.0.0" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "pytest", + "-q" + ], + "setup_command": [], + "sync_command": [ + "uv", + "sync", + "--frozen", + "--group", + "test", + "--no-dev", + "--extra", + "duckdb", + "--no-install-project" + ], + "test_command": [ + "pytest", + "-q" + ], + "timeout_s": 900 + }, + "schema_version": 1, + "setup_command": [], + "task_id": "sqlit-260", + "validated": true +} diff --git a/attestations/structlog-710.json b/attestations/structlog-710.json new file mode 100644 index 0000000000000000000000000000000000000000..53afec3f1bbcc7acbe40064c623f1b38fdfec2ef --- /dev/null +++ b/attestations/structlog-710.json @@ -0,0 +1,250 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async", + "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async_native_logger" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "d2bec03cfba5507a3e5280aba4ffce59120ed5840086c79b48bd6ff41f096239", + "output_tail": "ect.\n Thread information is now correctly captured before async bridge.\n \"\"\"\n string_io = StringIO()\n \n class StringIOLogger(structlog.PrintLogger):\n def __init__(self):\n super().__init__(file=string_io)\n \n processor = self.make_processor(None, [\"concurrent\", \"threading\"])\n structlog.configure(\n processors=[processor, JSONRenderer()],\n logger_factory=StringIOLogger,\n wrapper_class=wrapper_class,\n cache_logger_on_first_use=True,\n )\n \n logger = structlog.stdlib.get_logger()\n \n # Capture thread info before async call\n expected_thread = threading.get_ident()\n expected_thread_name = threading.current_thread().name\n \n callsite_params = self.get_callsite_parameters()\n await getattr(logger, method_name)(\"baz\")\n logger_params = json.loads(string_io.getvalue())\n \n> assert expected_thread == logger_params[\"thread\"]\nE assert 140060441699200 == 140060396824256\n\ntests/processors/test_processors.py:408: AssertionError\n_____________ TestCallsiteParameterAdder.test_async_native_logger ______________\n\nself = \n\n @pytest.mark.asyncio\n async def test_async_native_logger(self) -> None:\n \"\"\"\n Callsite thread information for native async invocations is correct.\n \"\"\"\n cf = CapturingLoggerFactory()\n structlog.configure(\n processors=[\n CallsiteParameterAdder(\n parameters=[\n CallsiteParameter.THREAD,\n CallsiteParameter.THREAD_NAME,\n ]\n ),\n ],\n logger_factory=cf,\n wrapper_class=structlog._native.BoundLoggerFilteringAtInfo,\n cache_logger_on_first_use=True,\n )\n \n logger = structlog.get_logger()\n \n expected_thread = threading.get_ident()\n expected_thread_name = threading.current_thread().name\n \n await logger.ainfo(\"test native async\")\n \n captured = cf.logger.calls[0].kwargs\n \n> assert expected_thread == captured[\"thread\"]\nE assert 140060441699200 == 140060406265536\n\ntests/processors/test_processors.py:447: AssertionError\n=============================== warnings summary ===============================\n../../opt/venv/lib/python3.14/site-packages/_pytest/python.py:124\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:124: PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.\n Test: tests/processors/test_processors.py::TestCallsiteParameterAdder::test_processor, argvalues type: product\n Please convert to a list or tuple.\n See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators\n metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)\n\n../../opt/venv/lib/python3.14/site-packages/_pytest/python.py:124\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:124: PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.\n Test: tests/processors/test_processors.py::TestCallsiteParameterAdder::test_e2e, argvalues type: product\n Please convert to a list or tuple.\n See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators\n metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n=========================== short test summary info ============================\nFAILED tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async[BoundLogger-ainfo]\nFAILED tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async[AsyncBoundLogger-info]\nFAILED tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async_native_logger\n3 failed, 2 warnings in 0.08s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "2f382bee69a3fb0fd2a01650df384f87ed08230036a357dd0efbe57aef402faf", + "output_tail": "urceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_10/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestLoggers::test_pickle_not_stdout_stderr[PrintLogger-5]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_11/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[0]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_12/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[1]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_13/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[2]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_14/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[3]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_15/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[4]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_16/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[5]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_17/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n880 passed, 37 skipped, 20 warnings in 1.40s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async", + "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async_native_logger" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "fe519a57baadae40bd4ec358a308fa6f07063800fcefa9232953828e36d896e5", + "output_tail": "... [100%]\n=============================== warnings summary ===============================\n../../opt/venv/lib/python3.14/site-packages/_pytest/python.py:124\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:124: PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.\n Test: tests/processors/test_processors.py::TestCallsiteParameterAdder::test_processor, argvalues type: product\n Please convert to a list or tuple.\n See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators\n metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)\n\n../../opt/venv/lib/python3.14/site-packages/_pytest/python.py:124\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:124: PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.\n Test: tests/processors/test_processors.py::TestCallsiteParameterAdder::test_e2e, argvalues type: product\n Please convert to a list or tuple.\n See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators\n metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n3 passed, 2 warnings in 0.06s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "0d3fffdc2e3bf46c29fce29b1ca416a959c77b8e17d56fe16581b84f8a81e64e", + "output_tail": "urceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_10/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestLoggers::test_pickle_not_stdout_stderr[PrintLogger-5]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_11/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[0]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_12/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[1]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_13/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[2]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_14/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[3]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_15/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[4]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_16/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[5]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_17/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n880 passed, 37 skipped, 20 warnings in 1.39s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async", + "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async_native_logger" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "39c7c98abc3c8118c034a0713626708e3c1f56f0c583dc87d5157de53d057226", + "output_tail": "ect.\n Thread information is now correctly captured before async bridge.\n \"\"\"\n string_io = StringIO()\n \n class StringIOLogger(structlog.PrintLogger):\n def __init__(self):\n super().__init__(file=string_io)\n \n processor = self.make_processor(None, [\"concurrent\", \"threading\"])\n structlog.configure(\n processors=[processor, JSONRenderer()],\n logger_factory=StringIOLogger,\n wrapper_class=wrapper_class,\n cache_logger_on_first_use=True,\n )\n \n logger = structlog.stdlib.get_logger()\n \n # Capture thread info before async call\n expected_thread = threading.get_ident()\n expected_thread_name = threading.current_thread().name\n \n callsite_params = self.get_callsite_parameters()\n await getattr(logger, method_name)(\"baz\")\n logger_params = json.loads(string_io.getvalue())\n \n> assert expected_thread == logger_params[\"thread\"]\nE assert 140025025811328 == 140024980936384\n\ntests/processors/test_processors.py:408: AssertionError\n_____________ TestCallsiteParameterAdder.test_async_native_logger ______________\n\nself = \n\n @pytest.mark.asyncio\n async def test_async_native_logger(self) -> None:\n \"\"\"\n Callsite thread information for native async invocations is correct.\n \"\"\"\n cf = CapturingLoggerFactory()\n structlog.configure(\n processors=[\n CallsiteParameterAdder(\n parameters=[\n CallsiteParameter.THREAD,\n CallsiteParameter.THREAD_NAME,\n ]\n ),\n ],\n logger_factory=cf,\n wrapper_class=structlog._native.BoundLoggerFilteringAtInfo,\n cache_logger_on_first_use=True,\n )\n \n logger = structlog.get_logger()\n \n expected_thread = threading.get_ident()\n expected_thread_name = threading.current_thread().name\n \n await logger.ainfo(\"test native async\")\n \n captured = cf.logger.calls[0].kwargs\n \n> assert expected_thread == captured[\"thread\"]\nE assert 140025025811328 == 140024990377664\n\ntests/processors/test_processors.py:447: AssertionError\n=============================== warnings summary ===============================\n../../opt/venv/lib/python3.14/site-packages/_pytest/python.py:124\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:124: PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.\n Test: tests/processors/test_processors.py::TestCallsiteParameterAdder::test_processor, argvalues type: product\n Please convert to a list or tuple.\n See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators\n metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)\n\n../../opt/venv/lib/python3.14/site-packages/_pytest/python.py:124\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:124: PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.\n Test: tests/processors/test_processors.py::TestCallsiteParameterAdder::test_e2e, argvalues type: product\n Please convert to a list or tuple.\n See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators\n metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n=========================== short test summary info ============================\nFAILED tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async[BoundLogger-ainfo]\nFAILED tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async[AsyncBoundLogger-info]\nFAILED tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async_native_logger\n3 failed, 2 warnings in 0.08s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "44cd6a86296f78d8587b911e31ec6be42a68c4a33a9f1c9799282b009a6135fe", + "output_tail": "urceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_10/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestLoggers::test_pickle_not_stdout_stderr[PrintLogger-5]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_11/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[0]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_12/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[1]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_13/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[2]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_14/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[3]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_15/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[4]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_16/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[5]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_17/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n880 passed, 37 skipped, 20 warnings in 1.45s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async", + "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async_native_logger" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "fe519a57baadae40bd4ec358a308fa6f07063800fcefa9232953828e36d896e5", + "output_tail": "... [100%]\n=============================== warnings summary ===============================\n../../opt/venv/lib/python3.14/site-packages/_pytest/python.py:124\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:124: PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.\n Test: tests/processors/test_processors.py::TestCallsiteParameterAdder::test_processor, argvalues type: product\n Please convert to a list or tuple.\n See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators\n metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)\n\n../../opt/venv/lib/python3.14/site-packages/_pytest/python.py:124\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:124: PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.\n Test: tests/processors/test_processors.py::TestCallsiteParameterAdder::test_e2e, argvalues type: product\n Please convert to a list or tuple.\n See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators\n metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n3 passed, 2 warnings in 0.06s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "0d3fffdc2e3bf46c29fce29b1ca416a959c77b8e17d56fe16581b84f8a81e64e", + "output_tail": "urceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_10/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestLoggers::test_pickle_not_stdout_stderr[PrintLogger-5]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_11/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[0]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_12/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[1]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_13/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[2]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_14/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[3]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_15/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[4]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_16/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\ntests/test_output.py::TestBytesLogger::test_pickle_not_stdout_stderr[5]\n /opt/venv/lib/python3.14/site-packages/_pytest/python.py:167: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-node/pytest-0/test_pickle_not_stdout_stderr_17/file.log' mode='r' encoding='UTF-8'>\n result = testfunction(**testargs)\n Enable tracemalloc to get traceback where the object was allocated.\n See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n880 passed, 37 skipped, 20 warnings in 1.39s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async", + "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async_native_logger" + ], + "fix_sha": "ba04ac275291ea1754aba24643d17cb8e5638c66", + "local_image": "patcheval-validate:structlog-710", + "local_image_id": "sha256:313184fa5e1ce56d73c81913fe2c1a0bdb793e1a533e80df97c13335800f00d2", + "parent_sha": "c6e7cad18ffe91febf2b97dac03a465134b1a5d1", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests" + ], + "repeats": 2, + "repository": "hynek/structlog", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.47.3\nripgrep 14.1.1", + "smoke_output_sha256": "1f9f54eb0528523e3fe1a96cfad2629677cab32bb4348a4eaa6992145e8608fc", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim@sha256:dfe4069fefc02ee4d6097c26f31d0784df09c9b6242fb4a25ad31fbae74ec6aa", + "bootstrap_command": [ + "uv", + "pip", + "install", + "--python", + "/opt/venv/bin/python", + "--only-binary", + ":all:", + "hatchling==1.27.0", + "hatch-vcs==0.5.0", + "hatch-fancy-pypi-readme==25.1.0", + "setuptools-scm==9.2.0", + "editables==0.5" + ], + "environment": [ + "HOME=/home/node", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "UV_CACHE_DIR=/tmp/uv-cache", + "PYTHONPATH=/workspace/repo/src", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONHASHSEED=0", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "UV_OFFLINE=1", + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_STRUCTLOG=0.0.0", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TZ=UTC", + "TERM=dumb", + "NO_COLOR=1", + "PYTHON_COLORS=0" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly", + "tests" + ], + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ." + ], + "sync_command": [ + "/bin/sh", + "-ec", + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_STRUCTLOG=0.0.0 uv sync --no-default-groups --group tests --no-install-project" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q", + "-p", + "no:randomly" + ], + "timeout_s": 900 + }, + "schema_version": 1, + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ." + ], + "task_id": "structlog-710", + "validated": true +} diff --git a/attestations/tomlkit-440.json b/attestations/tomlkit-440.json new file mode 100644 index 0000000000000000000000000000000000000000..ab197d104a62df9a07522dd4bae85b0a1758b62d --- /dev/null +++ b/attestations/tomlkit-440.json @@ -0,0 +1,226 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_toml_document.py::test_add_key_after_dotted_inline_table_without_ending_newline" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "7fd36babf9353dd82171d58db7e95c71d2932ef5c3b76b9507840e8ddf0eada4", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n________ test_add_key_after_dotted_inline_table_without_ending_newline _________\n\n def test_add_key_after_dotted_inline_table_without_ending_newline() -> None:\n content = \"[x]\\na.b = {}\"\n doc = parse(content)\n doc[\"x\"][\"c\"] = 3\n \n> assert doc.as_string() == \"[x]\\na.b = {}\\nc = 3\\n\"\nE AssertionError: assert '[x]\\na.b = {}c = 3\\n' == '[x]\\na.b = {}\\nc = 3\\n'\nE [x]\nE - a.b = {}\nE + a.b = {}c = 3\nE ? +++++\nE - c = 3\n\ntests/test_toml_document.py:1536: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_toml_document.py::test_add_key_after_dotted_inline_table_without_ending_newline\n1 failed in 0.12s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests", + "--ignore=tests/test_toml_tests.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "a1ed32ed1c1f35f0475861c6efc7c5ec6676c05680c84b1c38e11cc5bfc2ac1f", + "output_tail": "........................................................................ [ 20%]\n........................................................................ [ 40%]\n........................................................................ [ 61%]\n........................................................................ [ 81%]\n.................................................................. [100%]\n354 passed in 0.69s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_toml_document.py::test_add_key_after_dotted_inline_table_without_ending_newline" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "c1ff6fa3d412a24d2a636251f6dbcf1c16422151ed81d9ddba0bb844bd647d7b", + "output_tail": ". [100%]\n1 passed in 0.10s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests", + "--ignore=tests/test_toml_tests.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "10bf14087d9a4a102dc08e4f6155095424097cc7e501a8e18edd7177d0863c89", + "output_tail": "........................................................................ [ 20%]\n........................................................................ [ 40%]\n........................................................................ [ 61%]\n........................................................................ [ 81%]\n.................................................................. [100%]\n354 passed in 0.67s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_toml_document.py::test_add_key_after_dotted_inline_table_without_ending_newline" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "7fd36babf9353dd82171d58db7e95c71d2932ef5c3b76b9507840e8ddf0eada4", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n________ test_add_key_after_dotted_inline_table_without_ending_newline _________\n\n def test_add_key_after_dotted_inline_table_without_ending_newline() -> None:\n content = \"[x]\\na.b = {}\"\n doc = parse(content)\n doc[\"x\"][\"c\"] = 3\n \n> assert doc.as_string() == \"[x]\\na.b = {}\\nc = 3\\n\"\nE AssertionError: assert '[x]\\na.b = {}c = 3\\n' == '[x]\\na.b = {}\\nc = 3\\n'\nE [x]\nE - a.b = {}\nE + a.b = {}c = 3\nE ? +++++\nE - c = 3\n\ntests/test_toml_document.py:1536: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_toml_document.py::test_add_key_after_dotted_inline_table_without_ending_newline\n1 failed in 0.12s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests", + "--ignore=tests/test_toml_tests.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "10bf14087d9a4a102dc08e4f6155095424097cc7e501a8e18edd7177d0863c89", + "output_tail": "........................................................................ [ 20%]\n........................................................................ [ 40%]\n........................................................................ [ 61%]\n........................................................................ [ 81%]\n.................................................................. [100%]\n354 passed in 0.67s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_toml_document.py::test_add_key_after_dotted_inline_table_without_ending_newline" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "c1ff6fa3d412a24d2a636251f6dbcf1c16422151ed81d9ddba0bb844bd647d7b", + "output_tail": ". [100%]\n1 passed in 0.10s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests", + "--ignore=tests/test_toml_tests.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "feffe5a43defff9d9b742d4c0be2b3d2fe2040d0c00a889f5abc699190585ef1", + "output_tail": "........................................................................ [ 20%]\n........................................................................ [ 40%]\n........................................................................ [ 61%]\n........................................................................ [ 81%]\n.................................................................. [100%]\n354 passed in 0.70s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_toml_document.py::test_add_key_after_dotted_inline_table_without_ending_newline" + ], + "fix_sha": "43668ddebc3f082bf385d328aceed18d26976897", + "local_image": "patcheval-validate:tomlkit-440", + "local_image_id": "sha256:30626141da9c50ff0651069c5afcc2806ef54211c29c3a9ed0da526fa352605c", + "parent_sha": "d3c76f0bbe90af4b12a3b83bd8e59bc9061dfe85", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests", + "--ignore=tests/test_toml_tests.py" + ], + "repeats": 2, + "repository": "python-poetry/tomlkit", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim@sha256:b748a09ec61c993083278020a84e16f0c81485c5349b30c64dd29d6a22da7462", + "bootstrap_command": [], + "environment": [ + "HOME=/home/node", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "UV_CACHE_DIR=/tmp/uv-cache", + "PYTHONPATH=/workspace/repo", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONUNBUFFERED=1", + "PYTHONHASHSEED=0", + "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "UV_OFFLINE=1", + "TZ=UTC", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TERM=dumb", + "NO_COLOR=1", + "PYTHON_COLORS=0" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "tests" + ], + "setup_command": [], + "sync_command": [ + "/bin/sh", + "-ec", + "python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary=:all: pytest==7.4.4 iniconfig==2.0.0 packaging==24.0 pluggy==1.2.0" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q" + ], + "timeout_s": 300 + }, + "schema_version": 1, + "setup_command": [], + "task_id": "tomlkit-440", + "validated": true +} diff --git a/attestations/tomlkit-542.json b/attestations/tomlkit-542.json new file mode 100644 index 0000000000000000000000000000000000000000..97c0038ff707eb247f172f62bf3500bb01d06a35 --- /dev/null +++ b/attestations/tomlkit-542.json @@ -0,0 +1,226 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_toml_document.py::test_replace_dotted_key_with_aot_keeps_following_sibling" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "b9b96c533925c5773c5c050c079a34928567bd7c49c8e911b9546e7530404658", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n___________ test_replace_dotted_key_with_aot_keeps_following_sibling ___________\n\n def test_replace_dotted_key_with_aot_keeps_following_sibling() -> None:\n # https://github.com/python-poetry/tomlkit/issues/542\n content = \"\"\"a.b = 1\n c.d = 2\n \"\"\"\n doc = parse(content)\n arr = tomlkit.aot()\n tbl = tomlkit.table()\n tbl[\"x\"] = 9\n arr.append(tbl)\n doc[\"a\"] = arr\n> assert (\n doc.as_string()\n == \"\"\"c.d = 2\n \n [[a]]\n x = 9\n \"\"\"\n )\nE AssertionError: assert '[[a]]\\nx = 9\\nc.d = 2\\n' == 'c.d = 2\\n\\n[[a]]\\nx = 9\\n'\nE - c.d = 2\nE - \nE [[a]]\nE x = 9\nE + c.d = 2\n\ntests/test_toml_document.py:1184: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_toml_document.py::test_replace_dotted_key_with_aot_keeps_following_sibling\n1 failed in 0.13s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests", + "--ignore=tests/test_toml_tests.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "1e15c07f75f3ffcda30fd8a032e9f20d592fb677bb77e5674ea17bc77173c6aa", + "output_tail": "........................................................................ [ 20%]\n........................................................................ [ 40%]\n........................................................................ [ 60%]\n........................................................................ [ 80%]\n........................................................................ [100%]\n360 passed in 0.74s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_toml_document.py::test_replace_dotted_key_with_aot_keeps_following_sibling" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "52101d72c088045af4d065abe4ecef9b401dfeeb96a0c410254523c28377359a", + "output_tail": ". [100%]\n1 passed in 0.12s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests", + "--ignore=tests/test_toml_tests.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "c09301e5a2a0acf195ec48a1a02eb81d4dc68a15b0d060aec5c0f1361b1c23ba", + "output_tail": "........................................................................ [ 20%]\n........................................................................ [ 40%]\n........................................................................ [ 60%]\n........................................................................ [ 80%]\n........................................................................ [100%]\n360 passed in 0.72s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_toml_document.py::test_replace_dotted_key_with_aot_keeps_following_sibling" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "a95e8ee6febfb0cf34bf9f57ea9c577556321961424d0677992d98b5dc0fd358", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n___________ test_replace_dotted_key_with_aot_keeps_following_sibling ___________\n\n def test_replace_dotted_key_with_aot_keeps_following_sibling() -> None:\n # https://github.com/python-poetry/tomlkit/issues/542\n content = \"\"\"a.b = 1\n c.d = 2\n \"\"\"\n doc = parse(content)\n arr = tomlkit.aot()\n tbl = tomlkit.table()\n tbl[\"x\"] = 9\n arr.append(tbl)\n doc[\"a\"] = arr\n> assert (\n doc.as_string()\n == \"\"\"c.d = 2\n \n [[a]]\n x = 9\n \"\"\"\n )\nE AssertionError: assert '[[a]]\\nx = 9\\nc.d = 2\\n' == 'c.d = 2\\n\\n[[a]]\\nx = 9\\n'\nE - c.d = 2\nE - \nE [[a]]\nE x = 9\nE + c.d = 2\n\ntests/test_toml_document.py:1184: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_toml_document.py::test_replace_dotted_key_with_aot_keeps_following_sibling\n1 failed in 0.12s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests", + "--ignore=tests/test_toml_tests.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "1e15c07f75f3ffcda30fd8a032e9f20d592fb677bb77e5674ea17bc77173c6aa", + "output_tail": "........................................................................ [ 20%]\n........................................................................ [ 40%]\n........................................................................ [ 60%]\n........................................................................ [ 80%]\n........................................................................ [100%]\n360 passed in 0.74s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_toml_document.py::test_replace_dotted_key_with_aot_keeps_following_sibling" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "6ef9d4050462918cdf35d353527ef4e32568dadc63888db9cf1294f67af38b0d", + "output_tail": ". [100%]\n1 passed in 0.11s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests", + "--ignore=tests/test_toml_tests.py" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "9a06da342a55ac0226dcd8c62d91e54d81eb3cfadd4c635f5ad00cf43fca93e7", + "output_tail": "........................................................................ [ 20%]\n........................................................................ [ 40%]\n........................................................................ [ 60%]\n........................................................................ [ 80%]\n........................................................................ [100%]\n360 passed in 0.68s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests/test_toml_document.py::test_replace_dotted_key_with_aot_keeps_following_sibling" + ], + "fix_sha": "67d3e86502706df2a9ed67114ab67e25bcdcbbb7", + "local_image": "patcheval-validate:tomlkit-542", + "local_image_id": "sha256:59e453e378f0288c5890ffbcdf9a4ca8b5edf3b5406b8a75bcf75d10279a17ac", + "parent_sha": "e23a25438c6cc9b8cc28b6dcf76dc52f9c7a33e3", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "-o", + "cache_dir=/tmp/pytest-cache", + "tests", + "--ignore=tests/test_toml_tests.py" + ], + "repeats": 2, + "repository": "python-poetry/tomlkit", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.39.5\nripgrep 13.0.0", + "smoke_output_sha256": "cd2d951d78a7455f9ce30e0928d73f92e9138fdad73c9626b9bd0991124e3a0a", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim@sha256:b748a09ec61c993083278020a84e16f0c81485c5349b30c64dd29d6a22da7462", + "bootstrap_command": [], + "environment": [ + "HOME=/home/node", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "UV_CACHE_DIR=/tmp/uv-cache", + "PYTHONPATH=/workspace/repo", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONUNBUFFERED=1", + "PYTHONHASHSEED=0", + "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "UV_OFFLINE=1", + "TZ=UTC", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TERM=dumb", + "NO_COLOR=1", + "PYTHON_COLORS=0" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "tests" + ], + "setup_command": [], + "sync_command": [ + "/bin/sh", + "-ec", + "python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary=:all: pytest==7.4.4 iniconfig==2.0.0 packaging==24.0 pluggy==1.2.0" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q" + ], + "timeout_s": 300 + }, + "schema_version": 1, + "setup_command": [], + "task_id": "tomlkit-542", + "validated": true +} diff --git a/attestations/typeguard-499.json b/attestations/typeguard-499.json new file mode 100644 index 0000000000000000000000000000000000000000..95d46fc95b83568e3b7d58b2729e2cda105aee4c --- /dev/null +++ b/attestations/typeguard-499.json @@ -0,0 +1,219 @@ +{ + "cells": [ + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "tests/test_checkers.py::TestProtocol::test_class_against_protocol_ignores_instance_attributes" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "ac83948c95a3ed01fb84a5c620834254d0ac155106da9cebca9611a63b44a853", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_____ TestProtocol.test_class_against_protocol_ignores_instance_attributes _____\ntests/test_checkers.py:1357: in test_class_against_protocol_ignores_instance_attributes\n check_type(Foo, type[MyProtocol])\nsrc/typeguard/_functions.py:108: in check_type\n check_type_internal(value, expected_type, memo)\nsrc/typeguard/_checkers.py:986: in check_type_internal\n checker(value, origin_type, args, memo)\nsrc/typeguard/_checkers.py:496: in check_class\n check_protocol(value, expected_class, (), memo)\nsrc/typeguard/_checkers.py:843: in check_protocol\n raise TypeCheckError(\nE typeguard.TypeCheckError: class tests.test_checkers.TestProtocol.test_class_against_protocol_ignores_instance_attributes..Foo is not compatible with the TestProtocol.test_class_against_protocol_ignores_instance_attributes..MyProtocol protocol because it has no attribute named 'foo'\n=========================== short test summary info ============================\nFAILED tests/test_checkers.py::TestProtocol::test_class_against_protocol_ignores_instance_attributes\n1 failed in 0.10s", + "repeat": 1, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "6afc83c348f6277caf8cb78de76ced4d6d4db03ec3257359457e5d2aced725aa", + "output_tail": "..sss................................................................... [ 13%]\n.........s.s............................................................ [ 26%]\n.............................................xxx........................ [ 40%]\n.........................................xxx............................ [ 53%]\n..............................xxx....................................... [ 67%]\n.......................................................................s [ 80%]\n........................................................................ [ 94%]\n.............................. [100%]\n519 passed, 6 skipped, 9 xfailed in 3.83s", + "repeat": 1, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "tests/test_checkers.py::TestProtocol::test_class_against_protocol_ignores_instance_attributes" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "774412243a4dd9109d74cac1e88830db06a136051bbdbb28f78f1755be3ed12a", + "output_tail": ". [100%]\n1 passed in 0.04s", + "repeat": 1, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "e3a652816d14305628a860e22bfbff651cd4b0d1066f1d2f4e186bd72ac755f9", + "output_tail": "..sss................................................................... [ 13%]\n.........s.s............................................................ [ 26%]\n.............................................xxx........................ [ 40%]\n.........................................xxx............................ [ 53%]\n..............................xxx....................................... [ 67%]\n.......................................................................s [ 80%]\n........................................................................ [ 94%]\n.............................. [100%]\n519 passed, 6 skipped, 9 xfailed in 3.77s", + "repeat": 1, + "state": "gold-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "tests/test_checkers.py::TestProtocol::test_class_against_protocol_ignores_instance_attributes" + ], + "exit_code": 1, + "expected": "test-failure", + "output_sha256": "df2659a716fb6ba1c9b852f3a81abcebfde500c085aa5527628483932d553a02", + "output_tail": "F [100%]\n=================================== FAILURES ===================================\n_____ TestProtocol.test_class_against_protocol_ignores_instance_attributes _____\ntests/test_checkers.py:1357: in test_class_against_protocol_ignores_instance_attributes\n check_type(Foo, type[MyProtocol])\nsrc/typeguard/_functions.py:108: in check_type\n check_type_internal(value, expected_type, memo)\nsrc/typeguard/_checkers.py:986: in check_type_internal\n checker(value, origin_type, args, memo)\nsrc/typeguard/_checkers.py:496: in check_class\n check_protocol(value, expected_class, (), memo)\nsrc/typeguard/_checkers.py:843: in check_protocol\n raise TypeCheckError(\nE typeguard.TypeCheckError: class tests.test_checkers.TestProtocol.test_class_against_protocol_ignores_instance_attributes..Foo is not compatible with the TestProtocol.test_class_against_protocol_ignores_instance_attributes..MyProtocol protocol because it has no attribute named 'foo'\n=========================== short test summary info ============================\nFAILED tests/test_checkers.py::TestProtocol::test_class_against_protocol_ignores_instance_attributes\n1 failed in 0.09s", + "repeat": 2, + "state": "parent-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "0d2e61e0c11b9dfc570f651e7f06e51567820bee6968070ca325cc5538e9178a", + "output_tail": "..sss................................................................... [ 13%]\n.........s.s............................................................ [ 26%]\n.............................................xxx........................ [ 40%]\n.........................................xxx............................ [ 53%]\n..............................xxx....................................... [ 67%]\n.......................................................................s [ 80%]\n........................................................................ [ 94%]\n.............................. [100%]\n519 passed, 6 skipped, 9 xfailed in 3.80s", + "repeat": 2, + "state": "parent-regression" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "tests/test_checkers.py::TestProtocol::test_class_against_protocol_ignores_instance_attributes" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "774412243a4dd9109d74cac1e88830db06a136051bbdbb28f78f1755be3ed12a", + "output_tail": ". [100%]\n1 passed in 0.04s", + "repeat": 2, + "state": "gold-hidden" + }, + { + "command": [ + "python", + "-m", + "pytest", + "-q", + "tests" + ], + "exit_code": 0, + "expected": "zero", + "output_sha256": "10b44c659f66509c060f16b5f2af67a2699049a3ae9df4429b1079a9705963a8", + "output_tail": "..sss................................................................... [ 13%]\n.........s.s............................................................ [ 26%]\n.............................................xxx........................ [ 40%]\n.........................................xxx............................ [ 53%]\n..............................xxx....................................... [ 67%]\n.......................................................................s [ 80%]\n........................................................................ [ 94%]\n.............................. [100%]\n519 passed, 6 skipped, 9 xfailed in 3.81s", + "repeat": 2, + "state": "gold-regression" + } + ], + "fail_to_pass_command": [ + "python", + "-m", + "pytest", + "-q", + "tests/test_checkers.py::TestProtocol::test_class_against_protocol_ignores_instance_attributes" + ], + "fix_sha": "f1007ef36a10b5fed8268f5620d03fd19300a7b6", + "local_image": "patcheval-validate:typeguard-499", + "local_image_id": "sha256:2614c695b4692e98ca2d43646a8afdada4e7e76ab6792ba6a9d8c4aef2a0b06b", + "parent_sha": "32e7c85f74d12be72acd5856869e5110a7d4549e", + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "tests" + ], + "repeats": 2, + "repository": "agronholm/typeguard", + "runner_contract": { + "home": "/home/node", + "smoke_output": "v24.19.0\n11.17.0\ngit version 2.47.3\nripgrep 14.1.1", + "smoke_output_sha256": "1f9f54eb0528523e3fe1a96cfad2629677cab32bb4348a4eaa6992145e8608fc", + "uid": "1000", + "user": "node" + }, + "runtime_profile": { + "base_image": "ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim@sha256:dfe4069fefc02ee4d6097c26f31d0784df09c9b6242fb4a25ad31fbae74ec6aa", + "bootstrap_command": [ + "uv", + "pip", + "install", + "--python", + "/opt/venv/bin/python", + "--only-binary", + ":all:", + "setuptools==80.9.0", + "setuptools-scm==9.2.0", + "wheel==0.45.1" + ], + "environment": [ + "HOME=/home/node", + "XDG_CACHE_HOME=/tmp/xdg-cache", + "UV_CACHE_DIR=/tmp/uv-cache", + "PYTHONPATH=/workspace/repo/src", + "PYTHONDONTWRITEBYTECODE=1", + "PYTHONHASHSEED=0", + "PIP_NO_INDEX=1", + "PIP_DISABLE_PIP_VERSION_CHECK=1", + "UV_OFFLINE=1", + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TYPEGUARD=0.0.0", + "LANG=C.UTF-8", + "LC_ALL=C.UTF-8", + "TZ=UTC", + "TERM=dumb", + "NO_COLOR=1", + "PYTHON_COLORS=0" + ], + "fail_exit_codes": [ + 1 + ], + "regression_command": [ + "python", + "-m", + "pytest", + "-q", + "tests" + ], + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ." + ], + "sync_command": [ + "/bin/sh", + "-ec", + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TYPEGUARD=0.0.0 uv sync --no-default-groups --group test --no-install-project" + ], + "test_command": [ + "python", + "-m", + "pytest", + "-q" + ], + "timeout_s": 900 + }, + "schema_version": 1, + "setup_command": [ + "/bin/sh", + "-ec", + "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ." + ], + "task_id": "typeguard-499", + "validated": true +} diff --git a/dataset.json b/dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..063cf9cb827ee59942dce0949339833cf059fdfb --- /dev/null +++ b/dataset.json @@ -0,0 +1,33 @@ +{ + "checksums_file": "SHA256SUMS", + "name": "PatchEval", + "prompt_policy": "full-issue-body-unchanged", + "release": "pilot-20", + "schema_version": 1, + "task_count": 20, + "task_ids": [ + "sqlit-246", + "sqlit-260", + "narwhals-3864", + "city2graph-121", + "json-repair-207", + "json-repair-191", + "json-repair-205", + "click-3572", + "click-3360", + "click-2790", + "pypdf-3982", + "pypdf-3878", + "pypdf-3587", + "attrs-1575", + "typeguard-499", + "structlog-710", + "pygments-2816", + "pygments-2828", + "tomlkit-440", + "tomlkit-542" + ], + "tasks_file": "tasks.jsonl", + "tasks_sha256": "2efa2f1469aedf0c332ea8a93ff2045e9b49d2f383d4f740ed9afb300bfb4cbc", + "version": "pilot" +} diff --git a/hidden-tests/attrs-1575.patch b/hidden-tests/attrs-1575.patch new file mode 100644 index 0000000000000000000000000000000000000000..9e5cad40df0bc75187b895634ee42f701f39727d --- /dev/null +++ b/hidden-tests/attrs-1575.patch @@ -0,0 +1,36 @@ +diff --git a/tests/test_annotations.py b/tests/test_annotations.py +index e193d4ba..de3d1058 100644 +--- a/tests/test_annotations.py ++++ b/tests/test_annotations.py +@@ -434,6 +434,23 @@ class TestAnnotations: + + assert_init_annotations(C) + ++ @pytest.mark.skipif( ++ sys.version_info[:2] < (3, 14), ++ reason="Python 3.14 changed annotation evaluation behavior.", ++ ) ++ def test_missing_classvar_import(self, slots): ++ """ ++ Unimported ClassVars are recognized as ForwardRefs. ++ """ ++ ++ @attr.s(auto_attribs=True, slots=slots) ++ class C: ++ cls_var: ClassVar[str] # noqa: F821 ++ value: int = 1 ++ ++ assert "cls_var" not in attr.fields_dict(C) ++ assert 1 == C().value ++ + def test_keyword_only_auto_attribs(self): + """ + `kw_only` propagates to attributes defined via `auto_attribs`. +@@ -691,6 +708,7 @@ class TestAnnotations: + "typing.ClassVar", + "'typing.ClassVar[dict]'", + "t.ClassVar[int]", ++ typing.ForwardRef("ClassVar[str]"), + ], + ) + def test_is_class_var(annot): diff --git a/hidden-tests/city2graph-121.patch b/hidden-tests/city2graph-121.patch new file mode 100644 index 0000000000000000000000000000000000000000..0b3f50a080a3b7295054e150190e603652c8b9df --- /dev/null +++ b/hidden-tests/city2graph-121.patch @@ -0,0 +1,43 @@ +diff --git a/tests/test_utils.py b/tests/test_utils.py +index 70a0b00..08f9213 100644 +--- a/tests/test_utils.py ++++ b/tests/test_utils.py +@@ -2151,6 +2151,38 @@ class TestPlotting(BaseGraphTest): + finally: + plt.close(fig) + ++ def test_plot_graph_homo_with_legend_kwargs_and_title( ++ self, ++ sample_nodes_gdf: gpd.GeoDataFrame, ++ sample_edges_gdf: gpd.GeoDataFrame, ++ ) -> None: ++ """Homogeneous plotting should support legend kwargs and title.""" ++ if not utils.MATPLOTLIB_AVAILABLE: ++ pytest.skip("matplotlib not available") ++ ++ nodes = sample_nodes_gdf.copy() ++ nodes["centrality_quantile"] = range(len(nodes)) ++ ++ edge_linewidth = pd.Series([1.0] * len(sample_edges_gdf), index=sample_edges_gdf.index) ++ fig, ax = plt.subplots(figsize=(5, 5)) ++ try: ++ utils.plot_graph( ++ nodes=nodes, ++ edges=sample_edges_gdf, ++ node_color="centrality_quantile", ++ edge_color="#bbbbbb", ++ edge_linewidth=edge_linewidth, ++ legend=True, ++ legend_kwargs={"label": "Betweenness Centrality", "orientation": "horizontal"}, ++ title="Central London Transit Network Betweenness Centrality of Stops", ++ ax=ax, ++ ) ++ assert ( ++ ax.get_title() == "Central London Transit Network Betweenness Centrality of Stops" ++ ) ++ finally: ++ plt.close(fig) ++ + @pytest.mark.skipif(not MATPLOTLIB_AVAILABLE, reason="Matplotlib not available") + def test_plot_empty_gdf(self, empty_gdf: gpd.GeoDataFrame) -> None: + """Test _plot_gdf with empty GeoDataFrame (line 3246).""" diff --git a/hidden-tests/click-2790.patch b/hidden-tests/click-2790.patch new file mode 100644 index 0000000000000000000000000000000000000000..15a27e8d11501ef6a28a8d3a83079dca8d15ad8f --- /dev/null +++ b/hidden-tests/click-2790.patch @@ -0,0 +1,82 @@ +diff --git a/tests/test_formatting.py b/tests/test_formatting.py +index c79f6577..c74b53a3 100644 +--- a/tests/test_formatting.py ++++ b/tests/test_formatting.py +@@ -1,3 +1,5 @@ ++import pytest ++ + import click + + +@@ -246,6 +248,71 @@ def test_formatting_usage_custom_help(runner): + ] + + ++@pytest.mark.parametrize( ++ ("help_names", "extra_options", "expected_hint"), ++ [ ++ # No shadowing, longest name is picked. ++ (["-h", "--help"], [], "Try 'cli foo --help' for help."), ++ # -h shadowed by a subcommand option, --help still available. ++ ( ++ ["-h", "--help"], ++ [click.option("--host", "-h")], ++ "Try 'cli foo --help' for help.", ++ ), ++ # --help shadowed, -h still available. ++ ( ++ ["-h", "--help"], ++ [click.option("--help-file", "--help")], ++ "Try 'cli foo -h' for help.", ++ ), ++ # Both names shadowed: no hint line at all. ++ ( ++ ["-h", "--help"], ++ [click.option("--host", "-h"), click.option("--help-file", "--help")], ++ None, ++ ), ++ # Single custom help name, not shadowed. ++ (["--man"], [], "Try 'cli foo --man' for help."), ++ # Three help names, one shadowed, longest survivor picked. ++ ( ++ ["-h", "--help", "--info"], ++ [click.option("--info-file", "--info")], ++ "Try 'cli foo --help' for help.", ++ ), ++ ], ++) ++def test_formatting_usage_error_help_hint( ++ runner, help_names, extra_options, expected_hint ++): ++ """The error hint should only show non-shadowed help option names, ++ picking the longest for readability. ++ ++ https://github.com/pallets/click/issues/2790 ++ """ ++ ++ @click.group(context_settings={"help_option_names": help_names}) ++ def cli(): ++ pass ++ ++ @cli.command() ++ @click.argument("required_arg") ++ def foo(required_arg, **kwargs): ++ pass ++ ++ for option in extra_options: ++ option(foo) ++ ++ result = runner.invoke(cli, ["foo"]) ++ assert result.exit_code == 2 ++ lines = result.output.splitlines() ++ assert lines[0] == "Usage: cli foo [OPTIONS] REQUIRED_ARG" ++ assert lines[-1] == "Error: Missing argument 'REQUIRED_ARG'." ++ if expected_hint is not None: ++ assert expected_hint in lines ++ else: ++ assert not any(line.startswith("Try ") for line in lines) ++ ++ + def test_formatting_custom_type_metavar(runner): + class MyType(click.ParamType): + def get_metavar(self, param: click.Parameter, ctx: click.Context): diff --git a/hidden-tests/click-3360.patch b/hidden-tests/click-3360.patch new file mode 100644 index 0000000000000000000000000000000000000000..0b3d754db4172c5f29d1b2a8ead41277253c770c --- /dev/null +++ b/hidden-tests/click-3360.patch @@ -0,0 +1,123 @@ +diff --git a/tests/test_formatting.py b/tests/test_formatting.py +index 3e856885..a351cbef 100644 +--- a/tests/test_formatting.py ++++ b/tests/test_formatting.py +@@ -499,3 +499,118 @@ def test_write_usage_styled_prefix_keeps_options_on_one_line(): + + visible = strip_ansi(rendered) + assert visible == "Usage: cli [OPTIONS]\n" ++ ++ ++@pytest.mark.parametrize( ++ ("formatter_kwargs", "current_indent", "prog", "args", "prefix", "expected"), ++ [ ++ # Issue #3360: the default prefix used to emit only ++ # a blank line because ``wrap_text("", initial_indent=usage_prefix)`` ++ # returned ``""`` and discarded the prefix. ++ pytest.param( ++ {}, ++ 0, ++ "Program", ++ "", ++ None, ++ "Usage: Program\n", ++ id="empty-args-default-prefix", ++ ), ++ # A caller-supplied prefix is preserved verbatim. ++ pytest.param( ++ {}, ++ 0, ++ "Program", ++ "", ++ "Run: ", ++ "Run: Program\n", ++ id="empty-args-custom-prefix", ++ ), ++ # ``current_indent`` is preserved even with no args to render. ++ pytest.param( ++ {}, ++ 4, ++ "Program", ++ "", ++ None, ++ "Usage: Program\n", ++ id="empty-args-indented", ++ ), ++ # Prog too long to share a line with args: the wrap branch must not ++ # emit a second line. ++ pytest.param( ++ {"width": 20}, ++ 0, ++ "VeryLongProgramName", ++ "", ++ None, ++ "Usage: VeryLongProgramName\n", ++ id="empty-args-long-prog", ++ ), ++ # With non-empty args, the separator space between prog and args is preserved. ++ pytest.param( ++ {}, ++ 0, ++ "Program", ++ "[OPTIONS]", ++ None, ++ "Usage: Program [OPTIONS]\n", ++ id="with-args-default-prefix", ++ ), ++ ], ++) ++def test_help_formatter_write_usage( ++ formatter_kwargs, current_indent, prog, args, prefix, expected ++): ++ """``HelpFormatter.write_usage`` renders a single usage line whose ++ trailing separator tracks whether ``args`` is non-empty. ++ """ ++ f = click.HelpFormatter(**formatter_kwargs) ++ f.current_indent = current_indent ++ if prefix is None: ++ f.write_usage(prog, args) ++ else: ++ f.write_usage(prog, args, prefix=prefix) ++ assert f.getvalue() == expected ++ ++ ++def test_help_formatter_write_usage_without_args_styled_prefix(): ++ """A downstream-styled prefix is preserved when ``args`` is empty: ++ the ANSI escape sequences survive, only the trailing separator is ++ removed. ++ """ ++ styled_prefix = "\x1b[38;2;38;139;210m\x1b[1mUsage:\x1b[0m " ++ f = click.HelpFormatter() ++ f.write_usage("cli", prefix=styled_prefix) ++ rendered = f.getvalue() ++ assert strip_ansi(rendered) == "Usage: cli\n" ++ assert "\x1b[" in rendered ++ ++ ++@pytest.mark.parametrize( ++ ("command_kwargs", "expected_usage_line"), ++ [ ++ # End-to-end regression for #3360: an empty ``options_metavar`` with ++ # no parameters used to render a blank usage line. ++ pytest.param( ++ {"options_metavar": ""}, ++ "Usage: cli", ++ id="empty-options-metavar-no-params", ++ ), ++ # End-to-end regression: ``options_metavar=None`` is the documented ++ # way to suppress the ``[OPTIONS]`` slot entirely. ++ pytest.param( ++ {"options_metavar": None}, ++ "Usage: cli", ++ id="none-options-metavar-no-params", ++ ), ++ ], ++) ++def test_command_write_usage_no_args(runner, command_kwargs, expected_usage_line): ++ """End-to-end: a command with no parameters and an empty or absent ++ ``options_metavar`` renders a usage line with just the program name, ++ no trailing space. ++ """ ++ cli = click.Command("cli", **command_kwargs) ++ result = runner.invoke(cli, ["--help"]) ++ assert result.output.splitlines()[0] == expected_usage_line diff --git a/hidden-tests/click-3572.patch b/hidden-tests/click-3572.patch new file mode 100644 index 0000000000000000000000000000000000000000..71f76f9a3b7adabe8668ce7e9aee0fc9acd43435 --- /dev/null +++ b/hidden-tests/click-3572.patch @@ -0,0 +1,61 @@ +diff --git a/tests/test_termui.py b/tests/test_termui.py +index ce974f0c..98e25774 100644 +--- a/tests/test_termui.py ++++ b/tests/test_termui.py +@@ -1022,6 +1022,56 @@ def test_confirmation_prompt(runner, prompt, input, default, expect): + assert "Confirm Password: " in result.output + + ++@pytest.mark.parametrize( ++ ("call", "user_input", "color", "expect"), ++ [ ++ pytest.param( ++ lambda: click.confirm(click.style("Hello World!", fg="green")), ++ "y", ++ False, ++ "Hello World! [y/N]: y\n", ++ id="confirm-no-color", ++ ), ++ pytest.param( ++ lambda: click.confirm(click.style("Hello World!", fg="green")), ++ "y", ++ True, ++ "\x1b[32mHello World!\x1b[0m [y/N]: y\n", ++ id="confirm-color", ++ ), ++ pytest.param( ++ lambda: click.prompt(click.style("Name", fg="green")), ++ "Bob", ++ False, ++ "Name: Bob\n", ++ id="prompt-no-color", ++ ), ++ pytest.param( ++ lambda: click.prompt(click.style("Name", fg="green")), ++ "Bob", ++ True, ++ "\x1b[32mName\x1b[0m: Bob\n", ++ id="prompt-color", ++ ), ++ ], ++) ++def test_prompt_and_confirm_ansi_respects_color( ++ runner, call, user_input, color, expect ++): ++ """``confirm`` and ``prompt`` strip ANSI color and style codes from the ++ prompt when color is disabled and keep them when it is enabled, like ++ ``echo``. The prompt is written by ``input`` rather than ``echo``, so it ++ used to keep the codes regardless (issue 3572). ++ """ ++ ++ @click.command() ++ def cli(): ++ call() ++ ++ result = runner.invoke(cli, input=user_input, color=color) ++ assert result.output == expect ++ ++ + def test_false_show_default_cause_no_default_display_in_prompt(runner): + @click.command() + @click.option("--arg1", show_default=False, prompt=True, default="my-default-value") diff --git a/hidden-tests/json-repair-191.patch b/hidden-tests/json-repair-191.patch new file mode 100644 index 0000000000000000000000000000000000000000..5940c0bae86f139844d110081e15d61524fbafc1 --- /dev/null +++ b/hidden-tests/json-repair-191.patch @@ -0,0 +1,83 @@ +diff --git a/tests/test_json_repair.py b/tests/test_json_repair.py +index 696aff9..a3223b1 100644 +--- a/tests/test_json_repair.py ++++ b/tests/test_json_repair.py +@@ -28,6 +28,53 @@ def test_multiple_jsons(): + assert repair_json('[{"key":"value"}][{"key":"value_after"}]') == '[{"key": "value_after"}]' + + ++def test_parenthesized_prose_does_not_hijack_fenced_json(): ++ assert ( ++ repair_json( ++ """ ++ **Decision**: bla, bla (some clarification): ++ ++ ```json ++ { ++ "key": "value" ++ } ++ ``` ++ """ ++ ) ++ == '{"key": "value"}' ++ ) ++ ++ ++def test_numbered_prose_line_does_not_hijack_fenced_json(): ++ assert ( ++ repair_json( ++ """ ++ (1) Keep this note in the explanation. ++ ++ ```json ++ { ++ "key": "value" ++ } ++ ``` ++ """ ++ ) ++ == '{"key": "value"}' ++ ) ++ ++ ++def test_parenthesized_tuple_still_parses_when_it_is_the_fenced_json_payload(): ++ assert repair_json( ++ """ ++ Here is the tuple payload: ++ ++ ```json ++ (1, 2) ++ ``` ++ """, ++ return_objects=True, ++ ) == [1, 2] ++ ++ + def test_repair_json_with_objects(): + # Test with valid JSON strings + assert repair_json("[]", return_objects=True) == [] +diff --git a/tests/test_parse_array.py b/tests/test_parse_array.py +index 8c9aa08..e9c825e 100644 +--- a/tests/test_parse_array.py ++++ b/tests/test_parse_array.py +@@ -79,6 +79,20 @@ def test_parenthesized_tuple_classifier_handles_nested_delimiters_and_missing_cl + assert parser.parenthesized_is_explicit_tuple() is False + + ++def test_top_level_parenthesized_value_gate_rejects_prose_and_accepts_standalone_jsonish_values(): ++ parser = JSONParser("(", None, False) ++ assert parser.top_level_parenthesized_can_start_value() is False ++ ++ parser = JSONParser('(note)\n{"key": 1}', None, False) ++ assert parser.top_level_parenthesized_can_start_value() is False ++ ++ parser = JSONParser("(1", None, False) ++ assert parser.top_level_parenthesized_can_start_value() is True ++ ++ parser = JSONParser('(["a\\\\b"], {"k": 1})\n', None, False) ++ assert parser.top_level_parenthesized_can_start_value() is True ++ ++ + def test_parse_array_missing_quotes(): + assert repair_json('["value1" value2", "value3"]') == '["value1", "value2", "value3"]' + assert ( diff --git a/hidden-tests/json-repair-205.patch b/hidden-tests/json-repair-205.patch new file mode 100644 index 0000000000000000000000000000000000000000..9cb795fda54aade80e4d9f73ef94e9f249f7cf1b --- /dev/null +++ b/hidden-tests/json-repair-205.patch @@ -0,0 +1,40 @@ +diff --git a/tests/test_schema_guided_parse.py b/tests/test_schema_guided_parse.py +index 3d9c9dc..598fb1f 100644 +--- a/tests/test_schema_guided_parse.py ++++ b/tests/test_schema_guided_parse.py +@@ -99,6 +99,35 @@ def test_schema_applies_to_valid_json_without_skip_json_loads(): + repair_json('"bbb"', schema={"type": "string", "pattern": "^a+$"}, return_objects=True) + + ++def test_schema_union_branch_keeps_root_defs_scope_during_repair(): ++ pytest.importorskip("jsonschema") ++ schema = { ++ "$defs": { ++ "Item": { ++ "type": "object", ++ "properties": {"name": {"type": "string", "pattern": "^example$"}}, ++ "required": ["name"], ++ } ++ }, ++ "type": "object", ++ "properties": { ++ "value": { ++ "anyOf": [ ++ {"type": "array", "items": {"$ref": "#/$defs/Item"}}, ++ {"type": "null"}, ++ ] ++ } ++ }, ++ "required": ["value"], ++ } ++ ++ assert repair_json('{"value": [{"name": "example"}],}', schema=schema, return_objects=True) == { ++ "value": [{"name": "example"}] ++ } ++ with pytest.raises(ValueError, match="Expected null"): ++ repair_json('{"value": [{"name": "invalid"}],}', schema=schema, return_objects=True) ++ ++ + def test_schema_valid_fast_path_keeps_logging_empty(): + pytest.importorskip("jsonschema") + schema = { diff --git a/hidden-tests/json-repair-207.patch b/hidden-tests/json-repair-207.patch new file mode 100644 index 0000000000000000000000000000000000000000..b35f82901f75068cb781aed9f7846f625d09eefb --- /dev/null +++ b/hidden-tests/json-repair-207.patch @@ -0,0 +1,24 @@ +diff --git a/tests/test_parse_string.py b/tests/test_parse_string.py +index 49ff260..13cab7c 100644 +--- a/tests/test_parse_string.py ++++ b/tests/test_parse_string.py +@@ -464,6 +464,19 @@ def test_parse_string_preserves_escaped_braces_after_comma_group(): + assert repair_json(raw, return_objects=True, skip_json_loads=True) == {"key": r"\{1,2\} \{3\}"} + + ++@pytest.mark.parametrize( ++ ("raw", "expected", "serialized"), ++ [ ++ (r'{"key": "a\\\\b\\\\c",}', r"a\\b\\c", r'{"key": "a\\\\b\\\\c"}'), ++ (r'{"key": "1\\\\2\\\\3",}', r"1\\2\\3", r'{"key": "1\\\\2\\\\3"}'), ++ ], ++) ++def test_parse_string_preserves_repeated_escaped_backslashes_during_repair(raw, expected, serialized): ++ for skip_json_loads in (False, True): ++ assert repair_json(raw, return_objects=True, skip_json_loads=skip_json_loads) == {"key": expected} ++ assert repair_json(raw, skip_json_loads=skip_json_loads) == serialized ++ ++ + def test_parse_string_preserves_latex_command_after_bracketed_comma(): + raw = r'{ "key": "x [0,2] f(-\\frac{3}{4})" }' + diff --git a/hidden-tests/narwhals-3864.patch b/hidden-tests/narwhals-3864.patch new file mode 100644 index 0000000000000000000000000000000000000000..989c4348bd0a9442a52194fcfdc99cb11e4c668a --- /dev/null +++ b/hidden-tests/narwhals-3864.patch @@ -0,0 +1,90 @@ +diff --git a/tests/expr_and_series/corr_test.py b/tests/expr_and_series/corr_test.py +index 4617e52ec..d81f23327 100644 +--- a/tests/expr_and_series/corr_test.py ++++ b/tests/expr_and_series/corr_test.py +@@ -142,6 +142,24 @@ def test_corr_over(constructor: Constructor) -> None: + assert_equal_data(result, expected) + + ++def test_corr_series_foreign_index() -> None: ++ # https://github.com/narwhals-dev/narwhals/issues/3864 ++ # A `Series` with an index unrelated to `df`'s own must be aligned ++ # positionally (left-hand-rule), not by pandas' automatic label join. ++ pytest.importorskip("pandas") ++ import pandas as pd ++ ++ df = nw.from_native( ++ pd.DataFrame({"a": [1, 2, 3], "b": [10, 20, 30]}), eager_only=True ++ ) ++ foreign = nw.from_native( ++ pd.Series([3, 1, 2], index=[5, 6, 7], name="a"), series_only=True ++ ) ++ result = df.select(nw.corr(foreign, nw.col("b")).round(2)) ++ expected = {"a": [-0.5]} ++ assert_equal_data(result, expected) ++ ++ + def test_corr_pairwise_nulls( + constructor: Constructor, request: pytest.FixtureRequest + ) -> None: +diff --git a/tests/expr_and_series/cov_test.py b/tests/expr_and_series/cov_test.py +index 69be34787..e691ceed8 100644 +--- a/tests/expr_and_series/cov_test.py ++++ b/tests/expr_and_series/cov_test.py +@@ -99,6 +99,24 @@ def test_cov_over(constructor: Constructor) -> None: + assert_equal_data(result, expected) + + ++def test_cov_series_foreign_index() -> None: ++ # https://github.com/narwhals-dev/narwhals/issues/3864 ++ # A `Series` with an index unrelated to `df`'s own must be aligned ++ # positionally (left-hand-rule), not by pandas' automatic label join. ++ pytest.importorskip("pandas") ++ import pandas as pd ++ ++ df = nw.from_native( ++ pd.DataFrame({"a": [1, 2, 3], "b": [10, 20, 30]}), eager_only=True ++ ) ++ foreign = nw.from_native( ++ pd.Series([3, 1, 2], index=[5, 6, 7], name="a"), series_only=True ++ ) ++ result = df.select(nw.cov(foreign, nw.col("b"))) ++ expected = {"a": [-5.0]} ++ assert_equal_data(result, expected) ++ ++ + def test_cov_series(constructor_eager: ConstructorEager) -> None: + df = nw.from_native(constructor_eager(data), eager_only=True) + result = df.select( +diff --git a/tests/frame/concat_test.py b/tests/frame/concat_test.py +index 08c95bdb7..61c7fb584 100644 +--- a/tests/frame/concat_test.py ++++ b/tests/frame/concat_test.py +@@ -63,6 +63,27 @@ def test_concat_horizontal_mismatched( + assert_equal_data(result, expected) + + ++def test_concat_horizontal_pandas_left_hand_rule() -> None: ++ # https://github.com/narwhals-dev/narwhals/issues/3864 ++ pytest.importorskip("pandas") ++ import pandas as pd ++ ++ df_left = nw.from_native( ++ pd.DataFrame({"a": [1, 2, 3]}, index=[10, 20, 30]), eager_only=True ++ ) ++ df_right = nw.from_native( ++ pd.DataFrame({"b": [4, 5, 6]}, index=[0, 1, 2]), eager_only=True ++ ) ++ ++ result = nw.concat([df_left, df_right], how="horizontal") ++ ++ # the index of the left-most argument is preserved, and the other ++ # argument is aligned to it positionally, rather than by label. ++ assert result.to_native().index.tolist() == [10, 20, 30] ++ expected = {"a": [1, 2, 3], "b": [4, 5, 6]} ++ assert_equal_data(result, expected) ++ ++ + def test_concat_vertical(constructor: Constructor) -> None: + data = {"a": [1, 3, 2], "b": [4, 4, 6], "z": [7.0, 8.0, 9.0]} + df_left = ( diff --git a/hidden-tests/pygments-2816.patch b/hidden-tests/pygments-2816.patch new file mode 100644 index 0000000000000000000000000000000000000000..44f0e6e1fa0e7d118400cec17a463ca5fb75a365 --- /dev/null +++ b/hidden-tests/pygments-2816.patch @@ -0,0 +1,41 @@ +diff --git a/tests/snippets/jsx/test_apostrophe_text.txt b/tests/snippets/jsx/test_apostrophe_text.txt +new file mode 100644 +index 000000000..953214c2d +--- /dev/null ++++ b/tests/snippets/jsx/test_apostrophe_text.txt +@@ -0,0 +1,35 @@ ++---input--- ++const View = () =>
I'm the Block view component!
; ++ ++---tokens--- ++'const' Keyword.Declaration ++' ' Text.Whitespace ++'View' Name.Other ++' ' Text.Whitespace ++'=' Operator ++' ' Text.Whitespace ++'(' Punctuation ++')' Punctuation ++' ' Text.Whitespace ++'=>' Punctuation ++' ' Text.Whitespace ++'<' Punctuation ++'div' Name.Tag ++'>' Punctuation ++'I' Name.Other ++"'" Text ++'m' Name.Other ++' ' Text.Whitespace ++'the' Name.Other ++' ' Text.Whitespace ++'Block' Name.Other ++' ' Text.Whitespace ++'view' Name.Other ++' ' Text.Whitespace ++'component' Name.Other ++'!' Operator ++'' Punctuation ++';' Punctuation ++'\n' Text.Whitespace diff --git a/hidden-tests/pygments-2828.patch b/hidden-tests/pygments-2828.patch new file mode 100644 index 0000000000000000000000000000000000000000..bbc59feecc24a4007a51ceaa619cf2c9512e0d89 --- /dev/null +++ b/hidden-tests/pygments-2828.patch @@ -0,0 +1,69 @@ +diff --git a/tests/snippets/jsonnet/test_array_slice.txt b/tests/snippets/jsonnet/test_array_slice.txt +new file mode 100644 +index 000000000..de1dd316a +--- /dev/null ++++ b/tests/snippets/jsonnet/test_array_slice.txt +@@ -0,0 +1,63 @@ ++---input--- ++{ ++ local numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], ++ even_numbers: numbers[1::2], ++} ++ ++---tokens--- ++'{' Punctuation ++'\n ' Text.Whitespace ++'local' Keyword ++' ' Text.Whitespace ++'numbers' Name.Variable ++' ' Text.Whitespace ++'=' Operator ++' ' Text.Whitespace ++'[' Punctuation ++'1' Literal.Number.Float ++',' Punctuation ++' ' Text.Whitespace ++'2' Literal.Number.Float ++',' Punctuation ++' ' Text.Whitespace ++'3' Literal.Number.Float ++',' Punctuation ++' ' Text.Whitespace ++'4' Literal.Number.Float ++',' Punctuation ++' ' Text.Whitespace ++'5' Literal.Number.Float ++',' Punctuation ++' ' Text.Whitespace ++'6' Literal.Number.Float ++',' Punctuation ++' ' Text.Whitespace ++'7' Literal.Number.Float ++',' Punctuation ++' ' Text.Whitespace ++'8' Literal.Number.Float ++',' Punctuation ++' ' Text.Whitespace ++'9' Literal.Number.Float ++',' Punctuation ++' ' Text.Whitespace ++'10' Literal.Number.Float ++']' Punctuation ++',' Punctuation ++'\n ' Text.Whitespace ++'' Text ++'even_numbers' Name.Variable ++':' Punctuation ++' ' Text.Whitespace ++'numbers' Name.Variable ++'[' Punctuation ++'1' Literal.Number.Float ++':' Operator ++':' Operator ++'2' Literal.Number.Float ++']' Punctuation ++',' Punctuation ++'\n' Text.Whitespace ++ ++'}' Punctuation ++'\n' Text.Whitespace diff --git a/hidden-tests/pypdf-3587.patch b/hidden-tests/pypdf-3587.patch new file mode 100644 index 0000000000000000000000000000000000000000..bb915bcfe9d6c4959db05c93b35d4e7ddaaae61a --- /dev/null +++ b/hidden-tests/pypdf-3587.patch @@ -0,0 +1,51 @@ +diff --git a/tests/generic/test_base.py b/tests/generic/test_base.py +new file mode 100644 +index 00000000..e6387d36 +--- /dev/null ++++ b/tests/generic/test_base.py +@@ -0,0 +1,45 @@ ++"""Test the pypdf.generic._base module.""" ++from io import BytesIO ++ ++import pytest ++ ++from pypdf import PdfReader, PdfWriter ++from pypdf.generic import read_hex_string_from_stream ++from tests import get_data_from_url ++ ++ ++@pytest.mark.parametrize( ++ ("source", "expected"), ++ [ ++ (b"<00FE00FF>", "\xfe\xff"), ++ (b"<00FE00FF00D6>", "\xfe\xff\xd6"), ++ ] ++) ++def test_text_string_object__looks_like_bom(source: bytes, expected: str) -> None: ++ stream = BytesIO(source) ++ result = read_hex_string_from_stream(stream) ++ assert result == expected ++ ++ ++@pytest.mark.enable_socket ++def test_text_string_object__wrongly_detected_bom(): ++ url = "https://github.com/user-attachments/files/24401507/minimal.pdf" ++ name = "issue3587.pdf" ++ reader = PdfReader(BytesIO(get_data_from_url(url, name=name))) ++ reader_page = reader.pages[0] ++ ++ writer = PdfWriter() ++ for page in reader.pages: ++ writer_page = writer.add_blank_page(reader_page.mediabox.width, reader_page.mediabox.height) ++ writer_page.merge_page(page) ++ ++ assert writer_page.extract_text() == ( ++ "无译形带 r的参 z慧队手行 c要枪互工先调 uC一在你 k该方导最 xT况 M味政没出 v大同团\n" ++ "想急压游这体构主 m基重张预另做内已织程术并 U种规被中应 s过小立就公测和 F更为 BS\n" ++ "把强型 w利 qfJ现能您关文)己个言 VW是 Z亲社 y。说准密令 K络通自力 i诸旦明量放及 I\n" ++ "成战康养 d都蜂多开 pE次提朋动比台有培愿 A确 l充计标去人如么 b灵 N它 g弃语看 X;j\n" ++ "轮 HG采共由地友入(器 Y果感建切理情从集德翻 a单第识任 Q模 eh目经相哪受起时着 DR\n" ++ "用好 o备划付信、度解效作协读 O讨高具击始者意群治扩到 P才兰网认 t马倒来本整 L们 n\n" ++ "系可论,步各之但\n" ++ "12" ++ ) diff --git a/hidden-tests/pypdf-3878.patch b/hidden-tests/pypdf-3878.patch new file mode 100644 index 0000000000000000000000000000000000000000..626da3509af9aeea13a68f9213b5b4a179ef8164 --- /dev/null +++ b/hidden-tests/pypdf-3878.patch @@ -0,0 +1,122 @@ +diff --git a/tests/generic/test_data_structures.py b/tests/generic/test_data_structures.py +index f7ca7f18..78378f91 100644 +--- a/tests/generic/test_data_structures.py ++++ b/tests/generic/test_data_structures.py +@@ -15,6 +15,7 @@ from pypdf.generic import ( + ArrayObject, + ByteStringObject, + ContentStream, ++ Destination, + DictionaryObject, + NameObject, + NullObject, +@@ -24,6 +25,7 @@ from pypdf.generic import ( + TextStringObject, + TreeObject, + ) ++from pypdf.types import OutlineType + from tests import RESOURCE_ROOT, get_data_from_url + + try: +@@ -493,3 +495,101 @@ def test_tree_object__insert_child__cycle() -> None: + before=None, + pdf=writer, + ) ++ ++ ++def _outlined_pdf(nested: bool = False) -> BytesIO: ++ writer = PdfWriter() ++ for _ in range(4): ++ writer.add_blank_page(200, 200) ++ cover = writer.add_outline_item("Cover", 0) ++ writer.add_outline_item("Body", 1) ++ if nested: ++ writer.add_outline_item("Sub", 2, parent=cover) ++ writer.add_outline_item("End", 3) ++ stream = BytesIO() ++ writer.write(stream) ++ stream.seek(0) ++ return stream ++ ++ ++def _flat_outline(outline: OutlineType) -> list[Destination]: ++ """The outline items, asserting the outline holds no nested children.""" ++ items = [] ++ for entry in outline: ++ assert isinstance(entry, Destination), f"unexpected nested entry: {entry!r}" ++ items.append(entry) ++ return items ++ ++ ++@pytest.mark.parametrize( ++ ("index", "expected"), ++ [(0, ["Body", "End"]), (1, ["Cover", "End"]), (2, ["Cover", "Body"])], ++) ++def test_remove_from_tree_on_outline_item(index: int, expected: list[str]) -> None: ++ """ ++ reader.outline and writer.outline yield detached copies which never carry ++ /Parent, so removal has to act on the node they were built from. ++ """ ++ writer = PdfWriter(clone_from=PdfReader(_outlined_pdf())) ++ ++ _flat_outline(writer.outline)[index].remove_from_tree() ++ ++ assert [item.title for item in _flat_outline(writer.outline)] == expected ++ stream = BytesIO() ++ writer.write(stream) ++ stream.seek(0) ++ assert [item.title for item in _flat_outline(PdfReader(stream).outline)] == expected ++ ++ ++def test_remove_from_tree_on_outline_item_without_clone() -> None: ++ writer = PdfWriter() ++ for _ in range(3): ++ writer.add_blank_page(200, 200) ++ for page_number, title in enumerate(["Cover", "Body", "End"]): ++ writer.add_outline_item(title, page_number) ++ ++ _flat_outline(writer.outline)[0].remove_from_tree() ++ ++ assert [item.title for item in _flat_outline(writer.outline)] == ["Body", "End"] ++ ++ ++def test_remove_from_tree_on_nested_outline_item() -> None: ++ writer = PdfWriter(clone_from=PdfReader(_outlined_pdf(nested=True))) ++ children = writer.outline[1] ++ assert isinstance(children, list) ++ sub = children[0] ++ assert isinstance(sub, Destination) ++ assert sub.title == "Sub" ++ ++ sub.remove_from_tree() ++ ++ assert [item.title for item in _flat_outline(writer.outline)] == [ ++ "Cover", ++ "Body", ++ "End", ++ ] ++ ++ ++def test_remove_from_tree_on_destination_without_node() -> None: ++ """A destination carrying no node falls back to the plain tree behaviour.""" ++ writer = PdfWriter(clone_from=PdfReader(_outlined_pdf())) ++ item = _flat_outline(writer.outline)[0] ++ item.node = None ++ ++ with pytest.raises( ++ ValueError, match=r"^Removed child does not appear to be a tree item$" ++ ): ++ item.remove_from_tree() ++ ++ ++def test_remove_from_tree_on_node_already_detached() -> None: ++ """A node whose /Parent has gone is no longer part of any tree.""" ++ writer = PdfWriter(clone_from=PdfReader(_outlined_pdf())) ++ item = _flat_outline(writer.outline)[0] ++ assert item.node is not None ++ del item.node[NameObject("/Parent")] ++ ++ with pytest.raises( ++ ValueError, match=r"^Removed child does not appear to be a tree item$" ++ ): ++ item.remove_from_tree() diff --git a/hidden-tests/pypdf-3982.patch b/hidden-tests/pypdf-3982.patch new file mode 100644 index 0000000000000000000000000000000000000000..475ba89ab07d3a8c880a3276ff3432e3a8ffb426 --- /dev/null +++ b/hidden-tests/pypdf-3982.patch @@ -0,0 +1,66 @@ +diff --git a/tests/test_text_extraction.py b/tests/test_text_extraction.py +index 633d71dc..43bf0124 100644 +--- a/tests/test_text_extraction.py ++++ b/tests/test_text_extraction.py +@@ -930,3 +930,61 @@ def test_extract_text__form_xobject__limit(caplog) -> None: + assert caplog.messages == [ + "Exceeded 100 form XObject invocations while extracting text; further form content is skipped." + ] ++ ++ ++def _page_with_helvetica(content_stream: bytes) -> BytesIO: ++ """Build a single page using /F1 (Helvetica) and the given content stream.""" ++ writer = PdfWriter() ++ page = writer.add_blank_page(width=612, height=792) ++ ++ helvetica = DictionaryObject() ++ helvetica[NameObject("/Type")] = NameObject("/Font") ++ helvetica[NameObject("/Subtype")] = NameObject("/Type1") ++ helvetica[NameObject("/BaseFont")] = NameObject("/Helvetica") ++ font_resources = DictionaryObject() ++ font_resources[NameObject("/F1")] = writer._add_object(helvetica) ++ resources = DictionaryObject() ++ resources[NameObject("/Font")] = font_resources ++ page[NameObject("/Resources")] = resources ++ ++ content = DecodedStreamObject() ++ content.set_data(content_stream) ++ page[NameObject("/Contents")] = writer._add_object(content) ++ ++ buffer = BytesIO() ++ writer.write(buffer) ++ buffer.seek(0) ++ return buffer ++ ++ ++def test_text_leading_is_not_scaled_by_font_size() -> None: ++ """Tests for #3982""" ++ buffer = _page_with_helvetica( ++ b"BT /F1 12 Tf 1 0 0 1 72 700 Tm 14 TL " ++ b"(Line one) Tj T* (Line two) Tj T* (Line three) Tj ET" ++ ) ++ ++ positions = [] ++ ++ def visitor_text(text, cm, tm, font_dict, font_size) -> None: ++ if text.strip(): ++ positions.append(round(tm[5], 2)) ++ ++ text = PdfReader(buffer).pages[0].extract_text(visitor_text=visitor_text) ++ ++ # T* moves down by the leading itself: 14 units, not 14 * 12 (the font size). ++ assert positions == [700.0, 686.0, 672.0] ++ assert text == "Line one\nLine two\nLine three" ++ ++ ++def test_line_breaks_with_scaled_current_matrix() -> None: ++ """Tests for #2262: the line height has to be compared in the same space.""" ++ # The lines are 240 units apart in text space, which the CTM scales down to ++ # 12 units, matching a 200 pt font scaled down to 10 pt. ++ buffer = _page_with_helvetica( ++ b"q 0.05 0 0 0.05 0 0 cm " ++ b"BT /F1 200 Tf 1 0 0 1 200 14000 Tm (Line one) Tj " ++ b"1 0 0 1 200 13760 Tm (Line two) Tj ET Q" ++ ) ++ ++ assert PdfReader(buffer).pages[0].extract_text() == "Line one\nLine two" diff --git a/hidden-tests/sqlit-246.patch b/hidden-tests/sqlit-246.patch new file mode 100644 index 0000000000000000000000000000000000000000..b57ba513ba130539309a7eb632287e7be1058e72 --- /dev/null +++ b/hidden-tests/sqlit-246.patch @@ -0,0 +1,60 @@ +diff --git a/tests/unit/test_multi_statement.py b/tests/unit/test_multi_statement.py +index 21e3307..617abb2 100644 +--- a/tests/unit/test_multi_statement.py ++++ b/tests/unit/test_multi_statement.py +@@ -76,6 +76,55 @@ class TestStatementSplitting: + + assert len(statements) == 2 + ++ def test_preserves_semicolons_in_dollar_quoted_strings(self): ++ """Should not split on semicolons inside dollar-quoted strings.""" ++ from sqlit.domains.query.app.multi_statement import split_statements ++ ++ query = """ ++ CREATE OR REPLACE FUNCTION example() ++ RETURNS void AS $$ ++ BEGIN ++ INSERT INTO t (x) VALUES ('a;b'); ++ END; ++ $$ LANGUAGE plpgsql; ++ SELECT 1; ++ """ ++ statements = split_statements(query) ++ ++ assert len(statements) == 2 ++ assert "CREATE OR REPLACE FUNCTION" in statements[0] ++ assert "SELECT 1" in statements[1] ++ ++ def test_preserves_semicolons_in_named_dollar_quoted_strings(self): ++ """Should not split on semicolons inside named dollar-quoted strings.""" ++ from sqlit.domains.query.app.multi_statement import split_statements ++ ++ query = """ ++ CREATE OR REPLACE FUNCTION example() ++ RETURNS void AS $func_tag$ ++ BEGIN ++ INSERT INTO t (x) VALUES ('a;b'); ++ END; ++ $func_tag$ LANGUAGE plpgsql; ++ SELECT 1; ++ """ ++ statements = split_statements(query) ++ ++ assert len(statements) == 2 ++ assert "CREATE OR REPLACE FUNCTION" in statements[0] ++ assert "SELECT 1" in statements[1] ++ ++ def test_dollar_quotes_inside_standard_strings_are_ignored(self): ++ """Should ignore dollar quote delimiters when inside standard string literals.""" ++ from sqlit.domains.query.app.multi_statement import split_statements ++ ++ query = "INSERT INTO t (x) VALUES ('$$'); SELECT 1" ++ statements = split_statements(query) ++ ++ assert len(statements) == 2 ++ assert "INSERT" in statements[0] ++ assert "SELECT 1" in statements[1] ++ + + class TestMultiStatementResult: + """Tests for MultiStatementResult data structure.""" diff --git a/hidden-tests/sqlit-260.patch b/hidden-tests/sqlit-260.patch new file mode 100644 index 0000000000000000000000000000000000000000..b47d704e88315f615daf8382a4617d672e2618d4 --- /dev/null +++ b/hidden-tests/sqlit-260.patch @@ -0,0 +1,83 @@ +diff --git a/tests/connections/providers/oracle/test_statement_execution.py b/tests/connections/providers/oracle/test_statement_execution.py +new file mode 100644 +index 0000000..73eda73 +--- /dev/null ++++ b/tests/connections/providers/oracle/test_statement_execution.py +@@ -0,0 +1,77 @@ ++"""Oracle-specific statement execution behavior.""" ++ ++from __future__ import annotations ++ ++from unittest.mock import MagicMock ++ ++import pytest ++ ++from sqlit.domains.connections.providers.oracle.adapter import OracleAdapter ++ ++ ++@pytest.fixture ++def adapter() -> OracleAdapter: ++ return OracleAdapter() ++ ++ ++@pytest.fixture ++def mock_conn() -> MagicMock: ++ conn = MagicMock() ++ cursor = conn.cursor.return_value ++ cursor.description = None ++ cursor.rowcount = 0 ++ return conn ++ ++ ++@pytest.mark.parametrize( ++ ("query", "expected"), ++ [ ++ ("SELECT ';' AS value FROM DUAL;", "SELECT ';' AS value FROM DUAL"), ++ ("SELECT 1 FROM DUAL; \n", "SELECT 1 FROM DUAL"), ++ ("SELECT 1 FROM DUAL", "SELECT 1 FROM DUAL"), ++ ], ++) ++def test_execute_query_removes_sql_statement_terminator( ++ adapter: OracleAdapter, ++ mock_conn: MagicMock, ++ query: str, ++ expected: str, ++) -> None: ++ """python-oracledb rejects SQL statements ending in a semicolon.""" ++ adapter.execute_query(mock_conn, query) ++ ++ mock_conn.cursor.return_value.execute.assert_called_once_with(expected) ++ ++ ++def test_execute_non_query_removes_sql_statement_terminator( ++ adapter: OracleAdapter, ++ mock_conn: MagicMock, ++) -> None: ++ """Issue #260: ALTER SESSION must reach python-oracledb without ``;``.""" ++ adapter.execute_non_query(mock_conn, "ALTER SESSION SET EDITION = V0;") ++ ++ mock_conn.cursor.return_value.execute.assert_called_once_with("ALTER SESSION SET EDITION = V0") ++ ++ ++@pytest.mark.parametrize( ++ "statement", ++ [ ++ "BEGIN NULL; END;", ++ "DECLARE value NUMBER := 1; BEGIN NULL; END;", ++ "CREATE OR REPLACE PROCEDURE p AS BEGIN NULL; END;", ++ "-- setup\nBEGIN NULL; END;", ++ "/* setup */ CREATE OR REPLACE EDITIONABLE FUNCTION f RETURN NUMBER " ++ "AS BEGIN RETURN 1; END;", ++ "CREATE OR REPLACE TYPE BODY t AS MEMBER PROCEDURE p IS " ++ "BEGIN NULL; END; END;", ++ ], ++) ++def test_execute_non_query_preserves_plsql_terminator( ++ adapter: OracleAdapter, ++ mock_conn: MagicMock, ++ statement: str, ++) -> None: ++ """The final semicolon is part of PL/SQL syntax, not a client terminator.""" ++ adapter.execute_non_query(mock_conn, statement) ++ ++ mock_conn.cursor.return_value.execute.assert_called_once_with(statement) diff --git a/hidden-tests/structlog-710.patch b/hidden-tests/structlog-710.patch new file mode 100644 index 0000000000000000000000000000000000000000..4789fe44eba49eb8f0b3ca85fd80a882ac57e0f5 --- /dev/null +++ b/hidden-tests/structlog-710.patch @@ -0,0 +1,78 @@ +diff --git a/tests/processors/test_processors.py b/tests/processors/test_processors.py +index e43485e..99516b4 100644 +--- a/tests/processors/test_processors.py ++++ b/tests/processors/test_processors.py +@@ -36,6 +36,7 @@ from structlog.processors import ( + format_exc_info, + ) + from structlog.stdlib import ProcessorFormatter ++from structlog.testing import CapturingLoggerFactory + from structlog.typing import EventDict, ExcInfo + + from ..additional_frame import additional_frame +@@ -378,6 +379,7 @@ class TestCallsiteParameterAdder: + async def test_async(self, wrapper_class, method_name) -> None: + """ + Callsite information for async invocations are correct. ++ Thread information is now correctly captured before async bridge. + """ + string_io = StringIO() + +@@ -395,17 +397,56 @@ class TestCallsiteParameterAdder: + + logger = structlog.stdlib.get_logger() + ++ # Capture thread info before async call ++ expected_thread = threading.get_ident() ++ expected_thread_name = threading.current_thread().name ++ + callsite_params = self.get_callsite_parameters() + await getattr(logger, method_name)("baz") + logger_params = json.loads(string_io.getvalue()) + +- # These are different when running under async ++ assert expected_thread == logger_params["thread"] ++ assert expected_thread_name == logger_params["thread_name"] ++ ++ # Remove thread info from comparison for remaining params + for key in ["thread", "thread_name"]: + callsite_params.pop(key) + logger_params.pop(key) + + assert {"event": "baz", **callsite_params} == logger_params + ++ @pytest.mark.asyncio ++ async def test_async_native_logger(self) -> None: ++ """ ++ Callsite thread information for native async invocations is correct. ++ """ ++ cf = CapturingLoggerFactory() ++ structlog.configure( ++ processors=[ ++ CallsiteParameterAdder( ++ parameters=[ ++ CallsiteParameter.THREAD, ++ CallsiteParameter.THREAD_NAME, ++ ] ++ ), ++ ], ++ logger_factory=cf, ++ wrapper_class=structlog._native.BoundLoggerFilteringAtInfo, ++ cache_logger_on_first_use=True, ++ ) ++ ++ logger = structlog.get_logger() ++ ++ expected_thread = threading.get_ident() ++ expected_thread_name = threading.current_thread().name ++ ++ await logger.ainfo("test native async") ++ ++ captured = cf.logger.calls[0].kwargs ++ ++ assert expected_thread == captured["thread"] ++ assert expected_thread_name == captured["thread_name"] ++ + def test_additional_ignores(self, monkeypatch: pytest.MonkeyPatch) -> None: + """ + Stack frames from modules with names that start with values in diff --git a/hidden-tests/tomlkit-440.patch b/hidden-tests/tomlkit-440.patch new file mode 100644 index 0000000000000000000000000000000000000000..3c697ba54fa5907209acaab52baa7eb35135586a --- /dev/null +++ b/hidden-tests/tomlkit-440.patch @@ -0,0 +1,24 @@ +diff --git a/tests/test_toml_document.py b/tests/test_toml_document.py +index a3fd566..0ee5ed8 100644 +--- a/tests/test_toml_document.py ++++ b/tests/test_toml_document.py +@@ -1528,6 +1528,19 @@ name = "Nail" + } + + ++def test_add_key_after_dotted_inline_table_without_ending_newline() -> None: ++ content = "[x]\na.b = {}" ++ doc = parse(content) ++ doc["x"]["c"] = 3 ++ ++ assert doc.as_string() == "[x]\na.b = {}\nc = 3\n" ++ ++ doc = parse(f"{content}\n") ++ doc["x"]["c"] = 3 ++ ++ assert doc.as_string() == "[x]\na.b = {}\nc = 3\n" ++ ++ + def test_appending_to_super_table() -> None: + content = """\ + [a.b] diff --git a/hidden-tests/tomlkit-542.patch b/hidden-tests/tomlkit-542.patch new file mode 100644 index 0000000000000000000000000000000000000000..49785310b8b671d0e55ff665790f374064df1d94 --- /dev/null +++ b/hidden-tests/tomlkit-542.patch @@ -0,0 +1,33 @@ +diff --git a/tests/test_toml_document.py b/tests/test_toml_document.py +index 0e950cb..769c919 100644 +--- a/tests/test_toml_document.py ++++ b/tests/test_toml_document.py +@@ -1170,6 +1170,28 @@ x = 9 + assert parse(doc.as_string()) == {"c": {"d": 2}, "a": {"x": 9}} + + ++def test_replace_dotted_key_with_aot_keeps_following_sibling() -> None: ++ # https://github.com/python-poetry/tomlkit/issues/542 ++ content = """a.b = 1 ++c.d = 2 ++""" ++ doc = parse(content) ++ arr = tomlkit.aot() ++ tbl = tomlkit.table() ++ tbl["x"] = 9 ++ arr.append(tbl) ++ doc["a"] = arr ++ assert ( ++ doc.as_string() ++ == """c.d = 2 ++ ++[[a]] ++x = 9 ++""" ++ ) ++ assert parse(doc.as_string()) == {"c": {"d": 2}, "a": [{"x": 9}]} ++ ++ + def test_replace_value_with_table_keeps_following_dotted_sibling() -> None: + # A plain value turning into a table must likewise clear the inline region + # (including dotted keys) before emitting its header. diff --git a/hidden-tests/typeguard-499.patch b/hidden-tests/typeguard-499.patch new file mode 100644 index 0000000000000000000000000000000000000000..baf8d826dc0f6cb1edd7a5a646e93cabf7f3edd5 --- /dev/null +++ b/hidden-tests/typeguard-499.patch @@ -0,0 +1,49 @@ +diff --git a/tests/test_checkers.py b/tests/test_checkers.py +index 4c96cf8..5f77898 100644 +--- a/tests/test_checkers.py ++++ b/tests/test_checkers.py +@@ -14,6 +14,7 @@ from typing import ( + AnyStr, + BinaryIO, + Callable, ++ ClassVar, + Collection, + Concatenate, + ContextManager, +@@ -1342,6 +1343,36 @@ class TestProtocol: + f"'member'" + ) + ++ def test_class_against_protocol_ignores_instance_attributes(self) -> None: ++ # Checking a class (not an instance) against type[Protocol] must not ++ # flag instance attributes as missing; only ClassVar members are ++ # required on the class itself. See issue #499. ++ class MyProtocol(Protocol): ++ foo: str ++ ++ class Foo: ++ def __init__(self) -> None: ++ self.foo = "bar" ++ ++ check_type(Foo, type[MyProtocol]) ++ ++ def test_class_against_protocol_requires_classvar(self) -> None: ++ class MyProtocol(Protocol): ++ bar: ClassVar[int] ++ ++ class Missing: ++ pass ++ ++ pytest.raises(TypeCheckError, check_type, Missing, type[MyProtocol]).match( ++ f"is not compatible with the {MyProtocol.__qualname__} protocol " ++ f"because it has no attribute named 'bar'" ++ ) ++ ++ class Present: ++ bar = 3 ++ ++ check_type(Present, type[MyProtocol]) ++ + def test_missing_method(self) -> None: + class MyProtocol(Protocol): + def meth(self) -> None: diff --git a/miner/.gitignore b/miner/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..09ff39e775972aebc25339bffd28b9640fab2cc4 --- /dev/null +++ b/miner/.gitignore @@ -0,0 +1,11 @@ +.venv/ +__pycache__/ +.pytest_cache/ +.ruff_cache/ +*.pyc +build/ +dist/ +work/ +data/*candidates*.jsonl +data/artifacts/ +data/reviews/*/ diff --git a/miner/.pytest_cache/.gitignore b/miner/.pytest_cache/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..bc1a1f6167d09c909aad37280b760bb715d0f1da --- /dev/null +++ b/miner/.pytest_cache/.gitignore @@ -0,0 +1,2 @@ +# Created by pytest automatically. +* diff --git a/miner/.pytest_cache/CACHEDIR.TAG b/miner/.pytest_cache/CACHEDIR.TAG new file mode 100644 index 0000000000000000000000000000000000000000..fce15ad7eaa74e5682b644c84efb75334c112f95 --- /dev/null +++ b/miner/.pytest_cache/CACHEDIR.TAG @@ -0,0 +1,4 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by pytest. +# For information about cache directory tags, see: +# https://bford.info/cachedir/spec.html diff --git a/miner/.pytest_cache/README.md b/miner/.pytest_cache/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b89018ced91c0a8af7f3f23ce8901870da89f3a0 --- /dev/null +++ b/miner/.pytest_cache/README.md @@ -0,0 +1,8 @@ +# pytest cache directory # + +This directory contains data from the pytest's cache plugin, +which provides the `--lf` and `--ff` options, as well as the `cache` fixture. + +**Do not** commit this to version control. + +See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information. diff --git a/miner/.pytest_cache/v/cache/nodeids b/miner/.pytest_cache/v/cache/nodeids new file mode 100644 index 0000000000000000000000000000000000000000..5445923b4b59ae71fd7d11d30bc0dbe55744f7c4 --- /dev/null +++ b/miner/.pytest_cache/v/cache/nodeids @@ -0,0 +1,26 @@ +[ + "tests/test_classify.py::test_bug_label_can_supply_signal", + "tests/test_classify.py::test_eligible_fix_and_test", + "tests/test_classify.py::test_feature_without_bug_label_is_rejected", + "tests/test_classify.py::test_path_classification", + "tests/test_classify.py::test_rejections_are_explicit_and_additive", + "tests/test_freeze.py::test_freeze_accepts_and_normalizes_known_legacy_smoke_hash", + "tests/test_freeze.py::test_freeze_fails_closed_without_validation", + "tests/test_freeze.py::test_freeze_is_deterministic_and_dereferences_source_links", + "tests/test_freeze.py::test_freeze_publishes_version_tag_from_older_digest_attestation", + "tests/test_freeze.py::test_freeze_rechecks_four_cell_proof_and_validated_decision", + "tests/test_freeze.py::test_freeze_rejects_false_runner_smoke_hash", + "tests/test_freeze.py::test_freeze_rejects_nonversioned_runtime_recipe[bad image:1]", + "tests/test_freeze.py::test_freeze_rejects_nonversioned_runtime_recipe[python:latest]", + "tests/test_freeze.py::test_freeze_rejects_nonversioned_runtime_recipe[python@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]", + "tests/test_freeze.py::test_freeze_rejects_nonversioned_runtime_recipe[python]", + "tests/test_freeze.py::test_freeze_requires_exact_explicit_count", + "tests/test_io.py::test_candidate_jsonl_round_trip", + "tests/test_prepare.py::test_leakage_flags[Here is the proposed fix: change x to y-solution-language]", + "tests/test_prepare.py::test_leakage_flags[Reproduction only-None]", + "tests/test_prepare.py::test_leakage_flags[The traceback points at src/mod.py-mentions-production-path:src/mod.py]", + "tests/test_prepare.py::test_pilot_nominations_are_unique_and_balanced", + "tests/test_prepare.py::test_review_decisions_cover_every_nomination", + "tests/test_validate.py::test_json_repair_runtime_is_network_buildable_and_offline_runnable", + "tests/test_validate.py::test_reviewed_task_commands_are_focused" +] \ No newline at end of file diff --git a/miner/README.md b/miner/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d302aaec714a4d9a06fcb23c5e5868077b5d6743 --- /dev/null +++ b/miner/README.md @@ -0,0 +1,76 @@ +# PatchEval miner + +This repository mines and validates frozen PatchEval tasks. It is deliberately +separate from BenchKit: BenchKit contains the public runner and grader, while +this project records how each immutable dataset release was produced. + +The pilot release targets 20 Python bug-fix tasks from 2025-12-23 through +2026-08-23. A candidate is only eligible when one pull request: + +- links a public GitHub issue; +- changes Python production code and regression tests together; +- has a single-parent fix commit, so the starting state is unambiguous; and +- can later be proven to fail at the parent and pass at the fix without + regressing the repository's previously passing suite. + +Discovery is not validation. The `collect` command only builds an auditable raw +candidate ledger. Container builds, repeated fail/pass validation, blind review, +and final freezing are separate gates. + +## Discovery + +Authenticate the GitHub CLI, then run: + +```console +patcheval-mine collect --config config/pilot.toml --output data/candidates.jsonl +patcheval-mine summarize data/candidates.jsonl +``` + +The collector uses GitHub's public API through `gh`; it does not clone +repositories or download gold patches. + +## Publication boundary + +Raw review files may contain fix metadata and are not dataset artifacts. A +published task contains only its parent source archive, issue prompt, pinned +runtime build recipe, hidden-test patch, commands, checksums, and validation +attestation. PatchEval publishes no Docker images. Gold source patches and +repository history are never shipped to the agent sandbox. + +## Freeze a validated release + +Freezing is the final, fail-closed publication gate. It only accepts tasks whose +entry in `review-decisions.toml` is `decision = "validated"`, whose packet has a +successful repeated four-cell `validation.json`. Each task records the +versioned upstream base tag, dependency sync command, optional bootstrap +command, and runtime environment used by validation. BenchKit turns that recipe +into a local Docker image at run time and removes all PatchEval Docker resources +after the run. Version tags and package registries can drift; the release +deliberately freezes the recipe and source rather than a built image. + +Freeze an explicit set: + +```console +patcheval-mine freeze \ + --decisions config/review-decisions.toml \ + --packets work/review-packets \ + --cache work/repositories \ + --output dist/patcheval-pilot \ + --count 20 \ + --task sqlit-246 \ + --task sqlit-260 +# Repeat --task exactly 20 times. Without --task, validated entries are selected +# in review-decisions.toml order. +``` + +The output is written atomically and contains deterministic regular-file-only +parent tar archives, copied hidden-test patches and validation attestations, +`tasks.jsonl`, `dataset.json`, and a sorted `SHA256SUMS`. Safe repository +symlinks are dereferenced; escaping, cyclic, missing-target, hardlink, device, +and other special archive entries abort the freeze. Empty `setup_command` and +empty optional fields are omitted for BenchKit schema compatibility. + +The freezer refuses missing or contradictory validation cells, packet/checksum +mismatches, ambiguous parents, missing mirrors, an existing output directory, +malformed runtime recipes, mutable `latest` base tags, and invalid environment +entries. A failed run never leaves a partial release at `--output`. diff --git a/miner/config/commands.toml b/miner/config/commands.toml new file mode 100644 index 0000000000000000000000000000000000000000..e596ea80f1f371e3c281ff50ba3ad7e97ef94669 --- /dev/null +++ b/miner/config/commands.toml @@ -0,0 +1,117 @@ +schema_version = 1 + +[tasks."json-repair-207"] +fail_to_pass = ["pytest", "-q", "tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair"] +regression = ["pytest", "-q", "--ignore=tests/test_performance.py"] + +[tasks."json-repair-191"] +fail_to_pass = ["pytest", "-q", "tests/test_json_repair.py::test_parenthesized_prose_does_not_hijack_fenced_json"] +regression = ["pytest", "-q", "--ignore=tests/test_performance.py"] + +[tasks."json-repair-205"] +fail_to_pass = ["pytest", "-q", "tests/test_schema_guided_parse.py::test_schema_union_branch_keeps_root_defs_scope_during_repair"] +regression = ["pytest", "-q", "--ignore=tests/test_performance.py"] + +[tasks."json-repair-194"] +fail_to_pass = ["pytest", "-q", "tests/test_parse_comment.py::test_line_comment_brackets_do_not_close_array_items"] +regression = ["pytest", "-q", "--ignore=tests/test_performance.py"] + +[tasks."sqlit-246"] +fail_to_pass = ["pytest", "-q", "--timeout=60", "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_dollar_quoted_strings", "tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_named_dollar_quoted_strings", "tests/unit/test_multi_statement.py::TestStatementSplitting::test_dollar_quotes_inside_standard_strings_are_ignored"] +regression = ["pytest", "-q", "--timeout=60", "tests/", "--ignore=tests/test_mssql.py", "--ignore=tests/test_postgresql.py", "--ignore=tests/test_mysql.py", "--ignore=tests/test_oracle.py", "--ignore=tests/test_mariadb.py", "--ignore=tests/test_cockroachdb.py", "--ignore=tests/test_turso.py", "--ignore=tests/test_firebird.py", "--ignore=tests/test_ssh.py", "--ignore=tests/test_clickhouse.py"] + +[tasks."sqlit-260"] +fail_to_pass = ["pytest", "-q", "--timeout=60", "tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator", "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_removes_sql_statement_terminator", "tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_preserves_plsql_terminator"] +regression = ["pytest", "-q", "--timeout=60", "tests/", "--ignore=tests/test_mssql.py", "--ignore=tests/test_postgresql.py", "--ignore=tests/test_mysql.py", "--ignore=tests/test_oracle.py", "--ignore=tests/test_mariadb.py", "--ignore=tests/test_cockroachdb.py", "--ignore=tests/test_turso.py", "--ignore=tests/test_firebird.py", "--ignore=tests/test_ssh.py", "--ignore=tests/test_clickhouse.py"] + +[tasks."city2graph-121"] +fail_to_pass = ["pytest", "-q", "tests/test_utils.py::TestPlotting::test_plot_graph_homo_with_legend_kwargs_and_title"] +regression = ["pytest", "-q", "tests"] + +[tasks."city2graph-156"] +fail_to_pass = ["pytest", "-q", "tests/test_graph.py::TestUndirectedEdgeHandling::test_every_edge_has_reverse"] +regression = ["pytest", "-q", "tests"] + +[tasks."click-3572"] +fail_to_pass = ["pytest", "-q", "tests/test_termui.py::test_prompt_and_confirm_ansi_respects_color[confirm-no-color]"] +regression = ["pytest", "-q", "-m", "not stress", "tests"] + +[tasks."click-3360"] +fail_to_pass = ["pytest", "-q", "tests/test_formatting.py::test_help_formatter_write_usage[empty-args-default-prefix]"] +regression = ["pytest", "-q", "-m", "not stress", "tests"] + +[tasks."click-2790"] +fail_to_pass = ["pytest", "-q", "tests/test_formatting.py::test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.]"] +regression = ["pytest", "-q", "-m", "not stress", "tests"] + +[tasks."click-3121"] +fail_to_pass = ["pytest", "-q", "tests/test_options.py::test_callable_flag_value_not_instantiated[opt_params0-args0-Class1]"] +regression = ["pytest", "-q", "-m", "not stress", "tests"] + +[tasks."pypdf-3982"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-p", "pytest_socket", "-p", "pytest_timeout", "--timeout=60", "-o", "cache_dir=/tmp/pytest-cache", "tests/test_text_extraction.py::test_text_leading_is_not_scaled_by_font_size"] +regression = ["python", "-m", "pytest", "-q", "-p", "pytest_socket", "-p", "pytest_timeout", "--timeout=60", "-o", "cache_dir=/tmp/pytest-cache", "-m", "not enable_socket and not samples", "tests"] + +[tasks."pypdf-3878"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-p", "pytest_socket", "-p", "pytest_timeout", "--timeout=60", "-o", "cache_dir=/tmp/pytest-cache", "tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item"] +regression = ["python", "-m", "pytest", "-q", "-p", "pytest_socket", "-p", "pytest_timeout", "--timeout=60", "-o", "cache_dir=/tmp/pytest-cache", "-m", "not enable_socket and not samples", "tests"] + +[tasks."pypdf-3587"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-p", "pytest_socket", "-p", "pytest_timeout", "--timeout=60", "-o", "cache_dir=/tmp/pytest-cache", "tests/generic/test_base.py::test_text_string_object__looks_like_bom"] +regression = ["python", "-m", "pytest", "-q", "-p", "pytest_socket", "-p", "pytest_timeout", "--timeout=60", "-o", "cache_dir=/tmp/pytest-cache", "-m", "not enable_socket and not samples", "tests"] + +[tasks."coverage-2157"] +fail_to_pass = ["python", "igor.py", "test_with_core", "ctrace", "-n", "0", "--cache-clear", "tests/test_process.py::EnvironmentTest::test_coverage_in_symlink_is_like_python"] +regression = ["python", "igor.py", "test_with_core", "ctrace", "-n", "0", "--cache-clear", "tests"] + +[tasks."pytest-14195"] +fail_to_pass = ["python", "-m", "pytest", "-q", "--cache-clear", "testing/test_subtests.py::TestUnittestSubTest::test_msg_not_a_string"] +regression = ["python", "-m", "pytest", "-q", "--cache-clear", "testing"] + +[tasks."pytest-12444"] +fail_to_pass = ["python", "-m", "pytest", "-q", "--cache-clear", "testing/python/approx.py::TestApprox::test_approx_on_unordered_mapping_with_mismatch"] +regression = ["python", "-m", "pytest", "-q", "--cache-clear", "testing"] + +[tasks."pygments-2928"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-W", "error", "--cache-clear", "--randomly-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "tests/snippets/cpp/test_function_after_namespace.txt", "tests/examplefiles/cpp/namespace.cpp"] +regression = ["python", "-m", "pytest", "-q", "-W", "error", "--cache-clear", "--randomly-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "tests"] + +[tasks."pygments-2816"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-W", "error", "--cache-clear", "--randomly-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "tests/snippets/jsx/test_apostrophe_text.txt"] +regression = ["python", "-m", "pytest", "-q", "-W", "error", "--cache-clear", "--randomly-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "tests"] + +[tasks."pygments-2828"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-W", "error", "--cache-clear", "--randomly-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "tests/snippets/jsonnet/test_array_slice.txt"] +regression = ["python", "-m", "pytest", "-q", "-W", "error", "--cache-clear", "--randomly-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "tests"] + +[tasks."attrs-1575"] +fail_to_pass = ["python", "-m", "pytest", "-q", "--hypothesis-seed=0", "tests/test_annotations.py::TestAnnotations::test_missing_classvar_import"] +regression = ["python", "-m", "pytest", "-q", "--hypothesis-seed=0", "tests"] + +[tasks."typeguard-499"] +fail_to_pass = ["python", "-m", "pytest", "-q", "tests/test_checkers.py::TestProtocol::test_class_against_protocol_ignores_instance_attributes"] +regression = ["python", "-m", "pytest", "-q", "tests"] + +[tasks."structlog-710"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-p", "no:randomly", "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async", "tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async_native_logger"] +regression = ["python", "-m", "pytest", "-q", "-p", "no:randomly", "tests"] + +[tasks."narwhals-3864"] +fail_to_pass = ["python", "-m", "pytest", "-q", "--randomly-seed=0", "--hypothesis-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "--constructors=pandas,pandas[nullable]", "tests/frame/concat_test.py::test_concat_horizontal_pandas_left_hand_rule"] +regression = ["python", "-m", "pytest", "-q", "--randomly-seed=0", "--hypothesis-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "--runslow", "--constructors=pandas,pandas[nullable]", "tests"] + +[tasks."pluggy-431"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-o", "cache_dir=/tmp/pytest-cache", "testing/test_pluginmanager.py::test_unregister_plugin_with_multi_hookimpls"] +regression = ["python", "-m", "pytest", "-q", "-o", "cache_dir=/tmp/pytest-cache", "testing"] + +[tasks."tomlkit-440"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-o", "cache_dir=/tmp/pytest-cache", "tests/test_toml_document.py::test_add_key_after_dotted_inline_table_without_ending_newline"] +regression = ["python", "-m", "pytest", "-q", "-o", "cache_dir=/tmp/pytest-cache", "tests", "--ignore=tests/test_toml_tests.py"] + +[tasks."tomlkit-542"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-o", "cache_dir=/tmp/pytest-cache", "tests/test_toml_document.py::test_replace_dotted_key_with_aot_keeps_following_sibling"] +regression = ["python", "-m", "pytest", "-q", "-o", "cache_dir=/tmp/pytest-cache", "tests", "--ignore=tests/test_toml_tests.py"] + +[tasks."babel-1245"] +fail_to_pass = ["python", "-m", "pytest", "-q", "-o", "cache_dir=/tmp/pytest-cache", "tests/test_smoke.py::test_smoke_numbers[nl]", "tests/test_smoke.py::test_smoke_numbers[nl_BE]", "tests/test_smoke.py::test_smoke_numbers[nl_NL]"] +regression = ["python", "-m", "pytest", "-q", "-o", "cache_dir=/tmp/pytest-cache", "tests"] diff --git a/miner/config/nominations.toml b/miner/config/nominations.toml new file mode 100644 index 0000000000000000000000000000000000000000..ed1304aa7abfdee298f4b023faf0b935aaefc62a --- /dev/null +++ b/miner/config/nominations.toml @@ -0,0 +1,344 @@ +schema_version = 1 + +[[nominations]] +id = "ministack-1409" +repository = "ministackorg/ministack" +fix_sha = "7602aa9dd6b852022dac07644886f3506b2e3bc8" +issue = 1409 +pull = 1410 + +[[nominations]] +id = "ministack-1311" +repository = "ministackorg/ministack" +fix_sha = "ad49304ea3a263f3170fdde5c57cd617e4d6ea7e" +issue = 1311 +pull = 1312 + +[[nominations]] +id = "ministack-1281" +repository = "ministackorg/ministack" +fix_sha = "67c9e3ddbac6011d68442e73edb760bb09ce059a" +issue = 1281 +pull = 1282 + +[[nominations]] +id = "sqlit-246" +repository = "Maxteabag/sqlit" +fix_sha = "61be617020d07111426383d9b1bb4867643619a8" +issue = 246 +pull = 248 + +[[nominations]] +id = "sqlit-161" +repository = "Maxteabag/sqlit" +fix_sha = "c5520bb93c2f8262a75b41bb65e7db0bbc564a21" +issue = 161 +pull = 171 + +[[nominations]] +id = "sqlit-260" +repository = "Maxteabag/sqlit" +fix_sha = "15835dce61c8a57671ae87061f95c362e5d59d49" +issue = 260 +pull = 273 + +[[nominations]] +id = "codex-lb-1698" +repository = "Soju06/codex-lb" +fix_sha = "2164b8c0656b3a8539ccdf8a4a8655a788af9ae8" +issue = 1698 +pull = 1709 + +[[nominations]] +id = "codex-lb-1668" +repository = "Soju06/codex-lb" +fix_sha = "ff2920cab1eba62da7c540a1b72b71961553d57d" +issue = 1668 +pull = 1669 + +[[nominations]] +id = "narwhals-3850" +repository = "narwhals-dev/narwhals" +fix_sha = "f5ba0911cc7033eaba05824e4d61fdcddd1fcf3e" +issue = 3850 +pull = 3865 + +[[nominations]] +id = "narwhals-3864" +repository = "narwhals-dev/narwhals" +fix_sha = "bc34ee7ffd988f335e174075b6685059eef97280" +issue = 3864 +pull = 3866 + +[[nominations]] +id = "narwhals-3474" +repository = "narwhals-dev/narwhals" +fix_sha = "8fd15fb17d68479c4d637a3d28c08d7847b87a28" +issue = 3474 +pull = 3480 + +[[nominations]] +id = "narwhals-3841" +repository = "narwhals-dev/narwhals" +fix_sha = "c679eba989c489f3be8c3c5eda4d845339a49852" +issue = 3841 +pull = 3862 + +[[nominations]] +id = "pgqueuer-674" +repository = "janbjorge/pgqueuer" +fix_sha = "bb5bf6a05161efbcceb04310638210c2e80e48a3" +issue = 674 +pull = 675 + +[[nominations]] +id = "pgqueuer-684" +repository = "janbjorge/pgqueuer" +fix_sha = "632981b6aeaa63a19d4f76f437669e0b7e105aa9" +issue = 684 +pull = 685 + +[[nominations]] +id = "pgqueuer-671" +repository = "janbjorge/pgqueuer" +fix_sha = "9b6f9cc0fdf246129deab83075ae3c1177bd1bb0" +issue = 671 +pull = 676 + +[[nominations]] +id = "datachain-1157" +repository = "datachain-ai/datachain" +fix_sha = "bab32316cbd81311ff35c8e730619d85dfead744" +issue = 1157 +pull = 1871 + +[[nominations]] +id = "datachain-1836" +repository = "datachain-ai/datachain" +fix_sha = "16e4ef1140dc412bef3651b019749ec149e68759" +issue = 1836 +pull = 1841 + +[[nominations]] +id = "datachain-1676" +repository = "datachain-ai/datachain" +fix_sha = "f9a731cedece4f131cb6db081acfc1874dbc7560" +issue = 1676 +pull = 1677 + +[[nominations]] +id = "datachain-1666" +repository = "datachain-ai/datachain" +fix_sha = "f6e17e911f73fc505365c454da5a51d03cfc138b" +issue = 1666 +pull = 1668 + +[[nominations]] +id = "city2graph-121" +repository = "c2g-dev/city2graph" +fix_sha = "22f8f0342a913f65ff304677724c1bc36c3fd60e" +issue = 121 +pull = 122 + +[[nominations]] +id = "city2graph-156" +repository = "c2g-dev/city2graph" +fix_sha = "1c0e30f4b08a876054afd5a1f85b6c4efae9c433" +issue = 156 +pull = 157 + +[[nominations]] +id = "json-repair-211" +repository = "mangiucugna/json_repair" +fix_sha = "7ab1ebacd57f1dbd6b411a7d9c790d8f95f136c3" +issue = 211 + +[[nominations]] +id = "json-repair-207" +repository = "mangiucugna/json_repair" +fix_sha = "600ede6be7d125d14812be3bbd7ef3e0b526a84e" +issue = 207 + +[[nominations]] +id = "json-repair-191" +repository = "mangiucugna/json_repair" +fix_sha = "cd94f1fb39a1479e2e4592727fc7c3e999e73919" +issue = 191 + +[[nominations]] +id = "json-repair-205" +repository = "mangiucugna/json_repair" +fix_sha = "89815cf9c9675a2ff1bd3569f9418fd2be80af35" +issue = 205 + +[[nominations]] +id = "json-repair-194" +repository = "mangiucugna/json_repair" +fix_sha = "b8cd2e231a1c9dc36a043c958d40bda68848b7d7" +issue = 194 + +[[nominations]] +id = "click-3572" +repository = "pallets/click" +fix_sha = "93ba0075f4881b858b61f89a753c7c10e330027e" +issue = 3572 +pull = 3653 + +[[nominations]] +id = "click-3360" +repository = "pallets/click" +fix_sha = "0551bf53588ae87f462d336f24f853a156fefe3a" +issue = 3360 +pull = 3434 + +[[nominations]] +id = "click-2790" +repository = "pallets/click" +fix_sha = "1241abaed4e441582a21f4bf90c8482de02b92df" +issue = 2790 +pull = 3208 + +[[nominations]] +id = "click-3121" +repository = "pallets/click" +fix_sha = "546f2851f414b07413777ebcae89b2c21a685252" +issue = 3121 +pull = 3225 + +[[nominations]] +id = "pypdf-3982" +repository = "py-pdf/pypdf" +fix_sha = "31b32980f85a68c821349b006d7258044717a75e" +issue = 3982 +pull = 3987 + +[[nominations]] +id = "pypdf-3878" +repository = "py-pdf/pypdf" +fix_sha = "f6853ccd3ff492309c84060186aabc88ed472ffd" +issue = 3878 +pull = 3939 + +[[nominations]] +id = "pypdf-3587" +repository = "py-pdf/pypdf" +fix_sha = "a29e5326f543f93c4c317cf9f92df54aff68c584" +issue = 3587 +pull = 3589 + +[[nominations]] +id = "pypdf-3238" +repository = "py-pdf/pypdf" +fix_sha = "ddd34856173be64950759c0b8c19723fedd69b95" +issue = 3238 +pull = 3826 + +[[nominations]] +id = "coverage-2157" +repository = "coveragepy/coveragepy" +fix_sha = "f4413c6c0f196c626222ff8d13c95d3bc14302b6" +issue = 2157 + +[[nominations]] +id = "coverage-2115" +repository = "coveragepy/coveragepy" +fix_sha = "a2f248cf095fc49d3599c39befdea6a5552ccd23" +issue = 2115 + +[[nominations]] +id = "pytest-14195" +repository = "pytest-dev/pytest" +fix_sha = "8950ca3bc0988647dfc35b02f854347a1435bd36" +issue = 14195 +pull = 14196 + +[[nominations]] +id = "pytest-12444" +repository = "pytest-dev/pytest" +fix_sha = "e95a843a5dbf8af618d0714705bbf97dfdb04044" +issue = 12444 +pull = 13815 + +[[nominations]] +id = "marshmallow-2985" +repository = "marshmallow-code/marshmallow" +fix_sha = "ec2178c26b1a0b46e162a48a4aa5fd9840c0de59" +issue = 2985 +pull = 2994 + +[[nominations]] +id = "attrs-1575" +repository = "python-attrs/attrs" +fix_sha = "97f8d175656bc03c373a1c9038048a4d312c307c" +issue = 1575 +pull = 1593 + +[[nominations]] +id = "typeguard-499" +repository = "agronholm/typeguard" +fix_sha = "f1007ef36a10b5fed8268f5620d03fd19300a7b6" +issue = 499 +pull = 562 + +[[nominations]] +id = "structlog-710" +repository = "hynek/structlog" +fix_sha = "ba04ac275291ea1754aba24643d17cb8e5638c66" +issue = 710 +pull = 805 + +[[nominations]] +id = "pygments-2816" +repository = "pygments/pygments" +fix_sha = "5b57beacc2115ff748fdfb7d596faa4f055c51b5" +issue = 2816 +pull = 3214 + +[[nominations]] +id = "pygments-2828" +repository = "pygments/pygments" +fix_sha = "e1d0cd038c7e7d241ff1b0c7c5ee84c210ddbbd8" +issue = 2828 +pull = 3208 + +[[nominations]] +id = "pygments-2975" +repository = "pygments/pygments" +fix_sha = "147c5b3b7e61111a88888c4b88a7343ff1ba1418" +issue = 2975 +pull = 3175 + +[[nominations]] +id = "pluggy-431" +repository = "pytest-dev/pluggy" +fix_sha = "20d8143f127a4d7526dbbea441857b4b80ec8bdd" +issue = 431 +pull = 646 + +[[nominations]] +id = "tomlkit-440" +repository = "python-poetry/tomlkit" +fix_sha = "43668ddebc3f082bf385d328aceed18d26976897" +issue = 440 +pull = 533 + +[[nominations]] +id = "tomlkit-542" +repository = "python-poetry/tomlkit" +fix_sha = "67d3e86502706df2a9ed67114ab67e25bcdcbbb7" +issue = 542 +pull = 549 + +[[nominations]] +id = "babel-1245" +repository = "python-babel/babel" +fix_sha = "29bd3624463f9b8694d09a308f67f353373c76af" +issue = 1245 +pull = 1246 + +[[nominations]] +id = "pygments-2928" +repository = "pygments/pygments" +fix_sha = "b073d8adf1d6073d63b896c8520a9db5a19e99ea" +issue = 2928 +pull = 3176 diff --git a/miner/config/pilot.toml b/miner/config/pilot.toml new file mode 100644 index 0000000000000000000000000000000000000000..e79e3bfb7fa8705337798144fbf310a320863ca2 --- /dev/null +++ b/miner/config/pilot.toml @@ -0,0 +1,19 @@ +schema_version = 1 +start = "2025-12-23T00:00:00Z" +end = "2026-08-23T23:59:59Z" +max_files = 30 +max_changed_lines = 1200 + +repositories = [ + "ministackorg/ministack", + "Maxteabag/sqlit", + "Soju06/codex-lb", + "narwhals-dev/narwhals", + "janbjorge/pgqueuer", + "datachain-ai/datachain", + "c2g-dev/city2graph", + "mangiucugna/json_repair", +] + +# These repositories land issue-linked fixes directly on their default branch. +direct_commit_repositories = ["mangiucugna/json_repair"] diff --git a/miner/config/review-decisions.toml b/miner/config/review-decisions.toml new file mode 100644 index 0000000000000000000000000000000000000000..9a2ba6273f6e5786d8e638d874c5154fe28ba2f8 --- /dev/null +++ b/miner/config/review-decisions.toml @@ -0,0 +1,302 @@ +schema_version = 1 +prompt_policy = "full-issue-body-unchanged" + +[[decisions]] +id = "ministack-1409" +reviewer = "packet_review_a+runtime_review" +decision = "reject" +reason = "Issue review passed, but only a DynamoDB subsystem can be made hermetic; the repository regression requires Redis, Docker, Node, and other services." + +[[decisions]] +id = "ministack-1311" +reviewer = "packet_review_a" +decision = "reject" +reason = "Issue contains source-level implementation pseudocode." + +[[decisions]] +id = "ministack-1281" +reviewer = "packet_review_a" +decision = "reject" +reason = "Issue identifies the exact lookup mismatch, location, and fix strategies." + +[[decisions]] +id = "sqlit-246" +reviewer = "packet_review_a+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against the broad deterministic offline suite." + +[[decisions]] +id = "sqlit-161" +reviewer = "packet_review_a" +decision = "reject" +reason = "Hidden tests import gold-specific private helpers instead of grading behavior." + +[[decisions]] +id = "sqlit-260" +reviewer = "packet_review_a+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed after the runtime gained a real unprivileged process identity." + +[[decisions]] +id = "codex-lb-1698" +reviewer = "packet_review_a" +decision = "reject" +reason = "Issue provides the exact production location and one-line implementation." + +[[decisions]] +id = "codex-lb-1668" +reviewer = "packet_review_a" +decision = "reject" +reason = "Issue prescribes snapshotting scalar IDs before the session closes." + +[[decisions]] +id = "narwhals-3850" +reviewer = "packet_review_a" +decision = "reject" +reason = "Prompt suggests the implementation and hidden expectations mismatch stated null semantics." + +[[decisions]] +id = "narwhals-3864" +reviewer = "root_after_packet_review_b+dynamic_validator" +decision = "validated" +reason = "The direct concat selector and repeated full pandas/pandas-nullable regression slice passed offline." + +[[decisions]] +id = "narwhals-3474" +reviewer = "packet_review_b" +decision = "reject" +reason = "Issue materially proposes the cast-to-float implementation strategy." + +[[decisions]] +id = "narwhals-3841" +reviewer = "packet_review_b" +decision = "reject" +reason = "Issue identifies the missing decode path and hidden changes are overly broad." + +[[decisions]] +id = "pgqueuer-674" +reviewer = "packet_review_b" +decision = "reject" +reason = "Issue is an exact option-and-forwarding implementation checklist." + +[[decisions]] +id = "pgqueuer-684" +reviewer = "packet_review_b" +decision = "reject" +reason = "Issue contains the faulty query, diagnosis, and concrete solution shapes." + +[[decisions]] +id = "pgqueuer-671" +reviewer = "packet_review_b" +decision = "reject" +reason = "Issue prescribes schema type, migration, casts, and identity behavior." + +[[decisions]] +id = "datachain-1157" +reviewer = "packet_review_b+runtime_review" +decision = "reject" +reason = "Issue review passed, but the focused Session suite is not a meaningful repository regression and the full suite has large unpinned ML and PostgreSQL dependencies." + +[[decisions]] +id = "datachain-1836" +reviewer = "packet_review_b" +decision = "reject" +reason = "Hidden tests mandate policies and output structure beyond duplicate-free behavior." + +[[decisions]] +id = "datachain-1676" +reviewer = "packet_review_b" +decision = "reject" +reason = "Issue permits two outcomes while the hidden tests accept only one broad implementation." + +[[decisions]] +id = "datachain-1666" +reviewer = "packet_review_c" +decision = "reject" +reason = "Issue materially prescribes the production API approach." + +[[decisions]] +id = "city2graph-121" +reviewer = "packet_review_c+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against the full offline repository suite." + +[[decisions]] +id = "city2graph-156" +reviewer = "root_after_packet_review_c+dynamic_validator" +decision = "reject" +reason = "The parent and gold repository regressions reproducibly fail 44-46 existing transportation tests; narrowing the suite would violate the admission policy." + +[[decisions]] +id = "json-repair-211" +reviewer = "packet_review_c+dynamic_validator" +decision = "reject" +reason = "Issue reveals internal failure points and the focused regression already passes on the parent." + +[[decisions]] +id = "json-repair-207" +reviewer = "packet_review_c+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed in network-disabled containers." + +[[decisions]] +id = "json-repair-191" +reviewer = "packet_review_c+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed in network-disabled containers." + +[[decisions]] +id = "json-repair-205" +reviewer = "packet_review_c+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed with schema dependencies installed." + +[[decisions]] +id = "json-repair-194" +reviewer = "packet_review_c+dynamic_validator" +decision = "reject" +reason = "Gold production patch fails a previously passing parent regression in both repetitions." + +[[decisions]] +id = "click-3572" +reviewer = "packet_review_a+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against the deterministic non-stress suite." + +[[decisions]] +id = "click-3360" +reviewer = "packet_review_a+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against the deterministic non-stress suite." + +[[decisions]] +id = "click-2790" +reviewer = "packet_review_a+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against the deterministic non-stress suite." + +[[decisions]] +id = "click-3121" +reviewer = "packet_review_a+dynamic_validator" +decision = "reject" +reason = "The gold source patch reproducibly breaks two previously passing dual-option callable flag-value cases." + +[[decisions]] +id = "pypdf-3982" +reviewer = "packet_review_b+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against the full offline non-sample suite." + +[[decisions]] +id = "pypdf-3878" +reviewer = "packet_review_b+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against the full offline non-sample suite." + +[[decisions]] +id = "pypdf-3587" +reviewer = "packet_review_b+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against the full offline non-sample suite." + +[[decisions]] +id = "pypdf-3238" +reviewer = "packet_review_b" +decision = "reject" +reason = "Available tests overconstrain strict-mode warnings or directly target the gold private recovery method." + +[[decisions]] +id = "coverage-2157" +reviewer = "packet_review_c" +decision = "advance" +reason = "Issue-aligned POSIX symlink behavior with a direct hermetic subprocess comparison." + +[[decisions]] +id = "coverage-2115" +reviewer = "packet_review_c" +decision = "reject" +reason = "The only new test bundles an artificial configuration-mock requirement not specified by the issue." + +[[decisions]] +id = "pytest-14195" +reviewer = "packet_review_c" +decision = "advance" +reason = "Public unittest subtest rendering behavior; the already-working module-level symmetry case remains unscored." + +[[decisions]] +id = "pytest-12444" +reviewer = "packet_review_c" +decision = "advance" +reason = "Deterministic mismatch formatting for unordered mappings; the already-passing matching case remains unscored." + +[[decisions]] +id = "marshmallow-2985" +reviewer = "packet_review_b" +decision = "reject" +reason = "The issue gives away the allow_none implementation direction and explains the relevant Raw-field mechanism." + +[[decisions]] +id = "attrs-1575" +reviewer = "packet_review_b+dynamic_validator" +decision = "validated" +reason = "Behavior-only review passed and repeated four-cell proof passed on pinned CPython 3.14." + +[[decisions]] +id = "typeguard-499" +reviewer = "packet_review_b+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against the full offline suite on CPython 3.14." + +[[decisions]] +id = "structlog-710" +reviewer = "packet_review_b+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against the full deterministic offline suite." + +[[decisions]] +id = "pygments-2816" +reviewer = "packet_review_c+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against all 5,000-plus offline tests." + +[[decisions]] +id = "pygments-2828" +reviewer = "packet_review_c+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against all 5,000-plus offline tests." + +[[decisions]] +id = "pygments-2975" +reviewer = "packet_review_c" +decision = "reject" +reason = "The added test asserts gold-specific wrapper internals and override behavior not requested by the issue." + +[[decisions]] +id = "pygments-2928" +reviewer = "packet_review_c+dynamic_validator" +decision = "reject" +reason = "The gold source patch reproducibly breaks the parent namespace golden unless that existing expectation is replaced by the hidden patch." + +[[decisions]] +id = "pluggy-431" +reviewer = "packet_review_a+packet_review_b+dynamic_validator" +decision = "reject" +reason = "The issue-aligned unregister test already passes on the parent because duplicate hook callers compensate for one-at-a-time removal; the only failing added test grades unrequested internal deduplication." + +[[decisions]] +id = "tomlkit-440" +reviewer = "packet_review_c+root+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against every hermetic parent test; only the unavailable git-submodule fixture module is excluded." + +[[decisions]] +id = "tomlkit-542" +reviewer = "packet_review_c+root+dynamic_validator" +decision = "validated" +reason = "Review passed and repeated four-cell proof passed against every hermetic parent test; only the unavailable git-submodule fixture module is excluded." + +[[decisions]] +id = "babel-1245" +reviewer = "packet_review_a+packet_review_b+root+dynamic_validator" +decision = "reject" +reason = "The immutable git archive lacks Babel's generated locale data and the proposed parametrized node IDs do not exist after applying the shipped test change; reject instead of broadening the artifact contract after reaching 20." diff --git a/miner/config/runtimes.toml b/miner/config/runtimes.toml new file mode 100644 index 0000000000000000000000000000000000000000..000363420399e3946750f652ee99f6a5d69550f4 --- /dev/null +++ b/miner/config/runtimes.toml @@ -0,0 +1,155 @@ +schema_version = 1 + +[repositories."mangiucugna/json_repair"] +base_image = "ghcr.io/astral-sh/uv:0.8.14-python3.13-bookworm-slim" +sync_command = ["uv", "sync", "--frozen", "--all-groups", "--no-install-project"] +bootstrap_command = ["uv", "pip", "install", "--python", "/opt/venv/bin/python", "setuptools==80.9.0"] +setup_command = ["uv", "pip", "install", "--offline", "--python", "/opt/venv/bin/python", "--no-deps", "--no-build-isolation", "--editable", "."] +test_command = ["pytest", "-q"] +environment = ["PYTHONPATH=/workspace/repo/src", "PYTHONDONTWRITEBYTECODE=1", "UV_CACHE_DIR=/tmp/uv-cache"] +timeout_s = 300 +fail_exit_codes = [1] + +[repositories."c2g-dev/city2graph"] +base_image = "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm" +sync_command = ["uv", "sync", "--frozen", "--extra", "cpu", "--group", "dev", "--no-install-project"] +test_command = ["pytest", "-q"] +environment = ["PYTHONPATH=/workspace/repo", "MPLBACKEND=Agg", "MPLCONFIGDIR=/tmp/matplotlib", "XDG_CACHE_HOME=/tmp/xdg-cache", "PYTHONDONTWRITEBYTECODE=1", "UV_CACHE_DIR=/tmp/uv-cache"] +timeout_s = 1200 +fail_exit_codes = [1] + +[repositories."Maxteabag/sqlit"] +base_image = "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim" +sync_command = ["uv", "sync", "--frozen", "--group", "test", "--no-dev", "--extra", "duckdb", "--no-install-project"] +test_command = ["pytest", "-q"] +environment = ["PYTHONPATH=/workspace/repo", "PYTHONDONTWRITEBYTECODE=1", "UV_CACHE_DIR=/tmp/uv-cache", "XDG_CONFIG_HOME=/tmp/patcheval-config", "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SQLIT_TUI=0.0.0"] +timeout_s = 900 +fail_exit_codes = [1] + +[repositories."pallets/click"] +base_image = "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim" +sync_command = ["/bin/sh", "-ec", "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ATTRS=0.0.0 uv sync --frozen --no-default-groups --group tests --no-install-project"] +bootstrap_command = ["sh", "-euxc", "apt-get update && apt-get install -y --no-install-recommends less=590-2.1~deb12u2 && rm -rf /var/lib/apt/lists/*"] +test_command = ["pytest", "-q"] +regression_command = ["pytest", "-q", "-m", "not stress", "tests"] +environment = ["PYTHONPATH=/workspace/repo/src", "PYTHONDONTWRITEBYTECODE=1", "PYTHONHASHSEED=0", "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TZ=UTC", "PIP_NO_INDEX=1", "UV_OFFLINE=1"] +timeout_s = 300 +fail_exit_codes = [1] + +[repositories."py-pdf/pypdf"] +base_image = "ghcr.io/astral-sh/uv:0.8.14-python3.11-bookworm-slim" +sync_command = ["/bin/sh", "-c", "python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary :all: -r requirements/ci-3.11.txt"] +bootstrap_command = ["uv", "pip", "install", "--python", "/opt/venv/bin/python", "--no-deps", "--only-binary", ":all:", "flit_core==3.11.0", "pygments==2.19.2"] +setup_command = ["uv", "pip", "install", "--offline", "--python", "/opt/venv/bin/python", "--no-deps", "--no-build-isolation", "--editable", "."] +test_command = ["python", "-m", "pytest", "-q", "-p", "pytest_socket", "-p", "pytest_timeout", "--timeout=60", "-o", "cache_dir=/tmp/pytest-cache"] +regression_command = ["python", "-m", "pytest", "-q", "-p", "pytest_socket", "-p", "pytest_timeout", "--timeout=60", "-o", "cache_dir=/tmp/pytest-cache", "-m", "not enable_socket and not samples", "tests"] +environment = ["PYTHONPATH=/workspace/repo", "PYTHONDONTWRITEBYTECODE=1", "PYTHONUNBUFFERED=1", "PYTHONHASHSEED=0", "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", "PIP_NO_INDEX=1", "PIP_DISABLE_PIP_VERSION_CHECK=1", "XDG_CACHE_HOME=/tmp/xdg-cache", "TZ=UTC", "LANG=C.UTF-8", "LC_ALL=C.UTF-8"] +timeout_s = 1200 +fail_exit_codes = [1] + +[repositories."coveragepy/coveragepy"] +base_image = "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm" +sync_command = ["uv", "venv", "--python", "/usr/local/bin/python", "/opt/venv"] +bootstrap_command = ["uv", "pip", "install", "--python", "/opt/venv/bin/python", "--require-hashes", "-r", "requirements/pip.pip", "-r", "requirements/pytest.pip", "-r", "requirements/light-threads.pip"] +setup_command = ["/bin/sh", "-ec", "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" && python igor.py zip_mods && python setup.py --quiet build_ext --inplace && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."] +test_command = ["python", "igor.py", "test_with_core", "ctrace", "-n", "0", "--cache-clear"] +regression_command = ["python", "igor.py", "test_with_core", "ctrace", "-n", "0", "--cache-clear", "tests"] +environment = ["HOME=/home/node", "XDG_CACHE_HOME=/tmp/xdg-cache", "UV_CACHE_DIR=/tmp/uv-cache", "UV_OFFLINE=1", "PIP_NO_INDEX=1", "COVERAGE_CORE=ctrace", "COVERAGE_TESTING=True", "HYPOTHESIS_PROFILE=ci", "PYTHONHASHSEED=0", "PYTHONWARNDEFAULTENCODING=1", "PYTHON_COLORS=0", "NO_COLOR=1", "TERM=dumb", "COLUMNS=80", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TZ=UTC"] +timeout_s = 1800 +fail_exit_codes = [1] + +[repositories."pytest-dev/pytest"] +base_image = "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm" +sync_command = ["uv", "venv", "--python", "/usr/local/bin/python", "/opt/venv"] +bootstrap_command = ["/bin/sh", "-ec", "uv pip install --python /opt/venv/bin/python 'setuptools>=77' 'setuptools-scm[toml]>=6.2.3' && SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST=9.1.0.dev0 uv pip install --python /opt/venv/bin/python --no-build-isolation '.[dev]'"] +setup_command = ["/bin/sh", "-ec", "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."] +test_command = ["python", "-m", "pytest", "-q", "--cache-clear"] +regression_command = ["python", "-m", "pytest", "-q", "--cache-clear", "testing"] +environment = ["HOME=/home/node", "XDG_CACHE_HOME=/tmp/xdg-cache", "UV_CACHE_DIR=/tmp/uv-cache", "UV_OFFLINE=1", "PIP_NO_INDEX=1", "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST=9.1.0.dev0", "PYTHONHASHSEED=0", "PYTHONWARNDEFAULTENCODING=1", "PYTHON_COLORS=0", "NO_COLOR=1", "TERM=dumb", "COLUMNS=80", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TZ=UTC"] +timeout_s = 2700 +fail_exit_codes = [1] + +[repositories."pygments/pygments"] +base_image = "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm" +sync_command = ["uv", "venv", "--python", "/usr/local/bin/python", "/opt/venv"] +bootstrap_command = ["/bin/sh", "-ec", "uv pip install --python /opt/venv/bin/python --only-binary=:all: 'hatchling==1.27.0' 'editables==0.5' && uv pip install --python /opt/venv/bin/python --no-deps --only-binary=:all: 'pytest==8.4.2' 'pytest-randomly==4.0.1' 'iniconfig==2.1.0' && uv pip install --python /opt/venv/bin/python --no-deps 'wcag-contrast-ratio==0.9' && uv pip freeze --python /opt/venv/bin/python > /opt/patcheval-requirements.txt"] +setup_command = ["/bin/sh", "-ec", "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable . && uv pip check --python /opt/venv/bin/python"] +test_command = ["python", "-m", "pytest", "-q", "-W", "error", "--cache-clear", "--randomly-seed=0", "-o", "cache_dir=/tmp/pytest-cache"] +regression_command = ["python", "-m", "pytest", "-q", "-W", "error", "--cache-clear", "--randomly-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "tests"] +environment = ["HOME=/home/node", "XDG_CACHE_HOME=/tmp/xdg-cache", "UV_CACHE_DIR=/tmp/uv-cache", "UV_OFFLINE=1", "PIP_NO_INDEX=1", "PIP_DISABLE_PIP_VERSION_CHECK=1", "PYTHONPATH=/workspace/repo", "PYTHONDONTWRITEBYTECODE=1", "PYTHONUNBUFFERED=1", "PYTHONHASHSEED=0", "PYTHON_COLORS=0", "NO_COLOR=1", "TERM=dumb", "COLUMNS=80", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TZ=UTC"] +timeout_s = 900 +fail_exit_codes = [1] + +[repositories."python-attrs/attrs"] +base_image = "ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim" +sync_command = ["uv", "sync", "--frozen", "--no-default-groups", "--group", "tests", "--no-install-project"] +bootstrap_command = ["uv", "pip", "install", "--python", "/opt/venv/bin/python", "--only-binary", ":all:", "hatchling==1.27.0", "hatch-vcs==0.5.0", "hatch-fancy-pypi-readme==25.1.0", "setuptools-scm==9.2.0", "editables==0.5"] +setup_command = ["/bin/sh", "-ec", "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."] +test_command = ["python", "-m", "pytest", "-q", "--hypothesis-seed=0"] +regression_command = ["python", "-m", "pytest", "-q", "--hypothesis-seed=0", "tests"] +environment = ["HOME=/home/node", "XDG_CACHE_HOME=/tmp/xdg-cache", "UV_CACHE_DIR=/tmp/uv-cache", "PYTHONPATH=/workspace/repo/src", "PYTHONDONTWRITEBYTECODE=1", "PYTHONHASHSEED=0", "PIP_NO_INDEX=1", "PIP_DISABLE_PIP_VERSION_CHECK=1", "UV_OFFLINE=1", "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ATTRS=0.0.0", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TZ=UTC", "TERM=dumb", "NO_COLOR=1", "PYTHON_COLORS=0"] +timeout_s = 900 +fail_exit_codes = [1] + +[repositories."agronholm/typeguard"] +base_image = "ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim" +sync_command = ["/bin/sh", "-ec", "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TYPEGUARD=0.0.0 uv sync --no-default-groups --group test --no-install-project"] +bootstrap_command = ["uv", "pip", "install", "--python", "/opt/venv/bin/python", "--only-binary", ":all:", "setuptools==80.9.0", "setuptools-scm==9.2.0", "wheel==0.45.1"] +setup_command = ["/bin/sh", "-ec", "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."] +test_command = ["python", "-m", "pytest", "-q"] +regression_command = ["python", "-m", "pytest", "-q", "tests"] +environment = ["HOME=/home/node", "XDG_CACHE_HOME=/tmp/xdg-cache", "UV_CACHE_DIR=/tmp/uv-cache", "PYTHONPATH=/workspace/repo/src", "PYTHONDONTWRITEBYTECODE=1", "PYTHONHASHSEED=0", "PIP_NO_INDEX=1", "PIP_DISABLE_PIP_VERSION_CHECK=1", "UV_OFFLINE=1", "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TYPEGUARD=0.0.0", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TZ=UTC", "TERM=dumb", "NO_COLOR=1", "PYTHON_COLORS=0"] +timeout_s = 900 +fail_exit_codes = [1] + +[repositories."hynek/structlog"] +base_image = "ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim" +sync_command = ["/bin/sh", "-ec", "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_STRUCTLOG=0.0.0 uv sync --no-default-groups --group tests --no-install-project"] +bootstrap_command = ["uv", "pip", "install", "--python", "/opt/venv/bin/python", "--only-binary", ":all:", "hatchling==1.27.0", "hatch-vcs==0.5.0", "hatch-fancy-pypi-readme==25.1.0", "setuptools-scm==9.2.0", "editables==0.5"] +setup_command = ["/bin/sh", "-ec", "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."] +test_command = ["python", "-m", "pytest", "-q", "-p", "no:randomly"] +regression_command = ["python", "-m", "pytest", "-q", "-p", "no:randomly", "tests"] +environment = ["HOME=/home/node", "XDG_CACHE_HOME=/tmp/xdg-cache", "UV_CACHE_DIR=/tmp/uv-cache", "PYTHONPATH=/workspace/repo/src", "PYTHONDONTWRITEBYTECODE=1", "PYTHONHASHSEED=0", "PIP_NO_INDEX=1", "PIP_DISABLE_PIP_VERSION_CHECK=1", "UV_OFFLINE=1", "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_STRUCTLOG=0.0.0", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TZ=UTC", "TERM=dumb", "NO_COLOR=1", "PYTHON_COLORS=0"] +timeout_s = 900 +fail_exit_codes = [1] + +[repositories."narwhals-dev/narwhals"] +base_image = "ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim" +sync_command = ["uv", "sync", "--frozen", "--no-default-groups", "--group", "tests", "--extra", "pandas", "--no-install-project"] +bootstrap_command = ["uv", "pip", "install", "--python", "/opt/venv/bin/python", "--only-binary", ":all:", "uv_build==0.11.0"] +setup_command = ["/bin/sh", "-ec", "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."] +test_command = ["python", "-m", "pytest", "-q", "--randomly-seed=0", "--hypothesis-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "--constructors=pandas,pandas[nullable]"] +regression_command = ["python", "-m", "pytest", "-q", "--randomly-seed=0", "--hypothesis-seed=0", "-o", "cache_dir=/tmp/pytest-cache", "--runslow", "--constructors=pandas,pandas[nullable]", "tests"] +environment = ["HOME=/home/node", "XDG_CACHE_HOME=/tmp/xdg-cache", "UV_CACHE_DIR=/tmp/uv-cache", "PYTHONPATH=/workspace/repo/src", "PYTHONDONTWRITEBYTECODE=1", "PYTHONUNBUFFERED=1", "PYTHONHASHSEED=0", "PIP_NO_INDEX=1", "PIP_DISABLE_PIP_VERSION_CHECK=1", "UV_OFFLINE=1", "NARWHALS_DEFAULT_CONSTRUCTORS=pandas,pandas[nullable]", "MODIN_ENGINE=python", "PYARROW_IGNORE_TIMEZONE=1", "TZ=UTC", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TERM=dumb", "NO_COLOR=1", "PYTHON_COLORS=0"] +timeout_s = 1800 +fail_exit_codes = [1] + +[repositories."pytest-dev/pluggy"] +base_image = "ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim" +sync_command = ["uv", "sync", "--frozen", "--no-default-groups", "--group", "testing", "--no-install-project"] +bootstrap_command = ["uv", "pip", "install", "--python", "/opt/venv/bin/python", "--only-binary", ":all:", "setuptools==80.9.0", "setuptools-scm==9.2.0", "wheel==0.45.1"] +setup_command = ["/bin/sh", "-ec", "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."] +test_command = ["python", "-m", "pytest", "-q"] +regression_command = ["python", "-m", "pytest", "-q", "testing"] +environment = ["HOME=/home/node", "XDG_CACHE_HOME=/tmp/xdg-cache", "UV_CACHE_DIR=/tmp/uv-cache", "PYTHONPATH=/workspace/repo/src", "PYTHONDONTWRITEBYTECODE=1", "PYTHONUNBUFFERED=1", "PYTHONHASHSEED=0", "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", "_PYTEST_SETUP_SKIP_PLUGGY_DEP=1", "PIP_NO_INDEX=1", "PIP_DISABLE_PIP_VERSION_CHECK=1", "UV_OFFLINE=1", "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PLUGGY=0.0.0", "TZ=UTC", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TERM=dumb", "NO_COLOR=1", "PYTHON_COLORS=0"] +timeout_s = 300 +fail_exit_codes = [1] + +[repositories."python-poetry/tomlkit"] +base_image = "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim" +sync_command = ["/bin/sh", "-ec", "python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary=:all: pytest==7.4.4 iniconfig==2.0.0 packaging==24.0 pluggy==1.2.0"] +test_command = ["python", "-m", "pytest", "-q"] +regression_command = ["python", "-m", "pytest", "-q", "tests"] +environment = ["HOME=/home/node", "XDG_CACHE_HOME=/tmp/xdg-cache", "UV_CACHE_DIR=/tmp/uv-cache", "PYTHONPATH=/workspace/repo", "PYTHONDONTWRITEBYTECODE=1", "PYTHONUNBUFFERED=1", "PYTHONHASHSEED=0", "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", "PIP_NO_INDEX=1", "PIP_DISABLE_PIP_VERSION_CHECK=1", "UV_OFFLINE=1", "TZ=UTC", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TERM=dumb", "NO_COLOR=1", "PYTHON_COLORS=0"] +timeout_s = 300 +fail_exit_codes = [1] + +[repositories."python-babel/babel"] +base_image = "ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim" +sync_command = ["/bin/sh", "-ec", "python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --only-binary=:all: pytest==8.4.2 freezegun==1.5.5 Jinja2==3.1.6 pytz==2025.2 setuptools==80.9.0 wheel==0.45.1"] +setup_command = ["/bin/sh", "-ec", "mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."] +test_command = ["python", "-m", "pytest", "-q"] +regression_command = ["python", "-m", "pytest", "-q", "tests"] +environment = ["HOME=/home/node", "XDG_CACHE_HOME=/tmp/xdg-cache", "UV_CACHE_DIR=/tmp/uv-cache", "PYTHONPATH=/workspace/repo", "PYTHONDONTWRITEBYTECODE=1", "PYTHONUNBUFFERED=1", "PYTHONHASHSEED=0", "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1", "PIP_NO_INDEX=1", "PIP_DISABLE_PIP_VERSION_CHECK=1", "UV_OFFLINE=1", "TZ=UTC", "LANG=C.UTF-8", "LC_ALL=C.UTF-8", "TERM=dumb", "NO_COLOR=1", "PYTHON_COLORS=0"] +timeout_s = 600 +fail_exit_codes = [1] diff --git a/miner/docs/review-policy.md b/miner/docs/review-policy.md new file mode 100644 index 0000000000000000000000000000000000000000..8b5c185bb79ae70627ed59cdfe2bc3496281ed73 --- /dev/null +++ b/miner/docs/review-policy.md @@ -0,0 +1,31 @@ +# Candidate admission policy + +Structural eligibility is necessary but not sufficient. Every frozen task must +pass all gates below. A reviewer may reject a task for a documented reason, but +may not rewrite the issue or weaken a failing gate. + +1. **Provenance:** the fix is on the repository's default branch in the frozen + date window, has exactly one parent, and links a public GitHub issue. +2. **Prompt fidelity:** the model receives the issue title and full issue body, + byte-for-byte except for newline normalization. If the body contains a + material solution, source-level pseudocode, or a proposed patch, reject the + candidate. Do not sanitize it into an easier-to-curate prompt. +3. **Task coherence:** the issue's observable behavior matches the regression + test introduced by the fix. Incidental tests are not grading tests. +4. **Hermeticity:** setup and checks succeed without network access or external + credentials. Services may run inside the task container only when pinned and + deterministic. +5. **Dynamic proof:** on the parent, the hidden regression check fails and the + pre-existing regression command passes. On the fix, both commands pass. + Repeat the four-cell check twice from clean containers. +6. **Isolation:** the agent source archive contains the parent tree without + `.git`. The hidden test patch and gold source diff are absent from the agent + image and workspace. The runtime image is referenced by immutable digest. +7. **Balance:** at most four tasks per repository and at least five repositories + in pilot-20. Add repositories rather than relax an admission gate. + +AI reviewers are used for triage, prompt-leakage review, and task-coherence +review because this pilot has no human-review budget. Their decisions and +rationales are retained in the private review ledger. Final benchmark scores +remain entirely test-exit-code based. + diff --git a/miner/pyproject.toml b/miner/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..18d7b30f56a9a472f66f27136699ec2754732815 --- /dev/null +++ b/miner/pyproject.toml @@ -0,0 +1,31 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "patcheval-miner" +version = "0.1.0" +description = "Reproducible miner and validator for the PatchEval benchmark" +readme = "README.md" +requires-python = ">=3.11" +license = { text = "Apache-2.0" } +authors = [{ name = "Dogukan Urker" }] +dependencies = [] + +[project.optional-dependencies] +dev = ["pytest>=8.0", "ruff>=0.12"] + +[project.scripts] +patcheval-mine = "patcheval_miner.cli:main" + +[tool.hatch.build.targets.wheel] +packages = ["src/patcheval_miner"] + +[tool.pytest.ini_options] +addopts = "-q" +testpaths = ["tests"] + +[tool.ruff] +line-length = 88 +target-version = "py311" + diff --git a/miner/schemas/task.schema.json b/miner/schemas/task.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..0064314962d3b17287415f1ccf6cd7935ce7cf42 --- /dev/null +++ b/miner/schemas/task.schema.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/DogukanUrker/PatchEval/schemas/task.schema.json", + "title": "Frozen PatchEval task", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "repository", + "issue_title", + "issue_body", + "runtime_image", + "source_archive", + "hidden_test_patch", + "source_sha256", + "hidden_test_sha256", + "fail_to_pass_command", + "regression_command", + "protected_globs", + "validated" + ], + "properties": { + "id": { "type": "string", "minLength": 1 }, + "repository": { "type": "string", "pattern": "^[^/]+/[^/]+$" }, + "issue_title": { "type": "string", "minLength": 1 }, + "issue_body": { "type": "string", "minLength": 1 }, + "runtime_image": { "type": "string", "pattern": "@sha256:[0-9a-f]{64}$" }, + "source_archive": { "type": "string", "minLength": 1 }, + "hidden_test_patch": { "type": "string", "minLength": 1 }, + "source_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, + "hidden_test_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, + "fail_to_pass_command": { + "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } + }, + "regression_command": { + "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } + }, + "setup_command": { + "type": "array", "items": { "type": "string", "minLength": 1 } + }, + "protected_globs": { + "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } + }, + "ignored_globs": { + "type": "array", "items": { "type": "string", "minLength": 1 } + }, + "timeout_s": { "type": "integer", "minimum": 10, "maximum": 1800 }, + "validated": { "const": true } + } +} + diff --git a/miner/src/patcheval_miner/__init__.py b/miner/src/patcheval_miner/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..664bf1d33eaf11baf326f4d72c60191a34556936 --- /dev/null +++ b/miner/src/patcheval_miner/__init__.py @@ -0,0 +1,5 @@ +"""PatchEval mining and validation utilities.""" + +from patcheval_miner.models import Candidate, ChangedFile, IssueRef + +__all__ = ["Candidate", "ChangedFile", "IssueRef"] diff --git a/miner/src/patcheval_miner/__main__.py b/miner/src/patcheval_miner/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..027deb9698fd38007169bef2173a5605337b82ee --- /dev/null +++ b/miner/src/patcheval_miner/__main__.py @@ -0,0 +1,4 @@ +from patcheval_miner.cli import main + +if __name__ == "__main__": + main() diff --git a/miner/src/patcheval_miner/classify.py b/miner/src/patcheval_miner/classify.py new file mode 100644 index 0000000000000000000000000000000000000000..7140b50efdbb409d921d8a80ffd6826024acdb47 --- /dev/null +++ b/miner/src/patcheval_miner/classify.py @@ -0,0 +1,108 @@ +"""Deterministic structural screening for raw candidates.""" + +from __future__ import annotations + +import re +from pathlib import PurePosixPath + +from patcheval_miner.models import Candidate + +_TEST_DIRS = {"test", "testing", "tests"} +_NON_PRODUCT_DIRS = { + ".github", + "benchmark", + "benchmarks", + "doc", + "docs", + "example", + "examples", + "script", + "scripts", +} +_EXTERNAL_HINTS = { + "docker", + "e2e", + "integration", + "postgres", + "redis", + "remote", + "server", +} +_BUG_TITLE = re.compile( + r"(?i)\b(?:bug|crash|error|fail(?:ure|ing)?|fix(?:e[sd])?|hang|regression)\b" +) + + +def has_bug_signal(candidate: Candidate) -> bool: + if _BUG_TITLE.search(candidate.pr_title): + return True + return any( + any( + marker in label.lower() + for marker in ("bug", "defect", "regression", "type: fix") + ) + for issue in candidate.issues + for label in issue.labels + ) + + +def is_test_path(path: str) -> bool: + value = PurePosixPath(path) + name = value.name.lower() + parts = {part.lower() for part in value.parts} + return bool( + parts & _TEST_DIRS + or name.startswith("test_") + or name.endswith("_test.py") + or name == "conftest.py" + ) + + +def is_production_python(path: str) -> bool: + value = PurePosixPath(path) + parts = {part.lower() for part in value.parts} + return ( + value.suffix == ".py" + and not is_test_path(path) + and not (parts & _NON_PRODUCT_DIRS) + ) + + +def classify( + candidate: Candidate, *, max_files: int, max_changed_lines: int +) -> Candidate: + """Mutate a raw candidate with reproducible eligibility reasons and flags.""" + reasons: list[str] = [] + flags: list[str] = [] + changed_lines = sum(item.additions + item.deletions for item in candidate.files) + + if not candidate.issues: + reasons.append("no-linked-issue") + elif all(not issue.body.strip() for issue in candidate.issues): + reasons.append("empty-issue-body") + if candidate.parent_count != 1 or not candidate.parent_sha: + reasons.append("ambiguous-parent") + if not has_bug_signal(candidate): + reasons.append("no-bug-signal") + if not any(is_production_python(item.path) for item in candidate.files): + reasons.append("no-production-python-change") + if not any(is_test_path(item.path) for item in candidate.files): + reasons.append("no-test-change") + if candidate.changed_files_count > max_files: + reasons.append("too-many-files") + if changed_lines > max_changed_lines: + reasons.append("diff-too-large") + + lowered_paths = " ".join(item.path.lower() for item in candidate.files) + for hint in sorted(_EXTERNAL_HINTS): + if hint in lowered_paths: + flags.append(f"external-dependency-hint:{hint}") + if len(candidate.issues) > 1: + flags.append("multiple-linked-issues") + if any("```" in issue.body for issue in candidate.issues): + flags.append("issue-contains-code-block") + + candidate.rejection_reasons = reasons + candidate.risk_flags = flags + candidate.structural_status = "eligible" if not reasons else "rejected" + return candidate diff --git a/miner/src/patcheval_miner/cli.py b/miner/src/patcheval_miner/cli.py new file mode 100644 index 0000000000000000000000000000000000000000..77dc82ed524728c41951213caceae5346e831643 --- /dev/null +++ b/miner/src/patcheval_miner/cli.py @@ -0,0 +1,275 @@ +"""Command-line entry point for discovery and review preparation.""" + +from __future__ import annotations + +import argparse +import collections +import concurrent.futures +import json +import subprocess +import sys +import tomllib +from pathlib import Path + +from patcheval_miner.classify import classify +from patcheval_miner.freeze import freeze_dataset +from patcheval_miner.github import GitHub +from patcheval_miner.io import read_candidates, write_candidates +from patcheval_miner.prepare import load_nominations, prepare_nomination +from patcheval_miner.validate import load_commands, load_profiles, validate_packet + + +def _collect(args: argparse.Namespace) -> int: + with args.config.open("rb") as handle: + config = tomllib.load(handle) + if config.get("schema_version") != 1: + raise ValueError("config schema_version must be 1") + github = GitHub() + candidates = [] + configured = list(config["repositories"]) + selected = set(args.repository or configured) + unknown = selected.difference(configured) + if unknown: + raise ValueError( + "repositories are not present in the config: " + ", ".join(sorted(unknown)) + ) + for repository in configured: + if repository not in selected: + continue + print(f"collecting {repository}", file=sys.stderr) + for pull in github.merged_pull_requests( + repository, start=config["start"], end=config["end"] + ): + candidate = github.candidate(repository, pull) + classify( + candidate, + max_files=int(config["max_files"]), + max_changed_lines=int(config["max_changed_lines"]), + ) + candidates.append(candidate) + for repository in config.get("direct_commit_repositories", ()): + if repository not in selected: + continue + print(f"collecting direct commits from {repository}", file=sys.stderr) + for raw_commit in github.direct_commits( + repository, start=config["start"], end=config["end"] + ): + candidate = github.direct_candidate(repository, raw_commit) + classify( + candidate, + max_files=int(config["max_files"]), + max_changed_lines=int(config["max_changed_lines"]), + ) + candidates.append(candidate) + candidates.sort(key=lambda item: (item.repository.lower(), item.merged_at, item.id)) + write_candidates(args.output, candidates) + print(f"wrote {len(candidates)} candidates to {args.output}") + return 0 + + +def _summarize(args: argparse.Namespace) -> int: + candidates = list(read_candidates(args.path)) + statuses = collections.Counter(item.structural_status for item in candidates) + reasons = collections.Counter( + reason for item in candidates for reason in item.rejection_reasons + ) + repos = collections.Counter( + item.repository for item in candidates if item.structural_status == "eligible" + ) + print(f"total: {len(candidates)}") + for status, count in sorted(statuses.items()): + print(f"{status}: {count}") + print("eligible by repository:") + for repository, count in sorted(repos.items()): + print(f" {repository}: {count}") + print("rejection reasons:") + for reason, count in reasons.most_common(): + print(f" {reason}: {count}") + return 0 + + +def _prepare(args: argparse.Namespace) -> int: + nominations = load_nominations(args.nominations) + selected = set(args.task or [item.id for item in nominations]) + unknown = selected.difference(item.id for item in nominations) + if unknown: + raise ValueError("unknown task ids: " + ", ".join(sorted(unknown))) + prepared = 0 + for nomination in nominations: + if nomination.id not in selected: + continue + print(f"preparing {nomination.id}", file=sys.stderr) + prepare_nomination(nomination, cache=args.cache, output=args.output) + prepared += 1 + print(f"prepared {prepared} private review packets in {args.output}") + return 0 + + +def _validate_one( + packet_dir: Path, + *, + profiles: dict, + commands: dict, + cache: Path, + work: Path, + repeats: int, +) -> dict: + packet = json.loads((packet_dir / "packet.json").read_text(encoding="utf-8")) + repository_name = packet["repository"] + try: + profile = profiles[repository_name] + except KeyError as exc: + raise ValueError(f"no runtime profile for {repository_name}") from exc + owner, name = repository_name.split("/", 1) + repository = cache / f"{owner.lower()}__{name.lower()}.git" + if not repository.is_dir(): + raise ValueError(f"repository mirror does not exist: {repository}") + result = validate_packet( + packet_dir, + repository=repository, + profile=profile, + commands=commands.get(packet["id"]), + work=work, + repeats=repeats, + ) + return result + + +def _validate(args: argparse.Namespace) -> int: + result = _validate_one( + args.packet, + profiles=load_profiles(args.runtimes), + commands=load_commands(args.commands), + cache=args.cache, + work=args.work, + repeats=args.repeats, + ) + print(json.dumps({"task_id": result["task_id"], "validated": result["validated"]})) + return 0 if result["validated"] else 1 + + +def _validate_batch(args: argparse.Namespace) -> int: + profiles = load_profiles(args.runtimes) + commands = load_commands(args.commands) + packet_dirs = [args.packets / task_id for task_id in args.task] + results = [] + with concurrent.futures.ThreadPoolExecutor( + max_workers=min(args.max_workers, len(packet_dirs)) + ) as executor: + futures = { + executor.submit( + _validate_one, + packet_dir, + profiles=profiles, + commands=commands, + cache=args.cache, + work=args.work, + repeats=args.repeats, + ): packet_dir.name + for packet_dir in packet_dirs + } + for future in concurrent.futures.as_completed(futures): + task_id = futures[future] + try: + result = future.result() + except ( + OSError, + RuntimeError, + ValueError, + subprocess.SubprocessError, + ) as exc: + item = {"task_id": task_id, "validated": False, "error": str(exc)} + else: + item = { + "task_id": result["task_id"], + "validated": result["validated"], + } + results.append(item) + print(json.dumps(item, sort_keys=True), file=sys.stderr, flush=True) + results.sort(key=lambda item: item["task_id"]) + print(json.dumps({"results": results}, sort_keys=True)) + return 0 if results and all(item["validated"] for item in results) else 1 + + +def _freeze(args: argparse.Namespace) -> int: + selected = freeze_dataset( + decisions_path=args.decisions, + packets=args.packets, + cache=args.cache, + output=args.output, + count=args.count, + requested_tasks=args.task, + name=args.name, + version=args.version, + ) + print(json.dumps({"output": str(args.output), "tasks": selected}, sort_keys=True)) + return 0 + + +def _parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser(prog="patcheval-mine") + commands = parser.add_subparsers(dest="command", required=True) + collect = commands.add_parser("collect", help="collect raw GitHub candidates") + collect.add_argument("--config", type=Path, required=True) + collect.add_argument("--output", type=Path, required=True) + collect.add_argument( + "--repository", + action="append", + help="collect only this configured owner/repository (repeatable)", + ) + collect.set_defaults(handler=_collect) + summarize = commands.add_parser("summarize", help="summarize a candidate JSONL") + summarize.add_argument("path", type=Path) + summarize.set_defaults(handler=_summarize) + prepare = commands.add_parser( + "prepare", help="clone nominated fixes and create private review packets" + ) + prepare.add_argument("--nominations", type=Path, required=True) + prepare.add_argument("--cache", type=Path, required=True) + prepare.add_argument("--output", type=Path, required=True) + prepare.add_argument("--task", action="append", help="prepare only this task id") + prepare.set_defaults(handler=_prepare) + validate = commands.add_parser( + "validate", help="run repeated parent/gold hidden/regression checks in Docker" + ) + validate.add_argument("--packet", type=Path, required=True) + validate.add_argument("--cache", type=Path, required=True) + validate.add_argument("--runtimes", type=Path, required=True) + validate.add_argument("--commands", type=Path, required=True) + validate.add_argument("--work", type=Path, required=True) + validate.add_argument("--repeats", type=int, default=2) + validate.set_defaults(handler=_validate) + batch = commands.add_parser( + "validate-batch", help="validate independent packets with bounded concurrency" + ) + batch.add_argument("--packets", type=Path, required=True) + batch.add_argument("--task", action="append", required=True) + batch.add_argument("--cache", type=Path, required=True) + batch.add_argument("--runtimes", type=Path, required=True) + batch.add_argument("--commands", type=Path, required=True) + batch.add_argument("--work", type=Path, required=True) + batch.add_argument("--repeats", type=int, default=2) + batch.add_argument("--max-workers", type=int, choices=(1, 2), default=2) + batch.set_defaults(handler=_validate_batch) + freeze = commands.add_parser( + "freeze", help="freeze validated packets into an immutable public dataset" + ) + freeze.add_argument("--decisions", type=Path, required=True) + freeze.add_argument("--packets", type=Path, required=True) + freeze.add_argument("--cache", type=Path, required=True) + freeze.add_argument("--output", type=Path, required=True) + freeze.add_argument("--count", type=int, required=True) + freeze.add_argument( + "--task", + action="append", + help="explicit validated task id; repeat exactly --count times", + ) + freeze.add_argument("--name", default="PatchEval") + freeze.add_argument("--version", default="pilot") + freeze.set_defaults(handler=_freeze) + return parser + + +def main() -> None: + args = _parser().parse_args() + raise SystemExit(args.handler(args)) diff --git a/miner/src/patcheval_miner/freeze.py b/miner/src/patcheval_miner/freeze.py new file mode 100644 index 0000000000000000000000000000000000000000..ae5a620b1868bd7a0ca1eaacee434609d964a806 --- /dev/null +++ b/miner/src/patcheval_miner/freeze.py @@ -0,0 +1,650 @@ +"""Freeze reviewed and dynamically validated packets into a public dataset.""" + +from __future__ import annotations + +import hashlib +import io +import json +import os +import posixpath +import re +import shutil +import subprocess +import tarfile +import tempfile +import tomllib +from dataclasses import dataclass +from pathlib import Path, PurePosixPath +from typing import Any + +_SHA1 = re.compile(r"^[0-9a-f]{40}$") +_LOCAL_IMAGE_ID = re.compile(r"^sha256:[0-9a-f]{64}$") +_BASE_IMAGE = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._/:+-]*:[A-Za-z0-9_.-]+$") +_BASE_IMAGE_DIGEST = re.compile( + r"^(?P[A-Za-z0-9][A-Za-z0-9._/:+-]*:[A-Za-z0-9_.-]+)" + r"@sha256:[0-9a-f]{64}$" +) +_ENVIRONMENT_KEY = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$") +_LEGACY_SMOKE_PREFIX = ( + "/usr/local/bin/node\n" + "/usr/local/bin/npm\n" + "/usr/bin/git\n" + "/usr/bin/rg\n" + "/usr/bin/tar\n" + "/usr/bin/timeout\n" + "/opt/venv/bin/python\n" +) +_IGNORED_GLOBS = ( + ".coverage", + ".coverage.*", + ".hypothesis/**", + ".mypy_cache/**", + ".pytest_cache/**", + ".ruff_cache/**", + ".venv/**", + "**/.hypothesis/**", + "**/.mypy_cache/**", + "**/.pytest_cache/**", + "**/.ruff_cache/**", + "**/__pycache__/**", + "**/*.egg-info/**", + "**/*.py[cod]", + "__pycache__/**", + "*.egg-info/**", + "*.py[cod]", + "htmlcov/**", +) + + +class FreezeError(ValueError): + """Raised when publication inputs do not prove a safe frozen task.""" + + +@dataclass(frozen=True) +class _ArchiveFile: + data: bytes + mode: int + + +def _sha256_bytes(value: bytes) -> str: + return hashlib.sha256(value).hexdigest() + + +def _sha256_file(path: Path) -> str: + digest = hashlib.sha256() + with path.open("rb") as handle: + for block in iter(lambda: handle.read(1024 * 1024), b""): + digest.update(block) + return digest.hexdigest() + + +def _read_json(path: Path) -> dict[str, Any]: + try: + value = json.loads(path.read_text(encoding="utf-8")) + except FileNotFoundError as exc: + raise FreezeError(f"required file does not exist: {path}") from exc + except json.JSONDecodeError as exc: + raise FreezeError(f"invalid JSON in {path}: {exc}") from exc + if not isinstance(value, dict): + raise FreezeError(f"expected a JSON object in {path}") + return value + + +def _read_toml(path: Path) -> dict[str, Any]: + try: + with path.open("rb") as handle: + return tomllib.load(handle) + except FileNotFoundError as exc: + raise FreezeError(f"required file does not exist: {path}") from exc + except tomllib.TOMLDecodeError as exc: + raise FreezeError(f"invalid TOML in {path}: {exc}") from exc + + +def _load_decisions(path: Path) -> tuple[str, list[dict[str, Any]]]: + value = _read_toml(path) + if value.get("schema_version") != 1: + raise FreezeError("review decision schema_version must be 1") + prompt_policy = value.get("prompt_policy") + if prompt_policy != "full-issue-body-unchanged": + raise FreezeError("unsupported or missing prompt policy") + decisions = value.get("decisions") + if not isinstance(decisions, list): + raise FreezeError("review decisions must be an array") + ids = [item.get("id") for item in decisions if isinstance(item, dict)] + if len(ids) != len(decisions) or any(not isinstance(item, str) for item in ids): + raise FreezeError("every review decision must have a string id") + if len(ids) != len(set(ids)): + raise FreezeError("review decision ids must be unique") + return prompt_policy, decisions + + +def _select_tasks( + decisions: list[dict[str, Any]], count: int, requested: list[str] | None +) -> list[str]: + if count < 1: + raise FreezeError("count must be at least 1") + decision_by_id = {item["id"]: item.get("decision") for item in decisions} + if requested: + if len(requested) != len(set(requested)): + raise FreezeError("requested task ids must be unique") + if len(requested) != count: + raise FreezeError( + f"requested {len(requested)} task ids, but count is {count}" + ) + selected = list(requested) + else: + selected = [ + item["id"] for item in decisions if item.get("decision") == "validated" + ][:count] + if len(selected) != count: + raise FreezeError( + f"requested {count} validated tasks, but only {len(selected)} exist" + ) + invalid = [ + task_id for task_id in selected if decision_by_id.get(task_id) != "validated" + ] + if invalid: + raise FreezeError( + "tasks are not decision=validated: " + ", ".join(sorted(invalid)) + ) + return selected + + +def _string_list(value: object, label: str, *, allow_empty: bool = False) -> list[str]: + if not isinstance(value, list) or not all( + isinstance(item, str) and item for item in value + ): + raise FreezeError(f"{label} must be a list of nonempty strings") + if not value and not allow_empty: + raise FreezeError(f"{label} must not be empty") + return list(value) + + +def _runtime_recipe(task_id: str, profile: object) -> dict[str, Any]: + if not isinstance(profile, dict): + raise FreezeError(f"{task_id}: runtime profile is missing") + base_image = profile.get("base_image") + if isinstance(base_image, str): + pinned = _BASE_IMAGE_DIGEST.fullmatch(base_image) + if pinned is not None: + # Older validation attestations recorded the exact upstream digest. + # The public recipe intentionally keeps only its versioned tag. + base_image = pinned.group("tag") + if ( + not isinstance(base_image, str) + or _BASE_IMAGE.fullmatch(base_image) is None + or base_image.rsplit(":", 1)[1] == "latest" + or not any(character.isdigit() for character in base_image.rsplit(":", 1)[1]) + ): + raise FreezeError(f"{task_id}: runtime base image must use a versioned tag") + sync = _string_list(profile.get("sync_command"), f"{task_id}: runtime sync command") + bootstrap = _string_list( + profile.get("bootstrap_command", []), + f"{task_id}: runtime bootstrap command", + allow_empty=True, + ) + environment = _string_list( + profile.get("environment", []), + f"{task_id}: runtime environment", + allow_empty=True, + ) + environment_keys: list[str] = [] + for item in environment: + key, separator, _value = item.partition("=") + if ( + not separator + or _ENVIRONMENT_KEY.fullmatch(key) is None + or any(character in item for character in ("\n", "\r", "\0")) + ): + raise FreezeError(f"{task_id}: invalid runtime environment entry") + environment_keys.append(key) + if len(environment_keys) != len(set(environment_keys)): + raise FreezeError(f"{task_id}: duplicate runtime environment key") + recipe: dict[str, Any] = { + "schema_version": 1, + "base_image": base_image, + "sync_command": sync, + "environment": environment, + } + if bootstrap: + recipe["bootstrap_command"] = bootstrap + return recipe + + +def _validate_attestation( + task_id: str, packet: dict[str, Any], validation: dict[str, Any] +) -> None: + if validation.get("schema_version") != 1: + raise FreezeError(f"{task_id}: validation schema_version must be 1") + if validation.get("validated") is not True: + raise FreezeError(f"{task_id}: validation attestation is not successful") + if ( + not isinstance(validation.get("local_image"), str) + or not validation["local_image"] + ): + raise FreezeError(f"{task_id}: validation local image name is missing") + local_image_id = validation.get("local_image_id") + if ( + not isinstance(local_image_id, str) + or _LOCAL_IMAGE_ID.fullmatch(local_image_id) is None + ): + raise FreezeError(f"{task_id}: validation local image id is missing") + runner_contract = validation.get("runner_contract") + if not isinstance(runner_contract, dict) or any( + runner_contract.get(field) != expected + for field, expected in ( + ("user", "node"), + ("uid", "1000"), + ("home", "/home/node"), + ) + ): + raise FreezeError(f"{task_id}: runner image contract is missing or invalid") + smoke_hash = runner_contract.get("smoke_output_sha256") + smoke_output = runner_contract.get("smoke_output") + accepted_smoke_hashes = ( + { + _sha256_bytes(smoke_output.encode("utf-8")), + _sha256_bytes((_LEGACY_SMOKE_PREFIX + smoke_output + "\n").encode("utf-8")), + } + if isinstance(smoke_output, str) and smoke_output + else set() + ) + if ( + not isinstance(smoke_output, str) + or not smoke_output + or not isinstance(smoke_hash, str) + or re.fullmatch(r"[0-9a-f]{64}", smoke_hash) is None + or smoke_hash not in accepted_smoke_hashes + ): + raise FreezeError(f"{task_id}: runner contract smoke proof is missing") + for field in ("task_id", "repository", "fix_sha", "parent_sha"): + expected_field = "id" if field == "task_id" else field + if validation.get(field) != packet.get(expected_field): + raise FreezeError(f"{task_id}: validation {field} does not match packet") + + profile = validation.get("runtime_profile") + if not isinstance(profile, dict): + raise FreezeError(f"{task_id}: validation runtime_profile is missing") + _runtime_recipe(task_id, profile) + fail_codes = profile.get("fail_exit_codes") + if ( + not isinstance(fail_codes, list) + or not fail_codes + or 0 in fail_codes + or not all(isinstance(item, int) for item in fail_codes) + ): + raise FreezeError(f"{task_id}: invalid validation fail_exit_codes") + fail_to_pass_command = _string_list( + validation.get("fail_to_pass_command"), f"{task_id}: F2P command" + ) + regression_command = _string_list( + validation.get("regression_command"), f"{task_id}: regression command" + ) + setup_command = _string_list( + validation.get("setup_command", []), + f"{task_id}: setup command", + allow_empty=True, + ) + if setup_command != profile.get("setup_command", []): + raise FreezeError(f"{task_id}: setup command does not match runtime profile") + timeout_s = profile.get("timeout_s") + if not isinstance(timeout_s, int) or not 10 <= timeout_s <= 1800: + raise FreezeError(f"{task_id}: timeout_s is outside the dataset contract") + + repeats = validation.get("repeats") + cells = validation.get("cells") + if not isinstance(repeats, int) or repeats < 2: + raise FreezeError(f"{task_id}: validation must contain at least two repeats") + if not isinstance(cells, list): + raise FreezeError(f"{task_id}: validation cells are missing") + by_repeat: dict[int, dict[str, dict[str, Any]]] = {} + for cell in cells: + if not isinstance(cell, dict): + raise FreezeError(f"{task_id}: invalid validation cell") + repeat = cell.get("repeat") + state = cell.get("state") + if not isinstance(repeat, int) or not isinstance(state, str): + raise FreezeError(f"{task_id}: validation cell identity is invalid") + if state in by_repeat.setdefault(repeat, {}): + raise FreezeError(f"{task_id}: duplicate validation cell {repeat}/{state}") + by_repeat[repeat][state] = cell + + expected_states = { + "parent-hidden": ("test-failure", fail_codes, fail_to_pass_command), + "parent-regression": ("zero", [0], regression_command), + "gold-hidden": ("zero", [0], fail_to_pass_command), + "gold-regression": ("zero", [0], regression_command), + } + if set(by_repeat) != set(range(1, repeats + 1)): + raise FreezeError(f"{task_id}: validation repeat set is incomplete") + for repeat, repeat_cells in by_repeat.items(): + if set(repeat_cells) != set(expected_states): + raise FreezeError(f"{task_id}: repeat {repeat} does not have four cells") + for state, (expected, exit_codes, command) in expected_states.items(): + cell = repeat_cells[state] + if ( + cell.get("expected") != expected + or cell.get("exit_code") not in exit_codes + or cell.get("command") != command + ): + raise FreezeError( + f"{task_id}: repeat {repeat} cell {state} contradicts validation" + ) + + +def _safe_archive_name(name: str, task_id: str) -> str: + path = PurePosixPath(name) + if ( + path.is_absolute() + or not path.parts + or any(part in ("", ".", "..") for part in path.parts) + ): + raise FreezeError(f"{task_id}: unsafe source archive path: {name!r}") + return path.as_posix() + + +def _normal_link_target(link_path: str, target: str, task_id: str) -> str: + if not target or target.startswith("/"): + raise FreezeError(f"{task_id}: unsafe symlink target for {link_path!r}") + resolved = posixpath.normpath(posixpath.join(posixpath.dirname(link_path), target)) + if resolved == ".." or resolved.startswith("../"): + raise FreezeError(f"{task_id}: escaping symlink target for {link_path!r}") + return _safe_archive_name(resolved, task_id) + + +def _read_git_archive(repository: Path, parent: str, task_id: str) -> bytes: + completed = subprocess.run( + ["git", "archive", "--format=tar", parent], + cwd=repository, + check=False, + capture_output=True, + ) + if completed.returncode: + detail = completed.stderr.decode(errors="replace").strip() + raise FreezeError(f"{task_id}: git archive failed: {detail}") + return completed.stdout + + +def _dereferenced_files(archive: bytes, task_id: str) -> dict[str, _ArchiveFile]: + regular: dict[str, _ArchiveFile] = {} + links: dict[str, str] = {} + directories: set[str] = set() + with tarfile.open(fileobj=io.BytesIO(archive), mode="r:") as source: + for member in source: + name = _safe_archive_name(member.name.rstrip("/"), task_id) + if member.isdir(): + directories.add(name) + elif member.isreg(): + handle = source.extractfile(member) + if handle is None: + raise FreezeError(f"{task_id}: unreadable archive member {name!r}") + regular[name] = _ArchiveFile(handle.read(), member.mode & 0o777) + elif member.issym(): + links[name] = _normal_link_target(name, member.linkname, task_id) + else: + raise FreezeError( + f"{task_id}: unsupported archive member type for {name!r}" + ) + + for name in (*regular, *links): + parent = PurePosixPath(name).parent + while parent != PurePosixPath("."): + directories.add(parent.as_posix()) + parent = parent.parent + + def resolve_node(path: str, seen: frozenset[str]) -> tuple[str, str]: + if path in seen: + raise FreezeError(f"{task_id}: cyclic symlink involving {path!r}") + if path in regular: + return "file", path + if path in links: + return resolve_node(links[path], seen | {path}) + if path in directories: + return "directory", path + parts = PurePosixPath(path).parts + for index in range(len(parts) - 1, 0, -1): + prefix = PurePosixPath(*parts[:index]).as_posix() + if prefix in links: + suffix = PurePosixPath(*parts[index:]).as_posix() + target = posixpath.join(links[prefix], suffix) + return resolve_node(target, seen | {prefix}) + raise FreezeError(f"{task_id}: symlink target is absent: {path!r}") + + materialized = dict(regular) + + def add_file(output: str, source_path: str) -> None: + value = regular[source_path] + previous = materialized.get(output) + if previous is not None and previous != value: + raise FreezeError(f"{task_id}: dereferenced path collision at {output!r}") + materialized[output] = value + + def expand_directory( + source_dir: str, output_dir: str, seen: frozenset[str] + ) -> None: + if source_dir in seen: + raise FreezeError(f"{task_id}: cyclic directory symlink at {source_dir!r}") + prefix = f"{source_dir}/" + children = { + path[len(prefix) :].split("/", 1)[0] + for path in (*regular, *links, *directories) + if path.startswith(prefix) + } + for child in sorted(children): + source_child = f"{source_dir}/{child}" + output_child = f"{output_dir}/{child}" + kind, resolved = resolve_node(source_child, seen) + if kind == "file": + add_file(output_child, resolved) + else: + expand_directory(resolved, output_child, seen | {source_dir}) + + for link_path, target in sorted(links.items()): + kind, resolved = resolve_node(target, frozenset({link_path})) + if kind == "file": + add_file(link_path, resolved) + else: + expand_directory(resolved, link_path, frozenset({link_path})) + return materialized + + +def _write_source_archive( + repository: Path, parent: str, destination: Path, task_id: str +) -> None: + archive = _read_git_archive(repository, parent, task_id) + files = _dereferenced_files(archive, task_id) + if not files: + raise FreezeError(f"{task_id}: parent source archive is empty") + with tarfile.open(destination, mode="w", format=tarfile.PAX_FORMAT) as output: + for name, value in sorted(files.items()): + member = tarfile.TarInfo(name) + member.size = len(value.data) + member.mode = value.mode or 0o644 + member.uid = 0 + member.gid = 0 + member.uname = "" + member.gname = "" + member.mtime = 0 + output.addfile(member, io.BytesIO(value.data)) + + +def _verify_commit(repository: Path, packet: dict[str, Any], task_id: str) -> None: + parent = packet.get("parent_sha") + fix = packet.get("fix_sha") + if not isinstance(parent, str) or _SHA1.fullmatch(parent) is None: + raise FreezeError(f"{task_id}: invalid parent SHA") + if not isinstance(fix, str) or _SHA1.fullmatch(fix) is None: + raise FreezeError(f"{task_id}: invalid fix SHA") + completed = subprocess.run( + ["git", "show", "-s", "--format=%P", fix], + cwd=repository, + check=False, + capture_output=True, + text=True, + ) + if completed.returncode: + raise FreezeError(f"{task_id}: fix commit is absent from the mirror") + parents = completed.stdout.split() + if parents != [parent]: + raise FreezeError(f"{task_id}: mirror does not prove the configured parent") + + +def _task_record( + packet: dict[str, Any], + validation: dict[str, Any], + source_path: str, + hidden_path: str, + source_sha256: str, + hidden_sha256: str, +) -> dict[str, Any]: + task_id = packet["id"] + issue_title = packet.get("issue_title") + issue_body = packet.get("issue_body") + if not isinstance(issue_title, str) or not issue_title: + raise FreezeError(f"{task_id}: issue title is missing") + if not isinstance(issue_body, str) or not issue_body: + raise FreezeError(f"{task_id}: issue body is missing") + expected_body_hash = packet.get("issue_body_sha256") + if expected_body_hash != _sha256_bytes(issue_body.encode()): + raise FreezeError(f"{task_id}: issue body checksum does not match packet") + test_paths = _string_list(packet.get("test_paths"), f"{task_id}: test paths") + profile = validation["runtime_profile"] + task: dict[str, Any] = { + "id": task_id, + "repository": packet["repository"], + "issue_title": issue_title, + "issue_body": issue_body, + "runtime_recipe": _runtime_recipe(task_id, profile), + "source_archive": source_path, + "hidden_test_patch": hidden_path, + "source_sha256": source_sha256, + "hidden_test_sha256": hidden_sha256, + "fail_to_pass_command": validation["fail_to_pass_command"], + "regression_command": validation["regression_command"], + "protected_globs": sorted(set(test_paths)), + "ignored_globs": list(_IGNORED_GLOBS), + "timeout_s": profile["timeout_s"], + "validated": True, + } + setup = validation.get("setup_command", []) + if setup: + task["setup_command"] = setup + return task + + +def freeze_dataset( + *, + decisions_path: Path, + packets: Path, + cache: Path, + output: Path, + count: int, + requested_tasks: list[str] | None = None, + name: str = "PatchEval", + version: str = "pilot", +) -> list[str]: + """Build an atomic, deterministic dataset directory and return task ids.""" + + prompt_policy, decisions = _load_decisions(decisions_path) + selected = _select_tasks(decisions, count, requested_tasks) + if output.exists(): + raise FreezeError(f"output already exists: {output}") + output.parent.mkdir(parents=True, exist_ok=True) + temporary = Path(tempfile.mkdtemp(prefix=f".{output.name}.", dir=output.parent)) + try: + for child in ("sources", "hidden-tests", "attestations"): + (temporary / child).mkdir() + tasks: list[dict[str, Any]] = [] + for task_id in selected: + packet_dir = packets / task_id + packet = _read_json(packet_dir / "packet.json") + validation_path = packet_dir / "validation.json" + validation = _read_json(validation_path) + if packet.get("id") != task_id: + raise FreezeError(f"{task_id}: packet id does not match its directory") + repository_name = packet.get("repository") + if not isinstance(repository_name, str) or repository_name.count("/") != 1: + raise FreezeError(f"{task_id}: invalid repository") + _validate_attestation(task_id, packet, validation) + + owner, repository = repository_name.split("/", 1) + mirror = cache / f"{owner.lower()}__{repository.lower()}.git" + if not mirror.is_dir(): + raise FreezeError(f"{task_id}: repository mirror does not exist") + _verify_commit(mirror, packet, task_id) + + hidden_source = packet_dir / "hidden-tests.patch" + try: + hidden_bytes = hidden_source.read_bytes() + except FileNotFoundError as exc: + raise FreezeError(f"{task_id}: hidden test patch is missing") from exc + hidden_sha256 = _sha256_bytes(hidden_bytes) + if not hidden_bytes or packet.get("hidden_patch_sha256") != hidden_sha256: + raise FreezeError(f"{task_id}: hidden test patch checksum mismatch") + + source_relative = f"sources/{task_id}.tar" + hidden_relative = f"hidden-tests/{task_id}.patch" + source_destination = temporary / source_relative + hidden_destination = temporary / hidden_relative + _write_source_archive( + mirror, packet["parent_sha"], source_destination, task_id + ) + hidden_destination.write_bytes(hidden_bytes) + published_validation = dict(validation) + published_contract = dict(validation["runner_contract"]) + published_contract["smoke_output_sha256"] = _sha256_bytes( + published_contract["smoke_output"].encode("utf-8") + ) + published_validation["runner_contract"] = published_contract + (temporary / "attestations" / f"{task_id}.json").write_text( + json.dumps(published_validation, indent=2, sort_keys=True) + "\n", + encoding="utf-8", + ) + tasks.append( + _task_record( + packet, + validation, + source_relative, + hidden_relative, + _sha256_file(source_destination), + hidden_sha256, + ) + ) + + if len(tasks) != count: + raise FreezeError(f"freezer produced {len(tasks)} tasks, expected {count}") + tasks_bytes = b"".join( + (json.dumps(task, sort_keys=True, separators=(",", ":")) + "\n").encode() + for task in tasks + ) + (temporary / "tasks.jsonl").write_bytes(tasks_bytes) + dataset = { + "schema_version": 1, + "release": f"{version}-{count}", + "name": name, + "version": version, + "prompt_policy": prompt_policy, + "task_count": count, + "task_ids": selected, + "tasks_file": "tasks.jsonl", + "tasks_sha256": _sha256_bytes(tasks_bytes), + "checksums_file": "SHA256SUMS", + } + (temporary / "dataset.json").write_text( + json.dumps(dataset, indent=2, sort_keys=True) + "\n", encoding="utf-8" + ) + checksum_paths = sorted( + path + for path in temporary.rglob("*") + if path.is_file() and path.name != "SHA256SUMS" + ) + checksum_lines = [ + f"{_sha256_file(path)} {path.relative_to(temporary).as_posix()}\n" + for path in checksum_paths + ] + (temporary / "SHA256SUMS").write_text("".join(checksum_lines), encoding="utf-8") + os.replace(temporary, output) + except BaseException: + shutil.rmtree(temporary, ignore_errors=True) + raise + return selected diff --git a/miner/src/patcheval_miner/github.py b/miner/src/patcheval_miner/github.py new file mode 100644 index 0000000000000000000000000000000000000000..efa47aad9b9774cbf3472bbd058be1701a4f805f --- /dev/null +++ b/miner/src/patcheval_miner/github.py @@ -0,0 +1,238 @@ +"""GitHub-backed candidate discovery through the authenticated `gh` CLI.""" + +from __future__ import annotations + +import json +import re +import subprocess +from collections.abc import Iterator +from datetime import datetime +from typing import Any + +from patcheval_miner.models import Candidate, ChangedFile, IssueRef + +_GRAPHQL = """ +query($owner: String!, $name: String!, $cursor: String) { + repository(owner: $owner, name: $name) { + pullRequests( + first: 50, + after: $cursor, + states: MERGED, + orderBy: {field: UPDATED_AT, direction: DESC} + ) { + pageInfo { hasNextPage endCursor } + nodes { + number + url + title + body + mergedAt + updatedAt + mergeCommit { + oid + parents(first: 3) { totalCount nodes { oid } } + } + files(first: 100) { + totalCount + nodes { path changeType additions deletions } + } + closingIssuesReferences(first: 20) { + nodes { + number url title body + labels(first: 20) { nodes { name } } + } + } + } + } + } +} +""" +_ISSUE_NUMBER = re.compile(r"(?\d+)\b") + + +def _timestamp(value: str) -> datetime: + return datetime.fromisoformat(value) + + +class GitHub: + """Small JSON client that inherits authentication and rate limits from `gh`.""" + + def _api(self, *args: str) -> Any: + completed = subprocess.run( + ["gh", "api", *args], + check=False, + capture_output=True, + text=True, + ) + if completed.returncode: + detail = completed.stderr.strip() or completed.stdout.strip() + raise RuntimeError(f"gh api failed: {detail}") + return json.loads(completed.stdout) + + def merged_pull_requests( + self, repository: str, *, start: str, end: str, max_pages: int = 20 + ) -> Iterator[dict[str, Any]]: + """Yield merged PRs in the date window, newest first.""" + owner, name = repository.split("/", 1) + start_at = _timestamp(start) + end_at = _timestamp(end) + cursor: str | None = None + for _page in range(max_pages): + arguments = [ + "graphql", + "-f", + f"query={_GRAPHQL}", + "-F", + f"owner={owner}", + "-F", + f"name={name}", + ] + if cursor: + arguments.extend(("-F", f"cursor={cursor}")) + result = self._api(*arguments) + connection = result["data"]["repository"]["pullRequests"] + pulls = connection["nodes"] + if not pulls: + break + for pull in pulls: + merged_at = pull.get("mergedAt") + if merged_at and start_at <= _timestamp(merged_at) <= end_at: + yield pull + oldest_update = min(_timestamp(pull["updatedAt"]) for pull in pulls) + if oldest_update < start_at: + break + page_info = connection["pageInfo"] + if not page_info["hasNextPage"]: + break + cursor = page_info["endCursor"] + + def direct_commits( + self, repository: str, *, start: str, end: str, max_pages: int = 10 + ) -> Iterator[dict[str, Any]]: + """Yield issue-referencing default-branch commits in the date window.""" + for page in range(1, max_pages + 1): + commits = self._api( + f"repos/{repository}/commits", + "--method", + "GET", + "-f", + f"since={start}", + "-f", + f"until={end}", + "-f", + "per_page=100", + "-f", + f"page={page}", + ) + if not commits: + break + for commit in commits: + message = commit["commit"]["message"] + if _ISSUE_NUMBER.search(message): + yield commit + + def _verified_commit_issues(self, repository: str, message: str) -> list[IssueRef]: + issues: list[IssueRef] = [] + seen: set[int] = set() + for match in _ISSUE_NUMBER.finditer(message): + number = int(match.group("number")) + if number in seen: + continue + seen.add(number) + try: + value = self._api(f"repos/{repository}/issues/{number}") + except RuntimeError: + continue + if "pull_request" in value: + continue + issues.append( + IssueRef( + number=number, + url=value["html_url"], + title=value["title"], + body=value.get("body") or "", + link_kind="verified-commit-message-reference", + labels=tuple(label["name"] for label in value.get("labels", ())), + ) + ) + return issues + + def candidate(self, repository: str, pull: dict[str, Any]) -> Candidate: + owner, name = repository.split("/", 1) + number = int(pull["number"]) + merge_commit = pull.get("mergeCommit") + if not merge_commit: + raise ValueError(f"{repository}#{number} has no merge commit") + fix_sha = merge_commit["oid"] + raw_files = pull["files"]["nodes"] + files = [ + ChangedFile( + path=item["path"], + status=item["changeType"].lower(), + additions=int(item["additions"]), + deletions=int(item["deletions"]), + ) + for item in raw_files + ] + issues = [ + IssueRef( + number=int(item["number"]), + url=item["url"], + title=item["title"], + body=item.get("body") or "", + link_kind="github-closing-reference", + labels=tuple(label["name"] for label in item["labels"]["nodes"]), + ) + for item in pull["closingIssuesReferences"]["nodes"] + ] + parents = merge_commit["parents"]["nodes"] + return Candidate( + id=f"{owner.lower()}__{name.lower()}__pr{number}", + repository=repository, + fix_sha=fix_sha, + parent_sha=parents[0]["oid"] if len(parents) == 1 else None, + parent_count=int(merge_commit["parents"]["totalCount"]), + merged_at=pull["mergedAt"], + pr_number=number, + pr_url=pull["url"], + pr_title=pull["title"], + pr_body=pull.get("body") or "", + issues=issues, + files=files, + changed_files_count=int(pull["files"]["totalCount"]), + ) + + def direct_candidate( + self, repository: str, raw_commit: dict[str, Any] + ) -> Candidate: + detail = self._api(f"repos/{repository}/commits/{raw_commit['sha']}") + message = detail["commit"]["message"] + issues = self._verified_commit_issues(repository, message) + parents = detail.get("parents") or [] + owner, name = repository.split("/", 1) + files = [ + ChangedFile( + path=item["filename"], + status=item["status"], + additions=int(item["additions"]), + deletions=int(item["deletions"]), + ) + for item in detail.get("files", ()) + ] + sha = detail["sha"] + return Candidate( + id=f"{owner.lower()}__{name.lower()}__{sha[:12]}", + repository=repository, + fix_sha=sha, + parent_sha=parents[0]["sha"] if len(parents) == 1 else None, + parent_count=len(parents), + merged_at=detail["commit"]["committer"]["date"], + pr_number=None, + pr_url=detail["html_url"], + pr_title=message.splitlines()[0], + pr_body=message, + issues=issues, + files=files, + changed_files_count=len(files), + source_kind="direct-commit", + ) diff --git a/miner/src/patcheval_miner/io.py b/miner/src/patcheval_miner/io.py new file mode 100644 index 0000000000000000000000000000000000000000..a8821dc98bef434b53dbbf6243885cfcf2d84971 --- /dev/null +++ b/miner/src/patcheval_miner/io.py @@ -0,0 +1,28 @@ +"""Stable JSONL input and output helpers.""" + +from __future__ import annotations + +import json +from collections.abc import Iterable, Iterator +from pathlib import Path + +from patcheval_miner.models import Candidate + + +def write_candidates(path: Path, candidates: Iterable[Candidate]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + with path.open("w", encoding="utf-8") as handle: + for candidate in candidates: + handle.write(json.dumps(candidate.to_dict(), sort_keys=True) + "\n") + + +def read_candidates(path: Path) -> Iterator[Candidate]: + with path.open(encoding="utf-8") as handle: + for line_number, line in enumerate(handle, 1): + if line.strip(): + try: + yield Candidate.from_dict(json.loads(line)) + except (KeyError, TypeError, ValueError) as exc: + raise ValueError( + f"invalid candidate on line {line_number}: {exc}" + ) from exc diff --git a/miner/src/patcheval_miner/models.py b/miner/src/patcheval_miner/models.py new file mode 100644 index 0000000000000000000000000000000000000000..6b52d119fdab75ede54198abf5809297c85b0308 --- /dev/null +++ b/miner/src/patcheval_miner/models.py @@ -0,0 +1,76 @@ +"""Serializable records used by discovery and review.""" + +from __future__ import annotations + +from dataclasses import asdict, dataclass, field +from typing import Any + + +@dataclass(frozen=True) +class ChangedFile: + path: str + status: str + additions: int + deletions: int + + @classmethod + def from_dict(cls, value: dict[str, Any]) -> ChangedFile: + return cls( + path=str(value["path"]), + status=str(value["status"]), + additions=int(value["additions"]), + deletions=int(value["deletions"]), + ) + + +@dataclass(frozen=True) +class IssueRef: + number: int + url: str + title: str + body: str + link_kind: str + labels: tuple[str, ...] = () + + @classmethod + def from_dict(cls, value: dict[str, Any]) -> IssueRef: + return cls( + number=int(value["number"]), + url=str(value["url"]), + title=str(value["title"]), + body=str(value.get("body") or ""), + link_kind=str(value["link_kind"]), + labels=tuple(str(item) for item in value.get("labels", ())), + ) + + +@dataclass +class Candidate: + id: str + repository: str + fix_sha: str + parent_sha: str | None + parent_count: int + merged_at: str + pr_number: int | None + pr_url: str + pr_title: str + pr_body: str + issues: list[IssueRef] + files: list[ChangedFile] + changed_files_count: int + source_kind: str = "pull-request" + structural_status: str = "pending" + rejection_reasons: list[str] = field(default_factory=list) + risk_flags: list[str] = field(default_factory=list) + discovered_by: str = "github-api" + + def to_dict(self) -> dict[str, Any]: + return asdict(self) + + @classmethod + def from_dict(cls, value: dict[str, Any]) -> Candidate: + data = dict(value) + data["issues"] = [IssueRef.from_dict(item) for item in data["issues"]] + data["files"] = [ChangedFile.from_dict(item) for item in data["files"]] + return cls(**data) diff --git a/miner/src/patcheval_miner/prepare.py b/miner/src/patcheval_miner/prepare.py new file mode 100644 index 0000000000000000000000000000000000000000..d5c5235e2e736ac41c15c3b7ae2066f265dd75ec --- /dev/null +++ b/miner/src/patcheval_miner/prepare.py @@ -0,0 +1,164 @@ +"""Create private, auditable review packets for nominated fixes.""" + +from __future__ import annotations + +import hashlib +import json +import re +import subprocess +import tomllib +from dataclasses import asdict, dataclass +from pathlib import Path, PurePosixPath +from typing import Any + +from patcheval_miner.classify import is_production_python, is_test_path + +_SOLUTION_LANGUAGE = re.compile( + r"(?i)\b(?:exact fix|fix is|patch|proposed (?:change|fix|solution)|root cause|" + r"should (?:change|replace|add|remove)|change .+ to|replace .+ with)\b" +) + + +@dataclass(frozen=True) +class Nomination: + id: str + repository: str + fix_sha: str + issue: int + pull: int | None = None + + +def load_nominations(path: Path) -> list[Nomination]: + with path.open("rb") as handle: + value = tomllib.load(handle) + if value.get("schema_version") != 1: + raise ValueError("nomination schema_version must be 1") + nominations = [Nomination(**item) for item in value["nominations"]] + ids = [item.id for item in nominations] + if len(ids) != len(set(ids)): + raise ValueError("nomination ids must be unique") + return nominations + + +def _run(args: list[str], *, cwd: Path | None = None) -> str: + completed = subprocess.run( + args, cwd=cwd, check=False, capture_output=True, text=True + ) + if completed.returncode: + detail = completed.stderr.strip() or completed.stdout.strip() + raise RuntimeError(f"command failed ({' '.join(args)}): {detail}") + return completed.stdout + + +def _github_issue(repository: str, number: int) -> dict[str, Any]: + return json.loads(_run(["gh", "api", f"repos/{repository}/issues/{number}"])) + + +def _mirror(cache: Path, repository: str) -> Path: + owner, name = repository.split("/", 1) + destination = cache / f"{owner.lower()}__{name.lower()}.git" + if destination.exists(): + _run(["git", "fetch", "--prune", "origin"], cwd=destination) + else: + destination.parent.mkdir(parents=True, exist_ok=True) + _run( + [ + "git", + "clone", + "--mirror", + f"https://github.com/{repository}.git", + str(destination), + ] + ) + return destination + + +def _git(repository: Path, *args: str) -> str: + return _run(["git", *args], cwd=repository) + + +def _changed_paths(repository: Path, parent: str, fix: str) -> list[str]: + output = _git(repository, "diff", "--name-only", "--no-renames", parent, fix) + return [line for line in output.splitlines() if line] + + +def _leakage_flags(issue_body: str, production_paths: list[str]) -> list[str]: + flags: list[str] = [] + if _SOLUTION_LANGUAGE.search(issue_body): + flags.append("solution-language") + if "```diff" in issue_body.lower(): + flags.append("diff-code-block") + lowered = issue_body.lower() + for path in production_paths: + path_value = PurePosixPath(path) + if path.lower() in lowered or path_value.name.lower() in lowered: + flags.append(f"mentions-production-path:{path}") + return sorted(set(flags)) + + +def prepare_nomination(nomination: Nomination, *, cache: Path, output: Path) -> Path: + repository = _mirror(cache, nomination.repository) + commit_type = _git(repository, "cat-file", "-t", nomination.fix_sha).strip() + if commit_type != "commit": + raise ValueError(f"{nomination.id}: fix_sha is not a commit") + parents = _git(repository, "show", "-s", "--format=%P", nomination.fix_sha).split() + if len(parents) != 1: + raise ValueError(f"{nomination.id}: fix commit must have exactly one parent") + parent = parents[0] + changed = _changed_paths(repository, parent, nomination.fix_sha) + tests = [path for path in changed if is_test_path(path)] + production = [path for path in changed if is_production_python(path)] + if not tests or not production: + raise ValueError( + f"{nomination.id}: fix must change production Python and test paths" + ) + issue = _github_issue(nomination.repository, nomination.issue) + if "pull_request" in issue: + raise ValueError(f"{nomination.id}: configured issue points to a pull request") + issue_body = issue.get("body") or "" + full_diff = _git( + repository, + "diff", + "--binary", + "--no-ext-diff", + "--no-renames", + parent, + nomination.fix_sha, + ) + hidden_patch = _git( + repository, + "diff", + "--binary", + "--no-ext-diff", + "--no-renames", + parent, + nomination.fix_sha, + "--", + *tests, + ) + packet = { + **asdict(nomination), + "parent_sha": parent, + "commit_date": _git( + repository, "show", "-s", "--format=%cI", nomination.fix_sha + ).strip(), + "issue_url": issue["html_url"], + "issue_title": issue["title"], + "issue_body": issue_body, + "issue_body_sha256": hashlib.sha256(issue_body.encode()).hexdigest(), + "changed_paths": changed, + "production_paths": production, + "test_paths": tests, + "full_diff_sha256": hashlib.sha256(full_diff.encode()).hexdigest(), + "hidden_patch_sha256": hashlib.sha256(hidden_patch.encode()).hexdigest(), + "leakage_flags": _leakage_flags(issue_body, production), + "review_state": "pending", + } + destination = output / nomination.id + destination.mkdir(parents=True, exist_ok=True) + (destination / "packet.json").write_text( + json.dumps(packet, indent=2, sort_keys=True) + "\n", encoding="utf-8" + ) + (destination / "gold.diff").write_text(full_diff, encoding="utf-8") + (destination / "hidden-tests.patch").write_text(hidden_patch, encoding="utf-8") + return destination diff --git a/miner/src/patcheval_miner/validate.py b/miner/src/patcheval_miner/validate.py new file mode 100644 index 0000000000000000000000000000000000000000..555a8315c2b5039ace1a8808d2f4011e3cf9f0e8 --- /dev/null +++ b/miner/src/patcheval_miner/validate.py @@ -0,0 +1,422 @@ +"""Hermetic four-cell dynamic validation for prepared candidates.""" + +from __future__ import annotations + +import hashlib +import json +import shlex +import shutil +import subprocess +import tarfile +import tomllib +import uuid +from dataclasses import asdict, dataclass +from pathlib import Path +from typing import Any + +_NODE_IMAGE = "node:24-bookworm-slim" + + +@dataclass(frozen=True) +class RuntimeProfile: + base_image: str + sync_command: tuple[str, ...] + bootstrap_command: tuple[str, ...] + setup_command: tuple[str, ...] + test_command: tuple[str, ...] + regression_command: tuple[str, ...] + environment: tuple[str, ...] + timeout_s: int + fail_exit_codes: tuple[int, ...] + + +@dataclass(frozen=True) +class TaskCommands: + fail_to_pass: tuple[str, ...] + regression: tuple[str, ...] + + +def load_profiles(path: Path) -> dict[str, RuntimeProfile]: + with path.open("rb") as handle: + value = tomllib.load(handle) + if value.get("schema_version") != 1: + raise ValueError("runtime schema_version must be 1") + profiles: dict[str, RuntimeProfile] = {} + for repository, raw in value["repositories"].items(): + test_command = tuple(raw["test_command"]) + profiles[repository] = RuntimeProfile( + base_image=raw["base_image"], + sync_command=tuple(raw["sync_command"]), + bootstrap_command=tuple(raw.get("bootstrap_command", ())), + setup_command=tuple(raw.get("setup_command", ())), + test_command=test_command, + regression_command=tuple(raw.get("regression_command", test_command)), + environment=tuple(raw.get("environment", ())), + timeout_s=int(raw.get("timeout_s", 300)), + fail_exit_codes=tuple( + int(item) for item in raw.get("fail_exit_codes", (1,)) + ), + ) + return profiles + + +def load_commands(path: Path) -> dict[str, TaskCommands]: + with path.open("rb") as handle: + value = tomllib.load(handle) + if value.get("schema_version") != 1: + raise ValueError("command schema_version must be 1") + return { + task_id: TaskCommands( + fail_to_pass=tuple(raw["fail_to_pass"]), + regression=tuple(raw["regression"]), + ) + for task_id, raw in value["tasks"].items() + } + + +def _run( + args: list[str], + *, + cwd: Path | None = None, + check: bool = True, + timeout: int | None = None, +) -> subprocess.CompletedProcess[str]: + completed = subprocess.run( + args, + cwd=cwd, + check=False, + capture_output=True, + text=True, + timeout=timeout, + ) + if check and completed.returncode: + detail = completed.stderr.strip() or completed.stdout.strip() + raise RuntimeError(f"command failed ({' '.join(args)}): {detail}") + return completed + + +def _git(repository: Path, *args: str) -> str: + return _run(["git", *args], cwd=repository).stdout + + +def _archive(repository: Path, commit: str, destination: Path) -> None: + destination.mkdir(parents=True, exist_ok=True) + archive = subprocess.run( + ["git", "archive", "--format=tar", commit], + cwd=repository, + check=True, + capture_output=True, + ).stdout + tar_path = destination.parent / f"{destination.name}.tar" + tar_path.write_bytes(archive) + try: + with tarfile.open(tar_path) as handle: + handle.extractall(destination, filter="data") + finally: + tar_path.unlink() + + +def _write_patch( + repository: Path, + parent: str, + fix: str, + paths: list[str], + destination: Path, +) -> None: + if not paths: + raise ValueError("patch path list must not be empty") + patch = _git( + repository, + "diff", + "--binary", + "--no-ext-diff", + "--no-renames", + parent, + fix, + "--", + *paths, + ) + if not patch: + raise ValueError(f"empty patch for {destination.name}") + destination.write_text(patch, encoding="utf-8") + + +def _apply_patch(worktree: Path, patch: Path) -> None: + _run(["git", "init", "--quiet"], cwd=worktree) + try: + _run( + ["git", "apply", "--whitespace=nowarn", str(patch.resolve())], + cwd=worktree, + ) + finally: + shutil.rmtree(worktree / ".git") + + +def _dockerfile(profile: RuntimeProfile) -> str: + sync = " ".join(shlex.quote(item) for item in profile.sync_command) + bootstrap = " ".join(shlex.quote(item) for item in profile.bootstrap_command) + environment = " ".join( + f"{key}={shlex.quote(value)}" + for key, value in (item.split("=", 1) for item in profile.environment) + ) + env_line = f"ENV {environment}\n" if environment else "" + bootstrap_line = f"RUN {bootstrap}\n" if bootstrap else "" + return ( + f"FROM {_NODE_IMAGE} AS patcheval-node\n" + f"FROM {profile.base_image}\n" + "ENV UV_PROJECT_ENVIRONMENT=/opt/venv UV_LINK_MODE=copy " + "HOME=/home/node USER=node LOGNAME=node\n" + "COPY --from=patcheval-node /usr/local/ /usr/local/\n" + "RUN apt-get update && apt-get install -y --no-install-recommends " + "bash ca-certificates git ripgrep tar && rm -rf /var/lib/apt/lists/*; " + "getent group node >/dev/null || " + "printf 'node:x:1000:\\n' >> /etc/group; " + "getent passwd node >/dev/null || " + "printf 'node:x:1000:1000:PatchEval:/home/node:/bin/bash\\n' " + ">> /etc/passwd; mkdir -p /home/node/.pi/agent /workspace; " + "chown -R 1000:1000 /home/node /workspace\n" + "WORKDIR /opt/project\n" + "COPY source/ /opt/project/\n" + f"RUN {sync}\n" + f"{bootstrap_line}" + "RUN chmod -R a+rwX /opt/venv\n" + "RUN rm -rf /opt/project\n" + "ENV PATH=/opt/venv/bin:$PATH\n" + f"{env_line}" + "WORKDIR /workspace/repo\n" + ) + + +def _build_image( + task_id: str, profile: RuntimeProfile, parent_source: Path, build: Path +) -> tuple[str, str, dict[str, str]]: + context = build / "image" + if context.exists(): + shutil.rmtree(context) + (context / "source").mkdir(parents=True) + shutil.copytree(parent_source, context / "source", dirs_exist_ok=True) + (context / "Dockerfile").write_text(_dockerfile(profile), encoding="utf-8") + tag = f"patcheval-validate:{task_id}" + _run( + [ + "docker", + "build", + "--platform", + "linux/amd64", + "--pull", + "--tag", + tag, + str(context), + ] + ) + image_id = _run(["docker", "image", "inspect", tag, "--format", "{{.Id}}"]) + contract = _runner_contract(tag) + return tag, image_id.stdout.strip(), contract + + +def _runner_contract(image: str) -> dict[str, str]: + script = ( + "set -eu; " + 'test "$(id -u)" = 1000; ' + 'test "$(id -un)" = node; ' + 'test "$HOME" = /home/node; ' + 'for tool in node npm git rg tar timeout python; do command -v "$tool"; done; ' + "node --version; npm --version; git --version; rg --version | head -n 1" + ) + completed = _run( + [ + "docker", + "run", + "--rm", + "--network", + "none", + "--user", + "node:node", + image, + "/bin/sh", + "-ec", + script, + ] + ) + lines = completed.stdout.splitlines() + smoke_output = "\n".join(lines[-4:]) + return { + "user": "node", + "uid": "1000", + "home": "/home/node", + "smoke_output_sha256": hashlib.sha256(smoke_output.encode()).hexdigest(), + "smoke_output": smoke_output, + } + + +def _run_check( + image: str, + source: Path, + command: tuple[str, ...], + profile: RuntimeProfile, +) -> dict[str, Any]: + container = f"patcheval-validate-{uuid.uuid4().hex[:12]}" + args = [ + "docker", + "create", + "--name", + container, + "--user", + "node:node", + "--network", + "none", + "--cap-drop", + "ALL", + "--security-opt", + "no-new-privileges", + "--pids-limit", + "512", + "--memory", + "4g", + "--cpus", + "4", + "--tmpfs", + "/tmp:rw,nosuid,nodev,size=512m", + "--volume", + f"{source.resolve()}:/workspace/repo:rw", + ] + for item in profile.environment: + args.extend(("--env", item)) + args.extend((image, "sleep", "infinity")) + try: + _run(args) + _run(["docker", "start", container]) + if profile.setup_command: + _run( + [ + "docker", + "exec", + "--workdir", + "/workspace/repo", + container, + *profile.setup_command, + ], + timeout=profile.timeout_s + 30, + ) + completed = _run( + [ + "docker", + "exec", + "--workdir", + "/workspace/repo", + container, + "timeout", + "--signal=KILL", + f"{profile.timeout_s}s", + *command, + ], + check=False, + timeout=profile.timeout_s + 30, + ) + output = (completed.stdout + completed.stderr).strip() + return { + "command": list(command), + "exit_code": completed.returncode, + "output_tail": output[-4000:], + "output_sha256": hashlib.sha256(output.encode()).hexdigest(), + } + finally: + _run(["docker", "rm", "--force", container], check=False, timeout=30) + + +def validate_packet( + packet_dir: Path, + *, + repository: Path, + profile: RuntimeProfile, + commands: TaskCommands | None, + work: Path, + repeats: int = 2, +) -> dict[str, Any]: + packet = json.loads((packet_dir / "packet.json").read_text(encoding="utf-8")) + task_id = packet["id"] + task_work = work / task_id + if task_work.exists(): + shutil.rmtree(task_work) + task_work.mkdir(parents=True) + pristine = task_work / "pristine-parent" + _archive(repository, packet["parent_sha"], pristine) + test_paths = list(packet["test_paths"]) + test_path_set = set(test_paths) + non_test_paths = [ + path for path in packet["changed_paths"] if path not in test_path_set + ] + source_patch = task_work / "gold-source.patch" + hidden_patch = task_work / "hidden-tests.patch" + _write_patch( + repository, + packet["parent_sha"], + packet["fix_sha"], + non_test_paths, + source_patch, + ) + _write_patch( + repository, + packet["parent_sha"], + packet["fix_sha"], + test_paths, + hidden_patch, + ) + image, image_id, runner_contract = _build_image( + task_id, profile, pristine, task_work + ) + f2p_command = ( + commands.fail_to_pass + if commands is not None + else (*profile.test_command, *test_paths) + ) + regression_command = ( + commands.regression if commands is not None else profile.regression_command + ) + cells: list[dict[str, Any]] = [] + for repeat in range(1, repeats + 1): + for state, hidden, command, expected in ( + ("parent-hidden", True, f2p_command, "test-failure"), + ("parent-regression", False, regression_command, "zero"), + ("gold-hidden", True, f2p_command, "zero"), + ("gold-regression", False, regression_command, "zero"), + ): + source = task_work / f"run-{repeat}-{state}" + shutil.copytree(pristine, source) + if state.startswith("gold-"): + _apply_patch(source, source_patch) + if hidden: + _apply_patch(source, hidden_patch) + result = _run_check(image, source, command, profile) + result.update(repeat=repeat, state=state, expected=expected) + cells.append(result) + valid = all( + ( + cell["exit_code"] in profile.fail_exit_codes + if cell["expected"] == "test-failure" + else cell["exit_code"] == 0 + ) + for cell in cells + ) + result = { + "schema_version": 1, + "task_id": task_id, + "repository": packet["repository"], + "fix_sha": packet["fix_sha"], + "parent_sha": packet["parent_sha"], + "runtime_profile": asdict(profile), + "local_image": image, + "local_image_id": image_id, + "runner_contract": runner_contract, + "fail_to_pass_command": list(f2p_command), + "setup_command": list(profile.setup_command), + "regression_command": list(regression_command), + "repeats": repeats, + "cells": cells, + "validated": valid, + } + result_path = packet_dir / "validation.json" + result_path.write_text( + json.dumps(result, indent=2, sort_keys=True) + "\n", encoding="utf-8" + ) + return result diff --git a/miner/tests/__pycache__/test_classify.cpython-311-pytest-9.1.1.pyc b/miner/tests/__pycache__/test_classify.cpython-311-pytest-9.1.1.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a8ffc1e7aed645c6a7e5cbc01e6656cb136cd03a Binary files /dev/null and b/miner/tests/__pycache__/test_classify.cpython-311-pytest-9.1.1.pyc differ diff --git a/miner/tests/__pycache__/test_freeze.cpython-311-pytest-9.1.1.pyc b/miner/tests/__pycache__/test_freeze.cpython-311-pytest-9.1.1.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e6f42daf29a5f5bd927ce3d6dcdee773392f9cf7 Binary files /dev/null and b/miner/tests/__pycache__/test_freeze.cpython-311-pytest-9.1.1.pyc differ diff --git a/miner/tests/__pycache__/test_io.cpython-311-pytest-9.1.1.pyc b/miner/tests/__pycache__/test_io.cpython-311-pytest-9.1.1.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1b6e53733830ea6d674e3e38196c1b6bdfcee88f Binary files /dev/null and b/miner/tests/__pycache__/test_io.cpython-311-pytest-9.1.1.pyc differ diff --git a/miner/tests/__pycache__/test_prepare.cpython-311-pytest-9.1.1.pyc b/miner/tests/__pycache__/test_prepare.cpython-311-pytest-9.1.1.pyc new file mode 100644 index 0000000000000000000000000000000000000000..646888ae9a47e344d8fe05c4adeef13420173e5d Binary files /dev/null and b/miner/tests/__pycache__/test_prepare.cpython-311-pytest-9.1.1.pyc differ diff --git a/miner/tests/__pycache__/test_validate.cpython-311-pytest-9.1.1.pyc b/miner/tests/__pycache__/test_validate.cpython-311-pytest-9.1.1.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5410f506757f22959f1364e741a70c64f4a070af Binary files /dev/null and b/miner/tests/__pycache__/test_validate.cpython-311-pytest-9.1.1.pyc differ diff --git a/miner/tests/test_classify.py b/miner/tests/test_classify.py new file mode 100644 index 0000000000000000000000000000000000000000..d45c2d12a67003ae61bec9266242385ed436494b --- /dev/null +++ b/miner/tests/test_classify.py @@ -0,0 +1,78 @@ +from patcheval_miner.classify import classify, is_production_python, is_test_path +from patcheval_miner.models import Candidate, ChangedFile, IssueRef + + +def candidate(*, files: list[str], issues: bool = True, parents: int = 1) -> Candidate: + return Candidate( + id="owner__repo__pr1", + repository="owner/repo", + fix_sha="f" * 40, + parent_sha="a" * 40 if parents == 1 else None, + parent_count=parents, + merged_at="2026-01-02T00:00:00Z", + pr_number=1, + pr_url="https://github.com/owner/repo/pull/1", + pr_title="Fix bug", + pr_body="Fixes #2", + issues=[IssueRef(2, "https://example/2", "Bug", "Reproduction", "closing")] + if issues + else [], + files=[ChangedFile(path, "modified", 2, 1) for path in files], + changed_files_count=len(files), + ) + + +def test_path_classification() -> None: + assert is_test_path("tests/unit/test_parser.py") + assert is_test_path("testing/python/approx.py") + assert is_test_path("package/parser_test.py") + assert not is_test_path("src/package/parser.py") + assert is_production_python("src/package/parser.py") + assert not is_production_python("docs/example.py") + + +def test_eligible_fix_and_test() -> None: + value = classify( + candidate(files=["src/package/parser.py", "tests/test_parser.py"]), + max_files=30, + max_changed_lines=100, + ) + assert value.structural_status == "eligible" + assert value.rejection_reasons == [] + + +def test_feature_without_bug_label_is_rejected() -> None: + value = candidate(files=["src/package/parser.py", "tests/test_parser.py"]) + value.pr_title = "Add parser support" + classified = classify(value, max_files=30, max_changed_lines=100) + assert "no-bug-signal" in classified.rejection_reasons + + +def test_bug_label_can_supply_signal() -> None: + value = candidate(files=["src/package/parser.py", "tests/test_parser.py"]) + value.pr_title = "Handle parser support" + value.issues[0] = IssueRef( + 2, + "https://example/2", + "Parser fails", + "Reproduction", + "closing", + ("type: bug",), + ) + classified = classify(value, max_files=30, max_changed_lines=100) + assert classified.structural_status == "eligible" + + +def test_rejections_are_explicit_and_additive() -> None: + value = classify( + candidate(files=["README.md"], issues=False, parents=2), + max_files=30, + max_changed_lines=100, + ) + assert value.structural_status == "rejected" + assert value.rejection_reasons == [ + "no-linked-issue", + "ambiguous-parent", + "no-production-python-change", + "no-test-change", + ] diff --git a/miner/tests/test_freeze.py b/miner/tests/test_freeze.py new file mode 100644 index 0000000000000000000000000000000000000000..5ccf2a358ba52305a1440074968c80f06efe2833 --- /dev/null +++ b/miner/tests/test_freeze.py @@ -0,0 +1,339 @@ +import hashlib +import json +import subprocess +import tarfile +from pathlib import Path + +import pytest + +from patcheval_miner.freeze import FreezeError, freeze_dataset + +TASK_ID = "owner-repo-1" +REPOSITORY = "owner/repo" +PINNED_BASE = "ghcr.io/example/base:1.2.3" +LOCAL_IMAGE_ID = "sha256:" + "d" * 64 +SMOKE_OUTPUT = "v24.0.0" + + +def _git(repository: Path, *args: str) -> str: + completed = subprocess.run( + ["git", *args], + cwd=repository, + check=True, + capture_output=True, + text=True, + ) + return completed.stdout.strip() + + +def _write_json(path: Path, value: object) -> None: + path.write_text( + json.dumps(value, indent=2, sort_keys=True) + "\n", encoding="utf-8" + ) + + +def _fixture(tmp_path: Path) -> dict[str, Path]: + cache = tmp_path / "cache" + repository = cache / "owner__repo.git" + repository.mkdir(parents=True) + _git(repository, "init") + _git(repository, "config", "user.email", "tests@example.com") + _git(repository, "config", "user.name", "PatchEval tests") + (repository / "module.py").write_text("VALUE = 1\n", encoding="utf-8") + (repository / "module-link.py").symlink_to("module.py") + (repository / "tests").mkdir() + (repository / "tests" / "test_module.py").write_text( + "def test_value():\n assert True\n", encoding="utf-8" + ) + _git(repository, "add", ".") + _git(repository, "commit", "-m", "parent") + parent = _git(repository, "rev-parse", "HEAD") + (repository / "module.py").write_text("VALUE = 2\n", encoding="utf-8") + _git(repository, "add", "module.py") + _git(repository, "commit", "-m", "fix") + fix = _git(repository, "rev-parse", "HEAD") + + packets = tmp_path / "packets" + packet_dir = packets / TASK_ID + packet_dir.mkdir(parents=True) + hidden = b"diff --git a/tests/test_module.py b/tests/test_module.py\n" + (packet_dir / "hidden-tests.patch").write_bytes(hidden) + issue_body = "Calling the public function returns the wrong value." + packet = { + "id": TASK_ID, + "repository": REPOSITORY, + "fix_sha": fix, + "parent_sha": parent, + "issue_title": "Wrong public value", + "issue_body": issue_body, + "issue_body_sha256": hashlib.sha256(issue_body.encode()).hexdigest(), + "test_paths": ["tests/test_module.py"], + "hidden_patch_sha256": hashlib.sha256(hidden).hexdigest(), + } + _write_json(packet_dir / "packet.json", packet) + cells = [] + for repeat in (1, 2): + for state, expected, exit_code, command in ( + ( + "parent-hidden", + "test-failure", + 1, + ["python", "-m", "pytest", "-q", "hidden.py"], + ), + ( + "parent-regression", + "zero", + 0, + ["python", "-m", "pytest", "-q", "tests"], + ), + ( + "gold-hidden", + "zero", + 0, + ["python", "-m", "pytest", "-q", "hidden.py"], + ), + ( + "gold-regression", + "zero", + 0, + ["python", "-m", "pytest", "-q", "tests"], + ), + ): + cells.append( + { + "repeat": repeat, + "state": state, + "expected": expected, + "exit_code": exit_code, + "command": command, + } + ) + validation = { + "schema_version": 1, + "task_id": TASK_ID, + "repository": REPOSITORY, + "fix_sha": fix, + "parent_sha": parent, + "runtime_profile": { + "base_image": PINNED_BASE, + "sync_command": ["uv", "sync", "--frozen"], + "bootstrap_command": ["uv", "pip", "install", "wheel==0.45.1"], + "environment": ["PYTHONHASHSEED=0"], + "timeout_s": 60, + "fail_exit_codes": [1], + "setup_command": [], + }, + "fail_to_pass_command": ["python", "-m", "pytest", "-q", "hidden.py"], + "regression_command": ["python", "-m", "pytest", "-q", "tests"], + "setup_command": [], + "local_image": f"patcheval-validate:{TASK_ID}", + "local_image_id": LOCAL_IMAGE_ID, + "runner_contract": { + "user": "node", + "uid": "1000", + "home": "/home/node", + "smoke_output": SMOKE_OUTPUT, + "smoke_output_sha256": hashlib.sha256(SMOKE_OUTPUT.encode()).hexdigest(), + }, + "repeats": 2, + "cells": cells, + "validated": True, + } + _write_json(packet_dir / "validation.json", validation) + + decisions = tmp_path / "decisions.toml" + decisions.write_text( + """schema_version = 1 +prompt_policy = "full-issue-body-unchanged" + +[[decisions]] +id = "owner-repo-1" +decision = "validated" +reviewer = "test" +reason = "four cells passed" +""", + encoding="utf-8", + ) + return { + "cache": cache, + "packets": packets, + "packet": packet_dir, + "decisions": decisions, + } + + +def _freeze(paths: dict[str, Path], output: Path) -> None: + freeze_dataset( + decisions_path=paths["decisions"], + packets=paths["packets"], + cache=paths["cache"], + output=output, + count=1, + ) + + +def test_freeze_is_deterministic_and_dereferences_source_links(tmp_path: Path) -> None: + paths = _fixture(tmp_path) + first = tmp_path / "release-one" + second = tmp_path / "release-two" + _freeze(paths, first) + _freeze(paths, second) + + first_files = { + path.relative_to(first).as_posix(): path.read_bytes() + for path in first.rglob("*") + if path.is_file() + } + second_files = { + path.relative_to(second).as_posix(): path.read_bytes() + for path in second.rglob("*") + if path.is_file() + } + assert first_files == second_files + assert (first / "attestations" / f"{TASK_ID}.json").read_bytes() == ( + paths["packet"] / "validation.json" + ).read_bytes() + + task = json.loads((first / "tasks.jsonl").read_text(encoding="utf-8")) + assert task["runtime_recipe"] == { + "schema_version": 1, + "base_image": PINNED_BASE, + "sync_command": ["uv", "sync", "--frozen"], + "bootstrap_command": ["uv", "pip", "install", "wheel==0.45.1"], + "environment": ["PYTHONHASHSEED=0"], + } + assert task["protected_globs"] == ["tests/test_module.py"] + assert "setup_command" not in task + assert ".pytest_cache/**" in task["ignored_globs"] + assert "**/__pycache__/**" in task["ignored_globs"] + dataset = json.loads((first / "dataset.json").read_text(encoding="utf-8")) + assert dataset["release"] == "pilot-1" + with tarfile.open(first / task["source_archive"]) as archive: + members = archive.getmembers() + assert members + assert all(member.isreg() for member in members) + linked = archive.extractfile("module-link.py") + assert linked is not None + assert linked.read() == b"VALUE = 1\n" + + checksums = (first / "SHA256SUMS").read_text(encoding="utf-8").splitlines() + assert checksums == sorted(checksums, key=lambda line: line.split(" ", 1)[1]) + assert not any(line.endswith(" SHA256SUMS") for line in checksums) + + +def test_freeze_fails_closed_without_validation(tmp_path: Path) -> None: + paths = _fixture(tmp_path) + (paths["packet"] / "validation.json").unlink() + with pytest.raises(FreezeError, match="validation.json"): + _freeze(paths, tmp_path / "release") + assert not (tmp_path / "release").exists() + + +def test_freeze_rechecks_four_cell_proof_and_validated_decision(tmp_path: Path) -> None: + paths = _fixture(tmp_path) + validation_path = paths["packet"] / "validation.json" + validation = json.loads(validation_path.read_text(encoding="utf-8")) + validation["cells"][0]["exit_code"] = 0 + _write_json(validation_path, validation) + with pytest.raises(FreezeError, match="contradicts validation"): + _freeze(paths, tmp_path / "bad-cells") + + paths = _fixture(tmp_path / "runner") + validation_path = paths["packet"] / "validation.json" + validation = json.loads(validation_path.read_text(encoding="utf-8")) + validation.pop("runner_contract") + _write_json(validation_path, validation) + with pytest.raises(FreezeError, match="runner image contract"): + _freeze(paths, tmp_path / "bad-runner") + + paths = _fixture(tmp_path / "second") + paths["decisions"].write_text( + """schema_version = 1 +prompt_policy = "full-issue-body-unchanged" +[[decisions]] +id = "owner-repo-1" +decision = "advance" +""", + encoding="utf-8", + ) + with pytest.raises(FreezeError, match="only 0 exist"): + _freeze(paths, tmp_path / "not-validated") + + +def test_freeze_requires_exact_explicit_count(tmp_path: Path) -> None: + paths = _fixture(tmp_path) + with pytest.raises(FreezeError, match="requested 1 task ids, but count is 2"): + freeze_dataset( + decisions_path=paths["decisions"], + packets=paths["packets"], + cache=paths["cache"], + output=tmp_path / "release", + count=2, + requested_tasks=[TASK_ID], + ) + + +def test_freeze_rejects_false_runner_smoke_hash(tmp_path: Path) -> None: + paths = _fixture(tmp_path) + validation_path = paths["packet"] / "validation.json" + validation = json.loads(validation_path.read_text(encoding="utf-8")) + validation["runner_contract"]["smoke_output_sha256"] = "f" * 64 + _write_json(validation_path, validation) + with pytest.raises(FreezeError, match="smoke proof"): + _freeze(paths, tmp_path / "release") + + +def test_freeze_accepts_and_normalizes_known_legacy_smoke_hash(tmp_path: Path) -> None: + paths = _fixture(tmp_path) + validation_path = paths["packet"] / "validation.json" + validation = json.loads(validation_path.read_text(encoding="utf-8")) + smoke = validation["runner_contract"]["smoke_output"] + legacy_prefix = ( + "/usr/local/bin/node\n/usr/local/bin/npm\n/usr/bin/git\n/usr/bin/rg\n" + "/usr/bin/tar\n/usr/bin/timeout\n/opt/venv/bin/python\n" + ) + validation["runner_contract"]["smoke_output_sha256"] = hashlib.sha256( + (legacy_prefix + smoke + "\n").encode() + ).hexdigest() + _write_json(validation_path, validation) + release = tmp_path / "release" + + _freeze(paths, release) + + published = json.loads( + (release / "attestations" / f"{TASK_ID}.json").read_text(encoding="utf-8") + ) + assert ( + published["runner_contract"]["smoke_output_sha256"] + == hashlib.sha256(smoke.encode()).hexdigest() + ) + + +@pytest.mark.parametrize( + "base_image", + ["python:latest", "python", "python@sha256:" + "a" * 64, "bad image:1"], +) +def test_freeze_rejects_nonversioned_runtime_recipe( + tmp_path: Path, base_image: str +) -> None: + paths = _fixture(tmp_path) + validation_path = paths["packet"] / "validation.json" + validation = json.loads(validation_path.read_text(encoding="utf-8")) + validation["runtime_profile"]["base_image"] = base_image + _write_json(validation_path, validation) + with pytest.raises(FreezeError, match="versioned tag"): + _freeze(paths, tmp_path / "release") + + +def test_freeze_publishes_version_tag_from_older_digest_attestation( + tmp_path: Path, +) -> None: + paths = _fixture(tmp_path) + validation_path = paths["packet"] / "validation.json" + validation = json.loads(validation_path.read_text(encoding="utf-8")) + validation["runtime_profile"]["base_image"] = PINNED_BASE + "@sha256:" + "a" * 64 + _write_json(validation_path, validation) + release = tmp_path / "release" + _freeze(paths, release) + task = json.loads((release / "tasks.jsonl").read_text(encoding="utf-8")) + assert task["runtime_recipe"]["base_image"] == PINNED_BASE diff --git a/miner/tests/test_io.py b/miner/tests/test_io.py new file mode 100644 index 0000000000000000000000000000000000000000..100df033cc2306f7c495b87360ce3589830a746d --- /dev/null +++ b/miner/tests/test_io.py @@ -0,0 +1,12 @@ +from pathlib import Path + +from test_classify import candidate + +from patcheval_miner.io import read_candidates, write_candidates + + +def test_candidate_jsonl_round_trip(tmp_path: Path) -> None: + path = tmp_path / "candidates.jsonl" + expected = candidate(files=["src/a.py", "tests/test_a.py"]) + write_candidates(path, [expected]) + assert list(read_candidates(path)) == [expected] diff --git a/miner/tests/test_prepare.py b/miner/tests/test_prepare.py new file mode 100644 index 0000000000000000000000000000000000000000..0883c89ecc03153fbb9a4cbd95605dcc7dd5a58b --- /dev/null +++ b/miner/tests/test_prepare.py @@ -0,0 +1,49 @@ +import tomllib +from pathlib import Path + +import pytest + +from patcheval_miner.prepare import _leakage_flags, load_nominations + + +def test_pilot_nominations_are_unique_and_balanced() -> None: + root = Path(__file__).parents[1] + nominations = load_nominations(root / "config" / "nominations.toml") + assert len(nominations) >= 20 + counts: dict[str, int] = {} + for nomination in nominations: + counts[nomination.repository] = counts.get(nomination.repository, 0) + 1 + assert len(counts) >= 5 + assert max(counts.values()) <= 5 # validation queue may carry one reserve + + +def test_review_decisions_cover_every_nomination() -> None: + root = Path(__file__).parents[1] + nominations = load_nominations(root / "config" / "nominations.toml") + with (root / "config" / "review-decisions.toml").open("rb") as handle: + review = tomllib.load(handle) + assert review["prompt_policy"] == "full-issue-body-unchanged" + decisions = review["decisions"] + assert {item["id"] for item in decisions} == {item.id for item in nominations} + assert {item["decision"] for item in decisions} <= { + "advance", + "pending", + "reject", + "validated", + } + + +@pytest.mark.parametrize( + ("body", "expected"), + [ + ("Here is the proposed fix: change x to y", "solution-language"), + ("Reproduction only", None), + ("The traceback points at src/mod.py", "mentions-production-path:src/mod.py"), + ], +) +def test_leakage_flags(body: str, expected: str | None) -> None: + flags = _leakage_flags(body, ["src/mod.py"]) + if expected is None: + assert not flags + else: + assert expected in flags diff --git a/miner/tests/test_validate.py b/miner/tests/test_validate.py new file mode 100644 index 0000000000000000000000000000000000000000..c57ad66e870479d42386f648fc767b6b7044e54d --- /dev/null +++ b/miner/tests/test_validate.py @@ -0,0 +1,42 @@ +from pathlib import Path + +from patcheval_miner.validate import _dockerfile, load_commands, load_profiles + + +def test_json_repair_runtime_is_network_buildable_and_offline_runnable() -> None: + root = Path(__file__).parents[1] + profiles = load_profiles(root / "config" / "runtimes.toml") + profile = profiles["mangiucugna/json_repair"] + dockerfile = _dockerfile(profile) + assert "uv sync --frozen --all-groups --no-install-project" in dockerfile + assert "setuptools==80.9.0" in dockerfile + assert "chmod -R a+rwX /opt/venv" in dockerfile + assert "ENV PATH=/opt/venv/bin:$PATH" in dockerfile + assert "FROM node:24-bookworm-slim AS patcheval-node" in dockerfile + assert "COPY --from=patcheval-node /usr/local/ /usr/local/" in dockerfile + assert "git ripgrep tar" in dockerfile + assert "HOME=/home/node" in dockerfile + assert "USER=node" in dockerfile + assert "LOGNAME=node" in dockerfile + assert "getent passwd node" in dockerfile + assert "node:x:1000:1000" in dockerfile + assert profile.test_command == ("pytest", "-q") + assert profile.fail_exit_codes == (1,) + + +def test_reviewed_task_commands_are_focused() -> None: + root = Path(__file__).parents[1] + commands = load_commands(root / "config" / "commands.toml") + assert ( + commands["json-repair-207"] + .fail_to_pass[-1] + .startswith("tests/test_parse_string.py::") + ) + assert ( + "--ignore=tests/test_performance.py" in commands["json-repair-207"].regression + ) + assert any( + item.endswith("::test_preserves_semicolons_in_dollar_quoted_strings") + for item in commands["sqlit-246"].fail_to_pass + ) + assert commands["city2graph-121"].regression == ("pytest", "-q", "tests") diff --git a/miner/uv.lock b/miner/uv.lock new file mode 100644 index 0000000000000000000000000000000000000000..ef9b92984130753f35b77b9884d1e7e4f88ef500 --- /dev/null +++ b/miner/uv.lock @@ -0,0 +1,107 @@ +version = 1 +revision = 3 +requires-python = ">=3.11" + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "iniconfig" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, +] + +[[package]] +name = "packaging" +version = "26.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, +] + +[[package]] +name = "patcheval-miner" +version = "0.1.0" +source = { editable = "." } + +[package.optional-dependencies] +dev = [ + { name = "pytest" }, + { name = "ruff" }, +] + +[package.metadata] +requires-dist = [ + { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0" }, + { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.12" }, +] +provides-extras = ["dev"] + +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, +] + +[[package]] +name = "pygments" +version = "2.21.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" }, +] + +[[package]] +name = "pytest" +version = "9.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, +] + +[[package]] +name = "ruff" +version = "0.16.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/00/8f/d8074b1f25e003164087a8bfe79a0f1a3945135764dbb6aaab04103dcaf9/ruff-0.16.4.tar.gz", hash = "sha256:13171aa9d9af2240ee3504e639de73122c67e74036de5ba2e1d01422cd17e3dc", size = 4899731, upload-time = "2026-08-20T17:43:59.196Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ff/80/779895ef584e089d22f2c6df0d0e99a65ec2df0805f1fffd439415b8c1f0/ruff-0.16.4-py3-none-linux_armv6l.whl", hash = "sha256:df4075f71ddac40b9934af60c3ec8a53047dd5a5fdc43224e6e4e8e9a27cb6f7", size = 10006909, upload-time = "2026-08-20T17:43:16.888Z" }, + { url = "https://files.pythonhosted.org/packages/a9/e6/f553199b5e8927a05cb5c422d921fd0656b29ab976e91c44802107c6b0da/ruff-0.16.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:0c95538517af68004306b0fb3214ff2f2af67a65092aee77cd9eb86db6656604", size = 10240201, upload-time = "2026-08-20T17:43:19.337Z" }, + { url = "https://files.pythonhosted.org/packages/1c/70/4a6dc4bb34da4dee35e30f09bbd1bfbdd26f33b62fb9b8df31f08a199cd2/ruff-0.16.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:963f83df8e69e575b64d67dd447ebbc917db41a14bf38d4593a4183e7aaa8255", size = 9835122, upload-time = "2026-08-20T17:43:21.708Z" }, + { url = "https://files.pythonhosted.org/packages/24/12/c6e22d686372c15bcb7af99831f1a1be96df696491babf4f24e4f942c527/ruff-0.16.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:32a5057c7ff3f6e6480a48fccfb3a412a690f48a3d03ac5cf08177d6c2da3ade", size = 9977162, upload-time = "2026-08-20T17:43:24.236Z" }, + { url = "https://files.pythonhosted.org/packages/46/49/72b10ec912f5ab5854992eaf7aa7cd36729b6937d9dc4e0fb41b3bf428ec/ruff-0.16.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b3dce8d9b0c57c265b91885a66a567d8ea1372e8eb4e250fa8e5e3f579e99cff", size = 9829789, upload-time = "2026-08-20T17:43:26.966Z" }, + { url = "https://files.pythonhosted.org/packages/fa/80/0f30e32e7f6ee26edc39075502db9d368d788a44a79b55f763eb4ab03796/ruff-0.16.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7dc651db49283c69f8e72c834eec4fe5573e4c646856aebece0ce385dceb2a80", size = 10527949, upload-time = "2026-08-20T17:43:29.384Z" }, + { url = "https://files.pythonhosted.org/packages/52/3d/86e8ad3542169e56cac3859a343afdb9df2ad54d35a59ce1e67baee83421/ruff-0.16.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3817b87dbcabc92f13b05019257c5b89b5b4d51b5fb20f56fb5235ceb723cd07", size = 11333695, upload-time = "2026-08-20T17:43:31.872Z" }, + { url = "https://files.pythonhosted.org/packages/d0/16/481c29b380c20a0054a8261066665e1b3488e23636c49d0a43e75975b9bb/ruff-0.16.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9fce1499134b2c8c68e5166f95705a5812062bb93aacc5f9873bb1a27084bc7", size = 10727741, upload-time = "2026-08-20T17:43:34.596Z" }, + { url = "https://files.pythonhosted.org/packages/5e/b6/56bc0b8cf45b54b28b3a5e6381c8945d51b5b18adf659454c32295209a31/ruff-0.16.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2d812e482f5a7e02eee26cd73d2a37ebbdf47d795ea63ba1b89110ae93e9fb3", size = 10286522, upload-time = "2026-08-20T17:43:37.288Z" }, + { url = "https://files.pythonhosted.org/packages/e8/8b/b345b4fb110f2fbe2bd31eabd271e5e8b3b7e4ee6c0e02f2dc6be78db000/ruff-0.16.4-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:6baaf984aa7976edf93d3b627fe2d1d22ee94bbca05fa6f90fc76d73924e3454", size = 10584182, upload-time = "2026-08-20T17:43:39.984Z" }, + { url = "https://files.pythonhosted.org/packages/29/e5/827b34041c35f58774a9681a4213994c164fc987800f4dddabcf451da0bf/ruff-0.16.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:bdfcf0b28662eb890372d50f92c283bb94e67e7635ed93c7fd533970acff7b2b", size = 10134195, upload-time = "2026-08-20T17:43:42.351Z" }, + { url = "https://files.pythonhosted.org/packages/0f/10/d0bffcdd6729b87afc82ba0ef377173356a7dc8e972f5179968cf2fdf98c/ruff-0.16.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:b66b02cb9b04f537643cadf5768e5f98dc461890d530cb67113d71c8c76e605d", size = 9825821, upload-time = "2026-08-20T17:43:44.532Z" }, + { url = "https://files.pythonhosted.org/packages/f5/32/0db2a863b796ca62d83e92a07a3ccf00921b14db02059347576a2fda3d4b/ruff-0.16.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:8528bf9a4b291a60bf02ea453511e8ce6215bd2b982ee80405b66b008b6c30a0", size = 10267658, upload-time = "2026-08-20T17:43:46.989Z" }, + { url = "https://files.pythonhosted.org/packages/b2/a0/fbdeb59e48c6261f523e56c8f12e9c08fbe693786595cc7e3959207a9232/ruff-0.16.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:fbd85d2875fdd67e833213a651f613bbf25303abf6aa822a5121f4531195678d", size = 10697071, upload-time = "2026-08-20T17:43:49.891Z" }, + { url = "https://files.pythonhosted.org/packages/aa/28/0c6dd865859c6d17bc8ccc34cb72b0e02d6c7eb25e8a1e22b5bea681e2c0/ruff-0.16.4-py3-none-win32.whl", hash = "sha256:312769988007aaeb8e189b443ccdd03c0e6374489e053467be6d96518ebff76e", size = 10021687, upload-time = "2026-08-20T17:43:52.281Z" }, + { url = "https://files.pythonhosted.org/packages/a3/03/e724450f621698117f9aa6dd241c94d0274ae96781378dc86745ae29f0e7/ruff-0.16.4-py3-none-win_amd64.whl", hash = "sha256:05d9d27a18c4bcbefada602480ec9e01e0bc949d432e0ced5df77edac195919c", size = 10567657, upload-time = "2026-08-20T17:43:54.78Z" }, + { url = "https://files.pythonhosted.org/packages/0e/fe/da8b9e1347696bb22120b77280ec5ce25d500ca5cb39d5ad6e5c18de19c1/ruff-0.16.4-py3-none-win_arm64.whl", hash = "sha256:a3a61621c9b6f6a89573e938a080e648f1695baa3f58570a3a707bc51ff65a21", size = 10451579, upload-time = "2026-08-20T17:43:57.135Z" }, +] diff --git a/sources/attrs-1575.tar b/sources/attrs-1575.tar new file mode 100644 index 0000000000000000000000000000000000000000..1d5ad5f03dcc563ca0de0f93c5c4fbfeb3dba20a --- /dev/null +++ b/sources/attrs-1575.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64c20a8d14830dcd0a069d65b6bb86ca61251a981da11be7209917ce54bd1830 +size 2232320 diff --git a/sources/city2graph-121.tar b/sources/city2graph-121.tar new file mode 100644 index 0000000000000000000000000000000000000000..41e0429eba6aa353ceeb725fbaede6f83cce535c --- /dev/null +++ b/sources/city2graph-121.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:baa7c30a4b2e214b7e2cf9b51128f39da05947b7d34f3528139b1a8b19b5db3f +size 120954880 diff --git a/sources/click-2790.tar b/sources/click-2790.tar new file mode 100644 index 0000000000000000000000000000000000000000..d56a3193e7539421e20a13e624f51a55c7973507 --- /dev/null +++ b/sources/click-2790.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcf76b9cd560a2fad48982274e8b68ec8bd6a8dc22e48fe93df39d9ff8e89e4d +size 1505280 diff --git a/sources/click-3360.tar b/sources/click-3360.tar new file mode 100644 index 0000000000000000000000000000000000000000..ae50c46b5e5be708c86c16e24453290f3f882bf8 --- /dev/null +++ b/sources/click-3360.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d250a5680a151864900ce3271a1dac8057e58ba4be84b8e70f6c418522a72f29 +size 1597440 diff --git a/sources/click-3572.tar b/sources/click-3572.tar new file mode 100644 index 0000000000000000000000000000000000000000..e3cb3a5f1c9bb32a6d88a45c7237748b21cb4c56 --- /dev/null +++ b/sources/click-3572.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a810395f18b7c9d84a7e97c027d312dfbacd8c5fcd9aca9e593fb187c2c93308 +size 1648640 diff --git a/sources/json-repair-191.tar b/sources/json-repair-191.tar new file mode 100644 index 0000000000000000000000000000000000000000..15d6daa5ecf72f021b69599efeeec166cee163b8 --- /dev/null +++ b/sources/json-repair-191.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b81ba71d4e10022a7dd8b0345094c88cf0129f5ed6fe7bd3000c5138260624ae +size 3041280 diff --git a/sources/json-repair-205.tar b/sources/json-repair-205.tar new file mode 100644 index 0000000000000000000000000000000000000000..13054dd019b2dada25823158bc270190850450d7 --- /dev/null +++ b/sources/json-repair-205.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e87c1fdebeecd474d38376c95c83f625a63b35d5d4f840e47a495121961ef274 +size 3194880 diff --git a/sources/json-repair-207.tar b/sources/json-repair-207.tar new file mode 100644 index 0000000000000000000000000000000000000000..90d1d5824f3bce204ac5f3647252648998771145 --- /dev/null +++ b/sources/json-repair-207.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b011f04bdc1346010cc83c3cbdbc48593b62942063464ce4c8db87495a735250 +size 3194880 diff --git a/sources/narwhals-3864.tar b/sources/narwhals-3864.tar new file mode 100644 index 0000000000000000000000000000000000000000..ad8f7e286c4c7fce2a13512205ef3d4ccccfb2d2 --- /dev/null +++ b/sources/narwhals-3864.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58ec8ccfdd1e3b00d15715f665de6cb6796e4f9d456d8c0a55d3a9bad7ea25d2 +size 6871040 diff --git a/sources/pygments-2816.tar b/sources/pygments-2816.tar new file mode 100644 index 0000000000000000000000000000000000000000..4a8d8ecaf0a1ce0579cc39aeaa5ef002440c987a --- /dev/null +++ b/sources/pygments-2816.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccba4fdd41fd6a2a9796292a27e62babe206910a84f1290391e824371b6e58c0 +size 47400960 diff --git a/sources/pygments-2828.tar b/sources/pygments-2828.tar new file mode 100644 index 0000000000000000000000000000000000000000..fe741c4db9dcd36a749092e40fbfc8b9bb4e442e --- /dev/null +++ b/sources/pygments-2828.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9f794937fa960ed50c1c943691c030b6943a28f075e06a3e8ce70adf0ab6a20 +size 47390720 diff --git a/sources/pypdf-3587.tar b/sources/pypdf-3587.tar new file mode 100644 index 0000000000000000000000000000000000000000..1d2a840043d54c213b3b716a27ed511d47c03203 --- /dev/null +++ b/sources/pypdf-3587.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09eddc9e1688d5cbded2b6e1a8a8a1ff394746af53bd1aa54578b0701d6164c5 +size 17807360 diff --git a/sources/pypdf-3878.tar b/sources/pypdf-3878.tar new file mode 100644 index 0000000000000000000000000000000000000000..917d4e6627ad283fab92b04a5ecd834a41aba345 --- /dev/null +++ b/sources/pypdf-3878.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6853735f6f494b8202622393418d82192b2000bc91bf9fe133634619e6c47b9 +size 21790720 diff --git a/sources/pypdf-3982.tar b/sources/pypdf-3982.tar new file mode 100644 index 0000000000000000000000000000000000000000..ea94f6e195bd11db0872040fdb2f8d839ee4cb82 --- /dev/null +++ b/sources/pypdf-3982.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a49bc62c5c37a4aaf8796e82c0bb09ab7dc30b253991aeb9189a2e806cb7119 +size 21780480 diff --git a/sources/sqlit-246.tar b/sources/sqlit-246.tar new file mode 100644 index 0000000000000000000000000000000000000000..85bf808266c84ae5eee529402065a1b569c77853 --- /dev/null +++ b/sources/sqlit-246.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37e92cffd7649eebd9f247d6baaf7ce35b89a3b0e3eab48ed82e04defaf5282f +size 16578560 diff --git a/sources/sqlit-260.tar b/sources/sqlit-260.tar new file mode 100644 index 0000000000000000000000000000000000000000..2e0500378aec82472ae2bcd210e0db4de904e2f3 --- /dev/null +++ b/sources/sqlit-260.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad45cceffdbc5e3629a0b1ccd608266f0f0f1e7820fa86557bb51573b6da669f +size 16803840 diff --git a/sources/structlog-710.tar b/sources/structlog-710.tar new file mode 100644 index 0000000000000000000000000000000000000000..c2f750ae1232809514f622d3d2ecfad5444f94ad --- /dev/null +++ b/sources/structlog-710.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29cbfb33035b772d26d8ebae36cae0e0e30e606ee228056f2c910b9c55e396a1 +size 2273280 diff --git a/sources/tomlkit-440.tar b/sources/tomlkit-440.tar new file mode 100644 index 0000000000000000000000000000000000000000..3bc065e4e80283a054825d15ab0056eddd12d32f --- /dev/null +++ b/sources/tomlkit-440.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0b40aef624c1113496e08365bc15e70796c2280b3a71df568ec74123d72fab7 +size 532480 diff --git a/sources/tomlkit-542.tar b/sources/tomlkit-542.tar new file mode 100644 index 0000000000000000000000000000000000000000..d2318413a07b06647921a9dbc1b02ef024f63c1e --- /dev/null +++ b/sources/tomlkit-542.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:803d7046ba0b462206c5059327664b75228fd7d00e78f598a62e76e09260b329 +size 532480 diff --git a/sources/typeguard-499.tar b/sources/typeguard-499.tar new file mode 100644 index 0000000000000000000000000000000000000000..3d8b433ff548ee96ec462e9906a98355678c345d --- /dev/null +++ b/sources/typeguard-499.tar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15eec682771f0af79ba05bae6a97ad7a09c27f45b4e5623261b5e430377361a7 +size 430080 diff --git a/tasks.jsonl b/tasks.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..aafd0b8a2f50f466582c15d961722c5255602c87 --- /dev/null +++ b/tasks.jsonl @@ -0,0 +1,20 @@ +{"fail_to_pass_command":["pytest","-q","--timeout=60","tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_dollar_quoted_strings","tests/unit/test_multi_statement.py::TestStatementSplitting::test_preserves_semicolons_in_named_dollar_quoted_strings","tests/unit/test_multi_statement.py::TestStatementSplitting::test_dollar_quotes_inside_standard_strings_are_ignored"],"hidden_test_patch":"hidden-tests/sqlit-246.patch","hidden_test_sha256":"8c996d9f14192966e18f5dc48bd08f619ae44ab687594f2a769d57ce119c72c4","id":"sqlit-246","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"**Bug Report**\n\n When connected to a PostgreSQL database and running a CREATE OR REPLACE FUNCTION statement that uses dollar-quoting ($$), sqlit throws a parsing error before sending the query to Postgres:\n\n _unterminated dollar-quoted string at or near \"$$\n DECLARE\n ...\"\n LINE 2: RETURNS api.transactions AS $$_\n ^\n\n **Steps to Reproduce**\n\n 1. Connect sqlit to a PostgreSQL database\n 2. Run any function/procedure using dollar-quote syntax, e.g.:\n\n CREATE OR REPLACE FUNCTION example()\n RETURNS void AS $$\n BEGIN\n -- body\n END;\n $$ LANGUAGE plpgsql;\n\n **Expected Behavior**\n\n The full statement should be sent to PostgreSQL as-is. PostgreSQL natively supports dollar-quoting and executes it without\n error.\n\n **Actual Behavior**\n\n sqlit appears to parse/split the statement client-side and does not correctly handle $$ dollar-quote delimiters, resulting in\n the error above.\n\n **Workaround**\n\n Running the same SQL via psql directly works fine.\n\n - Tool: sqlit\n - Database: PostgreSQL\n\n\"Image\"\n","issue_title":"PostgreSQL dollar-quoted strings ($$) cause \"unterminated dollar-quoted string\" error","protected_globs":["tests/unit/test_multi_statement.py"],"regression_command":["pytest","-q","--timeout=60","tests/","--ignore=tests/test_mssql.py","--ignore=tests/test_postgresql.py","--ignore=tests/test_mysql.py","--ignore=tests/test_oracle.py","--ignore=tests/test_mariadb.py","--ignore=tests/test_cockroachdb.py","--ignore=tests/test_turso.py","--ignore=tests/test_firebird.py","--ignore=tests/test_ssh.py","--ignore=tests/test_clickhouse.py"],"repository":"Maxteabag/sqlit","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim","environment":["PYTHONPATH=/workspace/repo","PYTHONDONTWRITEBYTECODE=1","UV_CACHE_DIR=/tmp/uv-cache","XDG_CONFIG_HOME=/tmp/patcheval-config","SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SQLIT_TUI=0.0.0"],"schema_version":1,"sync_command":["uv","sync","--frozen","--group","test","--no-dev","--extra","duckdb","--no-install-project"]},"source_archive":"sources/sqlit-246.tar","source_sha256":"37e92cffd7649eebd9f247d6baaf7ce35b89a3b0e3eab48ed82e04defaf5282f","timeout_s":900,"validated":true} +{"fail_to_pass_command":["pytest","-q","--timeout=60","tests/connections/providers/oracle/test_statement_execution.py::test_execute_query_removes_sql_statement_terminator","tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_removes_sql_statement_terminator","tests/connections/providers/oracle/test_statement_execution.py::test_execute_non_query_preserves_plsql_terminator"],"hidden_test_patch":"hidden-tests/sqlit-260.patch","hidden_test_sha256":"6744a8637a2c5bfdf8784bba6d48bd1b1f2f8918d4fed945e965be7a6947be01","id":"sqlit-260","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"If I write this query\n\n```sql\nALTER SESSION SET EDITION = V0;\n```\nI get\n```\nQuery error: ORA-00922: missing or invalid option\nHelp: https://docs.oracle.com/error-help/db/ora-00922/\n```\n\nbut if I remove the trailing `;` it works","issue_title":"oracledb: if query has `;` it fails with `ORA-00922: missing or invalid option`","protected_globs":["tests/connections/providers/oracle/test_statement_execution.py"],"regression_command":["pytest","-q","--timeout=60","tests/","--ignore=tests/test_mssql.py","--ignore=tests/test_postgresql.py","--ignore=tests/test_mysql.py","--ignore=tests/test_oracle.py","--ignore=tests/test_mariadb.py","--ignore=tests/test_cockroachdb.py","--ignore=tests/test_turso.py","--ignore=tests/test_firebird.py","--ignore=tests/test_ssh.py","--ignore=tests/test_clickhouse.py"],"repository":"Maxteabag/sqlit","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim","environment":["PYTHONPATH=/workspace/repo","PYTHONDONTWRITEBYTECODE=1","UV_CACHE_DIR=/tmp/uv-cache","XDG_CONFIG_HOME=/tmp/patcheval-config","SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SQLIT_TUI=0.0.0"],"schema_version":1,"sync_command":["uv","sync","--frozen","--group","test","--no-dev","--extra","duckdb","--no-install-project"]},"source_archive":"sources/sqlit-260.tar","source_sha256":"ad45cceffdbc5e3629a0b1ccd608266f0f0f1e7820fa86557bb51573b6da669f","timeout_s":900,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","--randomly-seed=0","--hypothesis-seed=0","-o","cache_dir=/tmp/pytest-cache","--constructors=pandas,pandas[nullable]","tests/frame/concat_test.py::test_concat_horizontal_pandas_left_hand_rule"],"hidden_test_patch":"hidden-tests/narwhals-3864.patch","hidden_test_sha256":"543c57d1a118280d000165857c1bd5f9e67c0286e4e51dd6eaf364fbd2ce6655","id":"narwhals-3864","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"Hi, this is sort of a collection of issues/questions but I'm reporting them together to share to full picture.\n\nI'm currently trying to figure out how to best handle pandas indices in the context of `nw.concat` for certain cases. Consider the situation where I have some function `process` that transforms a given dataframe into another but *not* using index-preserving dataframe operations (the specifics don't matter, but in my case this happens because I'm transitioning to `torch` for the computation).\n\nThe problem I run into is that the resulting pandas execution will differ from other backends if I feed the resulting dataframe together with the original one into `nw.concat`:\n\n```python\nimport narwhals as nw\nimport pandas as pd\n\n\ndef process(df: nw.DataFrame) -> nw.DataFrame:\n return nw.from_dict(\n {\"B\": list(range(len(df)))}, backend=nw.get_native_namespace(df)\n )\n\n\ndf1 = pd.DataFrame({\"A\": [1, 2, 3]}, index=[10, 20, 30])\ndf1_nw = nw.from_native(df1)\ndf2_nw = process(df1_nw)\n\nprint(\"\\n-- concat without index alignment --\")\nprint(nw.to_native(nw.concat([df1_nw, df2_nw], how=\"horizontal\")))\n```\n\nThat is, for polars I'll get the \"expected\" compact 3-row dataframe while for pandas I get:\n```\n-- concat without index alignment --\n A B\n10 1.0 NaN\n20 2.0 NaN\n30 3.0 NaN\n0 NaN 0.0\n1 NaN 1.0\n2 NaN 2.0\n```\n\n### Questions\n1. Do you see a better way how to handle this situation, i.e. how would you approach it?\n2. One easy way to avoid losing the index would be if there existed some function that would let me \"swap out\" the dataframe content of the original one, instead of creating a new one. In particular, that would allow to both a) keep the index and b) keep the backend information. But I guess that functionality does not exist? The closest I could find is `replace_strict`, but that only works for `Series`.\n3. The other alternative I see is manually handle the index by calling `maybe_get_index`/`maybe_set_index`, like outlined in the method below. However, when I tried this, I was very surprised that the two functions are not symmetric in terms of types! That is, I would have expected that `maybe_set_index` also accepts an interable like `Series.from_iterable` does and I can easily nest them like `nw.maybe_set_index(..., index=nw.maybe_get_index(...))`, but that does not seem to be the case.\n\nAny thoughts here?\n\n```python\ndef process_preserving_index(df: nw.DataFrame) -> nw.DataFrame:\n idx = nw.maybe_get_index(df)\n result = process(df)\n if idx is not None:\n idx_series = nw.from_native(pd.Series(idx), series_only=True)\n result = nw.maybe_set_index(result, index=idx_series)\n return result\n```","issue_title":"`nw.concat` and `maybe_get/set_index`","protected_globs":["tests/expr_and_series/corr_test.py","tests/expr_and_series/cov_test.py","tests/frame/concat_test.py"],"regression_command":["python","-m","pytest","-q","--randomly-seed=0","--hypothesis-seed=0","-o","cache_dir=/tmp/pytest-cache","--runslow","--constructors=pandas,pandas[nullable]","tests"],"repository":"narwhals-dev/narwhals","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim","bootstrap_command":["uv","pip","install","--python","/opt/venv/bin/python","--only-binary",":all:","uv_build==0.11.0"],"environment":["HOME=/home/node","XDG_CACHE_HOME=/tmp/xdg-cache","UV_CACHE_DIR=/tmp/uv-cache","PYTHONPATH=/workspace/repo/src","PYTHONDONTWRITEBYTECODE=1","PYTHONUNBUFFERED=1","PYTHONHASHSEED=0","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","UV_OFFLINE=1","NARWHALS_DEFAULT_CONSTRUCTORS=pandas,pandas[nullable]","MODIN_ENGINE=python","PYARROW_IGNORE_TIMEZONE=1","TZ=UTC","LANG=C.UTF-8","LC_ALL=C.UTF-8","TERM=dumb","NO_COLOR=1","PYTHON_COLORS=0"],"schema_version":1,"sync_command":["uv","sync","--frozen","--no-default-groups","--group","tests","--extra","pandas","--no-install-project"]},"setup_command":["/bin/sh","-ec","mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."],"source_archive":"sources/narwhals-3864.tar","source_sha256":"58ec8ccfdd1e3b00d15715f665de6cb6796e4f9d456d8c0a55d3a9bad7ea25d2","timeout_s":1800,"validated":true} +{"fail_to_pass_command":["pytest","-q","tests/test_utils.py::TestPlotting::test_plot_graph_homo_with_legend_kwargs_and_title"],"hidden_test_patch":"hidden-tests/city2graph-121.patch","hidden_test_sha256":"5d0b869d29071084acbc351447cc02a402b938b303d83b817b1a04aa3503d6e6","id":"city2graph-121","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"### Contributing guidelines\n\n- [x] I understand the contributing guidelines\n\n### Documentation\n\n- [x] My proposal is not addressed by the documentation or examples\n\n### Existing issues\n\n- [x] Nothing similar appears in an existing issue\n\n### Describe the bug\n\nIn trying to reproduce the GTFS to Graphs example (https://city2graph.net/latest/examples/gtfs.html#the-power-of-graph-representation) , I found an error when plotting:\n```\nc2g.plot_graph(\n nodes=travel_nodes,\n edges=travel_edges,\n markersize=8,\n node_color='centrality_quantile',\n node_alpha=0.9,\n edge_color='#bbbbbb',\n edge_linewidth=travel_edges['frequency'] / 200,\n edge_alpha=0.7,\n figsize=(16, 16),\n title=\"Central London Transit Network\\nBetweenness Centrality of Stops\",\n legend=True,\n legend_kwargs={'label': 'Betweenness Centrality', 'orientation': 'horizontal'},\n title = 'Central London Transit Network\\nBetweenness Centrality of Stops',\n ax=ax\n)\n```\n> `IndexError: index 1 is out of bounds for axis 0 with size 1`\n\nRemoving `legend=True`, `legend_kwargs`, and `title` makes the same call work.\n\n\n### To Reproduce\n\n```python\n### Fails\n\nimport geopandas as gpd\nfrom shapely.geometry import Point, LineString\nimport matplotlib.pyplot as plt\nimport city2graph as c2g\n\nnodes = gpd.GeoDataFrame(\n {\"centrality_quantile\": [1, 2]},\n geometry=[Point(0, 0), Point(1, 1)],\n crs=\"EPSG:4326\",\n)\n\nedges = gpd.GeoDataFrame(\n {\"frequency\": [100, 200]},\n geometry=[LineString([(0, 0), (1, 1)]), LineString([(1, 1), (2, 2)])],\n crs=\"EPSG:4326\",\n)\n\nfig, ax = plt.subplots(figsize=(5, 5))\n\nc2g.plot_graph(\n nodes=nodes,\n edges=edges,\n node_color=\"centrality_quantile\",\n edge_color=\"#bbbbbb\",\n edge_linewidth=edges[\"frequency\"] / 200,\n legend=True,\n legend_kwargs={\"label\": \"Betweenness Centrality\", \"orientation\": \"horizontal\"},\n title = \"Central London Transit Network Betweenness Centrality of Stops\",\n ax=ax,\n)\n\nplt.show()\n```\nThis produces:\n > `IndexError: index 1 is out of bounds for axis 0 with size 1`\nI would expect that this creates plots the graph\n\n\n### Expected behavior\n\n```python\n### Works\n# Removing `legend=True`, `legend_kwargs`, and `title` a makes the same call succeed.\n\nimport geopandas as gpd\nfrom shapely.geometry import Point, LineString\nimport matplotlib.pyplot as plt\nimport city2graph as c2g\n\nnodes = gpd.GeoDataFrame(\n {\"centrality_quantile\": [1, 2]},\n geometry=[Point(0, 0), Point(1, 1)],\n crs=\"EPSG:4326\",\n)\n\nedges = gpd.GeoDataFrame(\n {\"frequency\": [100, 200]},\n geometry=[LineString([(0, 0), (1, 1)]), LineString([(1, 1), (2, 2)])],\n crs=\"EPSG:4326\",\n)\n\nfig, ax = plt.subplots(figsize=(5, 5))\n\nc2g.plot_graph(\n nodes=nodes,\n edges=edges,\n node_color=\"centrality_quantile\",\n edge_color=\"#bbbbbb\",\n edge_linewidth=edges[\"frequency\"] / 200,\n # legend=True,\n # legend_kwargs={\"label\": \"Betweenness Centrality\", \"orientation\": \"horizontal\"},\n # title = \"Central London Transit Network Betweenness Centrality of Stops\"\n ax=ax,\n)\n\nplt.show()\n```\n\n### Environment (please complete the following information):\n\nOS: macOS 15.7.2 \n\nCPU: Apple M4 Max (arm64)\n\nGPU: Apple M4 Max (integrated GPU)\n\nPython version: 3.13\n\ncity2graph version: 0.2.4\n\ntorch version: 2.10.0\n\ntorch_geometric version: 2.7.0\n\n### How did you install city2graph?\n\nvia PyPI (e.g., pip)\n\n### Additional context\n\n_No response_","issue_title":"[BUG] plot_graph fails when `legend=True` , `legend_kwargs` and `title` is provided","protected_globs":["tests/test_utils.py"],"regression_command":["pytest","-q","tests"],"repository":"c2g-dev/city2graph","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm","environment":["PYTHONPATH=/workspace/repo","MPLBACKEND=Agg","MPLCONFIGDIR=/tmp/matplotlib","XDG_CACHE_HOME=/tmp/xdg-cache","PYTHONDONTWRITEBYTECODE=1","UV_CACHE_DIR=/tmp/uv-cache"],"schema_version":1,"sync_command":["uv","sync","--frozen","--extra","cpu","--group","dev","--no-install-project"]},"source_archive":"sources/city2graph-121.tar","source_sha256":"baa7c30a4b2e214b7e2cf9b51128f39da05947b7d34f3528139b1a8b19b5db3f","timeout_s":1200,"validated":true} +{"fail_to_pass_command":["pytest","-q","tests/test_parse_string.py::test_parse_string_preserves_repeated_escaped_backslashes_during_repair"],"hidden_test_patch":"hidden-tests/json-repair-207.patch","hidden_test_sha256":"6a9e3a7f9307b102bc29764df8b4fe17c956f9227af6533015cb37105f1efbdb","id":"json-repair-207","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"### Version of the library\n\nhttps://mangiucugna.github.io/json_repair/#jr=v1.d.eJw9isEKglAUBX9FDoKL3kZr9aAv6bR42i2sfMZVQbjcf4_ImsUwizHcEWHEMolORDwZkdMgRCTKtGuPHXnV1Fnt1nhJBELH53cgW7n12V5DmrVfvai50fxi_9GhICVf_h8R_ByI8UHEWRepmOFvF04wEQ\n\n### Describe the bug\n\nLaTex uses double backslashes `\\\\` to break new liens, and in JSON we have to write 4 backslashes `\\\\\\\\`. This is important in writing matrices.\njson_repair would convert `\\\\\\\\` (4 backslashes) to `\\\\` (2 backslahes), making the matrix expression incorrect.\n\n### How to reproduce\nFor input\n`{ \"content\": [ { \"topic_text\": \" $$\\\\begin{pmatrix} a\\\\\\\\b\\\\\\\\c \\\\end{pmatrix}$$\" } ] } `\n\noutput is\n`\n{\n \"content\": [\n {\n \"topic_text\": \" $$\\\\begin{pmatrix} a\\\\b\\\\c \\\\end{pmatrix}$$\"\n }\n ]\n}\n`\n\n### Expected behavior\n`\n{\n \"content\": [\n {\n \"topic_text\": \" $$\\\\begin{pmatrix} a\\\\\\\\b\\\\\\\\c \\\\end{pmatrix}$$\"\n }\n ]\n}\n`","issue_title":"[Bug]: Backslashes in LaTex expression","protected_globs":["tests/test_parse_string.py"],"regression_command":["pytest","-q","--ignore=tests/test_performance.py"],"repository":"mangiucugna/json_repair","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.13-bookworm-slim","bootstrap_command":["uv","pip","install","--python","/opt/venv/bin/python","setuptools==80.9.0"],"environment":["PYTHONPATH=/workspace/repo/src","PYTHONDONTWRITEBYTECODE=1","UV_CACHE_DIR=/tmp/uv-cache"],"schema_version":1,"sync_command":["uv","sync","--frozen","--all-groups","--no-install-project"]},"setup_command":["uv","pip","install","--offline","--python","/opt/venv/bin/python","--no-deps","--no-build-isolation","--editable","."],"source_archive":"sources/json-repair-207.tar","source_sha256":"b011f04bdc1346010cc83c3cbdbc48593b62942063464ce4c8db87495a735250","timeout_s":300,"validated":true} +{"fail_to_pass_command":["pytest","-q","tests/test_json_repair.py::test_parenthesized_prose_does_not_hijack_fenced_json"],"hidden_test_patch":"hidden-tests/json-repair-191.patch","hidden_test_sha256":"96b3b7a6fe4ae4f86f8f42e86af8aedadaa9cfe87b6d5409adf1df05e49a06b0","id":"json-repair-191","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"### Version of the library\n\n0.59.0\n\n### Describe the bug\n\nIf input contains () characters outside of json block, the result gets weird.\n\nWith 0.58.7 it works as expected: `{\"key\": \"value\"}` is returned.\nWith 0.59.0 result is: `[\"some clarification):\\n \\n ```json\\n {\", \"key\\\": \\\"value\"]`\n\n\n\n### How to reproduce\n\n```\n async def test_json_and_parenthesis(self):\n import json_repair\n data_str = \"\"\"\n **Decision**: bla, bla (some clarification):\n \n ```json\n {\n \"key\": \"value\"\n }\n ```\n \"\"\"\n\n repaired = json_repair.repair_json(data_str)\n\n self.assertEqual('{\"key\": \"value\"}', repaired)\n```\n\n### Expected behavior\n\n`{\"key\": \"value\"}` is returned.","issue_title":"[Bug]: 0.59.0 regression: () characters in input break json output","protected_globs":["tests/test_json_repair.py","tests/test_parse_array.py"],"regression_command":["pytest","-q","--ignore=tests/test_performance.py"],"repository":"mangiucugna/json_repair","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.13-bookworm-slim","bootstrap_command":["uv","pip","install","--python","/opt/venv/bin/python","setuptools==80.9.0"],"environment":["PYTHONPATH=/workspace/repo/src","PYTHONDONTWRITEBYTECODE=1","UV_CACHE_DIR=/tmp/uv-cache"],"schema_version":1,"sync_command":["uv","sync","--frozen","--all-groups","--no-install-project"]},"setup_command":["uv","pip","install","--offline","--python","/opt/venv/bin/python","--no-deps","--no-build-isolation","--editable","."],"source_archive":"sources/json-repair-191.tar","source_sha256":"b81ba71d4e10022a7dd8b0345094c88cf0129f5ed6fe7bd3000c5138260624ae","timeout_s":300,"validated":true} +{"fail_to_pass_command":["pytest","-q","tests/test_schema_guided_parse.py::test_schema_union_branch_keeps_root_defs_scope_during_repair"],"hidden_test_patch":"hidden-tests/json-repair-205.patch","hidden_test_sha256":"ef001d5bffbb4e4dbd51620fd70532d3d1e6c4373abf7ca1c75e1171b49e68c4","id":"json-repair-205","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"### Version of the library\n\n0.61.4\n\n### Describe the bug\n\nWhen malformed JSON activates the schema-aware repair parser, validation of an `anyOf` branch containing a root-relative $ref fails with `PointerToNowhere`:\n\n```\njsonschema.exceptions._WrappedReferencingError: PointerToNowhere: '/$defs/Item' does not exist within {'type': 'array', 'items': {'$ref': '#/$defs/Item'}}\n```\n\njson_repair appears to validate the individual anyOf branch as a standalone schema document which fails because that isolated branch does not contain $defs.\n\n### How to reproduce\n\n```python\nimport json_repair\n\nschema = {\n \"$defs\": {\n \"Item\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\"type\": \"string\"},\n },\n \"required\": [\"name\"],\n }\n },\n \"type\": \"object\",\n \"properties\": {\n \"value\": {\n \"anyOf\": [\n {\n \"type\": \"array\",\n \"items\": {\"$ref\": \"#/$defs/Item\"},\n },\n {\"type\": \"null\"},\n ]\n }\n },\n \"required\": [\"value\"],\n}\n\n# The trailing comma forces json_repair to use its repair parser.\nbroken_json = '{\"value\": [{\"name\": \"example\"}],}'\n\nprint(json_repair.loads(broken_json, schema=schema))\n```\n\n### Expected behavior\n\nThe reference should resolve against the original root schema.","issue_title":"[Bug]: Schema aware repair loses root $defs scope when validating an anyOf branch","protected_globs":["tests/test_schema_guided_parse.py"],"regression_command":["pytest","-q","--ignore=tests/test_performance.py"],"repository":"mangiucugna/json_repair","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.13-bookworm-slim","bootstrap_command":["uv","pip","install","--python","/opt/venv/bin/python","setuptools==80.9.0"],"environment":["PYTHONPATH=/workspace/repo/src","PYTHONDONTWRITEBYTECODE=1","UV_CACHE_DIR=/tmp/uv-cache"],"schema_version":1,"sync_command":["uv","sync","--frozen","--all-groups","--no-install-project"]},"setup_command":["uv","pip","install","--offline","--python","/opt/venv/bin/python","--no-deps","--no-build-isolation","--editable","."],"source_archive":"sources/json-repair-205.tar","source_sha256":"e87c1fdebeecd474d38376c95c83f625a63b35d5d4f840e47a495121961ef274","timeout_s":300,"validated":true} +{"fail_to_pass_command":["pytest","-q","tests/test_termui.py::test_prompt_and_confirm_ansi_respects_color[confirm-no-color]"],"hidden_test_patch":"hidden-tests/click-3572.patch","hidden_test_sha256":"d6a1ee42b73b16163fb9b35056355ce65749240b87ec3f862805780dc101edd8","id":"click-3572","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"\nI had failing unit tests after upgrading to click 8.4.1. I was able to address some \nby using `runner.invoke(cmd, color=False)`, but that didn't help for commands\nthat use `click.confirm()`\n\n\n\nThis test script `test_repro.py` replicates the issue.\n```\nimport click\nfrom click.testing import CliRunner\n\n\n@click.command()\ndef cmd():\n click.echo(click.style('Hello World!', fg='green'))\n\n\n@click.command()\ndef cmd_confirm():\n click.confirm(click.style('Hello World!', fg='green'), abort=True)\n\n\ndef test_echo_strips_ansi_with_color_false():\n runner = CliRunner()\n result = runner.invoke(cmd, color=False)\n assert result.output == \"Hello World!\\n\"\n\n\ndef test_confirm_strips_ansi_with_color_false():\n runner = CliRunner()\n result = runner.invoke(cmd_confirm, input=\"Y\", color=False)\n assert result.output == \"Hello World! [y/N]: Y\\n\" # FAILS: ANSI codes present\n```\n\nWith click 8.3.3 both tests pass. With click 8.4.0 and 8.4.1, the `test_confirm_strips_ansi_with_color_false` test fails:\n\n```\nuvx --with click==8.4 pytest test_repro.py\n...\n================================================ FAILURES ================================================\n_______________________________ test_confirm_strips_ansi_with_color_false ________________________________\n\n def test_confirm_strips_ansi_with_color_false():\n runner = CliRunner()\n result = runner.invoke(cmd_confirm, input=\"Y\", color=False)\n> assert result.output == \"Hello World! [y/N]: Y\\n\" # FAILS: ANSI codes present\n```\n\n\nThe ansi codes should be stripped when running click.confirm, as they are for click.echo.\n\nEnvironment:\n\n- Python version: 3.13\n- Click version: 8.4.1\n- MacOS\n\n","issue_title":"ANSI codes not stripped from click.confirm after upgrading to click 8.4","protected_globs":["tests/test_termui.py"],"regression_command":["pytest","-q","-m","not stress","tests"],"repository":"pallets/click","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim","bootstrap_command":["sh","-euxc","apt-get update && apt-get install -y --no-install-recommends less=590-2.1~deb12u2 && rm -rf /var/lib/apt/lists/*"],"environment":["PYTHONPATH=/workspace/repo/src","PYTHONDONTWRITEBYTECODE=1","PYTHONHASHSEED=0","PYTEST_DISABLE_PLUGIN_AUTOLOAD=1","LANG=C.UTF-8","LC_ALL=C.UTF-8","TZ=UTC","PIP_NO_INDEX=1","UV_OFFLINE=1"],"schema_version":1,"sync_command":["/bin/sh","-ec","SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ATTRS=0.0.0 uv sync --frozen --no-default-groups --group tests --no-install-project"]},"source_archive":"sources/click-3572.tar","source_sha256":"a810395f18b7c9d84a7e97c027d312dfbacd8c5fcd9aca9e593fb187c2c93308","timeout_s":300,"validated":true} +{"fail_to_pass_command":["pytest","-q","tests/test_formatting.py::test_help_formatter_write_usage[empty-args-default-prefix]"],"hidden_test_patch":"hidden-tests/click-3360.patch","hidden_test_sha256":"b492d89726576456570f5a4ec209c61e4e1cae524b470beae226b530f6629118","id":"click-3360","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"If no `args` are passed to `HelpFormatter.write_usage`, the Usage line is not printed.\n\n### Reproduction\n\n```python\nimport click\n\nf = click.HelpFormatter()\nf.write_usage(\"program\")\nprint(f.getvalue())\n```\n\n\n### Expected output\n```\nUsage: program\n```\n\n### Actual output\n(an empty line)\n\n### Environment\n\n- Python version: 3.12.3\n- Click version: 8.3.1\n\n### Additional information\n\nWe use `click` for a CLI program with interactive mode. We are about to use `click.HelpFormatter` to print help for internal commands, some of which do not accept any arguments (`exit`, for example).","issue_title":"Empty output from `HelpFormatter.write_usage` for a program without arguments","protected_globs":["tests/test_formatting.py"],"regression_command":["pytest","-q","-m","not stress","tests"],"repository":"pallets/click","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim","bootstrap_command":["sh","-euxc","apt-get update && apt-get install -y --no-install-recommends less=590-2.1~deb12u2 && rm -rf /var/lib/apt/lists/*"],"environment":["PYTHONPATH=/workspace/repo/src","PYTHONDONTWRITEBYTECODE=1","PYTHONHASHSEED=0","PYTEST_DISABLE_PLUGIN_AUTOLOAD=1","LANG=C.UTF-8","LC_ALL=C.UTF-8","TZ=UTC","PIP_NO_INDEX=1","UV_OFFLINE=1"],"schema_version":1,"sync_command":["/bin/sh","-ec","SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ATTRS=0.0.0 uv sync --frozen --no-default-groups --group tests --no-install-project"]},"source_archive":"sources/click-3360.tar","source_sha256":"d250a5680a151864900ce3271a1dac8057e58ba4be84b8e70f6c418522a72f29","timeout_s":300,"validated":true} +{"fail_to_pass_command":["pytest","-q","tests/test_formatting.py::test_formatting_usage_error_help_hint[help_names1-extra_options1-Try 'cli foo --help' for help.]"],"hidden_test_patch":"hidden-tests/click-2790.patch","hidden_test_sha256":"95c637397e9eea58e200e3001f2882f0da4cf99df1e4f5ad3d2cbb1347cc51d3","id":"click-2790","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"\n\nClick prints an incorrect suggestion when using a combination of nested command and required argument. This happens when the nested command shadows the `-h` option shortcut of the main command which Click apparently tolerates.\n\n\n\n## Replication\n\nSee https://github.com/tumidi/click-subcommand-help-message.\n\n```shell-session\n$ click-test-cli foo\nUsage: click-test-cli foo [OPTIONS] REQUIRED_ARG\nTry 'click-test-cli foo -h' for help.\n\nError: Missing argument 'REQUIRED_ARG'.\n```\n\nBut, actually running the suggested `click-test-cli foo -h` prints\n\n```shell-session\n$ click-test-cli foo -h\nError: Option '-h' requires an argument.\n```\n\nInterestingly, Click correctly detects the shadowing of the option when printing the foo command help and prints a consistent help page.\n\n```shell-session\n$ click-test-cli foo --help\nUsage: click-test-cli foo [OPTIONS] REQUIRED_ARG\n\nOptions:\n -h, --host TEXT\n --help Show this message and exit.\n```\n\n### Python code\n\n```py\n@click.group(context_settings={\"help_option_names\": [\"-h\", \"--help\"]})\ndef cli():\n pass\n\n\n@click.command()\n@click.argument(\"required_arg\")\n@click.option(\"--host\", \"-h\", \"host\", default=\"localhost\")\ndef foo(required_arg, host):\n click.echo(f\"Foo command required_arg={required_arg} host={host}\")\n\n\ncli.add_command(foo)\n```\n\n\n\n## Possible solutions\n\nFix the generated message, so it prints `Try 'click-test-cli foo --help' for help.` in this case.\n\nEnvironment:\n\n- Python version: 3.12.6\n- Click version: 8.2.0.dev0 d73083e\n","issue_title":"Nested command option shadowing `-h` prints wrong suggestion","protected_globs":["tests/test_formatting.py"],"regression_command":["pytest","-q","-m","not stress","tests"],"repository":"pallets/click","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim","bootstrap_command":["sh","-euxc","apt-get update && apt-get install -y --no-install-recommends less=590-2.1~deb12u2 && rm -rf /var/lib/apt/lists/*"],"environment":["PYTHONPATH=/workspace/repo/src","PYTHONDONTWRITEBYTECODE=1","PYTHONHASHSEED=0","PYTEST_DISABLE_PLUGIN_AUTOLOAD=1","LANG=C.UTF-8","LC_ALL=C.UTF-8","TZ=UTC","PIP_NO_INDEX=1","UV_OFFLINE=1"],"schema_version":1,"sync_command":["/bin/sh","-ec","SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ATTRS=0.0.0 uv sync --frozen --no-default-groups --group tests --no-install-project"]},"source_archive":"sources/click-2790.tar","source_sha256":"bcf76b9cd560a2fad48982274e8b68ec8bd6a8dc22e48fe93df39d9ff8e89e4d","timeout_s":300,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","-p","pytest_socket","-p","pytest_timeout","--timeout=60","-o","cache_dir=/tmp/pytest-cache","tests/test_text_extraction.py::test_text_leading_is_not_scaled_by_font_size"],"hidden_test_patch":"hidden-tests/pypdf-3982.patch","hidden_test_sha256":"24192fe8f49b136426596b99789ca659d4edfbf20542de86e2e2b109aebe8198","id":"pypdf-3982","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"I am using `visitor_text` to get text positions so I can draw highlight boxes over\na rendered page.\n\nThe attached PDF sets a text leading of 14 (`14 TL`) and uses `T*` to move to the\nnext line. Each `T*` should move down 14pt. `visitor_text` reports the lines\n168pt apart instead.\n\nThis looks distinct from #3247 / #3250, which corrected the *direction* of the\n`T*` translation (the missing horizontal component for rotated text). Here the\ndirection is fine and the *distance* is wrong.\n\nContent stream, in full:\n\n```\nBT\n/F1 12 Tf\n1 0 0 1 72 700 Tm\n14 TL\n(Line one) Tj\nT*\n(Line two) Tj\nT*\n(Line three) Tj\nET\n```\n\n## Environment\n\n```bash\n$ python -m platform\nWindows-10-10.0.26200-SP0\n\n$ python -c \"import pypdf;print(pypdf._debug_versions)\"\npypdf==6.16.1, crypt_provider=('local_crypt_fallback', '0.0.0'), PIL=12.3.0\n```\n\n## Code + PDF\n\n`tl_repro.pdf` attached (633 bytes). Happy for it to go in your tests.\n\n```python\nimport pypdf\n\npage = pypdf.PdfReader(\"tl_repro.pdf\").pages[0]\n\nys = []\npage.extract_text(\n visitor_text=lambda text, cm, tm, fd, fs:\n ys.append(round(tm[5], 2)) if text.strip() else None)\nprint(ys)\n```\n\nExpected `[700.0, 686.0, 672.0]` (14pt apart).\nActual `[700.0, 532.0, 364.0]` (168pt apart).\n\nFor reference, MuPDF 1.28.2 puts the three lines 14pt apart on this file\n(top-y `79.10 / 93.10 / 107.10`).\n\nThe extracted text itself is correct (`'Line one\\nLine two\\nLine three'`) \u2014 only\nthe reported text matrix is wrong.\n\n## Traceback\n\nNot applicable, no exception \u2014 the returned coordinates are just wrong.\n\n## Bisect\n\nSame file, same script:\n\n```\npypdf 5.0.1 : [700.0, 686.0, 672.0] correct\npypdf 5.1.0 : [700.0, 532.0, 364.0] wrong\npypdf 6.16.1: [700.0, 532.0, 364.0] wrong\n```\n\n[tl_repro.pdf](https://github.com/user-attachments/files/31226124/tl_repro.pdf)","issue_title":"T* moves by the wrong amount \u2014 regression in 5.1.0","protected_globs":["tests/test_text_extraction.py"],"regression_command":["python","-m","pytest","-q","-p","pytest_socket","-p","pytest_timeout","--timeout=60","-o","cache_dir=/tmp/pytest-cache","-m","not enable_socket and not samples","tests"],"repository":"py-pdf/pypdf","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.11-bookworm-slim","bootstrap_command":["uv","pip","install","--python","/opt/venv/bin/python","--no-deps","--only-binary",":all:","flit_core==3.11.0","pygments==2.19.2"],"environment":["PYTHONPATH=/workspace/repo","PYTHONDONTWRITEBYTECODE=1","PYTHONUNBUFFERED=1","PYTHONHASHSEED=0","PYTEST_DISABLE_PLUGIN_AUTOLOAD=1","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","XDG_CACHE_HOME=/tmp/xdg-cache","TZ=UTC","LANG=C.UTF-8","LC_ALL=C.UTF-8"],"schema_version":1,"sync_command":["/bin/sh","-c","python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary :all: -r requirements/ci-3.11.txt"]},"setup_command":["uv","pip","install","--offline","--python","/opt/venv/bin/python","--no-deps","--no-build-isolation","--editable","."],"source_archive":"sources/pypdf-3982.tar","source_sha256":"5a49bc62c5c37a4aaf8796e82c0bb09ab7dc30b253991aeb9189a2e806cb7119","timeout_s":1200,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","-p","pytest_socket","-p","pytest_timeout","--timeout=60","-o","cache_dir=/tmp/pytest-cache","tests/generic/test_data_structures.py::test_remove_from_tree_on_outline_item"],"hidden_test_patch":"hidden-tests/pypdf-3878.patch","hidden_test_sha256":"1f35d4edd2497d3568cac113ae07fcb935b5e3454799094fc7180d2ed8b7ca05","id":"pypdf-3878","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"[Issue description, minimal reproducible example, and link to test document](https://stackoverflow.com/questions/79962929/calling-remove-from-tree-on-outline-item-causes-removed-child-does-not-appear-t?noredirect=1#comment141089279_79962929)\n\n## Environment\n\nWhich environment were you using when you encountered the problem?\n\n```bash\n$ python -m platform\nWindows-11-10.0.26200-SP0\n\n$ python -c \"import pypdf;print(pypdf._debug_versions)\"\npypdf==6.13.0, crypt_provider=('cryptography', '48.0.0'), PIL=12.2.0\n```\n\n## Code + PDF\n\nThis is a minimal, complete example that shows the issue:\n\n```python\n# Source - https://stackoverflow.com/q/79962929\n# Posted by Les Harris, modified by community. See post 'Timeline' for change history\n# Retrieved 2026-06-19, License - CC BY-SA 4.0\n\nfrom typing import List, Union\n\nfrom pypdf import PdfReader, PdfWriter\nfrom pypdf.generic import Destination, Fit, NameObject, ArrayObject, NumberObject, FloatObject\n\ndef remove_outline_item(output_path: str) -> None:\n try:\n # Remove a specific outline item by its color\n for outline in writer.outline:\n if isinstance(outline, list):\n remove_outline_item(outline)\n else:\n if outline.color == [0.0, 0.0, 0.0]:\n print(outline.title, outline.color, outline.get(\"/Parent\"))\n outline.remove_from_tree() # error happens here\n \n except FileNotFoundError:\n print(f\"Error: File '{output_path}' not found.\")\n except Exception as e:\n print(f\"An error occurred: {e}\")\n\nreader = PdfReader(\"input.pdf\")\nwriter = PdfWriter(clone_from=reader)\n\nremove_outline_item(writer)\n\n# Save to a new file\nwith open(\"output.pdf\", \"wb\") as f:\n writer.write(f)\n\n```\n\nFor testing:\n[input.pdf](https://github.com/user-attachments/files/29153170/input.pdf)\n\n## Traceback\n\nThis is the complete traceback I see:\n\n```\n# Source - https://stackoverflow.com/q/79962929\n# Posted by Les Harris, modified by community. See post 'Timeline' for change history\n# Retrieved 2026-06-19, License - CC BY-SA 4.0\n\nPS C:\\temp> python change-bookmark-text-color.py\nCover [0.0, 0.0, 0.0] None\nAn error occurred: Removed child does not appear to be a tree item\n\n```\n","issue_title":"Calling remove_from_tree on outline item causes \"Removed child does not appear to be a tree item\" error","protected_globs":["tests/generic/test_data_structures.py"],"regression_command":["python","-m","pytest","-q","-p","pytest_socket","-p","pytest_timeout","--timeout=60","-o","cache_dir=/tmp/pytest-cache","-m","not enable_socket and not samples","tests"],"repository":"py-pdf/pypdf","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.11-bookworm-slim","bootstrap_command":["uv","pip","install","--python","/opt/venv/bin/python","--no-deps","--only-binary",":all:","flit_core==3.11.0","pygments==2.19.2"],"environment":["PYTHONPATH=/workspace/repo","PYTHONDONTWRITEBYTECODE=1","PYTHONUNBUFFERED=1","PYTHONHASHSEED=0","PYTEST_DISABLE_PLUGIN_AUTOLOAD=1","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","XDG_CACHE_HOME=/tmp/xdg-cache","TZ=UTC","LANG=C.UTF-8","LC_ALL=C.UTF-8"],"schema_version":1,"sync_command":["/bin/sh","-c","python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary :all: -r requirements/ci-3.11.txt"]},"setup_command":["uv","pip","install","--offline","--python","/opt/venv/bin/python","--no-deps","--no-build-isolation","--editable","."],"source_archive":"sources/pypdf-3878.tar","source_sha256":"c6853735f6f494b8202622393418d82192b2000bc91bf9fe133634619e6c47b9","timeout_s":1200,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","-p","pytest_socket","-p","pytest_timeout","--timeout=60","-o","cache_dir=/tmp/pytest-cache","tests/generic/test_base.py::test_text_string_object__looks_like_bom"],"hidden_test_patch":"hidden-tests/pypdf-3587.patch","hidden_test_sha256":"d7dbc9b6309ee54bbfbe2a7b9075c4320e704e46e3cbc703e7f94c72b546f24d","id":"pypdf-3587","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"I get an AssertionError when merging a PDF that contains both latin and Chinese characters. This happens with a real PDF I work with, but for this issue I've created a small PDF that triggers the error. Perhaps the fact that the PDF contains both latin and Chinese characters has nothing to do with the issue, but I suspect it does.\n\n## Environment\n\n```bash\n$ python3 -c \"import pypdf;print(pypdf._debug_versions)\"\npypdf==6.5.0, crypt_provider=('cryptography', '43.0.0'), PIL=11.1.0\n```\n\n## Code + PDF\n\n```python\nimport pypdf\n\nreader = pypdf.PdfReader(\"minimal.pdf\")\nwriter = pypdf.PdfWriter()\nfor page in reader.pages:\n writerPage = writer.add_blank_page(reader.pages[0].mediabox.width, reader.pages[0].mediabox.height)\n writerPage.merge_page(page)\n```\n\n[minimal.pdf](https://github.com/user-attachments/files/24400020/minimal.pdf)\n\nI do not know why this particular set of characters triggers the error, but it's the minimal set I could find that triggers it. Feel free to add the PDF to your tests.\n\n## Traceback\n\n```\nTraceback (most recent call last):\n File \"/home/user/tmp/minimal.py\", line 7, in \n writerPage.merge_page(page)\n ~~~~~~~~~~~~~~~~~~~~~^^^^^^\n File \"/home/user/tmp/pypdf/_page.py\", line 1068, in merge_page\n self._merge_page(page2, over=over, expand=expand)\n ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/user/tmp/pypdf/_page.py\", line 1147, in _merge_page\n page2content.operations.insert(\n ^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/user/tmp/pypdf/generic/_data_structures.py\", line 1410, in operations\n self._parse_content_stream(BytesIO(self._data))\n ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^\n File \"/home/user/tmp/pypdf/generic/_data_structures.py\", line 1303, in _parse_content_stream\n operands.append(read_object(stream, None, self.forced_encoding))\n ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/user/tmp/pypdf/generic/_data_structures.py\", line 1452, in read_object\n return ArrayObject.read_from_stream(stream, pdf, forced_encoding)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/user/tmp/pypdf/generic/_data_structures.py\", line 261, in read_from_stream\n arr.append(read_object(stream, pdf, forced_encoding))\n ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/user/tmp/pypdf/generic/_data_structures.py\", line 1450, in read_object\n return read_hex_string_from_stream(stream, forced_encoding)\n File \"/home/user/tmp/pypdf/generic/_utils.py\", line 35, in read_hex_string_from_stream\n return create_string_object(bytes(arr), forced_encoding)\n File \"/home/user/tmp/pypdf/generic/_utils.py\", line 168, in create_string_object\n retval = TextStringObject(string.decode(\"utf-16be\"))\n File \"/home/user/tmp/pypdf/generic/_base.py\", line 673, in __new__\n assert org is not None, \"mypy\"\n ^^^^^^^^^^^^^^^\nAssertionError: mypy\n```\n\n## Typst code\n\nThe PDF I share above was created with the [Typst](https://typst.app) typesetting system, version 0.14.2, from the following code:\n\n```typ\n#set document(date: none)\n#set text(font: (\"Noto Sans CJK SC\"))\n\n\u63a5\u53f8\u667a\u5bf9UQfiffI:'!'bSMEftN;Tpghlxo?Ldcrm,quva sine.\u53d6\u5668\u6548\u8bba\u8bc1\u53cd\u7ed3\u4ef6\u4ee5\u91cf\u8bf4\u660e\u8ba8\u7528\u516c\u9ad8\u8ba4\u5e26\u7684\u8d77\u6700\u51c6\u90fd\u4f60\u5355\u548c\u613f\u8ba1\u5170\u5b83\u7531\uff0c\u4eb2\u53f0\u672c\u53ca\u96c6\u6e38\u672f\u884c\u5177\u9a6c\u6269\u5145\u8981\u8bfb\u597d\u60a8\u624d\u8702\u65e0\u51fb\u6b65\u65b9\u5e76\u6025\u6807\u662f\u591a\u54ea\u8be5\u5ea6\u53bb\u670b\u88ab\u5c0f\u6574\u4efb\u8bd1\u5f62\u59cb\u6210\u4e2d\u4e4b\u5e94\u79cd\u4e48\u8bc6\u793e\u7ec7\u8c03\u653e\u5f03\u5df1\u57fa\u7406\u6b21\u5012\u4eba\u9884\u51b5\u6709\u7075\u4ece\u7ecf\u4e2a\u5eb7\u80fd\u5efa\u3001\u624b\u73b0\u540c\u4f5c\u6167\u961f\n\n\u5212\u65f6\u4f46AA\u8f6e\u66f4\u529b\u6218\u4ed8\u8005\u5173\u4e92AA\u6587\u578b\u5f3a\u5bfc\u5de5\u5bc6\u4eec\u5404\u5173\u5df2\uff08\u610f\u7edc\u5171\u5173\u91c7\u5229\u4e00\u4f53\u5f20\u5173\u5f00\u5173\u901a\u786e\u4fe1\u5173\u6d4b\u5173\u63d0\u5173\u5173\u6a21\u5230\u7acb\u5173\u8bed\u5173\u5173\u5907\u8fd9\u517b\u5165\u5173\u538b\u5173\u7b2c\u5473\u7a0b\u5173\uff09\u56e2\u7fa4\u5982\u53e6\u8a00\u52a8\u60c5\uff1b\u6765\u89c4\u57f9\u5173\u679c\u6ca1\u67aa\u5173\u8fc7\u6cbb\u81ea\u7f51\u3002\u5c31\u53c2\u4e3b\u5730\u7cfb\u5fb7\u7740\u89e3\u6784\u505a\u65e6\u653f\u91cd\u76ee\u611f\u51fa\u5207\u5927\u534f\u53d7\u4ee4\u5173\u60f3\u7ffb\u53cb\u5173\u5185\u8bf8\u6bd4\u4e3a\u628a\u5728\u76f8\u5148\u53ef\u770b\u673a\u9886\n```\n\nI don't think this bug comes from Typst creating a malformed PDF, but if you find that it does I'll be happy to create an issue on their side.","issue_title":"Wrong BOM detection for strings starting with \\x00\\xfe\\x00\\xff","protected_globs":["tests/generic/test_base.py"],"regression_command":["python","-m","pytest","-q","-p","pytest_socket","-p","pytest_timeout","--timeout=60","-o","cache_dir=/tmp/pytest-cache","-m","not enable_socket and not samples","tests"],"repository":"py-pdf/pypdf","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.11-bookworm-slim","bootstrap_command":["uv","pip","install","--python","/opt/venv/bin/python","--no-deps","--only-binary",":all:","flit_core==3.11.0","pygments==2.19.2"],"environment":["PYTHONPATH=/workspace/repo","PYTHONDONTWRITEBYTECODE=1","PYTHONUNBUFFERED=1","PYTHONHASHSEED=0","PYTEST_DISABLE_PLUGIN_AUTOLOAD=1","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","XDG_CACHE_HOME=/tmp/xdg-cache","TZ=UTC","LANG=C.UTF-8","LC_ALL=C.UTF-8"],"schema_version":1,"sync_command":["/bin/sh","-c","python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary :all: -r requirements/ci-3.11.txt"]},"setup_command":["uv","pip","install","--offline","--python","/opt/venv/bin/python","--no-deps","--no-build-isolation","--editable","."],"source_archive":"sources/pypdf-3587.tar","source_sha256":"09eddc9e1688d5cbded2b6e1a8a8a1ff394746af53bd1aa54578b0701d6164c5","timeout_s":1200,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","--hypothesis-seed=0","tests/test_annotations.py::TestAnnotations::test_missing_classvar_import"],"hidden_test_patch":"hidden-tests/attrs-1575.patch","hidden_test_sha256":"544fb459fb354931c31c5963726d4ab8ed153d8c61fcfc518363300ec1ee327a","id":"attrs-1575","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"The following code\n\n```python\nfrom typing import TYPE_CHECKING\n\nimport attrs\n\nif TYPE_CHECKING:\n from typing import ClassVar\n\n@attrs.define\nclass T:\n t: ClassVar[str]\n\nT()\n```\n\nresults in:\n```python\nTraceback (most recent call last):\n File \"/tmp/test.py\", line 12, in \n T()\n ~^^\nTypeError: T.__init__() missing 1 required positional argument: 't'\n```\n\nSince the `if TYPE_CHECKING` block doesn't run, `ClassVar` isn't defined and attrs can't evaluate the ForwardRef or doesn't recognize `ClassVar`:\n\n```python\n>>> attrs.fields_dict(T)[\"t\"]\nAttribute(name='t', default=NOTHING, validator=None, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=ForwardRef('ClassVar[str]', is_class=True, owner=), converter=None, kw_only=False, inherited=False, on_setattr=None, alias='t')\n```\n\nBefore Python 3.14, `T`'s definition would only run if you used a string annotation or `from __future__ import annotations` (which if used with 3.14, the above code runs fine), but with the new annotations behavior the class definition runs fine and this error appears. This is actually issue for dataclasses too, as I get the same error with them.\n\nI'm not sure if this is fixable, but decided to report it, because it catches you by surprise","issue_title":"attrs doesn't recognize ClassVar if not imported in Python 3.14","protected_globs":["tests/test_annotations.py"],"regression_command":["python","-m","pytest","-q","--hypothesis-seed=0","tests"],"repository":"python-attrs/attrs","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim","bootstrap_command":["uv","pip","install","--python","/opt/venv/bin/python","--only-binary",":all:","hatchling==1.27.0","hatch-vcs==0.5.0","hatch-fancy-pypi-readme==25.1.0","setuptools-scm==9.2.0","editables==0.5"],"environment":["HOME=/home/node","XDG_CACHE_HOME=/tmp/xdg-cache","UV_CACHE_DIR=/tmp/uv-cache","PYTHONPATH=/workspace/repo/src","PYTHONDONTWRITEBYTECODE=1","PYTHONHASHSEED=0","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","UV_OFFLINE=1","SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ATTRS=0.0.0","LANG=C.UTF-8","LC_ALL=C.UTF-8","TZ=UTC","TERM=dumb","NO_COLOR=1","PYTHON_COLORS=0"],"schema_version":1,"sync_command":["uv","sync","--frozen","--no-default-groups","--group","tests","--no-install-project"]},"setup_command":["/bin/sh","-ec","mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."],"source_archive":"sources/attrs-1575.tar","source_sha256":"64c20a8d14830dcd0a069d65b6bb86ca61251a981da11be7209917ce54bd1830","timeout_s":900,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","tests/test_checkers.py::TestProtocol::test_class_against_protocol_ignores_instance_attributes"],"hidden_test_patch":"hidden-tests/typeguard-499.patch","hidden_test_sha256":"89bba7c95533fbb25ba5d68804f6734e9b48ec2bae3e7352aca6e43fd0eba1d2","id":"typeguard-499","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"### Things to check first\n\n- [X] I have searched the existing issues and didn't find my bug already reported there\n\n- [X] I have checked that my bug is still present in the latest release\n\n\n### Typeguard version\n\n4.4.1\n\n### Python version\n\n3.13.0\n\n### What happened?\n\nI think https://github.com/agronholm/typeguard/issues/498 is not fully fixed yet.\n\n### How can we reproduce the bug?\n\n`bug.py`\r\n```python\r\nfrom typeguard import install_import_hook\r\n\r\ninstall_import_hook()\r\n\r\nfrom code import Class, function_of_instance, function_of_type\r\n\r\n# This works:\r\nfunction_of_instance(Class())\r\n\r\n# This does not:\r\nfunction_of_type(Class)\r\n```\r\n\r\n`code.py`\r\n```python\r\nfrom typing import Protocol\r\n\r\nclass Proto(Protocol):\r\n foo: str\r\n\r\nclass Class(Proto):\r\n def __init__(self):\r\n self.foo = \"bar\"\r\n\r\ndef function_of_instance(instance: Proto): ...\r\n\r\ndef function_of_type(type_: type[Proto]): ...\r\n```","issue_title":"Class is not compatible with protocol because it has no attribute named ...","protected_globs":["tests/test_checkers.py"],"regression_command":["python","-m","pytest","-q","tests"],"repository":"agronholm/typeguard","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim","bootstrap_command":["uv","pip","install","--python","/opt/venv/bin/python","--only-binary",":all:","setuptools==80.9.0","setuptools-scm==9.2.0","wheel==0.45.1"],"environment":["HOME=/home/node","XDG_CACHE_HOME=/tmp/xdg-cache","UV_CACHE_DIR=/tmp/uv-cache","PYTHONPATH=/workspace/repo/src","PYTHONDONTWRITEBYTECODE=1","PYTHONHASHSEED=0","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","UV_OFFLINE=1","SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TYPEGUARD=0.0.0","LANG=C.UTF-8","LC_ALL=C.UTF-8","TZ=UTC","TERM=dumb","NO_COLOR=1","PYTHON_COLORS=0"],"schema_version":1,"sync_command":["/bin/sh","-ec","SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TYPEGUARD=0.0.0 uv sync --no-default-groups --group test --no-install-project"]},"setup_command":["/bin/sh","-ec","mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."],"source_archive":"sources/typeguard-499.tar","source_sha256":"15eec682771f0af79ba05bae6a97ad7a09c27f45b4e5623261b5e430377361a7","timeout_s":900,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","-p","no:randomly","tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async","tests/processors/test_processors.py::TestCallsiteParameterAdder::test_async_native_logger"],"hidden_test_patch":"hidden-tests/structlog-710.patch","hidden_test_sha256":"4888a5dc77f47dde9a751411c5c27880ce5948c5e9c8b3648b618286779c9daa","id":"structlog-710","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"This is based on @PrieJos's helpful analysis in https://github.com/hynek/structlog/issues/693#issuecomment-2629117069\n\nIn async log methods, callsite collection happens in the async logger thread which makes its thread-related information worthless:\n\n```python\n# /// script\n# dependencies = [\n# \"structlog\",\n# ]\n# ///\n\nimport asyncio\nimport logging\nimport sys\n\nimport structlog\n\nsl = structlog.get_logger()\nlogger = logging.getLogger()\n\nlogging.basicConfig(\n stream=sys.stdout,\n format=(\n \"%(process)d %(processName)s %(module)s\"\n \" %(funcName)s:%(lineno)d %(threadName)s %(taskName)s\"\n \" %(message)s\"\n ),\n datefmt=r\"%Y-%m-%dT%H:%M:%S\",\n level=logging.INFO,\n encoding=\"utf-8\",\n)\n\nstructlog.configure(\n processors=[\n structlog.processors.CallsiteParameterAdder(\n [\n structlog.processors.CallsiteParameter.PROCESS,\n structlog.processors.CallsiteParameter.PROCESS_NAME,\n structlog.processors.CallsiteParameter.MODULE,\n structlog.processors.CallsiteParameter.FILENAME,\n structlog.processors.CallsiteParameter.FUNC_NAME,\n structlog.processors.CallsiteParameter.LINENO,\n structlog.processors.CallsiteParameter.THREAD_NAME,\n ]\n ),\n structlog.processors.LogfmtRenderer(),\n ],\n)\n\n\nasync def afunc():\n await sl.ainfo(\"async\")\n logger.info(\"stdlib async\")\n\ndef func():\n sl.info(\"sync\")\n logger.info(\"stdlib sync\")\n\n\nasyncio.run(afunc())\nfunc()\n```\n\nNotably, thread name is wrong and so would be a task name as shown in #698:\n\n```\nevent=async process=55347 process_name=n/a module=t filename=t.py func_name=afunc lineno=47 thread_name=asyncio_0\n55347 MainProcess t afunc:48 MainThread Task-1 stdlib async\nevent=sync process=55347 process_name=n/a module=t filename=t.py func_name=func lineno=51 thread_name=MainThread\n55347 MainProcess t func:52 MainThread None stdlib sync\n```\n\nNot sure how to deal with this most elegantly \u2013 I feel like we'll have to pass thread/task objects into the event_dict or something?\n\nI _think_ the `process_name` is in fact correct, since `logging` just [sets it unconditionally](https://github.com/python/cpython/blob/72e5b25efb580fb1f0fdfade516be90d90822164/Lib/logging/__init__.py#L359-L371) and we get `n/a` in sync code too. Happy to be corrected, though.","issue_title":"Thread name CallsiteParameterAdder parameter doesn't work in async methods","protected_globs":["tests/processors/test_processors.py"],"regression_command":["python","-m","pytest","-q","-p","no:randomly","tests"],"repository":"hynek/structlog","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.12.1-python3.14-trixie-slim","bootstrap_command":["uv","pip","install","--python","/opt/venv/bin/python","--only-binary",":all:","hatchling==1.27.0","hatch-vcs==0.5.0","hatch-fancy-pypi-readme==25.1.0","setuptools-scm==9.2.0","editables==0.5"],"environment":["HOME=/home/node","XDG_CACHE_HOME=/tmp/xdg-cache","UV_CACHE_DIR=/tmp/uv-cache","PYTHONPATH=/workspace/repo/src","PYTHONDONTWRITEBYTECODE=1","PYTHONHASHSEED=0","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","UV_OFFLINE=1","SETUPTOOLS_SCM_PRETEND_VERSION_FOR_STRUCTLOG=0.0.0","LANG=C.UTF-8","LC_ALL=C.UTF-8","TZ=UTC","TERM=dumb","NO_COLOR=1","PYTHON_COLORS=0"],"schema_version":1,"sync_command":["/bin/sh","-ec","SETUPTOOLS_SCM_PRETEND_VERSION_FOR_STRUCTLOG=0.0.0 uv sync --no-default-groups --group tests --no-install-project"]},"setup_command":["/bin/sh","-ec","mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable ."],"source_archive":"sources/structlog-710.tar","source_sha256":"29cbfb33035b772d26d8ebae36cae0e0e30e606ee228056f2c910b9c55e396a1","timeout_s":900,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","-W","error","--cache-clear","--randomly-seed=0","-o","cache_dir=/tmp/pytest-cache","tests/snippets/jsx/test_apostrophe_text.txt"],"hidden_test_patch":"hidden-tests/pygments-2816.patch","hidden_test_sha256":"85529df235553cfc030b00769f8a10c2683d12d3eaea0713a48f4716b5be2cd9","id":"pygments-2816","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"When I attempt to highlight the following code snippet using `jsx` as the lexer in Sphinx and MyST, Sphinx returns a warning:\r\n\r\n`WARNING: Lexing literal_block (JSX code omitted) as \"jsx\" resulted in an error at token: \"'\". Retrying in relaxed mode.`\r\n\r\n````\r\n```jsx\r\nimport React from 'react';\r\n\r\nconst View = props => {\r\n return
I'm the Block view component!
;\r\n};\r\n\r\nexport default View;\r\n```\r\n````\r\n\r\n[Try it on the Pygments demo](https://pygments.org/demo/?lexer=jsx&style=bw&formatter=html&code=import+React+from+%27react%27%3B%0A%0Aconst+View+%3D+props+%3D%3E+%7B%0A++return+%3Cdiv%3EI%27m+the+Block+view+component%21%3C%2Fdiv%3E%3B%0A%7D%3B%0A%0Aexport+default+View%3B%0A).\r\n\r\nFWIW, if I try `js` as the lexer, it also does not lex.\r\n\r\nSee:\r\n- https://github.com/plone/volto/issues/3038\r\n- https://github.com/plone/training/issues/347\r\n- https://github.com/fcurella/jsx-lexer/issues/15","issue_title":"WARNING: Lexing literal_block ... as \"jsx\" resulted in an error at token: \"'\". Retrying in relaxed mode.","protected_globs":["tests/snippets/jsx/test_apostrophe_text.txt"],"regression_command":["python","-m","pytest","-q","-W","error","--cache-clear","--randomly-seed=0","-o","cache_dir=/tmp/pytest-cache","tests"],"repository":"pygments/pygments","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm","bootstrap_command":["/bin/sh","-ec","uv pip install --python /opt/venv/bin/python --only-binary=:all: 'hatchling==1.27.0' 'editables==0.5' && uv pip install --python /opt/venv/bin/python --no-deps --only-binary=:all: 'pytest==8.4.2' 'pytest-randomly==4.0.1' 'iniconfig==2.1.0' && uv pip install --python /opt/venv/bin/python --no-deps 'wcag-contrast-ratio==0.9' && uv pip freeze --python /opt/venv/bin/python > /opt/patcheval-requirements.txt"],"environment":["HOME=/home/node","XDG_CACHE_HOME=/tmp/xdg-cache","UV_CACHE_DIR=/tmp/uv-cache","UV_OFFLINE=1","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","PYTHONPATH=/workspace/repo","PYTHONDONTWRITEBYTECODE=1","PYTHONUNBUFFERED=1","PYTHONHASHSEED=0","PYTHON_COLORS=0","NO_COLOR=1","TERM=dumb","COLUMNS=80","LANG=C.UTF-8","LC_ALL=C.UTF-8","TZ=UTC"],"schema_version":1,"sync_command":["uv","venv","--python","/usr/local/bin/python","/opt/venv"]},"setup_command":["/bin/sh","-ec","mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable . && uv pip check --python /opt/venv/bin/python"],"source_archive":"sources/pygments-2816.tar","source_sha256":"ccba4fdd41fd6a2a9796292a27e62babe206910a84f1290391e824371b6e58c0","timeout_s":900,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","-W","error","--cache-clear","--randomly-seed=0","-o","cache_dir=/tmp/pytest-cache","tests/snippets/jsonnet/test_array_slice.txt"],"hidden_test_patch":"hidden-tests/pygments-2828.patch","hidden_test_sha256":"ac9e1f7355dff0ff69e30c1ea43bdb3b082a0f7b8fb0bf00b0b34ba3ac95f02d","id":"pygments-2828","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"The `::` in this snippet is highlighted as an error but it shouldn't be, it's array slice notation, just like in Python\r\n\r\n```jsonnet\r\n{\r\n local numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\r\n even_numbers: numbers[1::2],\r\n}\r\n```\r\n\r\nhttps://pygments.org/demo/?lexer=jsonnet&style=bw&formatter=html&code=local+obj2+%3D+%7B%0A++local+numbers+%3D+%5B1%2C+2%2C+3%2C+4%2C+5%2C+6%2C+7%2C+8%2C+9%2C+10%5D%2C%0A++even_numbers%3A+numbers%5B1%3A%3A2%5D%2C%0A%7D%3B%0A\r\n\r\nYou can try it on https://jsonnet.org/learning/tutorial.html","issue_title":"Jsonnet: array slice syntax","protected_globs":["tests/snippets/jsonnet/test_array_slice.txt"],"regression_command":["python","-m","pytest","-q","-W","error","--cache-clear","--randomly-seed=0","-o","cache_dir=/tmp/pytest-cache","tests"],"repository":"pygments/pygments","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm","bootstrap_command":["/bin/sh","-ec","uv pip install --python /opt/venv/bin/python --only-binary=:all: 'hatchling==1.27.0' 'editables==0.5' && uv pip install --python /opt/venv/bin/python --no-deps --only-binary=:all: 'pytest==8.4.2' 'pytest-randomly==4.0.1' 'iniconfig==2.1.0' && uv pip install --python /opt/venv/bin/python --no-deps 'wcag-contrast-ratio==0.9' && uv pip freeze --python /opt/venv/bin/python > /opt/patcheval-requirements.txt"],"environment":["HOME=/home/node","XDG_CACHE_HOME=/tmp/xdg-cache","UV_CACHE_DIR=/tmp/uv-cache","UV_OFFLINE=1","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","PYTHONPATH=/workspace/repo","PYTHONDONTWRITEBYTECODE=1","PYTHONUNBUFFERED=1","PYTHONHASHSEED=0","PYTHON_COLORS=0","NO_COLOR=1","TERM=dumb","COLUMNS=80","LANG=C.UTF-8","LC_ALL=C.UTF-8","TZ=UTC"],"schema_version":1,"sync_command":["uv","venv","--python","/usr/local/bin/python","/opt/venv"]},"setup_command":["/bin/sh","-ec","mkdir -p \"$HOME\" \"$XDG_CACHE_HOME\" \"$UV_CACHE_DIR\" && uv pip install --offline --python /opt/venv/bin/python --no-deps --no-build-isolation --editable . && uv pip check --python /opt/venv/bin/python"],"source_archive":"sources/pygments-2828.tar","source_sha256":"c9f794937fa960ed50c1c943691c030b6943a28f075e06a3e8ce70adf0ab6a20","timeout_s":900,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","-o","cache_dir=/tmp/pytest-cache","tests/test_toml_document.py::test_add_key_after_dotted_inline_table_without_ending_newline"],"hidden_test_patch":"hidden-tests/tomlkit-440.patch","hidden_test_sha256":"4f54de74b1893428d216906daa3c5d5e667b21a74d913da32cb374d6c06a9f96","id":"tomlkit-440","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"Hello,\nSorry to be opening another issue so early after the last one, but I found something else:\n\n```python\nv = tomlkit.loads(\"\"\"[x]\\na.b = {}\"\"\")\nv[\"x\"][\"c\"] = 3\nprint(tomlkit.dumps(v))\n```\n\noutput:\n```toml\n[x]\na.b = {}c = 3\n```\n\nAs you can see, there should be a new line before `c = 3`\n\nNote that this doesn't happens with either:\n- `\"\"\"[x]\\na.b = {}\\n\"\"\"`\n- `\"\"\"[x]\\na = {}\"\"\"`","issue_title":"Missing newline after inline table","protected_globs":["tests/test_toml_document.py"],"regression_command":["python","-m","pytest","-q","-o","cache_dir=/tmp/pytest-cache","tests","--ignore=tests/test_toml_tests.py"],"repository":"python-poetry/tomlkit","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim","environment":["HOME=/home/node","XDG_CACHE_HOME=/tmp/xdg-cache","UV_CACHE_DIR=/tmp/uv-cache","PYTHONPATH=/workspace/repo","PYTHONDONTWRITEBYTECODE=1","PYTHONUNBUFFERED=1","PYTHONHASHSEED=0","PYTEST_DISABLE_PLUGIN_AUTOLOAD=1","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","UV_OFFLINE=1","TZ=UTC","LANG=C.UTF-8","LC_ALL=C.UTF-8","TERM=dumb","NO_COLOR=1","PYTHON_COLORS=0"],"schema_version":1,"sync_command":["/bin/sh","-ec","python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary=:all: pytest==7.4.4 iniconfig==2.0.0 packaging==24.0 pluggy==1.2.0"]},"source_archive":"sources/tomlkit-440.tar","source_sha256":"a0b40aef624c1113496e08365bc15e70796c2280b3a71df568ec74123d72fab7","timeout_s":300,"validated":true} +{"fail_to_pass_command":["python","-m","pytest","-q","-o","cache_dir=/tmp/pytest-cache","tests/test_toml_document.py::test_replace_dotted_key_with_aot_keeps_following_sibling"],"hidden_test_patch":"hidden-tests/tomlkit-542.patch","hidden_test_sha256":"483263ef19d363a1236c066b76997f78f1357daa721c28b0da098c1c79d0a054","id":"tomlkit-542","ignored_globs":[".coverage",".coverage.*",".hypothesis/**",".mypy_cache/**",".pytest_cache/**",".ruff_cache/**",".venv/**","**/.hypothesis/**","**/.mypy_cache/**","**/.pytest_cache/**","**/.ruff_cache/**","**/__pycache__/**","**/*.egg-info/**","**/*.py[cod]","__pycache__/**","*.egg-info/**","*.py[cod]","htmlcov/**"],"issue_body":"```python\n#!/usr/bin/env python3\n\nimport tomlkit\n\n\ndoc = tomlkit.parse(\"a.b = 1\\nc.d = 2\\n\")\naot = tomlkit.aot()\nt = tomlkit.table()\nt[\"x\"] = 9\naot.append(t)\ndoc[\"a\"] = aot\nprint(tomlkit.dumps(doc))\n```\nresult\n```\n[[a]]\nx = 9\nc.d = 2\n```\nin which `c.d` has wrongly been captured by the array of tables.\n\nSimilar in flavour to other recent bug reports and fixes, I expect the fix will be nearby too.","issue_title":"AoT captures too many keys","protected_globs":["tests/test_toml_document.py"],"regression_command":["python","-m","pytest","-q","-o","cache_dir=/tmp/pytest-cache","tests","--ignore=tests/test_toml_tests.py"],"repository":"python-poetry/tomlkit","runtime_recipe":{"base_image":"ghcr.io/astral-sh/uv:0.8.14-python3.12-bookworm-slim","environment":["HOME=/home/node","XDG_CACHE_HOME=/tmp/xdg-cache","UV_CACHE_DIR=/tmp/uv-cache","PYTHONPATH=/workspace/repo","PYTHONDONTWRITEBYTECODE=1","PYTHONUNBUFFERED=1","PYTHONHASHSEED=0","PYTEST_DISABLE_PLUGIN_AUTOLOAD=1","PIP_NO_INDEX=1","PIP_DISABLE_PIP_VERSION_CHECK=1","UV_OFFLINE=1","TZ=UTC","LANG=C.UTF-8","LC_ALL=C.UTF-8","TERM=dumb","NO_COLOR=1","PYTHON_COLORS=0"],"schema_version":1,"sync_command":["/bin/sh","-ec","python -m venv /opt/venv && uv pip install --python /opt/venv/bin/python --no-deps --only-binary=:all: pytest==7.4.4 iniconfig==2.0.0 packaging==24.0 pluggy==1.2.0"]},"source_archive":"sources/tomlkit-542.tar","source_sha256":"803d7046ba0b462206c5059327664b75228fd7d00e78f598a62e76e09260b329","timeout_s":300,"validated":true}