Skip to content

K2GO-443 feat(forgejo): repo refresh on the durable job engine - #630

Merged
luisguzman-adfa merged 5 commits into
mainfrom
feat/K2GO-443-forgejo-job-engine
Oct 3, 2026
Merged

luisguzman-adfa merged 5 commits into
mainfrom
feat/K2GO-443-forgejo-job-engine

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

Forgejo is the third content updater. "Update repos" moves from the fire-and-forget wrapper to the
durable job engine. Forgejo is a git operation (per seeded example repo: fetch to a side ref, classify by
ancestry, fast-forward or clean 3-way merge, authenticated push), not a file download, so it runs on the
engine WITHOUT aria2 and without pause/resume: repo-count is the progress and a retry re-runs the
idempotent refresh. The seed (install) path is untouched.

dash-node 1.3.13: forgejo is a job type (POST /forgejo/download, GET /forgejo/jobs/:id with
{phase, percent, detail}, retry/cancel over the generic /:type/* surface). The runner
(sockets/forgejo.exec.ts) wraps the existing refresh_forgejo orchestration and reports per-repo progress
(repo N of M + the current repo) from a new K2GO_PROGRESS marker the orchestration emits, and carries the
per-repo outcome tally (changed/problems/total) in the final detail so the app keeps the
"some could not be updated" / "already up to date" messages.

App: ForgejoRepoRefresh drives the forgejo job through the shared RestContentClient (determinate bar,
current repo, Cancel), replacing the indeterminate bar + status-file poll. ForgejoSeedClient keeps the
seed; its now-unused refresh helpers retire with the legacy route later. The older POST /forgejo/refresh
(wrapper) stays for now.

Verified on device (OnePlus, fresh Full): forgejo seeds (admin + 3 repos) and a refresh runs end to end
on the job engine (per-repo progress, "updated" / "already up to date").

…node 1.3.13)

Forgejo is the third content updater. It is a git operation (fetch + fast-forward/merge + authenticated
push per seeded example repo), not a file download, so it goes on the job engine WITHOUT aria2 and without
pause/resume: repo-count is the progress and a retry re-runs the idempotent refresh. The runner
(sockets/forgejo.exec.ts) wraps the existing refresh_forgejo orchestration and reports per-repo progress
(repo N of M + current repo) from a new K2GO_PROGRESS marker the orchestration emits. The seed (install)
path is untouched; the legacy POST /forgejo/refresh wrapper stays for now.
…te progress)

ForgejoRepoRefresh drives the forgejo job type through the shared RestContentClient: a determinate bar
(repo N of M) with the current repo name (the job detail) and Cancel, replacing the indeterminate bar +
status-file poll. No pause/resume (git). ForgejoSeedClient keeps the seed (drive); its now-unused refresh
helpers retire with the legacy route later.
…ed / up to date)

The job phase alone cannot say a repo conflicted (refresh_forgejo returns 0 even then). The runner now
tallies the per-repo outcomes (same classes as the legacy status route) and carries them in the final
detail (K2GO_SUMMARY changed problems total); ForgejoRepoRefresh parses it in onDone and keeps the
'some could not be updated' / 'already up to date' messages instead of a flat 'updated'.
…tus line

The refresh showed only the current repo and a bar with no number, so an all-up-to-date refresh (git has
nothing to fetch, so it is near-instant) read as no progress. The status line now shows "<pct>%  <repo>"
(percent from onProgress, repo from onLog, both via render()). The percent is coarse by nature (repo
count: 0/33/66 for 3 repos), but it is the visible progress the user expected.
@luisguzman-adfa
luisguzman-adfa merged commit 476a936 into main Oct 3, 2026
4 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/K2GO-443-forgejo-job-engine branch October 3, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant