fix(release): copy before signing in publish mode too ai:gpt-5.6-sol #85
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
nagonag
nagonag/ignore
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
heiko/gogogo!85
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/publish-outdir-signed-dsc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Third and last defect from the same cert-proxy release attempt (after #83 and #84). With #84's fix the run got through packaging and uploaded every Forgejo asset, then died on the final step:
Cause
finishStagealready copies packaged artifacts into the output directory before staging them for upload, exactly so that debsign's in-place rewrite of the.dscis the last write to that file. The existing comment spells the hazard out in full — and then the guard excluded the publish stage:deferring to
publishLocal, which runs afterstageAndSignDupload. So with--outand a single dupload destination, where staging directory and output directory are the sameout/<version>/deb:.dscin place (765 → 1677 bytes) and records that size and checksum in the.changes, which it then signs;publishLocalcopies the assets from the temp directory, overwriting the signed.dscwith the unsigned original;.changesagainst the files on disk and refuses.The failure lands at the very end, with everything built and the release assets already uploaded — the most expensive possible moment.
Only a single-invocation
publish --outis affected.pack --outfollowed bypublish --outcopies during the pack stage, and apublishwithout--outnever has staging and output collide, which is why this went unnoticed.Fix
The condition now covers every target.
publishLocalstill runs and is simply a no-op, sincecopyAssetsToOutdirskips assets whose destination already equals their current path.Tests
TestFinishStage_KeepsDebsignSignatureInOutdirguarded this forStagePackonly — the branch that was excluded was never exercised, which is exactly how the regression survived. The newTestFinishStage_KeepsDebsignSignatureInOutdirOnPublishdrivesfinishStage(StagePublish)with a fake debsign that really rewrites the.dsc, and asserts the file dupload would validate still carries the signature, and that staged and published.dscare identical.It uses
DryRunrather thanSkipUploadas the stopping point:SkipUploadreturns fromstageAndSignDuploadbefore anything is staged, so it cannot reach the ordering under test. No archive, no network.Verified to fail without the production change (
Should be trueon the signature prefix) and pass with it.Verification
go build ./...,go test ./...,go vet ./...pass;golangci-lint run --new-from-rev origin/masterreports 0 issues. Cut frommaster, independent of #83 and #84.(authored by ai:gpt-5.6-sol)