Skip to content

feat(joblifecycle): the queue journal speaks every transition once - #335

Merged
rldyourmnd merged 2 commits into
mainfrom
feat/job-lifecycle-stream
Sep 1, 2026
Merged

feat(joblifecycle): the queue journal speaks every transition once#335
rldyourmnd merged 2 commits into
mainfrom
feat/job-lifecycle-stream

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

Closes the module half of the estate ledger item job-lifecycle-otel-stream: internal/joblifecycle (transition differ over a tolerant journal read + OpenObserve bulk exporter) and gha-fleet export-job-lifecycle (plan mode prints pending records; --apply delivers then advances watermarks, so failures retry the same records).

The stream is keyed by intent/repository/run with runner and scale-set identity: queued/acquiring/acquired/assigned/running carry the journal's own state_entered_at and waited_seconds; completed closes via the terminal map; vanished names an intent that disappeared without one — the exact orphan class from the correlation-leak incident.

internal/joblifecycle is not in the provider dependency set — no derivative release. Estate follow-up (rides the estate wave): systemd unit+timer on services, dashboards over the stream.

https://claude.ai/code/session_01LsGid6U5RrQdFvJmvYdGCF

Latency questions were answered by correlating GARM journals by hand.
The journal already holds each intent's current state with the time it
was entered; export-job-lifecycle samples it and emits one record per
observed transition into gha_fleet_job_lifecycle -- the whole
queued-acquiring-acquired-assigned-running ladder with the journal's own
timestamps and waited_seconds from first queue time, a completed record
when the intent reaches the terminal map, and a vanished record when it
disappears without one, which is the orphan this fleet has been burned
by. Watermarks advance only after a successful delivery, so a failed
export retries rather than losing records; the journal is read
tolerantly so a schema addition never turns a read-only exporter into a
two-deploy dance.

Claude-Session: https://claude.ai/code/session_01LsGid6U5RrQdFvJmvYdGCF
@rldyourmnd
rldyourmnd merged commit d5b3059 into main Sep 1, 2026
10 checks passed
@rldyourmnd
rldyourmnd deleted the feat/job-lifecycle-stream branch September 1, 2026 17:25
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