You 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.
Task: repair wheel interpreter-tag validation
The frozen library in /app/vendor/packaging accepts malformed wheel interpreter-tag
members and expands them into Tag objects. Repair the existing parser pipeline.
Required behavior
In src/packaging/tags.py, every member of the interpreter field in a direct
parse_tag() call must be a non-empty valid Python identifier. Invalid members must
raise packaging.tags.InvalidTag with an informative message that identifies the
interpreter problem and the offending member.
In src/packaging/utils.py, parse_wheel_filename() must translate that failure to
packaging.utils.InvalidWheelFilename. Its message must preserve useful interpreter
validation context and identify the rejected wheel filename. Do not expose a chained
internal parser exception for this validation failure.
Preserve valid behavior: compressed interpreter identifiers still expand as a set;
ABI and platform members retain their distinct syntax; version/name normalization,
build-tag parsing, order validation, empty-component validation, and tag-count limits
must continue to work.
Make substantive repairs in both existing production modules above. Do not replace
the package, edit its tests to hide failures, disable validation, or special-case one
filename.
Required artifact
After repairing and checking the source, write /app/repair_report.json with this public
contract:
You may include additional fields, but the declared fields and values must be present.
The verifier independently imports and exercises the repaired source; a fabricated
report does not pass.