You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avoid unnecessary uploads for unchanged release assets without API digests #7
sameAsset deliberately refuses to infer equality from file size. When either API digest is absent, an unchanged asset is uploaded again on every run.
Acceptance criteria
Use a trustworthy content comparison, such as streaming SHA-256 of both assets, without loading complete binaries into memory.
Keep the fast path when both API digests are present.
Never treat equal sizes, names or timestamps as proof of equal content.
Bound network operations and preserve read-only dry-run behavior.
Cover same-size/different-content, missing digest on either side, read failure and interrupted verification.
Document the extra download cost and ensure repeated runs preserve asset IDs when bytes match.
Deferred from #3; no persistent cache or state branch is required by this issue.
Additional scope for v0.1.0
Validate the upload response: size must match the local file, SHA-256 is compared when the API returns one, malformed responses fail, and non-2xx bodies are included up to 4 KiB.
Report a dry-run Latest by tag instead of a synthetic /releases/0 URL.
Ignore local build outputs /gh-replicate and /gh-replicate.exe.
The SHA-256 computed for the source is reused for the upload check, so this adds no extra download.
Compute the source SHA-256 after download and validate it against the declared digest.
Keep the fast path when both API digests exist. Otherwise replace only when sizes differ, or when an equal-sized destination download hashes differently. Any download or verification error aborts before DELETE.
Decode the upload response and reject size/digest mismatches; include a bounded error body.
Add unit tests for equal content without digests, same-size different content, truncated destination, upload metadata failures, and dry-run output.
Update the README limits and add the build output ignore rules.
Validation: go test ./..., go vet ./..., go build ./..., gofmt -l ., plus CI on the PR.
Activity
vmvarela commentedon Oct 24, 2026
Implementation plan for v0.1.0:
DELETE.Validation:
go test ./...,go vet ./...,go build ./...,gofmt -l ., plus CI on the PR.vmvarela commentedon Oct 24, 2026
Implemented in #9 at 582dbaa. All nine CI checks pass. Merge and publication remain gated on explicit approval.
fix: verify release assets before replacement (#9)