Skip to content

feat: add machine-readable run progress for long commands#21

Merged
Monotox merged 1 commit into
mainfrom
feat/machine-readable-run-progress
Jun 1, 2026
Merged

feat: add machine-readable run progress for long commands#21
Monotox merged 1 commit into
mainfrom
feat/machine-readable-run-progress

Conversation

@Monotox

@Monotox Monotox commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

Test Plan

  • uv run pytest passes
  • uv run ruff check . passes
  • Documentation updated, if user-facing behavior changed
  • Golden fixtures updated, if a public JSON or Markdown contract changed

Contract Impact

  • No public contract surfaces changed
  • Public contract changes are intentional and versioned per docs/VERSIONING_POLICY.md

Let the long-running commands stream structured JSONL progress so a
non-interactive worker can show live progress instead of a flat "running"
until exit. sample, propagate, and batch gain two opt-in flags:
--progress-format jsonl (records to stderr) and --progress-file PATH
(records to a sidecar file). Each line is a compact JSON object with stable
keys (event, command, completed, total, elapsed_s), completed increases
monotonically, and the final record always has completed == total.

A keyword-only progress callback is threaded through run_monte_carlo,
run_stochastic_propagation, and run_batch_manifest; default None preserves
today's behaviour exactly. Progress is a stderr/sidecar side-channel only:
it never touches the --output stream, adds no schema or envelope version,
and leaves the result envelope, deterministic results, and exit codes
unchanged. elapsed_s is monotonic wall-clock and kept out of golden output.

Also ran ruff format on the touched modules to clear pre-existing line-wrap
violations in those files.
@Monotox Monotox merged commit 0cb573b into main Jun 1, 2026
4 checks passed
@Monotox Monotox deleted the feat/machine-readable-run-progress branch June 1, 2026 05:38
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