mirror of
https://github.com/floci-io/floci.git
synced 2026-11-30 08:55:17 -05:00
Two follow-ups hectorvent flagged on #4619, approved but marked as separate-PR material: Compares an existing asset's persisted SHA-256 instead of reading its bytes. The hash is normal metadata (not @JsonIgnore like the content field), so this needs no disk read, no in-memory-store lookup, and no special case for a backing file that happens to be missing - a stored hash never "goes missing" the way a file can, and a genuinely different republish still conflicts even when the file is gone, closing a gap the previous byte-comparison approach had. Extends the idempotent-retry allowance to an already-Published version. AWS's "Overwriting package assets" rule isn't scoped to Unfinished, and the terminal publish call (the one that actually finishes a version) is the likeliest one a client retries after a dropped response. A brand-new asset name against a Published version still always conflicts; only a byte-identical replay of an asset that's already there is idempotent.