4.0: Forgejo CI migration and review findings #1

Open
indi wants to merge 39 commits from feat/4.0-review into develop
Owner

Русский

Проблема

Ветка 4.0 закрывает находки ревью и переносит CI и релизы с GitHub на Forgejo. Первый прогон runner-smoke на Forgejo показал, что ссылки на actions записаны без схемы https://, а workflow используют неподдерживаемый ключ permissions:.

Изменение

  • CI, релизы, registry, установщик и проверка обновлений переведены на Forgejo (gitlab.indi.one), документация и CHANGELOG обновлены;
  • закрыты находки ревью 4.0: границы API, бэкапы и восстановление, безопасность сессий и 2FA, производительность, UI и типографика;
  • ссылки на actions во всех workflow — полные URL (https://data.forgejo.org/...): без схемы runner принимал хост за владельца репозитория и падал на git clone до первого шага;
  • вариант развёртывания на Synology NAS (deploy/docker-compose.synology.yml) и инструкция docs/synology.md/docs/synology.en.md для встроенного reverse proxy DSM;
  • убран permissions: — Forgejo его игнорирует и выдаёт warning, права выдаются через Authorized Integrations;
  • новый гейт scripts/checkworkflows в job go-static: запрещает host/owner/repo@ref без схемы и permissions:.

Проверка

  • runner-smoke на Forgejo: job'ы container и host — success, включая artifact round-trip, PostgreSQL, Trivy и Playwright-образ;

  • go test ./scripts/checkworkflows, go vet ./scripts/checkworkflows, gofmt — чисто;

  • go run ./scripts/checkworkflows — 20/20 ссылок, 0 неподдерживаемых ключей;

  • go run ./scripts/checkdocs — OK;

  • forgejo-runner validate --directory . (v13.2.2) — 5/5 workflow OK;

  • полный CI (ci.yml) запускается этим PR.

  • go run ./scripts/checkdocs

  • остальные пункты шаблона закрывает полный прогон CI этого PR

Реестр ревью

Находки закрыты коммитами ветки, реестр docs/review/2026-11-registry.md обновлён в них.

Документация

  • обе языковые версии docs/testing.md и docs/testing.en.md обновлены
  • CHANGELOG.md и CHANGELOG.en.md обновлены

Миграции и откат

Схема БД в этих коммитах не менялась.

English

Problem

The 4.0 branch closes the review findings and moves CI and releases from GitHub to Forgejo. The first runner-smoke run on Forgejo showed that action references lacked the https:// scheme and that workflows used the unsupported permissions: key.

Change

  • CI, releases, the registry, the installer and update checks moved to Forgejo (gitlab.indi.one), with docs and CHANGELOG;
  • 4.0 review findings closed: API boundaries, backup and restore, session and 2FA security, performance, UI and typography;
  • every action reference is a fully qualified URL (https://data.forgejo.org/...): without the scheme the runner read the host as the repository owner and failed on git clone before the first step;
  • a Synology NAS deployment variant (deploy/docker-compose.synology.yml) and a docs/synology.en.md guide for the built-in DSM reverse proxy;
  • removed permissions: — Forgejo ignores it and emits a warning, while capabilities come from Authorized Integrations;
  • new scripts/checkworkflows gate in go-static: rejects a scheme-less host/owner/repo@ref and permissions:.

Verification

  • runner-smoke on Forgejo: the container and host jobs succeeded, including the artifact round-trip, PostgreSQL, Trivy and the Playwright image;

  • go test ./scripts/checkworkflows, go vet ./scripts/checkworkflows, gofmt — clean;

  • go run ./scripts/checkworkflows — 20/20 references, no unsupported keys;

  • go run ./scripts/checkdocs — OK;

  • forgejo-runner validate --directory . (v13.2.2) — 5/5 workflows OK;

  • the full ci.yml pipeline runs on this PR.

  • go run ./scripts/checkdocs

  • the remaining template items are covered by this PR's CI run

Review registry

Findings are closed by the branch commits, and docs/review/2026-11-registry.en.md is updated there.

Documentation

  • both language versions of docs/testing.md and docs/testing.en.md are updated
  • CHANGELOG.md and CHANGELOG.en.md are updated

Migrations and rollback

No database schema changes in these commits.

## Русский ### Проблема Ветка 4.0 закрывает находки ревью и переносит CI и релизы с GitHub на Forgejo. Первый прогон `runner-smoke` на Forgejo показал, что ссылки на actions записаны без схемы `https://`, а workflow используют неподдерживаемый ключ `permissions:`. ### Изменение - CI, релизы, registry, установщик и проверка обновлений переведены на Forgejo (`gitlab.indi.one`), документация и CHANGELOG обновлены; - закрыты находки ревью 4.0: границы API, бэкапы и восстановление, безопасность сессий и 2FA, производительность, UI и типографика; - ссылки на actions во всех workflow — полные URL (`https://data.forgejo.org/...`): без схемы runner принимал хост за владельца репозитория и падал на `git clone` до первого шага; - вариант развёртывания на Synology NAS (`deploy/docker-compose.synology.yml`) и инструкция `docs/synology.md`/`docs/synology.en.md` для встроенного reverse proxy DSM; - убран `permissions:` — Forgejo его игнорирует и выдаёт warning, права выдаются через Authorized Integrations; - новый гейт `scripts/checkworkflows` в job `go-static`: запрещает `host/owner/repo@ref` без схемы и `permissions:`. ### Проверка - `runner-smoke` на Forgejo: job'ы `container` и `host` — success, включая artifact round-trip, PostgreSQL, Trivy и Playwright-образ; - `go test ./scripts/checkworkflows`, `go vet ./scripts/checkworkflows`, `gofmt` — чисто; - `go run ./scripts/checkworkflows` — 20/20 ссылок, 0 неподдерживаемых ключей; - `go run ./scripts/checkdocs` — OK; - `forgejo-runner validate --directory .` (v13.2.2) — 5/5 workflow OK; - полный CI (`ci.yml`) запускается этим PR. - [x] `go run ./scripts/checkdocs` - [ ] остальные пункты шаблона закрывает полный прогон CI этого PR ### Реестр ревью Находки закрыты коммитами ветки, реестр `docs/review/2026-11-registry.md` обновлён в них. ### Документация - [x] обе языковые версии `docs/testing.md` и `docs/testing.en.md` обновлены - [x] `CHANGELOG.md` и `CHANGELOG.en.md` обновлены ### Миграции и откат Схема БД в этих коммитах не менялась. ## English ### Problem The 4.0 branch closes the review findings and moves CI and releases from GitHub to Forgejo. The first `runner-smoke` run on Forgejo showed that action references lacked the `https://` scheme and that workflows used the unsupported `permissions:` key. ### Change - CI, releases, the registry, the installer and update checks moved to Forgejo (`gitlab.indi.one`), with docs and CHANGELOG; - 4.0 review findings closed: API boundaries, backup and restore, session and 2FA security, performance, UI and typography; - every action reference is a fully qualified URL (`https://data.forgejo.org/...`): without the scheme the runner read the host as the repository owner and failed on `git clone` before the first step; - a Synology NAS deployment variant (`deploy/docker-compose.synology.yml`) and a `docs/synology.en.md` guide for the built-in DSM reverse proxy; - removed `permissions:` — Forgejo ignores it and emits a warning, while capabilities come from Authorized Integrations; - new `scripts/checkworkflows` gate in `go-static`: rejects a scheme-less `host/owner/repo@ref` and `permissions:`. ### Verification - `runner-smoke` on Forgejo: the `container` and `host` jobs succeeded, including the artifact round-trip, PostgreSQL, Trivy and the Playwright image; - `go test ./scripts/checkworkflows`, `go vet ./scripts/checkworkflows`, `gofmt` — clean; - `go run ./scripts/checkworkflows` — 20/20 references, no unsupported keys; - `go run ./scripts/checkdocs` — OK; - `forgejo-runner validate --directory .` (v13.2.2) — 5/5 workflows OK; - the full `ci.yml` pipeline runs on this PR. - [x] `go run ./scripts/checkdocs` - [ ] the remaining template items are covered by this PR's CI run ### Review registry Findings are closed by the branch commits, and `docs/review/2026-11-registry.en.md` is updated there. ### Documentation - [x] both language versions of `docs/testing.md` and `docs/testing.en.md` are updated - [x] `CHANGELOG.md` and `CHANGELOG.en.md` are updated ### Migrations and rollback No database schema changes in these commits.
indi added 34 commits 2026-11-27 22:17:34 +03:00
PR-0: import the full review, record the 4.0 baseline, add Go/frontend coverage ratchets, strict integration target, scheduled security scans and a Playwright smoke gate for key UI states. H6 stays blocked until the repository owner configures the approval Environment.
PR-1: return HTTP bind errors instead of exiting 0, cancel request contexts before shutdown, recover background panics, mark interrupted backup runs, bound verify, take an advisory instance/restore lock, use a full pre-restore dump, swap empty files trees, fsync agent pending traffic and make CLI timeouts configurable.
PR-2: honour the WARP kernel TUN toggle, accept traffic/presence only for users rendered for the node with a 10-minute previous-revision grace, bound heartbeat metadata and User-Agent, mask the Telegram SOCKS5 password, reject absolute xray test log/cert paths, return 503 when settings cannot be read, count audit write failures, export users_online, keep pending traffic on older-panel invalid_json, and use sentinel backup errors.
PR-3: users/nodes get a revision column and stale updates return 409; the UI sends revision. Node addresses lock the node row, map unique violations to 409 and refuse deleting the last address. ApplyTraffic sorts presence IDs and retries serialization/deadlock errors. Node position allocation is serialized, TouchUserDevice avoids locking known devices and group deletion invalidates the users cache.
PR-3 follow-up: agents send a monotonic report_seq persisted across restarts; the panel records nodes.last_report_seq and acknowledges stale reports without applying them. Manual activation of limited/expired users requires a raised limit or a future expiry. Self-steal changes return to pending until the heartbeat hash matches.
PR-4: authenticateNode reuses nodeCredentials, dead errNotFound/ListUsers/SetUserGroups are gone, metricsMiddleware owns its status recorder, every /sub response gets noindex, oversized bodies return 413, and the architecture/API docs reflect package map, inbounds order and the verify DB exception.
PR-5: active users use singleflight, render cache TTL is one hour, the render key hashes WARP/self-steal content instead of status timestamps, and the config endpoint returns a 64 KiB preview with a UI notice. The full hash-only render path remains for the next performance pass.
PR-6: retention deletes run in bounded batches; traffic_daily gets a covering day index; OnlineUsersByNode uses a nodes LEFT JOIN; statement_timeout drops to 15s; production compose uses 20 DB connections and GOMEMLIMIT=384MiB. Monthly partitions remain for the dedicated migration pass.
PR-7: POST /api/backups now creates the run row, starts a detached 2h backup worker and returns 202; the client disconnect no longer cancels the dump. The UI polls running jobs every 2s and reports that the backup was started. Signing/encryption and installer verification remain for the security pass.
PR-8: PANEL_URL is parsed as an absolute http(s) URL without userinfo/path/query/fragment and compose values are YAML-quoted; sameOrigin falls back to the PublicURL scheme; backup download/checksum/verify/delete resolve symlinks and re-check containment; traffic_multiplier is bounded to 0.01..100. PostgreSQL roles, Telegram retry and installer signing remain.
PR-9: AuthGate keeps cached data, Settings/NodeConfig show stale data with a banner, route changes restore scroll and focus, enabled nodes are disabled and deleted in one action, dashboard errors show —, error screens have retry, audit labels cover groups/rotation/order, ConfirmDialog blocks close while loading, and 404 crumbs are correct.
PR-10: mobile inputs use 16px to stop iOS zoom, segmented controls expose aria-pressed, Progress bars are labelled, Users uses table roles, Tooltip links its trigger with aria-describedby, touch targets grow on mobile, node status has visible text, charts show Y values, the public QR is 180px and login mentions 2FA. Full axe/contrast/typography matrix remains.
PR-11: a reflection test rejects serialized secret fields; the architecture/API/compatibility/node/monitoring/production/PERF/package docs now match the implemented behaviour, including the ZIP limit, unknown transport, WARP timeout caveat, online metric, package map and node config state. Third-party template licences are inventoried with the remaining legal checklist.
PR-12: Ed25519 signatures and optional age encryption with a key outside the DB/archive, Telegram only receives encrypted archives; runtime and migration PostgreSQL roles with install.sh --upgrade-db-roles; safe panel-init script; route-scoped ErrorBoundary; selfsteal socket allowlist; health/ready endpoint minimization; drop dead traffic indexes and add hot-path partial indexes; docs and registry updated.
PR-12 follow-up: hash-only render cache and bounded render concurrency, ETag/gzip/timeouts, O(1) rate limiter, monthly traffic partitions with partition retention, selfsteal metadata without PEM, batched monthly reset, scheduler alert deduplication and deadlines, agent heartbeat backoff, strict env parsing, DB role wiring and digest pinning. Frontend: abort signals, deferred config parse, dirty modal guards, inline group creation, server-side inbound search, revision diff/reload, sort controls, mobile action bar, typography tokens, setup checklist, subscription theming, status wording, login cooldown, and full light/dark axe matrix. Registry now has zero open rows; H6 and LIC-01 remain blocked on owner actions.
LIC-01 technical part: replace YouTube raster icons/manifest with a neutral SVG, add templates/MANIFEST.md and a catalog test that every template id has a directory, index and the shared MIT licence. Owner legal confirmation remains the external release blocker.
The HTTP handler serialised the same *BackupRun the background goroutine mutates; race detector caught it in TestBackupCreateWithFakeDump. Return a copy and keep the goroutine on the original.
Owner confirmed all 11 templates are AI-generated neutral placeholders. Delete the upstream MIT LICENSE and per-template README files, rewrite MANIFEST and docs/selfsteal-templates, remove upstream links from node/release/contributing docs and the template picker, and extend catalog_test.go to require a manifest row and reject upstream artifacts. LIC-01 is closed; H6 remains the only external release blocker.
The trigger wrapper was a block box around an inline-flex button, so the ellipsis sat ~0.7px above the other badges on a baseline. Make the wrapper a flex row and add a Playwright geometry check on the node config card.
ARCH-L1: API is composed from dependencies/caches/limiters; handlers use domain-split Store ports plus BackupManager and Validator interfaces, and constructors no longer require concrete *store.Store or *backup.Service. ARCH-L2: Xray process validation moved to internal/xraycheck; backup history, archive path/checksum and deletion moved to backup.Service, so HTTP handlers no longer start processes or delete archives. Registry and plan mark both fixed.
PERF-6.2: activeUsers clones the cached slice for handlers, while the render hot path uses an explicitly immutable snapshot. Add an integration test that mutation and append cannot poison the cache; registry marks the risk fixed.
ARCH-Q8: nginx stops through a per-process done channel without a manual unlock inside stopLocked. ARCH-A5: decoder details, raw UUIDs and xray -test output stay in the server log; API responses use stable generic messages. ARCH-TD5: migrations use a local goose.Provider and the warp probe timeout is a constant with an internal test seam.
Forgejo Runner parses a bare `uses: data.forgejo.org/...` value as
owner=data.forgejo.org, so the job cloned
https://data.forgejo.org/data.forgejo.org/forgejo and failed before the first
step. Use fully qualified URLs in every workflow and add
scripts/checkworkflows, which rejects references without an https:// scheme in
the go-static job.
Drop unsupported Forgejo permissions key and guard it
Some checks failed
ci / go (pull_request) Successful in 13m6s
ci / go-static (pull_request) Has been cancelled
ci / workflows (pull_request) Has been cancelled
ci / security (pull_request) Has been cancelled
ci / web (pull_request) Has been cancelled
ci / e2e (pull_request) Has been cancelled
ci / playwright (pull_request) Has been cancelled
ci / docker-build (node) (pull_request) Has been cancelled
ci / docker-build (panel) (pull_request) Has been cancelled
c20e18e16e
Forgejo ignores `permissions:` and reports a workflow warning on every job.
Capabilities come from Authorized Integrations, so remove the key from all
workflows and extend scripts/checkworkflows to reject it at workflow or job
level.
Add Synology deployment variant and guide
Some checks failed
ci / go (pull_request) Has been cancelled
ci / go-static (pull_request) Has been cancelled
ci / workflows (pull_request) Has been cancelled
ci / security (pull_request) Has been cancelled
ci / web (pull_request) Has been cancelled
ci / e2e (pull_request) Has been cancelled
ci / playwright (pull_request) Has been cancelled
ci / docker-build (node) (pull_request) Has been cancelled
ci / docker-build (panel) (pull_request) Has been cancelled
81a97d1061
Add deploy/docker-compose.synology.yml for Container Manager: the same
postgres, panel-init and panel services without the bundled Caddy, with the
panel published on 127.0.0.1:8080 for the DSM reverse proxy. Document the full
flow in docs/synology.md and docs/synology.en.md, including the DSM reverse
proxy, certificate, the nginx body-size/timeout limits and the upgrade path.
Speed up CI and build only amd64 images on pull requests
Some checks failed
ci / go (pull_request) Successful in 3m22s
ci / go-static (pull_request) Failing after 36s
ci / workflows (pull_request) Successful in 7s
ci / security (pull_request) Successful in 8s
ci / web (pull_request) Failing after 25s
ci / e2e (pull_request) Has been cancelled
ci / playwright (pull_request) Has been cancelled
ci / docker-build (node) (pull_request) Has been cancelled
ci / docker-build (panel) (pull_request) Has been cancelled
637bde6a2e
The runner announces its action cache server on the public IP and job
containers cannot reach it, so setup-go spent about 4m39s on a failing restore
and 4m45s on a failing save in every job; go-static was stuck in the same
restore. Even with a working server the GOCACHE archive takes longer than a
cold build, so disable the setup-go and setup-node caches and stop paying for
timeouts.

Build only linux/amd64 in the PR docker-build job: arm64 runs through QEMU and
more than doubles the build. Pushes to main/develop and manual runs still build
both architectures, matching the policy from 1.9.0 before the 4.0 review branch.
Regenerate TypeScript types for node error kinds
Some checks failed
ci / go (pull_request) Has been cancelled
ci / go-static (pull_request) Has been cancelled
ci / workflows (pull_request) Has been cancelled
ci / security (pull_request) Has been cancelled
ci / web (pull_request) Has been cancelled
ci / e2e (pull_request) Has been cancelled
ci / playwright (pull_request) Has been cancelled
ci / docker-build (node) (pull_request) Has been cancelled
ci / docker-build (panel) (pull_request) Has been cancelled
36b2c072bb
The branch added last_error_kind, report_seq and the nodeerror.go constants in
Go without regenerating web/src/lib/api.gen.ts, so the go-static generated-types
check failed. Output of scripts/generate-types.sh at v0.2.21.
Fix web lint keys and the node fixture for regenerated types
Some checks failed
ci / go (pull_request) Successful in 3m24s
ci / go-static (pull_request) Failing after 1m33s
ci / workflows (pull_request) Successful in 7s
ci / security (pull_request) Successful in 8s
ci / web (pull_request) Failing after 1m15s
ci / e2e (pull_request) Failing after 55s
ci / playwright (pull_request) Successful in 3m16s
ci / docker-build (node) (pull_request) Has been skipped
ci / docker-build (panel) (pull_request) Has been skipped
2ee32b2d32
Biome rejected array indexes as React keys in the revision diff preview and the
page loader. Give each diff line a positional id and render the skeleton cards
from a static list. The test fixture now sets the required last_error_kind that
the regenerated api.gen.ts exposed.
Fix staticcheck finding and cover web gaps for the coverage ratchet
Some checks are pending
ci / web (pull_request) Waiting to run
ci / e2e (pull_request) Waiting to run
ci / go-static (pull_request) Waiting to run
ci / workflows (pull_request) Waiting to run
ci / security (pull_request) Waiting to run
ci / playwright (pull_request) Waiting to run
ci / docker-build (node) (pull_request) Blocked by required conditions
ci / docker-build (panel) (pull_request) Blocked by required conditions
ci / go (pull_request) Has started running
14674d9764
staticcheck reported SA4006 for the discarded append result in the active users
test; assert the appended length instead. Relative time has an English branch
that no test exercised, and a few date helpers lacked their invalid-input
returns, which left web coverage at 77.81% against the 78% line ratchet; add
those cases and a fresh-module test for the English labels.
Some checks are pending
ci / web (pull_request) Waiting to run
ci / e2e (pull_request) Waiting to run
ci / go-static (pull_request) Waiting to run
ci / workflows (pull_request) Waiting to run
ci / security (pull_request) Waiting to run
ci / playwright (pull_request) Waiting to run
ci / docker-build (node) (pull_request) Blocked by required conditions
ci / docker-build (panel) (pull_request) Blocked by required conditions
ci / go (pull_request) Has started running
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'feat/4.0-review:feat/4.0-review'
git switch 'feat/4.0-review'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'develop'
git merge --no-ff 'feat/4.0-review'
git switch 'feat/4.0-review'
git rebase 'develop'
git switch 'develop'
git merge --ff-only 'feat/4.0-review'
git switch 'feat/4.0-review'
git rebase 'develop'
git switch 'develop'
git merge --no-ff 'feat/4.0-review'
git switch 'develop'
git merge --squash 'feat/4.0-review'
git switch 'develop'
git merge --ff-only 'feat/4.0-review'
git switch 'develop'
git merge 'feat/4.0-review'
git push origin 'develop'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
indi/soliton-panel!1
No description provided.