[ticket-058] fix(publish): make Twine retries idempotent - #96
Conversation
Co-authored-by: Koru Agent <agent@coru.dev>
There was a problem hiding this comment.
Deterministic Validator approval for exact head 21af56d709b0802b8bdac4bb66ce8a2e4e6f3d51.
Ticket: ticket-058
Correlation ID: goal-pr-96-21af56d709b0
Model: openrouter/z-ai/glm-5.2
Reviewed diff chunks: 3
Advisory LLM verdict: REQUEST_CHANGES
Advisory summary: Reviewed all 3 diff chunk(s). This chunk implements ticket-058, adding --skip-existing to Twine upload commands for idempotent PyPI retries and refactoring PY013 doctor diagnostics to validate and auto-fix the canonical idempotent command. The runtime injection in publish.py is careful: it uses shlex.split for detection and a regex splice for insertion to avoid double-insertion. The PY013 pattern extraction is migrated from a fragile single regex to a structurally-aware line parser that scopes searches to the python: strategy block, preventing false matches against sibling Node/Rust strategies. Tests and governance checks all pass. | This chunk adds ticket-058 governance/evidence artifacts (intent.json, changelog, preprompt, AI logs) and the beginning of new doctor tests for PY013. The test results show all checks passing. However, the visible diff is an incomplete set of changes: the test file adds a call to _diagnose_python with auto-fix behavior assertions, but no source change to goal/doctor/python_diag_extended.py is visible in this chunk to implement PY013 detection/migration. Additionally, the two new tests reference a third test helper pattern but only two tests are fully shown (the chunk ends mid-hunk before any third test). The tests cannot be fully validated without the corresponding implementation diff. Since tests are reported as passing, this is not a failure, but the missing implementation creates an incomplete review picture for this chunk. | Test additions for PY013 repair and publish command resolution look coherent and well-targeted. The chunk shows new/updated tests covering wrong package repair, safe custom twine option preservation, non-python publisher preservation, skip-existing insertion/dedup, and non-twine publisher pass-through. All referenced test results pass.
Advisory findings: No implementation change for PY013 doctor logic is visible in this chunk, yet new tests assert auto-fix behavior (PY013 adds --skip-existing during auto_fix=True and reports fixed=True). The corresponding source modification to goal/doctor/python_diag_extended.py must be present in the reviewed diff set; if it only exists in another chunk, this chunk alone is incomplete for approval.; The test diff ends mid-hunk after test_py013_adds_skip_existing_during_auto_fix — no closing hunk marker or remaining tests are visible, making it impossible to confirm the complete test additions in this chunk.; No security issues identified in the visible chunk. No secrets, no env access, no workflow modifications, no destructive commands in code.
The LLM output above is advisory and was not used as the approval trust root.
Merge was not requested or performed.
Decision record (recomputable)
DECISION D-058-2720
TICKET ticket-058
HEAD_SHA 21af56d709b0802b8bdac4bb66ce8a2e4e6f3d51
CORRELATION_ID goal-pr-96-21af56d709b0
ACTOR agent:ifuri-validator-agent[bot]
APPLIED_RULE P-CORE-015
INPUT author_login = "tom-sapletta-com"
INPUT observed_checks = ["governance / remote lifecycle=PASS","test (3.12)=PASS","test (3.13)=PASS"]
INPUT required_checks = ["test (3.12)","test (3.13)"]
INPUT required_checks_source = "env/request"
INPUT reviewer_login = "ifuri-validator-agent[bot]"
VERDICT APPROVE AUTHORITY DETERMINISTIC
REJECTED REQUEST_CHANGES BECAUSE NO_UNSAFE_CHANGE_REASON_FOUND
ADVISORY llm_verdict = "REQUEST_CHANGES" MODEL "openrouter/z-ai/glm-5.2"
ASSERT VERDICT_AUTHORITY != "ADVISORY"
Created by governed goal -a pull-request delivery.