docs(migration): CommandForge is done, and what it found #13

Merged
poli0981 merged 2 commits from docs/commandforge-done into main 2026-11-26 03:18:24 +00:00
4 changed files with 91 additions and 3 deletions

No files matched your search

+1 -1
View File
@@ -86,7 +86,7 @@ jobs:
run: |
PACKAGER=""
case "$REPO" in
*autoclick*|*captureimg*|*randomizerMAC*|*HashTool*) PACKAGER="Velopack" ;;
*autoclick*|*captureimg*|*randomizerMAC*|*HashTool*|*CommandForge*|*OmniDeck*|*frameledger*|*AppLedger*) PACKAGER="Velopack" ;;
*youtube-generator*|*free-steam-games-list*|*free-games-itchio-list*) PACKAGER="Tauri" ;;
*)
if echo "$WF_NAME" | grep -qi 'tauri\|desktop'; then PACKAGER="Tauri"; fi
+3 -2
View File
@@ -381,8 +381,8 @@ Qodana CLI scan for any stack; replaces `JetBrains/qodana-action`.
1. `vpk download s3 --channel win -o releases` (previous release, for delta packages; first release: ignore the "nothing found" result).
2. `vpk pack -u <PackId> -v <version> -p <publish dir> -o releases …` (existing flags of the repo).
3. `vpk upload s3 --channel win -o releases --keepMaxReleases 10`.
- **VERIFY on the pilot:** that `vpk … s3` works against R2 with `--endpoint` only (if signing fails, try adding `--region auto`), and that the keys land under `<app>/`. If `vpk … s3` cannot talk to R2: `vpk download http --url https://releases.poli0981.dev/<app>` + `publish-r2.yml` (packages first, `releases.win.json`, `assets.win.json` and `RELEASES` last).
- Public files: the stable-named installer and portable zip that `vpk pack` writes (`<PackId>-Setup.exe` / `<PackId>-Portable.zip`; some Velopack versions add `-win-`: copy the exact names from the pilot's `releases/` folder). Both are matched by the cache-bypass rule. Link them from README and the Gitea release notes.
- **Verified 2026-11-26 on CommandForge** (vpk 1.2.161, [its guide](migration/commandforge.md)): `vpk … s3` works against R2 with the endpoint only (no region, default checksums), the objects land under `<app>/`, and vpk reads every option from `VPK_<OPTION>` environment variables. `vpk download s3` on an empty folder finds 0 releases and exits 0, so a dispatched dry run can check the credentials. `vpk upload s3` publishes the packages, Setup.exe and Portable.zip, then `releases.win.json` and `RELEASES` (`no-cache`); not `assets.win.json`. Fallback if it ever cannot talk to R2: `vpk download http --url https://releases.poli0981.dev/<app>` + `publish-r2.yml` (packages first, `releases.win.json` and `RELEASES` last).
- Public files: the stable-named installer and portable zip that `vpk pack` writes, with the channel in the name: `<PackId>-win-Setup.exe` / `<PackId>-win-Portable.zip` (CommandForge, vpk 1.2.161). Both are matched by the cache-bypass rule. Link them from README and the Gitea release notes.
- Other platforms later: Velopack makes a `.pkg` + portable `.zip` on macOS (needs a Mac; no macOS runner) and only a portable `.AppImage` on Linux. Feeds are `releases.osx.json` / `releases.linux.json`. All of these names are already covered by the cache-bypass rule (§1).
- App code: `new UpdateManager("https://releases.poli0981.dev/<app>")` (HTTP source). Remove `GithubSource` usage and any GitHub token logic.
- Qodana: native mode on Windows (§3.5).
@@ -488,6 +488,7 @@ None (2026-11-23). A new question goes into [`migration/README.md`](migration/RE
| free-games-itchio-list | data + web + tauri | ☑ merged 2026-11-25 (Gitea #1) | ☑ | ☑ | ☑ | ☑ v4.7.0 on R2 | ☑ | `27 13 * * *` (update), `49 13 * * *` (refresh), `1 15 * * 3` (security) |
| RepoLens | web | ☐ | ☐ | ☐ | ☐ | n/a | ☐ | proposed |
| content | content (submodule of poli0981-dev) | ☑ main on Gitea 2026-11-24 | n/a | n/a | n/a | n/a | ☑ | none |
| CommandForge | dotnet | ☑ merged 2026-11-26 (Gitea #2, #3) | ☑ | ☑ | ☑ | ☑ v2.3.0 on R2 (`vpk upload s3`), Gitea release by CI | ☑ | `11 14 * * 5` (security) |
| any repo not listed (not inventoried) | | | | | | | | |
The cron slots themselves are registered in [migration/README.md](migration/README.md#cron-slots-utc--the-registry).
+2
View File
@@ -48,6 +48,7 @@ For a repo without a guide, the same prompt works with only the runbook: §3.1 s
| `free-steam-games-list` (`E:\2`) | Python data pipeline + SvelteKit on Workers + Tauri + Android | **Done.** Data restored 2026-11-24 (49 GitHub-only data commits pushed, the Worker reads Gitea); migration merged as Gitea #1; v4.8.0 / apps 2.6.0 released to R2 | [free-steam-games-list.md](free-steam-games-list.md) |
| `free-games-itchio-list` (`E:\game`) | Python data pipeline + React on Workers + Tauri + Android | **Done.** Catalog restored 2026-11-24 from the live site (+235 games); migration merged as Gitea #1; v4.7.0 released to R2 | [free-games-itchio-list.md](free-games-itchio-list.md) |
| `RepoLens` (`E:\repo`) | SvelteKit on Workers, data from the GitHub API | not started; **the site has no data source** | [repolens.md](repolens.md) |
| `CommandForge` (`E:\cmd`) | .NET/WPF, Velopack | **Done.** Merged 2026-11-26 (Gitea #2, #3); v2.3.0 released to R2, the first Velopack app there | [commandforge.md](commandforge.md) |
| any repo not listed | — | not inventoried | run the inventory |
## Cron slots (UTC) — the registry
@@ -70,6 +71,7 @@ Every scheduled workflow gets its own slot inside 13:00–16:00 UTC (runbook §3
| 13:53 | Thu | HashTool · qodana | proposed |
| 13:59 | daily | softharbor · vt-recheck | live |
| 14:07 | Sun | .github · weekly-digest | live |
| 14:11 | Fri | CommandForge · security (workflow lint + ops caller in one workflow) | live |
| 14:13 | Wed | poli0981-dev · security | live |
| 14:17 | Mon | captureimg · docs (external links) | proposed |
| 14:19 | Thu | pipdock · security (ops caller, D4) | proposed |
+85
View File
@@ -0,0 +1,85 @@
# CommandForge — migration guide
> Written 2026-11-26 against `main` @ `ea60d58` (local clone `E:\cmd`, Gitea `poli0981/CommandForge`). Profile: .NET 10 WPF (`net10.0-windows`, `.slnx`), Velopack (channel `win`, ReadyToRun publish with an elevated helper next to the app), releases from GPG-signed annotated tags (runbook §5.1). Maintenance mode. It had no guide before its session: the inventory ran in it. Shared decisions: [README](README.md).
**Done 2026-11-26**, the first Velopack app released to R2. The migration merged as Gitea #2 (`f59bc54`, 12
commits, with the release commit), tagged and released as **v2.3.0**: Velopack feed and packages on
`releases.poli0981.dev/commandforge/`, `2.3.0/SHA256SUMS` and a CycloneDX SBOM next to them, a Gitea release with the
notes and links, announced through the ops `announce-release.yml` (pinned at ops v2026.11.4, `c133a00`). #3 corrected
two docs details the release showed. Renovate's onboarding PR #1 was closed: #2 adds `renovate.json`. What the move
found:
- **`vpk … s3` works against R2 as the runbook guessed** (vpk 1.2.161): `VPK_BUCKET`, `VPK_PREFIX=commandforge/`,
`VPK_ENDPOINT=https://<account>.r2.cloudflarestorage.com` and the keys, no region, default checksums. vpk reads every
option from `VPK_<OPTION>` (checked locally against a dead endpoint first). `vpk download s3` on the empty folder
logged "Found 0 release(s) in remote file … No full / applicable release was found" and exited 0, so a dispatched
**dry run** (build, pack, SBOM, checksums, the download; no upload) checks the R2 credentials before the first tag.
`vpk upload s3` sent the full package, Portable.zip and Setup.exe, then `releases.win.json` and `RELEASES`
(`no-cache`), in 8 s. It does **not** publish `assets.win.json`, which `vpk pack` writes locally. The public names
carry the channel: `CommandForge-win-Setup.exe`, `CommandForge-win-Portable.zip`. The workflow keeps one retry with
`--disableChecksumValidation` in case R2 ever refuses the SDK's checksums; it was not needed.
- **Release layout**: a local `release.yml`, not `reusable-desktop-csharp.yml`, because `scripts/pack.ps1` publishes
ReadyToRun and checks that the elevated helper is in the publish folder. `scripts/release-assets.ps1` (runs locally
too) writes the CycloneDX SBOM (`cyclonedx` 6.3.2 as a local tool, `.slnx` supported, test projects left out,
build-only packages kept with scope `excluded`), `SHA256SUMS` and the notes from CHANGELOG.md. `SHA256SUMS` lists
only what the version ships (Setup, Portable, its packages, the SBOM), not the feed files that vpk rewrites on every
upload: that was the bug of the GitHub-era `checksums.txt`. The ops `publish-r2.yml` puts `<version>/` up after
vpk; then `gitea-release-action`, then the announcer. The tag must equal `<Version>` in `Directory.Build.props`.
- **Downloaded and compared after the release**: Setup.exe, Portable.zip, the full package and the SBOM all match
`SHA256SUMS`, and the feed's SHA-256 of the full package matches too. Every public file answers 200 with
`cf-cache-status: DYNAMIC`, the versioned ones included (the edge does not cache this folder today).
- **VirusTotal**: the optional step found `VT_API_KEY` although the repository has no such secret, so it is a
user-level secret; the scan and its links in the notes worked.
- **Report a bug** opens `gitlab.com/poli0981/CommandForge/-/issues/new?issue[title]=…&issue[description]=…` with the
Bug template's sections answered (no `issuable_template`: a template would replace the description). GitLab
redirects `issues/new` to `work_items/new` and keeps both fields (checked signed in, nothing submitted). A test keeps
the app's sections equal to `.gitlab/issue_templates/Bug.md`, another fails if any source file links to
`github.com/poli0981`. The legal texts the app links (EULA, LICENSE, DISCLAIMER, PRIVACY) open on Gitea's
`/src/branch/main/…`; the terms version stays the same (as FG5: same request, another host).
- **Installs of 2.2.0 and older** asked GitHub (`GithubSource`) and see 404 ("No release feed was found"): they need
2.3.0 once by hand. The notes, README, UPDATES and CHANGELOG say so (runbook §7 item 5).
- **CI on the single runner** (`anon-win`, all labels, one job at a time): the PR's 11 checks took ~17 min, the
release ~4 min. Qodana's CLI in native mode on Windows reported zero problems, as the action did; gitleaks found
nothing over the full history; osv-scanner has no lockfile to read (the repo has no `packages.lock.json`; the
NuGetAudit restore covers NuGet). Until #2 merged, Gitea listed the GitHub-era `.github/workflows` of `main`.
- **Branch protection on `main`** (D6): no push, no force push, status checks `Build / build (*)` and
`Build / package (*)` (Gitea lists both `(pull_request)` and `(push)` contexts). Merge commits made in the UI are
unsigned ("no key available to sign"), so signed commits are not required.
- **Logs and runs without a token**: `GET /repos/{owner}/{repo}/actions/runs/{id}/jobs` and
`/commits/{sha}/status` answer; `GET …/actions/runs` and the API's job-log route answer 401. From the signed-in
browser, `/{owner}/{repo}/actions/runs/{run}/jobs/{job id}/logs` returns the raw log.
- **On the PC**: Git for Windows' ssh was refused by Gitea (`Permission denied (publickey)`) while the Windows
OpenSSH agent holds the key: push with `GIT_SSH_COMMAND=C:/Windows/System32/OpenSSH/ssh.exe`. GPG signing failed
with "sending fd … to keyboxd: Input/output error" until `gpgconf --kill keyboxd`.
## Decided (2026-11-26)
- D1 (SonarCloud and `dotnet-sonarscanner` removed; SonarAnalyzer stays as a Roslyn analyzer), D2 (no triage
workflow existed), D6, D7 (attestations, Scorecard, dependency review, the GitHub SBOM go; a CycloneDX SBOM is
generated in the build and uploaded under `<version>/`), D11 (Discussions links removed).
- **CF1 — release workflow local**, as above; manual runs on a branch are dry runs.
- **CF2 — VirusTotal stays optional**, skipped without `VT_API_KEY`.
## Workflows (`.github/workflows` → `.gitea/workflows`)
| File | Before | Now |
|---|---|---|
| `build.yml` | build/test/format + package smoke on `windows-latest`, `actions/cache`, upstream `upload-artifact` | Moved; tool-cache SDK, the PC's NuGet cache (no `actions/cache`), Gitea artifact action |
| `codeql.yml` | CodeQL C# + actions, cron `37 14 * * 1` | **Deleted** → `security.yml`: actionlint + shellcheck job and the ops `security.yml` (`dotnet: true`, `dotnet-runs-on: windows-latest`, `dotnet-solution: CommandForge.slnx`), cron **`11 14 * * 5`** |
| `sonarcloud.yml`, `scorecard.yml` (cron `25 6 * * 1`), `dependency-review.yml` | | **Deleted** (D1, D7) |
| `qodana.yml` | `qodana-action`, token check job | Caller of `reusable-qodana.yml` (`windows-latest`, `dotnet-global-json-file`, `prepare-command: dotnet build …`) |
| `release.yml` | `vpk download/upload github`, attestations, `gh` SBOM/checksums/notes, VirusTotal | CF1 |
| `announce-release.yml`, `notify-ci-failure.yml` | ops callers `@c3e118a` (old path), `secrets: inherit` | ops v2026.11.4 + `ops_ref`, secrets by name; new `notify-release-pipeline.yml` |
`.github/dependabot.yml` → deleted; `renovate.json` (majors need Dashboard approval, no `Microsoft.Extensions.**` /
`dotnet-sdk` majors, Velopack + vpk together). `.gitlab/issue_templates` (Bug, Feature request, Command, Translation,
Accessibility) and the MR template added; `.github/ISSUE_TEMPLATE` kept for Gitea.
## Secrets
Repository: `DISCORD_CI_WEBHOOK`, `DISCORD_RELEASES_WEBHOOK`, `DISCORD_RELEASE_PIPELINE_WEBHOOK`, `QODANA_TOKEN`.
User level: R2 keys + `R2_ACCOUNT_ID`, `VT_API_KEY`. Dropped: `SONAR_TOKEN`.
## Hand-off extras
Qodana Cloud: set the project's VCS URL to `https://git.poli0981.dev/poli0981/CommandForge.git` (maintainer).