Commit 8305bbd
* docs(#211): design spec — maestro_run structured step results + partial-progress-on-timeout
Stdout-only parser generalizing #263; additive result fields
{steps,failedStep,reason,lastStep,timedOut,outputTruncated}. Folds in the
pre-code multi-LLM plan review (codex + claude file-grounded): reason must be
raw-free (parseMaestroFailure embeds full output), maxBuffer-vs-timeout
discrimination, verb trailing-colon strip, data/meta envelope placement,
terminal-only failedStep, ANSI/runFlow edges.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(#211): TDD implementation plan — maestro_run structured step results
6 bite-sized TDD tasks: parseSteps+stripAnsi, buildStepSummary+helpers,
classifyExecError, tap-latency refactor, maestro-run wiring, changeset.
Encodes the multi-LLM review findings as concrete test cases.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(#211): amend plan from codex-pair review — raw-free headline + changeset path
MED#1: add pure formatFailureHeadline (structured, raw-free) for the catch-path
message; raw err.message kept only as system-error fallback.
MED#2: Task 6 runs from repo root, stages repo-root .changeset/ (two-package
frontmatter rn-dev-agent-cdp + rn-dev-agent-plugin).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(#211): parseSteps + stripAnsi — structure maestro-runner step lines
Pure, fail-open parser for `{✓|✗} verb[: sel] (N.Ns)` lines. verb is the first
token (trailing colon stripped); requires trailing (N.Ns) so the rn-maestro-run
summary + count lines are excluded; ANSI-stripped first. 7/7 tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(#211): buildStepSummary + helpers (raw-free reason, terminal-only failedStep)
findFailedStep/lastObservedStep/summarizeReason/buildStepSummary. summarizeReason
projects parseMaestroFailure to {kind,selector}, dropping raw (the full output).
failedStep/reason gated on opts.failed so a fail-then-retry-✓ passed run reports
no failure. 14/14 tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(#211): classifyExecError + formatFailureHeadline
classifyExecError distinguishes timeout (killed, no maxBuffer code) from a 10MB
buffer overflow. formatFailureHeadline builds a raw-free failure message from the
structured summary, naming the failing/last step; raw err.message is fallback
only for system errors. 19/19 tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor(#211): parseTapLatencies derives from shared parseSteps (DRY with #263)
Replaces the duplicated ✓-tapOn line regex with a filter over parseSteps. The
gh-263 suite (13 tests) stays green — behavior is identical.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(#211): maestro_run returns steps/failedStep/reason/lastStep + partial progress on timeout
Spreads the structured summary into the result on success/warn/catch paths
(data on ok/warn, meta on fail; output preserved for run-action). Catch path
classifies timeout vs maxBuffer overflow and builds a raw-free headline naming
the failing/last step. Full suite 2082/2082.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(#211): changeset for maestro_run structured step results
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(#211): address codex-pair review — terminal-fail semantics + bounded fields
- findFailedStep now returns the TERMINAL failed step (last parsed step iff it
failed), so a transient ✗ retried-✓ before a later timeout is not mis-blamed.
- cap step names + reason.selector to 200 chars so a pathological step
name/selector can't balloon the failure headline past the bounded `output`.
3 new tests; full suite 2085/2085.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(#211): eliminate STEP_RE ReDoS + structured headline when reason-only
Multi-review (Codex) found catastrophic backtracking in STEP_RE: the overlapping
`\s+(.*?)\s*` whitespace quantifiers blow up on a glyph + long-whitespace line in
the untrusted combined stdout+stderr (10MB app logs). Benchmark: prior pattern
30s @ n=2000; Codex's minimal `(\S.*?)` still 30ms @ n=4000 on trailing ws.
Switched to `(\S.*\S|\S)\s*\(` (name starts AND ends non-space) — 0ms on all
pathological inputs, byte-identical on valid lines. Also: failure headline now
uses the structured reason when there's no terminal ✗ step line (raw-free).
+2 tests (ReDoS timing guard, reason-only headline). Full suite 2087/2087.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(#211): cap returned steps to most-recent 1000 (PR #302 review P2)
parseSteps appended every match, so a multi-MB stdout/stderr with many
step-shaped lines could bloat the MCP response past the output slice. Cap to the
most recent MAX_STEPS=1000 (failures + partial-progress live at the tail), true
index preserved so a gap signals truncation. +1 test. Full suite 2088/2088.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1c35f6d commit 8305bbd
10 files changed
Lines changed: 1338 additions & 39 deletions
File tree
- .changeset
- docs/superpowers
- plans
- specs
- scripts/cdp-bridge
- dist
- domain
- tools
- src
- domain
- tools
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 627 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 163 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 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 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 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 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
0 commit comments