Skip to main content

Module progress

Module progress 

Source
Expand description

Progress observability for the aicx store pipeline.

Long-running phases (extract / chunk / steer_sync / bm25_sync) emit a Phase event at start, optional tick updates, and a final finish carrying the outcome and elapsed time. Output is routed through a Reporter impl chosen once at subcommand entry by select_reporter:

  • TerminalReporter — compact \r-rewrite line for interactive TTY.
  • StructuredReporter — one [aicx][phase=...] marker per event, line-buffered, used for JSON-emit / non-TTY runs and downstream parsers (the wizard TUI will consume the same surface).
  • NoopReporter — silent, used by callers that don’t want instrumentation (existing public API shims keep this).

Failures recorded via FailureLog::record surface in a tail block with a recovery hint and turn the subcommand exit code non-zero so the operator’s shell prompt visibly flips.

Vibecrafted with AI Agents by VetCoders (c)2024-2026 VetCoders

Structs§

FailureLog
Thread-safe failure buffer shared across pipeline phases.
FailureRecord
Single recorded failure. Crops up in the tail block and informs the non-zero exit code.
NoopReporter
No-op reporter for callers that don’t want instrumentation.
Phase
StructuredReporter
One-line marker per event. Stable enough for downstream parsers (the wizard TUI will consume this surface unchanged) and free of \r rewrites that confuse non-TTY consumers.
TerminalReporter
Compact terminal reporter using the existing \r-rewrite pattern already employed by run_store — so the visual UX stays consistent across stages.

Enums§

PhaseOutcome

Traits§

Reporter

Functions§

recovery_hint_for
Default recovery hint for a known phase. Returns None for unknown phase names so callers can decide whether to fall back to a generic hint or omit the line entirely.
render_failure_tail
Render the failure tail block to stderr and return whether any failures were present (so the caller can choose the exit code).
select_reporter
Choose the reporter based on whether stderr is a TTY and whether the caller asked for structured (json / non-interactive) output.