Durable per-job run history + logs (read model for the panel) - #14
Merged
Conversation
…guration" passed gates Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGgfho2J6YfRSQN1bSDhj6
…un-history module" passed gates Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGgfho2J6YfRSQN1bSDhj6
…iner output capture" passed gates Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGgfho2J6YfRSQN1bSDhj6
…s record assembly + wiring" passed gates Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGgfho2J6YfRSQN1bSDhj6
…, contract test, docs, deploy notes" passed gates Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGgfho2J6YfRSQN1bSDhj6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Durable per-job run history + logs — the read-model layer a future admin panel reads (issue #4). Each job reaching a terminal state now persists a PII-free, id-keyed status record (
logs/<jobId>.json) via a synchronous write that beats the shutdown race; whenPI_CAPTURE_JOB_LOGS=1(opt-in, off by default) the container's raw output is also tee'd tologs/<jobId>.log. No new database — a flatnode:fssidecar keyed by job id, with a boot-time age sweep (PI_LOG_RETENTION_DAYS) for retention. All host-side, never mounted into the container; the raw log is gitignored.The record captures what BullMQ's retained job cannot:
exitCode,turns(parsed from the runner'sexitstdout line), andbudgetReserved— for every terminal outcome (completed / policy / infra-failure). The log/record path is money-path-adjacent, so it is fault-isolated end-to-end: a throwing or rejecting sink/writer can neither hang nor crash the run and never changes the throw-vs-return retry classification (proven by the load-bearing acceptance tests) — no double-spend, no lost retry.{code, aborted}and the reserve-before-container order are byte-identical.New specs:
REQ-DURABLE-RUN-HISTORY,INT-RUN-HISTORY-FILE-CONTRACT,DES-RUN-HISTORY-FLAT-FILES-NO-DB, andOQ-007(periodic-sweep retention, left OPEN).Verification
0.80.7; runner tests 58/58 incl. newturnscontract testContainer one-job E2E was skipped (no provider key in the runner environment — optional per the plan).
Closes #4
🤖 Generated with Claude Code