Files
.github/docs/migration/jsonprism.md
poli0981andClaude Opus 5.5 fcf83b8a9e
Ops lint / actionlint + Python (pull_request) Successful in 17s
docs(migration): jsonPrism is done, and what it found
- migration/jsonprism.md: done 2026-11-27 (Gitea #2, v2.3.0 on R2, the site
  deployed by the CI `deploy` job) and the findings: the runner that started
  before Docker Desktop, SSH refused but HTTPS fine, two Discord secrets not
  carried over, Renovate's runner-label and JDK proposals, the Kotlin
  build-cache CVE held with the Tauri template, gitleaks and the beacon
  token, the release dry run from the branch, the npm Tauri CLI in
  gen/android, production smoke as a local reusable, the keystore alias
  masking the app name in logs, one runner for every queue, keyboxd.
- migration/README.md: jsonPrism done; its 13:19 Friday security slot is
  live.
- GITEA-MIGRATION.md §8: the jsonPrism row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 12:11:22 +07:00

8.6 KiB

jsonPrism — migration guide

Written 2026-11-23 against main @ 9923c4c. Profile: React/Vite web app + API Worker on Cloudflare (jsonprism.poli0981.dev) + Tauri 2 desktop (no updater) + Android APK (runbook §5.2, §5.3). Maintenance mode. Shared decisions: README.

Done 2026-11-27. The migration, the dependency refresh and the release commit merged together as Gitea #2 (aab4b89, 7 commits); the CI deploy job put the site live and v2.3.0 went to R2 (Windows, Linux, Android; no macOS, D9). Renovate's onboarding PR (#1) was closed: #2 adds renovate.json with this repo's rules. What the move found:

  • Gitea's main matched github/main (9923c4c, the 2.2.1 release): nothing to restore. Until #2 merged, the GitHub-era maintenance-triage.yml still ran from main on pull_request_target (owner PRs: skipped).
  • The runner did not come up at logon: the scheduled task "Gitea Runner" started before Docker Desktop and the daemon exited with "Docker Engine socket not found and docker_host config was invalid" (07:08 local); queued jobs of every repo waited until Start-ScheduledTask 'Gitea Runner' once Docker was up (the first retry, a few seconds later, still failed). With capacity 1, #2's first checks waited ~30 min behind free-games-itchio-list's ingest and a RepoLens PR.
  • SSH push refused, HTTPS works: ssh://git@git.poli0981.dev:2222/… answers "Permission denied (publickey)" from the agent's shell on the PC, while https://git.poli0981.dev/… pushes through Git Credential Manager (one transient "Failed to authenticate user" on a branch delete, fine on retry). The session pushed by URL and left the origin remote as it was.
  • Two Discord secrets were not carried over: the repo had DISCORD_RELEASES_WEBHOOK and DISCORD_REPO_WEBHOOK but not DISCORD_CI_WEBHOOK or DISCORD_RELEASE_PIPELINE_WEBHOOK (youtube-generator has both). discord_notify.py exits 1 without its webhook, so the release-pipeline notifier fails after every tag run until they exist; DISCORD_PING_ROLE_ID is optional.
  • Renovate's onboarding preview showed two proposals this repo cannot take: ubuntu 26.04 (it reads runs-on: labels with the github-runners datasource, but the labels are the PC runner's) and JDK 25. renovate.json disables github-runners, node/java-jdk, and the gradle/gradle-wrapper managers (the committed Tauri Android project). The OSV alert it raised, kotlin-gradle-plugin 1.9.25 → 2.4.20 (CVE-2026-53914, moderate, unsafe deserialization of the Kotlin build cache), waits for Tauri's template with the reason in renovate.json; the release job never shares or restores a build cache.
  • Security on the first run: Opengrep, osv-scanner and cargo-deny passed after the refresh (url 2.5.9, cookie 0.18.3 taken; the six Tauri-stack advisories nobody fixes yet in src-tauri/osv-scanner.toml, as youtube-generator). gitleaks found one non-secret, the Web Analytics beacon token in src/lib/analytics.ts, in .gitleaksignore. npm audit: 0 — typescript-eslint 8.74 moved to minimatch 11, which closed the last GitHub-era alert (GHSA-g3hv-75wg-m249).
  • Release dry run from the branch (web route POST /{owner}/{repo}/actions/run?workflow=release.yml, ref=refs/heads/chore/gitea-migration, as youtube-generator): verify, Windows (~6 min on the host), Linux (ubuntu-22.04, ~9 min) and Android (~7 min, SDK + NDK 27.2 installed in the job) all green on the first try. Unlike youtube-generator, this repo's committed gen/android BuildTask.kt runs the npm Tauri CLI, so no cargo install tauri-cli is needed. The APK's signer certificate SHA-256 is fef0029e…b645; the keystore on the PC (E:\jsonprism-release.jks) is PKCS12 with alias jsonprism, which keytool will not list without its password, so the maintainer should confirm it matches the 2.2.1 APK's.
  • Production smoke as a reusable: production-smoke.yml is workflow_call + workflow_dispatch, and ci.yml's smoke job calls it with uses: ./.gitea/workflows/production-smoke.yml after deploy, the pattern free-games-itchio-list uses for its notifier. The first deploy (run 795) put aab4b89 live; the same checks by hand passed while the smoke job still queued behind Qodana.
  • The keystore alias is a secret, so the logs hide the app's name: ANDROID_KEY_ALIAS is jsonprism, and the runner masks secret values in the run's logs, so even the assemble job (which gets no secret) shows *** for "jsonprism" (releases.poli0981.dev/***/2.3.0/…). The files and notes are right; only the logs read oddly.
  • One runner, many queues: the PR's Qodana Rust run (Docker Desktop, cold cache) would have held the deploy job for ~25 minutes after the merge; it was cancelled, since the push to main runs the same scan.
  • GnuPG on the PC: the first signed commit failed with "sending fd … to keyboxd: Input/output error" although the signature was made; gpgconf --kill keyboxd fixed it.

Decided (2026-11-23)

  • D3: a deploy job with wrangler deploy, and production-smoke.yml runs after it. D9: no macOS bundles. D10: the Android SDK is installed in the job. D11: pages-redirect.yml and announce-discussion.yml go.
  • Qodana Rust: in Docker on windows-latest (within-docker: true); if the image does not run under Docker Desktop on the PC (VERIFY), the Rust project goes.

Workflows (.github/workflows → .gitea/workflows; runs-on: ubuntu-24.04 stays, it is a runner label)

File Today Do
ci.yml build/test, Sonar, upstream artifact actions Move; Gitea artifact actions; remove Sonar (D1); add the wrangler deploy job on main pushes (D3)
production-smoke.yml on push to main: waits until the site serves the pushed commit, then checks headers, routing, redirects, API Keep. Run it after the deploy job (needs: in the same workflow, or workflow_run on CI) instead of polling for Workers Builds
qodana.yml qodana-action: JS native (QODANA_TOKEN_TS_JS) + Rust Docker (QODANA_TOKEN_RUST) Two callers of reusable-qodana.yml (TS: package-manager: npm; Rust: runs-on: windows-latest, within-docker: true, its config), separate artifact-name
release.yml tag → tauri-action on a matrix incl. macOS + Android APK into ONE draft release; github-script; SHA256SUMS; attestations Tauri CLI on windows-latest (+ Linux bundles on ubuntu-24.04); no macOS (D9); Android per D10. Everything + SHA256SUMS.txt to R2 with publish-r2.yml (app: jsonprism, <version>/…; a jsonprism-latest.apk alias if you link the APK from the site); draft Gitea release with links (gitea-release-action, draft: true); drop attestations (D7). You publish the draft, which fires release: published for the announcements
announce-release.yml, notify-ci-failure.yml, notify-release-pipeline.yml ops callers at c3e118a (old .github/workflows path) poli0981/.github/.gitea/workflows/<x>.yml@<ops-sha> + ops_ref
announce-discussion.yml posts to GitHub Discussions on release Delete (D11): Gitea has no Discussions; Discord gets the announcement
pages-redirect.yml GitHub Pages redirect poli0981.github.io/jsonPrism/ → the site Delete (D11) with .github/pages-redirect/
maintenance-triage.yml issues + pull_request_target + github-script Delete (D2)

Add a caller of the ops security.yml (node: true, rust: true, cron 19 13 * * 5). .github/dependabot.yml → delete; add renovate.json. .github/FUNDING.yml is GitHub-only.

README.md and README.vi.md (13 each, keep them in parity), CONTRIBUTING.md (8), MAINTAINERS.md (6), DISCLAIMER.md (4), .github/ISSUE_TEMPLATE/ (config.yml 3, accessibility.md, bug_report.md), .github/PULL_REQUEST_TEMPLATE.md (3), package.json (3), ACCESSIBILITY.md + docs/i18n/vi/ACCESSIBILITY.md, public/.well-known/security.txt (2), docs/DEPLOYMENT.md, src/pages/About.tsx, and the tests that pin links: useExternalLinkInterceptor.test.ts, privacy-features.test.ts. CLAUDE.md (deploy path, CI). THIRD-PARTY.md / package-lock.json github.io hits are third-party. SECURITY.md: GitHub advisories → security@poli0981.dev (already documented).

Secrets

Keep QODANA_TOKEN_TS_JS, QODANA_TOKEN_RUST, ANDROID_KEYSTORE_BASE64, ANDROID_KEYSTORE_PASSWORD, ANDROID_KEY_ALIAS, ANDROID_KEY_PASSWORD, DISCORD_*. Create (user level): R2 keys + R2_ACCOUNT_ID, CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID (D3). Drop SONAR_TOKEN and the explicit GITHUB_TOKEN.