Skip to content

fix(publish): stop clobbering curated name/subtitle/cover on republish - #103

Merged
LukasHirt merged 1 commit into
mainfrom
feat/reuse-name-subtitle-cover
Aug 29, 2026
Merged

LukasHirt merged 1 commit into
mainfrom
feat/reuse-name-subtitle-cover

Conversation

@LukasHirt

Copy link
Copy Markdown
Owner

Summary

extctl publish always overwrote name/subtitle with its own generated guesses and never generated a cover at all — on every republish of an already-published extension, not just the first. Same root cause as owncloud/marketplace#240 (reported for minOCIS), just for three more fields.

This is what actually broke the last batch of marketplace PRs (unzip/progress-bars/json-viewer/external-sites/draw-io) before they got manually patched — "Draw.io" → "Draw Io", curated subtitles replaced with raw package.json descriptions, cover art missing entirely.

  • BuildExtensionYAML now takes prev (already threaded through for tags/minOCIS) and reuses prev.Name/prev.Subtitle verbatim when set, only falling back to the generated guess for an extension's first-ever submission.
  • New previousCoverBytes reads the previous release's actual cover.png via git show + git lfs smudge (not the checkout's ambient working-tree state), and BuildSubmission writes it into the new release dir when present.
  • cover is only ever set true from whether those bytes were actually fetched — never from prev.Cover directly — so a fetch failure can't leave a dangling cover: true with no file behind it.
  • license is deliberately still never reused from a prior release (it's a legal claim that can genuinely change — see the AGPL→Apache correction already in this repo's history).
  • BuildSubmission now runs git lfs install --local before staging anything — without it, bundle.zip/cover.png/screenshots were committed as raw blobs despite .gitattributes marking them filter=lfs (half of owncloud/marketplace#238; the CI-gate half is intentionally out of scope for this PR).
  • printReviewNotes now reports name/subtitle/cover provenance alongside the existing tags/minOCIS notes.

Test plan

  • go build ./..., go vet ./..., gofmt -l clean
  • go test ./... — full suite passes, including new tests: TestBuildExtensionYAML_ReusesPrevNameAndSubtitle, TestBuildExtensionYAML_CoverNeverTrueWithoutBytes, and TestPreviousCoverBytes_SmudgesRealLFSContent (a real git-lfs round trip, confirmed via an explicit setup assertion that it actually produces an LFS pointer before testing the smudge)

extctl publish always overwrote name/subtitle with its own generated
guesses (humanized app-id slug, upstream package.json description) and
never generated a cover at all — on EVERY republish of an
already-published extension, not just the first one. That's the exact
same root cause owncloud/marketplace#240 reported for minOCIS, just for
three more fields: a value only ever gets curated once by a human, then
silently regresses back to the generator's guess the next time that
extension's dependencies get bumped and republished.

Confirmed the hard way: this is what actually broke unzip/progress-bars/
json-viewer/external-sites/draw-io's last batch of marketplace PRs
("Draw.io" -> "Draw Io", "JSON Viewer" -> "Json Viewer", curated
subtitles replaced with raw package.json descriptions, cover art missing
entirely) before they got manually patched.

BuildExtensionYAML now takes prev (PreviousRelease's result, already
threaded through for tags/minOCIS) and reuses prev.Name/prev.Subtitle
verbatim when set, falling through to the generated guess only for an
extension's first-ever submission. A new previousCoverBytes reads the
previous release's actual cover.png content via `git show` + `git lfs
smudge` (not trusting the checkout's ambient working-tree filter state),
and BuildSubmission writes it into the new release directory when
present. cover is deliberately only ever set true from whether those
bytes were actually fetched, never from prev.Cover directly, so a fetch
failure can't leave a dangling `cover: true` with no file behind it —
license is still never reused from a prior release, since it's a legal
claim that can genuinely change.

Also runs `git lfs install --local` in BuildSubmission before staging
anything — cfg.MarketplaceRepo.Checkout never ran that itself, so
bundle.zip/cover.png/screenshots were being committed as raw blobs
despite .gitattributes marking them filter=lfs (half of
owncloud/marketplace#238; the CI-gate half stays out of scope).

printReviewNotes now also reports name/subtitle/cover provenance
alongside the existing tags/minOCIS notes, so a human reviewing a staged
submission can see at a glance what got reused vs. guessed.

Signed-off-by: Lukas Hirt <info@hirt.cz>
@LukasHirt LukasHirt self-assigned this Aug 29, 2026
@LukasHirt
LukasHirt merged commit 6de53c6 into main Aug 29, 2026
3 checks passed
@LukasHirt
LukasHirt deleted the feat/reuse-name-subtitle-cover branch August 29, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant