mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
Addresses three Copilot review comments on #653. `item_label` comes from a model or a workflow author, and it reaches the terminal through the CLI progress display. A label could carry ANSI escapes, newlines, or bidi overrides and rewrite what the operator sees. It could also be whitespace-only, giving a branch a blank identity. Add `text::sanitize_display_label`: strip ANSI sequences, drop control and bidi-reordering characters, trim, and elide past 80 characters. Return an empty string when nothing printable survives so callers fall back to an identity they control. Apply it where the label is created, so events, the store, and the web UI all get a clean value instead of each consumer having to remember. `parallel_branch_display` sanitizes again, because a run recorded before this commit still has raw labels in its event log. `emit_branch_retrying` now sets `stage.retrying`'s `index` from the branch stage's execution ordinal, matching the envelope `stage_id` and the meaning every other emitter gives that field. The branch's position in the fan-out is already on `parallel.branch.started`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| Cargo.toml | ||