Commit graph

9 commits

Author SHA256 Message Date
Till Wegmueller
ceaac25a7e Send incremental UpdateTask with step states during log streaming
Streamer now sends UpdateTask alongside UpdateLog on each poll so
Forgejo maps log lines to steps in real time, not just at completion.
This prevents "Set up job" from accumulating all streamed logs.
2026-04-07 00:44:02 +02:00
Till Wegmueller
49c3ab03c4 Map per-step log ranges to YAML steps using KDL step order
- Streamer sorts step categories in KDL workflow order (not alphabetical)
- Reporter emits one StepState per KDL step, each mapped by position
  to the corresponding YAML step ID
- Setup logs auto-map to "Set up job", per-step logs to their steps
2026-04-07 00:41:26 +02:00
Till Wegmueller
ea3a249918 Fix step mapping: only real YAML steps get StepState entries
Forgejo's "Set up job" and "Complete job" are virtual UI steps that
auto-collect logs outside any real step's range. Only the actual YAML
step (id=0) needs a StepState. Setup logs before its log_index go to
"Set up job" automatically.
2026-04-07 00:36:33 +02:00
Till Wegmueller
f61588e68b Fix streamer category ordering to match step boundaries
Streamer now rebuilds the full sorted log (setup categories first,
then work categories) on each poll and only sends new lines. This
ensures log indices align with the reporter's step boundary
calculation regardless of when categories appear in the DB.
2026-04-07 00:32:54 +02:00
Till Wegmueller
61fca2673d Fix log streaming: no duplicates, proper step boundaries
- Streamer sends only new lines per category (tracks cursor per category)
- Reporter no longer re-uploads logs — only sets step state boundaries
  and sends the no_more marker
- Remove ::group:: markers that cluttered the Forgejo log viewer
- Step 0 (Set up job) gets setup categories (boot, env, tool_check)
- Step 1 (main step) gets workflow step output
2026-04-07 00:23:00 +02:00
Till Wegmueller
3a261b3f2e Add log streaming and fix Forgejo step mapping
- Stream logs to Forgejo in real-time during job execution (polls
  logs-service every 3s)
- Map setup logs (boot, env, tool_check) to "Set up job" step
- Map KDL workflow step logs to the main Actions step
- Add summary line to "Complete job" step
- Use ::group::/::endgroup:: markers for log category sections
2026-04-07 00:13:54 +02:00
Till Wegmueller
d8ef6ef236 Add log delivery and step state reporting to Forgejo runner
Fetches logs from logs-service per category, uploads them to Forgejo
via UpdateLog, and reports per-step StepState entries so the Forgejo
UI shows individual step results and log output.
2026-04-06 23:59:26 +02:00
Till Wegmueller
5dfd9c367b Fix Forgejo runner auth: use x-runner-token/x-runner-uuid headers
Forgejo's connect-rpc API uses custom headers for authentication, not
Authorization: Bearer. Registration uses x-runner-token only, while
post-registration calls require both x-runner-token and x-runner-uuid.
2026-04-06 23:43:07 +02:00
Till Wegmueller
70605a3c3a Add Forgejo Runner integration service
New crate that registers as a Forgejo Actions Runner, polls for tasks
via connect-rpc, translates them into Solstice JobRequests (with 3-tier
fallback: KDL workflow → Actions YAML run steps → unsupported error),
and reports results back to Forgejo.

Includes Containerfile and compose.yml service definition.
2026-04-06 23:34:53 +02:00