Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 50 additions & 4 deletions .github/workflows/validate-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,64 @@ jobs:
import glob
import json

required = {"version", "description", "homepage", "license", "url", "hash"}
# Top-level keys every manifest must carry.
top_required = {"version", "description", "homepage", "license"}
# url + hash may live either at the root OR nested under
# architecture.{32bit,64bit,arm64}.* for multi-arch manifests
# (GoReleaser v2, modern Scoop). Either shape is valid.
arch_required = {"url", "hash"}
arch_keys = {"64bit", "32bit", "arm64"}
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

arch_keys is a Python set, so iteration order is not guaranteed. This can make present_arches and the subsequent error output order nondeterministic across Python versions/runs. Use an ordered sequence (e.g., a list/tuple) for arch_keys, and derive present_arches with that order (or sort explicitly).

Suggested change
arch_keys = {"64bit", "32bit", "arm64"}
arch_keys = ("64bit", "32bit", "arm64")

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +46
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

The README’s “Run locally” Scoop validation snippet still enforces top-level url+hash only, which will incorrectly fail multi-arch manifests that this CI validator now accepts. Please update the documented local validation snippet to match this new logic so local + CI validation stay consistent.

Copilot uses AI. Check for mistakes.

files = glob.glob("bucket/*.json")
if not files:
print("No Scoop manifests found")
raise SystemExit(0)

errors = []
for path in files:
with open(path, "r", encoding="utf-8") as f:
data = json.load(f)
missing = required - set(data)
if missing:
raise SystemExit(f"{path}: missing required keys: {', '.join(sorted(missing))}")

missing_top = top_required - set(data)
if missing_top:
errors.append(f"{path}: missing top-level keys: {', '.join(sorted(missing_top))}")
continue

root_has_url_hash = arch_required.issubset(data.keys())
arch = data.get("architecture")

if root_has_url_hash:
# Single-arch manifest — fine.
continue

if not isinstance(arch, dict) or not arch:
errors.append(
f"{path}: must have top-level url+hash OR an architecture.{{64bit|32bit|arm64}} block"
)
continue

present_arches = [a for a in arch_keys if a in arch]
if not present_arches:
errors.append(
f"{path}: architecture block has no known arch key ({', '.join(sorted(arch_keys))})"
)
continue

for a in present_arches:
block = arch.get(a)
if not isinstance(block, dict):
errors.append(f"{path}: architecture.{a} is not an object")
continue
missing = arch_required - set(block)
if missing:
errors.append(
f"{path}: architecture.{a} missing: {', '.join(sorted(missing))}"
)

if errors:
for e in errors:
print(e)
raise SystemExit(1)
print(f"Validated {len(files)} Scoop manifest(s)")
PY

Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ domain: technical

Unified package repository for every `jbcom/*` project. Ships Homebrew,
Scoop, and Chocolatey packages from one git tree plus an auto-generated
Astro static site at <https://jbcom.github.io/pkgs/>.
Astro static site at <https://jonbogaty.com/pkgs/>.

## Critical rules

Expand Down Expand Up @@ -71,7 +71,7 @@ Upstream projects write manifests here on every tagged release:
commit manifests here.

The Astro site rebuilds automatically on every push to `main`, so
new packages appear on <https://jbcom.github.io/pkgs/> within minutes
new packages appear on <https://jonbogaty.com/pkgs/> within minutes
of the upstream release landing here.

## What jbcom/pkgs is NOT
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Unified package repository for every `jbcom/*` project — Homebrew,
Scoop, and Chocolatey from one git tree. Public package index at
<https://jbcom.github.io/pkgs/>.
<https://jonbogaty.com/pkgs/>.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

While updating the documentation for the new domain, please note that the 'Validation' section later in this file (lines 121-131) still contains the 'legacy' validation logic that the PR description claims to be replacing. If the validator logic is indeed being updated in this PR (though currently missing from the diff), the example script in the README should also be updated to ensure local validation remains consistent with CI.


## Install

Expand Down Expand Up @@ -142,7 +142,7 @@ PY

`deploy.yml` runs on every push to `main` using `withastro/action@v6`.
The built site is deployed to GitHub Pages at
<https://jbcom.github.io/pkgs/>.
<https://jonbogaty.com/pkgs/>.

## License

Expand Down
5 changes: 3 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import { ViteToml } from "vite-plugin-toml";
import tailwindcss from "@tailwindcss/vite";

// jbcom/pkgs — package index site
// Served at https://jbcom.github.io/pkgs per Astro's GitHub Pages guide.
// Served at https://jonbogaty.com/pkgs/ via GitHub Pages custom-domain
// routing. jbcom.github.io/pkgs/ 301-redirects here automatically.

export default defineConfig({
site: "https://jbcom.github.io",
site: "https://jonbogaty.com",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

There is a significant discrepancy between the pull request title/description and the actual code changes. The PR title and summary describe a fix for the Scoop manifest validator to support multi-architecture manifests, but the provided diffs only contain changes related to a domain migration (from jbcom.github.io to jonbogaty.com). The validator logic mentioned in the description is missing from this PR. Please verify if the correct commits were pushed.

base: "/pkgs",
Comment on lines +11 to 16
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

The PR title/description focus on the Scoop manifest validator, but this change also updates the site’s canonical URL (site:) and multiple docs/README links to jonbogaty.com. Please either update the PR description to cover the domain/canonical URL change (and any expected operational impact) or split these doc/site changes into a separate PR to keep scope clear.

Copilot uses AI. Check for mistakes.
integrations: [
vue(),
Expand Down
20 changes: 12 additions & 8 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,21 @@ tap git tree directly.
- **Deployed** via `withastro/action@v6` (auto-detects pnpm) to GitHub
Pages with base path `/pkgs`

## Why not subpath under custom domain (jonbogaty.com/pkgs)?
## Site serves at jonbogaty.com/pkgs/

Astro's official GitHub Pages guide only supports either:
The operator's apex domain `jonbogaty.com` already CNAMEs to
`jbcom.github.io`, so GitHub Pages transparently serves `/pkgs/` at
`https://jonbogaty.com/pkgs/`. `jbcom.github.io/pkgs/` 301-redirects
to the canonical URL.

- Project page (`jbcom.github.io/pkgs`) with `base: '/pkgs'`
- Custom domain with `site: 'https://custom.tld'` and **no base**
Astro's `astro.config.mjs` uses `site: 'https://jonbogaty.com'` +
`base: '/pkgs'` — this feeds correct absolute URLs into sitemap and OG
metadata while internal routing stays subpath-relative.

Serving `jonbogaty.com/pkgs` requires an external reverse proxy
(Cloudflare Worker, Netlify rewrite, Caddy) that maps that path to
`jbcom.github.io/pkgs/`. That's a future-operator decision; the repo
itself is deployed at `jbcom.github.io/pkgs` today.
No CNAME file is needed in `public/` because the apex-domain CNAME is
configured repo-wide (pages settings), not per-repo via file. Adding a
`public/CNAME` would *break* the `/pkgs` base path by treating the
repo as apex-mode.

## Dependencies

Expand Down
19 changes: 11 additions & 8 deletions docs/DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ domain: ops

| Env | URL | Trigger |
|-----|-----|---------|
| Production | <https://jbcom.github.io/pkgs/> | Push to `main` |
| Production | <https://jonbogaty.com/pkgs/> | Push to `main` |
| Preview | Local (`pnpm dev`) | `localhost:4321/pkgs/` |

There is no staging environment. Previews happen locally.
Expand Down Expand Up @@ -53,20 +53,23 @@ Or:

- GitHub Pages build status: <https://github.com/jbcom/pkgs/deployments>
- Workflow runs: <https://github.com/jbcom/pkgs/actions>
- Site health: manual check at <https://jbcom.github.io/pkgs/>
- Site health: manual check at <https://jonbogaty.com/pkgs/>

No uptime SLA. If the site is down for more than an hour during a
release window, escalate via the upstream project's issue tracker.

## DNS / custom domain

Currently served on the GitHub-issued subdomain
(`jbcom.github.io/pkgs`). To serve `jonbogaty.com/pkgs` in the future:
The operator's apex `jonbogaty.com` already CNAMEs to
`jbcom.github.io`. GitHub Pages transparently serves every `jbcom/*`
repo's pages subpath at the matching URL on the apex, so this repo
is live at `https://jonbogaty.com/pkgs/` with no additional config.

1. Configure Cloudflare (or equivalent CDN) to proxy
`jonbogaty.com/pkgs/*` → `jbcom.github.io/pkgs/*`
2. Do NOT add a `public/CNAME` file — per Astro docs, that converts
the site to apex-domain mode and breaks the `/pkgs` base path
`jbcom.github.io/pkgs/` 301-redirects to the apex, so operators
following the GitHub URL end up in the right place.

Do NOT add a `public/CNAME` file. That converts this repo to
apex-domain mode and would break the `/pkgs` base path.

## Broken-build triage

Expand Down
2 changes: 0 additions & 2 deletions docs/STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ publish from `jbcom/radioactive-ralph`.
the seeded manifests
- A non-Go publishing workflow template for `jbcom/paranoid-passwd`
and other CMake/C projects (no GoReleaser equivalent)
- Reverse-proxy setup for `jonbogaty.com/pkgs` → `jbcom.github.io/pkgs`
(optional; current deploy works at the GitHub-issued subdomain)

## Active owners

Expand Down
Loading