The first Flutter repo: Gitea #2 and #3 fast-forwarded, v1.1.0 released to R2 with the latest.json update feed (D8), branch protection on main, maintenance mode. What the move found, for the next repos: - No Flutter setup action fits host mode (subosito's bash steps can hit WSL): a pinned, checksummed SDK install into the runner tool cache. - docker run -v $PWD inside a Docker job mounts a host path, so the Linux floor is the ubuntu-22.04 label again. - Renovate proposes ubuntu v26 for Dockerfile bases and newer runs-on labels; a repo that pins an Ubuntu label on purpose needs a rule (candidate for the preset). - gitleaks reads a Sonar project key as an API key; apt in the runner's Docker network can lose a DNS lookup; the artifact service can time out on CreateArtifact (re-run failed jobs). The tracker row, the status row and the 15:23 Fri cron slot are live; the runbook notes pub.dev in the release-age rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8.5 KiB
MarkLens — migration guide
Written 2026-11-23 against
main@2d33b1c(local cloneE:\marklens, Giteapoli0981/MarkLens). Profile: Flutter desktop app (Windows installer via Inno Setup, Linux package), with an in-app update check. Docs 11 and 14 describe packaging and CI. Shared decisions: README.
Done 2026-11-27, the first Flutter repo. The migration merged as Gitea #2 (9 commits) and #3 stacked on it (the
remote-badge fix, Flutter 3.50.1, maintenance mode and the release commit), both by fast-forward in the UI (every
commit stays signed); tagged and released as v1.1.0: the four artefacts and SHA256SUMS under
releases.poli0981.dev/marklens/1.1.0/, the update feed marklens/latest.json uploaded last, a Gitea release with the
notes and links, published (not a draft). Renovate's onboarding PR #1 was closed: #2 adds renovate.json. #4 ticked
the release checklist. What the move found:
- Flutter has no setup action that fits host mode.
subosito/flutter-action's steps areshell: bash, which on the host-mode Windows runner can resolve to WSL'sbash.exe.tool/ci/install-flutter.{sh,ps1}download the pinned archive fromstorage.googleapis.com, check a SHA-256 pinned intool/ci/flutter.env(copied from Google'sreleases_<os>.json, not fetched beside the archive), and unpack it into$RUNNER_TOOL_CACHE(else%LOCALAPPDATA%\gitea-runner\toolcache): once per version, never system-wide on the PC. A release passes--fresh/-Fresh(job temp dir, no shared cache). The PC hasLongPathsEnabled=1, which the SDK needs (its deepest relative path is ~186 characters). Flutter runs as root in the Docker jobs with only a warning. - The Linux floor is a runner label again. The GitHub release built the
.deband AppImage withdocker run -v "$PWD:/src"inside the job; from inside the runner's own container that mounts a host path, not the checkout.runs-on: ubuntu-22.04is the build machine here (the runner's image), so the job installstool/linux/Dockerfile's packages there and a repo test holds the label and the Dockerfile'sFROMtogether. The goldens, made in anubuntu:24.04container, match byte for byte on the runner'subuntu-24.04image. - Renovate would have moved the floor. The onboarding PR listed "update dependency ubuntu to v26" (the
Dockerfiles' base images), and the
github-runnersdatasource proposes newerruns-onlabels. MarkLens'srenovate.jsondisables both for Ubuntu: 22.04 is its glibc floor, 24.04 its goldens' image. Any repo that pins an Ubuntu label on purpose (youtube-generator'subuntu-22.04floor) wants the same rule; a candidate for the preset. Also local:constraints.flutter(the SDK Renovate's lockfile updates install), and holds ondesktop_drop< 0.9 (across_filewall) andwindow_manager< 0.6 (a nativeapi rewrite, held by decision). pub joined the preset's 3-day release-age rule (renovate-config #7): pub.dev reportspublished. - The update feed (D8).
tool/release/release_files.pywriteslatest.json—{app, version, tag, published, page, files[{name, url, sha256, size}], sha256sums}— and the release notes from CHANGELOG. The app readsversionandpage, and openspageonly ongit.poli0981.dev/releases.poli0981.dev(the GitHub version opened anyhtml_url). The Gitea release is published, not a draft: the banner links to it, and a draft is a 404 for everyone else. So the tag is the release decision, and the person's checks moved before it (doc 15).latest.jsonanswers withcf-cache-status: DYNAMIC. - First CI run, two reds, neither in the code. gitleaks (full history) flagged
sonar.projectKey=…in the deletedsonar-project.propertiesasgeneric-api-key;.gitleaksignorerecords that fingerprint, as softharbor's does. The golden job died inapt-geton one failed DNS lookup ofarchive.ubuntu.comfrom the runner's Docker network; everyapt-getnow runs with-o Acquire::Retries=5. osv-scanner readspubspec.lock(green). - The tag run lost its Windows artifact to
Failed to CreateArtifact … Request timeout(all 5 attempts) after a good build; nothing had been published, and "Re-run failed jobs" finished the chain with the Linux artifact kept. - Timings on the single runner: a PR round ~25 min once it starts (
CI+Security); the release rehearsal's build jobs 6 min (Windows, host) and 4.7 min (Linux), assemble 30 s. A PR stacked on another was the cheaper path: the lower PR's runs were cancelled and the upper one's CI covered both before both fast-forwarded. - Enabling Actions on 28.4.0 is Settings → Actions → General → "Enable Repository Actions" (not in the Advanced
settings list;
/settings/actions404s until it is on). - Branch protection on
main(D6): no push, no force push, administrators included; required checksCI / ci-ok (*),Security / workflow-lint (*),Reusable / Security / Secrets (gitleaks) (*),Reusable / Security / Dependencies (osv-scanner) (*). Default merge style: fast-forward only. - Installs of 1.0.0–1.0.2 ask
api.github.com/repos/poli0981/MarkLens/releases/latest, now 404, silently by design: README, SECURITY.md, the CHANGELOG and the release notes tell them to install 1.1.0 once by hand. - WinGet is paused: winget-pkgs PRs come from a GitHub fork, and the pending 1.0.1 submission (#439835) points at
dead GitHub downloads.
tool/winget/is unchanged. - Contacts: CLAUDE.md said to leave
{{CONTACT_EMAIL}}for the maintainer; this guide decidedsecurity@/code@poli0981.dev, and the runbook wins for migration topics. Reported in #2; CLAUDE.md updated. - Not done: no Discord announcement (MarkLens has no Discord webhooks; three secrets and one
announce-release.ymlcaller would add it); the listings (SoftHarbor, poli0981.dev) still link GitHub.
Decided (2026-11-23)
- D8 — the update check: a
latest.json(version + download URLs) atreleases.poli0981.dev/marklens/latest.json, uploaded last by each release (a*.jsonname, so the cache is bypassed);update_service.dartreads it. Not the Gitea API: the app stays off the forge, like every other app.legal/PRIVACY.mdnames the new host: it is a privacy statement, not just a doc. - D6: branch protection on
mainrequires the CI checks.
Workflows (.github/workflows → .gitea/workflows)
| File | Today | Do |
|---|---|---|
ci.yml |
analyze/test/build on a matrix, Sonar (sonar-project.properties), upstream artifact actions |
Move; Gitea artifact actions; remove Sonar and sonar-project.properties (D1). The Windows leg runs in host mode on the PC: the Flutter SDK goes to the runner tool cache, nothing system-wide |
codeql.yml |
CodeQL, cron 17 3 * * 1 |
Delete → ops security.yml caller (no language flag fits Dart: you get gitleaks, the workflow rules and osv-scanner on pubspec.lock), cron 23 15 * * 5 |
dependency-review.yml |
GitHub dependency review | Delete (D7) |
release.yml |
builds the four artefacts of doc 11 on ubuntu-24.04 and windows-2025, draft GitHub release; only a v* tag reaches the writing job |
windows-2025 → windows-latest; Gitea artifact actions; artefacts + checksums to R2 with publish-r2.yml (app: marklens, <version>/…, latest.json as the feed file for D8); draft Gitea release with links. Keep the dispatch-builds-only / tag-writes split (rule 10) |
watch-observation.yml |
manual matrix run | Move; drop any macOS leg |
.github/dependabot.yml → delete; add renovate.json (Renovate reads pubspec.yaml). .github/FUNDING.yml is GitHub-only.
Code, packaging, docs
lib/core/update/update_service.dart(D8) and its tests:test/core/update_service_test.dart(expects the hostapi.github.com),test/architecture/no_network_test.dart(the allowed-host list).packaging/linux/dev.poli0981.marklens.metainfo.xml(3: homepage → Gitea, bugtracker → GitLab issues),packaging/windows/marklens.iss(AppURLs).README.md(5),docs/03_DATA_FLOW.md,docs/10_SECURITY_PRIVACY.md,docs/11_PACKAGING_UPDATE.md,legal/PRIVACY.md(D8), CLAUDE.md.tool/fonts/build_fonts.pyfetches Noto fonts fromraw.githubusercontent.com: third-party, leave it.SECURITY.md: GitHub advisories → e-mail. The repo documents no@poli0981.devaddress in tracked text: usesecurity@poli0981.dev. Add GitLab issue templates (runbook §3.4).
Secrets
The inventory found none besides SONAR_TOKEN (drop). Create (user level): R2 keys + R2_ACCOUNT_ID.