Repair compressed interpreter-tag validation and wheel filename error propagation in a frozen packaging source tree…
harbor run -t mimo-v2.6-rl/candidate-0993-software-systemsharbor download mimo-v2.6-rl/candidate-0993-software-systemsYou are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
You are working in a frozen checkout of the Python packaging library under
/app/vendor/packaging. A compatibility regression is present at the boundary
between compressed wheel-tag parsing and wheel filename parsing.
Repair the existing production code, rather than adding a parallel evaluator.
The public APIs involved are packaging.tags.parse_tag and
packaging.utils.parse_wheel_filename.
Requirements:
2.7.6 as one malformed interpreter member; do not
expand it into 2, 7, and 6.py3.py2-none-any, and preserve
custom identifier forms such as graalpy311 and _custom.InvalidTag API. Wheel filename
parsing must translate malformed tag validation into its existing
InvalidWheelFilename API without changing valid filename normalization,
versions, build tags, or tag sets.src/packaging/tags.py and
src/packaging/utils.py./app/output.json using the repaired public APIs.The output must be JSON with this exact top-level contract:
{
"output_schema_version": "packaging-tag-audit.v1",
"cases": [
{
"name": "valid-compressed",
"direct": {"status": "ok", "tag_count": 2, "interpreters": ["py2", "py3"]},
"wheel": {"status": "ok", "name": "demo", "version": "1.0", "build": [], "tag_count": 2, "interpreters": ["py2", "py3"]}
},
{
"name": "custom-identifiers",
"direct": {"status": "ok", "tag_count": 2, "interpreters": ["_custom", "graalpy311"]},
"wheel": {"status": "ok", "name": "demo", "version": "1.0", "build": [], "tag_count": 2, "interpreters": ["_custom", "graalpy311"]}
},
{
"name": "malformed-interpreter",
"direct": {"status": "invalid-tag", "tag_count": 0, "interpreters": []},
"wheel": {"status": "invalid-wheel", "tag_count": 0, "interpreters": []}
}
]
}
For the malformed wheel case, use a filename whose tag is
2.7.6-none-any; do not hard-code an answer without exercising both public
entry points. JSON arrays must be deterministically sorted as shown.