Coding comparison · Supporting records
Inspecting two patch explanations
These selected excerpts let you inspect why the article describes Cookiecutter as a missed fix and python-semver as broken existing behavior. They connect the saved code changes, required assertions and original test outcomes.
What this establishes: the published code and assertions support a narrow explanation of these failures. They are author-extracted records; public readers cannot authenticate their extraction from the private archive. No models, patches or repository tests were run for this supplement.
Download excerpts, source hashes and license notices (JSON) · Recalculate the original failure categories
Diff lines beginning with + were added; − marks removed lines. Each block is a separate excerpt, with omissions between blocks. Code blocks scroll horizontally on narrow screens. “Existing” is the preservation-only final stage; “Combined” tests the requested fix and required existing behavior. A primary attempt passes only if both stages pass.
python-semver: the fix also clears a required suffix
Task python-semver__python-semver-254 · required tests T024 and T025
The requested fix requires next_version to return a VersionInfo object. The existing prerelease cases also require particular version strings. These two parameter rows, in order, map to T024 and T025:
Existing inputs and expected versions
("0.1.4", "prerelease", "0.1.5-rc.1"),
("0.1.5-rc.1", "prerelease", "0.1.5-rc.2"),
The original existing-behavior assertion
def test_next_version_with_versioninfo(version, part, expected):
ver = VersionInfo.parse(version)
assert str(ver.next_version(part)) == expected
The combined-stage test retains the version-string requirement and adds an object-type check. These two prerelease identities remain in the original preservation group; they do not become new requested-fix failures.
The combined-stage assertion
def test_next_version_with_versioninfo(version, part, expected):
ver = VersionInfo.parse(version)
next_version = ver.next_version(part)
assert isinstance(next_version, VersionInfo)
assert str(next_version) == expected
GPT-6 removes the string conversion for the major/minor/patch branch:
GPT-6: change the return type
Retained patch lines 36–38; full-file SHA-256 in the download.
if part in ("major", "minor", "patch"):
- return str(getattr(version, "bump_" + part)())
+ return getattr(version, "bump_" + part)()
GPT-6.1 makes that return-type change too, but also adds .replace(prerelease=None, build=None) to the prerelease return. The excerpt exposes the additional behavior: clearing the prerelease field after incrementing it.
GPT-6.1: additionally clear prerelease metadata
Retained patch lines 84–89; full-file SHA-256 in the download.
if not version.prerelease:
version = version.bump_patch()
- return version.bump_prerelease(prerelease_token)
+ return version.bump_prerelease(prerelease_token).replace(
+ prerelease=None, build=None
+ )
T024 — saved combined-stage assertion:
E AssertionError: assert '0.1.5' == '0.1.5-rc.1'T025 — saved combined-stage assertion:
E AssertionError: assert '0.1.5' == '0.1.5-rc.2'| Test | Stage | GPT-6 | GPT-6.1 |
|---|---|---|---|
| T024 | Existing | Pass | Fail |
| T024 | Combined | Pass | Fail |
| T025 | Existing | Pass | Fail |
| T025 | Combined | Pass | Fail |
Both saved assertions show 0.1.5 where an rc suffix was required. GPT-6.1 passed all seven required requested-fix identities but failed these two existing-behavior identities in both final stages. This supports the specific suffix explanation; it does not establish all effects of the patch, why the model chose it, or the severity for other uses.
How to check the connection
- Compare the short branches and assertions above. The upstream links open exact public revisions, so you can inspect the surrounding test and fixture code.
- Download the excerpt records and the unchanged test-level records. Match the task ID and T002, T024 or T025. The outcome columns are identical, including both models and stages.
- Use the existing offline checker to reproduce the original grades and categories. It reads recorded outcomes; it does not execute these snippets or prove their meaning.
The download retains exact patch line ranges, public test revisions and file hashes, the three selected test identities, and assertion locations within the saved JUnit failure text. Patch hashes match the previously published review; JUnit hashes match the existing test-level records. Archive holders can compare the originals. Hashes identify files, but do not prove the private extraction to readers without those files.
Before publication, the selected retained bytes were matched to archive-member pins, and complete upstream test versions were matched to both blob identities and all changed/context lines in the retained test patch. Only the displayed code, public test names and parameters, and single-line assertions were released. Prompts, private paths, credentials, tool transcripts, unrelated fixture fields and full test logs remain excluded. The excerpts are not standalone test programs.
The original results, grades, uncertainty intervals, charts and signed evidence remain unchanged. This supplement is not an independent audit or a new experiment.
Attribution and license notices
Upstream projects do not endorse this comparison. The notices below accompany all source and test excerpts, including adapted model patches.
cookiecutter/cookiecutter
Source and test excerpts are reproduced or adapted from this project.
License at base af9478f45dc6c64475027e8010e024be40a07b41 and test revision e3f626049c224c5c6c69337fe4cd786e7546ad36:
https://github.com/cookiecutter/cookiecutter/blob/af9478f45dc6c64475027e8010e024be40a07b41/LICENSE
Copyright (c) 2013-2015, Audrey Roy
All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of border nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
python-semver/python-semver
Source and test excerpts are reproduced or adapted from this project.
License at base cf18005a6ca1fa2c4d45f2011d05d4f733d81182 and test revision bb4464dd77bd92d2c5f6766483072ce01697306c:
https://github.com/python-semver/python-semver/blob/cf18005a6ca1fa2c4d45f2011d05d4f733d81182/LICENSE.txt
Copyright (c) 2013, Konstantine Rybnikov
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
Neither the name of the {organization} nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Excerpt download SHA-256: fb15a4d12135eab2a2f0442b272b1261c90cfc68a3d2be1bf1683a52d70695e5