Expand description
Serve operations P1 per .spec/sot/serve-operations.sot.md:
- O-6: Structured JSON access logs (
ARKS_LOG_FORMAT=json),X-Request-Id, W3Ctraceparent. - O-7: Persistent atomic file-backed job queue (
arks-forge/jobs/). - O-9: Typed TOML config (
--config arks.toml),arks serve config check,*_FILEsecret loader.
Structs§
- JobRecord
- Request
Trace - Request correlation context (O-6):
X-Request-Idand W3Ctraceparent. - Serve
Config
Enums§
Functions§
- complete_
job - Mark a job completed and persist atomically.
- due_
jobs - Claim due pending jobs (
next_run_at <= now) and return them. - enqueue_
job - Atomically persist a new background job into
<git_dir>/arks-forge/jobs/<id>.json. - fail_
job_ with_ backoff - Record a failed attempt with capped exponential backoff (
2^attempts * 5s, max 3600s), transitioning toDeadLetteronceattempts >= max_attempts. - format_
json_ access_ log - list_
jobs - List all persisted jobs in
<git_dir>/arks-forge/jobs/. - maybe_
emit_ json_ access_ log - Emit a single-line JSON access log record when
ARKS_LOG_FORMAT=json(O-6). - resolve_
secret_ env - Resolve a secret from
<VAR>_FILE(trimmed file contents) first, falling back to<VAR>.