Commit Graph
4 Commits
Author SHA1 Message Date
alex 7114650aed Split workflow modules by concern: plan, run, command 2026-12-01 10:55:35 +00:00
alex c6dae27ec4 Journal each-step items as per-item rows
Each `pi-workflow-run-v1` step record now carries `items`: one row per
fanned-out child with its source line, a stable per-item input hash, status,
attempt count, bounded output, and timings, alongside the step's aggregate
record. The format has shipped nowhere, so it is extended in place.

Item identity (`itemValue`) now rides the task identity into the child's
snapshot instead of living only on the manager's internal task, so the
journal reads the line the child actually ran rather than re-deriving it
from the source output. Item hashes key the plan, step, args, and item line
— never prior outputs — so identical items hash alike across runs, and item
outputs use the same bound and truncation marker as step outputs.

Persistence validates the rows (one-based index, required fields) and the
optional item identity on job snapshots. Round-trip tests cover restore,
bounding, and hash stability, plus a property test for the hash inputs.
2026-11-26 20:09:54 +00:00
alex 5baa7f4508 Merge ticket/t6-journal: journal workflow runs as resume-ready entries
Resolve the t4/t6 overlap in index.ts by keeping the trust-gated workflow
start path and adding the journal persistence hook and entry renderer.

Adapt journal step lookup to the item engine: an each-step's item children
share their step's id, so the run journal records one row per plan step from
the coordinator's aggregate status and joined output. Per-item journal rows
remain a follow-up. Adds a regression test for the seam.
2026-11-26 19:30:47 +00:00
alex e6f062f402 Journal workflow runs as resume-ready entries 2026-11-26 19:24:14 +00:00