Commit 2d6a71d
committed
Give the pipeline stage ledger a reader
Nothing outside internal/coordinator could read pipeline_stage_records -- no
RPC, no session-event kind -- so the per-stage verdicts, timings and skip counts
the whole Pipeline Refinement milestone produces were invisible to any
interface. The evidence existed and had no reader.
PipelineStageService.ListPipelineStages returns one task attempt's recorded
flow. An RPC rather than a durable session event, decided on the shape of the
data: the rows are immutable and fully written before any interface could
announce them, they are addressed by task and attempt rather than delivered in
one session's live order, and the session snapshot is correctness-bearing base
state rather than a stage-by-stage audit trail. Live progress is a real but
different concern the existing tool and plan events already serve.
Migration 000036 adds elapsed_measured. StartedAt and FinishedAt alone cannot
distinguish an untracked start from a genuinely instant stage -- both store
identical equal timestamps -- and inferring it from that equality is exactly
the overstatement this ledger exists to avoid. The bit is decided at write time,
the only point that knows why the timestamps match, and the handler leaves
elapsed unset rather than an explicit zero when unmeasured, so a client reading
only that field cannot quietly treat "not measured" as "instant".
Named elapsed rather than duration, matching TaskView.elapsed, and documented at
the proto as wall clock from the previous stage's record rather than the check's
own processing time.
Bounded at LIMIT 128 as defence in depth -- the schema already caps an attempt
at 64 rows -- with a test proving the bound does not clip a real 38-stage flow.
Proven to discriminate twice: sabotaging the storage write to infer
measured-ness from timestamp inequality failed the re-read assertion, and
sabotaging the handler to always set elapsed failed the wire test.
Unblocks PIPE-006a and PIPE-044.
Committed with --no-verify at the user's explicit request.
TODO: PIPE-006b
Change-Log: CL-20260802-064
Dev-Log: DL-20260802-074
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent c78b03b commit 2d6a71d
15 files changed
Lines changed: 2139 additions & 712 deletions
File tree
- api
- gen/codeflux/v1
- proto/codeflux/v1
- internal
- buildinfo
- coordinator
- storage
- transport
- migrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
45 | 82 | | |
46 | 83 | | |
47 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
28 | 67 | | |
29 | 68 | | |
30 | 69 | | |
| |||
0 commit comments