Skip to content

publish-to-r2: refuse the stable suite and drop the implicit stable default - #66

Merged
bketelsen merged 1 commit into
mainfrom
owners/w-request-r-20261002-a43afc
Oct 2, 2026
Merged

bketelsen merged 1 commit into
mainfrom
owners/w-request-r-20261002-a43afc

Conversation

@bketelsen

Copy link
Copy Markdown

repogen's publish-to-r2 Action fails closed, before credentials or any R2 access, when codename or suite resolves to 'stable', and no longer defaults codename to 'stable'.

Reviewed by github-copilot/gpt-6-sol.

Review

approve after 1 round: The previous validation-order and path-name findings remain resolved. The previous symlink blocker is now resolved: validation checks symlink entries and reads their targets, and the targeted tests pass. The action has no stable codename default, rejects stable targets before installation or R2 access, and requires an explicit codename for deb while allowing sysext callers to omit it. The supplied change description names bootc-debian and updex as unaffected, but the PR description itself was unavailable, so that acceptance criterion cannot be independently verified.

Approved plan

Context

At c978986, .github/actions/publish-to-r2/action.yml defaults codename: 'stable' (lines 65-68) and passes it to repogen generate (481-487). Package type deb is already rejected in "Validate inputs" (165-170), the first step, which runs before installing repogen, configuring credentials or syncing R2.

Assumptions (please correct)

  1. Refuse stable for codename and suite, case-insensitive and whitespace-trimmed, for every package type. A sysext/rpm caller never needs that value.
  2. Remove the default (default: ''). An omitted codename fails with a clear message only for package-type: deb (checked before the existing deb refusal, so the caller sees why). Snosi's sysext callers omit codename, and the deb generator does not use it for them, so making it required for every type would break them for no benefit. If Odrade wants it required for all types, it is a one-line change.
  3. repogen generate --codename keeps its CLI default of stable (internal/cli/generate.go:66). The CLI writes locally, and the production writer already refuses mutable names (production.go:193). Changing the CLI is out of scope; I will mention it in the PR as a possible follow-up.
  4. No consumer changes. updex release.yml (pinned 6648671) and bootc-debian build.yml (pinned 5a799b4, manual-only since PR test: Fix IncrementalSkipDuplicates using wrong repodata path #6) use older pinned commits, so they are unaffected until they move to trixie.

Tasks

  1. Test first. Add scripts/validate-publish-target.sh cases to a new Go test, internal/releaseasset/publish_target_test.go, that runs the script with env PACKAGE_TYPE, CODENAME, SUITE. Table: sysext with empty codename → ok; sysext codename stable/Stable/stable → fail; suite stable → fail; deb with empty codename → fail, message contains "codename is required"; trixie → ok. Also assert that action.yml has no default: 'stable', calls the script in the "Validate inputs" step through env: (no direct ${{ inputs.codename }} interpolation in that shell), and that the step comes before "Install repogen". Watch it fail.
  2. Script. scripts/validate-publish-target.sh (POSIX sh, set -eu): normalize; exit 1 with ::error:: messages naming ADR-0048/ADR-0054 (signed stable frozen; publish to an immutable codename such as trixie).
  3. Action. codename default: '', descriptions updated; call the script from "Validate inputs" with env: PACKAGE_TYPE/CODENAME/SUITE, before the deb refusal.
  4. Docs. README publish-to-r2 input table/examples (around lines 1047-1183), docs/design/ci-cd.md action section, and the closing paragraph of docs/specs/generators.md.

Verification

make build, make fmt, make lint, make test-unit, shellcheck scripts/validate-publish-target.sh, actionlint if available, node scripts/check-docs.mjs, git diff --check, gofmt check.

PR notes

State that bootc-debian (pinned 5a799b4) and updex (pinned 6648671) are unaffected until they move to trixie. That move needs repogen-version/repogen-commit inputs, an explicit codename, and Brian's approval for the first production write.

Plan approved by owner:odrade (standing grant approve-plans in lucilla).

Work item: w-request-r-20261002-a43afc

…efault

repogen's publish-to-r2 Action fails closed, before credentials or any R2 access, when codename or suite resolves to 'stable', and no longer defaults codename to 'stable'.

Work-item: w-request-r-20261002-a43afc
Reviewed-by: github-copilot/gpt-6-sol
@bketelsen
bketelsen merged commit 841aa82 into main Oct 2, 2026
2 checks passed
@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

bketelsen added a commit that referenced this pull request Oct 2, 2026
… map Plan 0007 R1–R5 (#67)

Finish core Plan 0007's R1–R5 in repogen. Most of it already landed in #62/#64/#66. This closes the remaining gaps: the generic `--codename stable` default, the Debian incremental restore fallbacks, and a README map from each R item to its code and tests.

Work-item: w-request-r-20261002-ac50b8
Reviewed-by: github-copilot/gpt-6-sol
@bketelsen
bketelsen deleted the owners/w-request-r-20261002-a43afc branch October 2, 2026 14:46
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