Skip to content

Publish ezdbbackup through the EZ Game Host APT repository - #1

Merged
matthewzhaocc merged 3 commits into
mainfrom
agent/apt-repository
Aug 10, 2026
Merged

Publish ezdbbackup through the EZ Game Host APT repository#1
matthewzhaocc merged 3 commits into
mainfrom
agent/apt-repository

Conversation

@matthewzhaocc

@matthewzhaocc matthewzhaocc commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • build and semantically verify static amd64/arm64 Debian packages
  • publish release assets through the immutable EZ Game Host APT action using GitHub OIDC
  • document fingerprint-verified installation from packages.ezghcloud.com

Verification

  • go test ./... -count=1
  • go test -race ./... -count=1
  • go vet ./...
  • real amd64/arm64 static binary and Debian package build
  • independent final review: no Critical or Important findings

Summary by CodeRabbit

  • New Features

    • Added Debian and Ubuntu APT repository installation instructions.
    • Releases now provide verified amd64 and arm64 Debian packages.
    • Added automated publishing of Debian packages to the APT repository.
    • Release artifacts include checksums and Linux archives.
  • Bug Fixes

    • Strengthened release validation for package metadata, contents, permissions, and embedded binaries.
  • Documentation

    • Added Debian package changelog and copyright metadata.
    • Expanded release and APT repository setup guidance.
  • Tests

    • Added coverage for Debian package creation, verification, and APT publication workflows.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release pipeline now builds and verifies Debian packages, publishes selected release assets, adds authenticated APT publication, and documents Debian and Ubuntu installation.

Changes

APT release infrastructure

Layer / File(s) Summary
APT publication model
docs/superpowers/...
The plan and design define OIDC-authenticated publication, central release discovery, allowlists, retry-safe asset handling, and removal of cross-repository credentials.
Debian package assembly and verification
packaging/debian/*, scripts/package-release.sh, test/workflow/package_release_test.go, README.md
The release script builds and validates amd64 and arm64 Debian packages. Tests cover package metadata, contents, permissions, binary identity, and failure cases. The README documents APT installation.
Release and APT publication workflow
.github/workflows/release.yml, test/workflow/release_test.go
The workflow pins actions, limits GitHub release assets, and adds apt-publish to verify and publish both Debian packages. Workflow tests validate these contracts.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant apt-publish
  participant GitHubRelease
  participant APTPublishingAction
  apt-publish->>GitHubRelease: download and verify release artifacts
  apt-publish->>APTPublishingAction: provide verified amd64 and arm64 packages
  APTPublishingAction->>GitHubRelease: attach or verify package assets
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: publishing ezdbbackup through the EZ Game Host APT repository.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/apt-repository

Comment @coderabbitai help to get the list of available commands.

@matthewzhaocc
matthewzhaocc merged commit c9fb1c2 into main Aug 10, 2026
4 of 5 checks passed
@matthewzhaocc
matthewzhaocc deleted the agent/apt-repository branch August 10, 2026 15:13

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 150-155: Broaden the release-version validation in
scripts/package-release.sh, then validate the version without the leading v
using dpkg --validate-version. In .github/workflows/release.yml:150-155, replace
the restrictive regex check with dpkg --validate-version "${version}"
>/dev/null. Update test/workflow/release_test.go:238-249 to expect the dpkg
validation and cover versions containing +, with no direct change required at
the workflow site beyond the validation replacement.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ecf86a01-30df-45df-9a3c-a5b64e537db7

📥 Commits

Reviewing files that changed from the base of the PR and between 4af3715 and ffc8700.

📒 Files selected for processing (9)
  • .github/workflows/release.yml
  • README.md
  • docs/superpowers/plans/2026-08-10-apt-repository-infrastructure.md
  • docs/superpowers/specs/2026-08-10-apt-repository-infrastructure-design.md
  • packaging/debian/changelog.template
  • packaging/debian/copyright
  • scripts/package-release.sh
  • test/workflow/package_release_test.go
  • test/workflow/release_test.go

Comment on lines +150 to +155
version="${GITHUB_REF_NAME#v}"
[[ "${version}" =~ ^[0-9A-Za-z][0-9A-Za-z._-]*$ ]]
amd64="dist/ezdbbackup_${version}_amd64.deb"
arm64="dist/ezdbbackup_${version}_arm64.deb"
[[ -f "${amd64}" && ! -L "${amd64}" ]]
[[ -f "${arm64}" && ! -L "${arm64}" ]]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

version='1.2.3+build.1'
dpkg --validate-version "${version}"
git check-ref-format "refs/tags/v${version}"

rg -n -C 2 'validate-version|0-9A-Za-z._-' \
  scripts/package-release.sh .github/workflows/release.yml test/workflow/release_test.go

Repository: ezgamehost/ezdbbackup

Length of output: 201


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- scripts/package-release.sh ---'
rg -n -C 5 'validate-version|version|dpkg' scripts/package-release.sh || true

printf '%s\n' '--- workflow target ---'
sed -n '135,165p' .github/workflows/release.yml

printf '%s\n' '--- test target ---'
sed -n '220,265p' test/workflow/release_test.go

printf '%s\n' '--- related version checks ---'
rg -n -C 3 'validate-version|GITHUB_REF_NAME|package-release|0-9A-Za-z|apt-publish' \
  scripts .github/workflows test/workflow || true

printf '%s\n' '--- tracked files ---'
git ls-files scripts/package-release.sh .github/workflows/release.yml test/workflow/release_test.go

Repository: ezgamehost/ezdbbackup

Length of output: 19671


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- package-release version tests ---'
rg -n -C 8 'GITHUB_REF_NAME|unsupported release tag|valid Debian version|invalid|plus|\+' \
  test/workflow/package_release_test.go scripts/package-release.sh

printf '%s\n' '--- release trigger and job dependencies ---'
sed -n '1,80p' .github/workflows/release.yml
sed -n '80,145p' .github/workflows/release.yml

printf '%s\n' '--- repository documentation for release tags ---'
rg -n -C 3 'release tag|version tag|semantic|SemVer|tag.*v[0-9]|\+build|Debian version' \
  README.md CONTRIBUTING.md .github scripts test 2>/dev/null || true

printf '%s\n' '--- available local version tools ---'
command -v dpkg || true
command -v dpkg-deb || true
command -v git || true
git check-ref-format 'refs/tags/v1.2.3+build.1'

Repository: ezgamehost/ezdbbackup

Length of output: 20133


🌐 Web query:

Debian Policy version strings plus sign dpkg --validate-version official documentation

💡 Result:

In the Debian package management system, the plus sign (+) is a valid character in version strings and is explicitly allowed by official Debian Policy [1][2][3]. Version Format The format for a Debian package version string is: [epoch:]upstream_version[-debian_revision] [1][2][4]. The plus sign (+) is permitted in both the upstream_version and the debian_revision components [1][2]. Specifically, the upstream_version may contain alphanumerics and the characters. + -: ~ (full stop, plus, hyphen, colon, tilde) [2][3]. The debian_revision may contain alphanumerics and the characters +. ~ (plus, full stop, tilde) [1][2]. Note that hyphens are only allowed in the debian_revision or if a debian_revision is present, as the package management system uses the last hyphen to separate the upstream version from the revision [1][2]. Validation You can validate version strings using the dpkg command-line tool [5][6]. The --validate-thing command, introduced in dpkg 1.18.16, allows for syntax checking [5][7]. To validate a version string, use: dpkg --validate-version <version_string> The command will return an exit code of 0 if the version string is valid, 1 if it is invalid but might be accepted in lax contexts, and 2 if the string is entirely invalid [5][6].

Citations:


🌐 Web query:

Git check-ref-format tag name plus sign official documentation

💡 Result:

In Git's official documentation, the command git check-ref-format is used to verify if a reference name is well-formed, but it does not specifically restrict or define the use of a plus sign (+) within a tag name itself [1][2]. The confusion regarding the plus sign often arises because it has a specific, different meaning when used in the context of refspecs (such as in git push or git fetch commands) [3][4][5]. In those contexts, a leading plus sign (+) is an optional prefix that forces an update, overriding the fast-forward requirement [4][6][5]. Regarding reference naming rules, git check-ref-format enforces the following constraints on all reference names (including tags): - They must contain at least one slash (/) (e.g., tags/my-tag), unless the --allow-onelevel option is used [1][2]. - They cannot contain a space, tilde (~), caret (^), colon (:), question mark (?), asterisk (*), open bracket ([), or control characters [1][2]. - They cannot end with a slash, dot, or the sequence.lock [2]. - They cannot contain consecutive dots (..) [2]. If you are concerned about whether a specific tag name containing a plus sign is valid, you can test it directly using the command: git check-ref-format refs/tags/ If the command exits with a status of 0, the name is valid [1][2].

Citations:


Allow valid Debian versions in every release gate.

v1.2.3+build.1 is valid for Git tags and Debian versions, but scripts/package-release.sh rejects it before packaging. The workflow repeats the same restrictive check. The failure occurs in static-build, before publish or apt-publish.

  • Broaden the pre-check in scripts/package-release.sh, then validate ${version#v} with dpkg --validate-version.
  • Replace the workflow check with dpkg --validate-version "${version}" >/dev/null.
  • Update test/workflow/release_test.go to match and cover +.
📍 Affects 2 files
  • .github/workflows/release.yml#L150-L155 (this comment)
  • test/workflow/release_test.go#L238-L249
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 150 - 155, Broaden the
release-version validation in scripts/package-release.sh, then validate the
version without the leading v using dpkg --validate-version. In
.github/workflows/release.yml:150-155, replace the restrictive regex check with
dpkg --validate-version "${version}" >/dev/null. Update
test/workflow/release_test.go:238-249 to expect the dpkg validation and cover
versions containing +, with no direct change required at the workflow site
beyond the validation replacement.

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