Skip to content

feat(publish-to-r2): opt-in identity-level skip for published sysexts - #86

Merged
bketelsen merged 3 commits into
mainfrom
lucilla/skip-published-identities
Nov 3, 2026
Merged

bketelsen merged 3 commits into
mainfrom
lucilla/skip-published-identities

Conversation

@frostyard-machines

Copy link
Copy Markdown

What

An opt-in, identity-level skip for sysexts that are already published (night shift 2026-11-02, line 16; design: Lucilla's muster proposal, T714).

  • CLI: repogen generate --skip-published-identities (sysext only, requires --incremental). An incoming sysext whose identity name:version:OSVersion:arch is already listed in the signature-verified SHA256SUMS is skipped, whatever its bytes or compression suffix. The read is the generator's strict read (readCurrentPackages(config, true)): strict parse, SHA256SUMS.gpg verification, transfer and index checks. Any error fails the run. No lenient fallback.
  • --skipped-report FILE: the published payload path (ext/NAME/FILE) of each skip, sorted. Written only on success.
  • Clean no-op: when every identity is skipped, repogen writes no output and no HTML index, and exits 0.
  • Fail closed in the new mode: a non-sysext input, or a sysext that does not parse, fails the run (default mode only warns).
  • Action publish-to-r2: input skip-published-identities (default false), output published. A new step runs scripts/check-published-payloads.sh before any upload: 1 ListObjectsV2 call; it fails if a skipped identity's payload object is missing (a rebuild can never repair it; see ADR-0017, run 41384581449). Upload and purge run only when published == 'true'. An empty packages-dir stays an error.
  • Default behavior does not change: without the flag, a changed-bytes rebuild still fails.

Known gap (documented in ADR-0018, README, action input)

A content change without a version or SYSEXT_REVISION bump keeps its identity, so it is skipped and not republished. The old bytes stay live. Same gap as snosi's drop-published.sh today.

After merge

  1. Brian tags v0.7.2 (feature on v0.x, no breaking change).
  2. Then a separate snosi PR (owner: Murbella) pins the action to v0.7.2, sets skip-published-identities: true, removes the prefilter gate, and deletes shared/sysext/publish/drop-published.sh. Not part of this PR.

Checks

  • make build, make fmt, make lint (0 issues), go test -short -race ./...: pass locally.
  • New tests: 8 CLI cases (internal/cli/generate_test.go), SplitPublishedIdentities table tests, script tests with a fake aws and action contract tests (internal/releaseasset/published_payloads_test.go).
  • Coder model: deepseek/deepseek-flash (subagent); review and fixes by Lucilla.

Add `repogen generate --skip-published-identities` (sysext only, needs
--incremental) and the publish-to-r2 input `skip-published-identities`.
A rebuilt sysext whose identity name:version:OSVersion:arch is already
listed in the signature-verified SHA256SUMS is skipped, whatever its
bytes or compression suffix. Any read or signature error fails the run.

--skipped-report writes the published payload path of each skip; the
action checks with one bucket listing that each such payload object
exists before any upload. When nothing is left to publish, repogen
writes no output and the action uploads and purges nothing
(published=false). An empty packages-dir stays an error. The default
stays fail-closed.

Known gap: a content change without a version or revision bump keeps
its identity and is not republished. ADR-0018.

Replaces snosi shared/sysext/publish/drop-published.sh after a release.
@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.33884% with 25 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/cli/generate.go 84.15% 10 Missing and 6 partials ⚠️
internal/generator/sysext/generator.go 0.00% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

- require --gpg-key (and gpg-private-key in the action): published
  identities come only from signature-verified manifests
- check each skipped payload with an exact head-object request, not a
  listing compared with '+' read as a space
- refuse a ./repo that already holds payloads in the new mode
- fail when the scanner drops a sysext candidate in the new mode
The scanner follows symlinks, so a dangling one or one to a file that
fails detection was dropped and not caught by the candidate check.
@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 3, 2026
@bketelsen
bketelsen merged commit b5dccc7 into main Nov 3, 2026
3 checks passed
@frostyard-machines
frostyard-machines deleted the lucilla/skip-published-identities branch November 3, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants