Files
poli0981andClaude Opus 5.5 497fb914a1
Ops lint / actionlint + Python (pull_request) Successful in 6s
docs: ops v2026.11.5 is out, HashTool and CommandForge pin it
The runbook's tagging note named v2026.11.1 as the tag before the notifier
fix; it now names the latest tag, v2026.11.5 (signed, b93b371): the release
notifier knows the Velopack apps released from Gitea and the security scan
restores .NET without ICU. The HashTool and CommandForge guides record their
pin bumps (HashTool #3, CommandForge #4); HashTool's NuGetAudit job runs on
ubuntu-latest again, which checked the ICU fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:46:32 +07:00

86 lines
7.8 KiB
Markdown

# 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; #4 moved the ops pins to v2026.11.5, whose notifier names CommandForge a Velopack
app. 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).