Skip to content

fix(replay): resolve Maestro failures and resize progress - #1450

Merged
thymikee merged 5 commits into
mainfrom
agent/maestro-replay-diagnostics
Jul 28, 2026
Merged

fix(replay): resolve Maestro failures and resize progress#1450
thymikee merged 5 commits into
mainfrom
agent/maestro-replay-diagnostics

Conversation

@thymikee

@thymikee thymikee commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

Resolve Maestro variables at the failing runtime boundary so target labels and runFlow paths are actionable without adding new environment or secret flags.

  • Keep Maestro-compatible -e/--env KEY=VALUE; resolved diagnostic identifiers appear in failure output, matching what Maestro attempted.
  • Treat text entry as the security boundary: resolved inputText payloads are registered with centralized diagnostics redaction at dispatch and remain hidden from failures. Sensitive recorded input continues to use --record-as.
  • Preserve typed error metadata and daemon-owned paths; ordinary env values such as 2, on, or ios cannot corrupt diagnostic timestamps, keys, platform fields, or artifact paths.
  • Normalize malformed replay env entries as daemon INVALID_ARGS responses instead of allowing the request handler to throw.
  • Bound live-progress cleanup after terminal resize so reflow is cleared without erasing completed output in non-reflowing multiplexers.
  • Document the public secrets contract and the intentional native .ad/Maestro diagnostic policy in ADR 0012 and replay guidance.

Validation

  • Full pre-push gate passed with unit execution serialized for host stability: lint, typecheck, layering, production exports, metadata, build, Fallow, 4,655 unit tests, and smoke tests.
  • Focused router, failure projection, Maestro, divergence, support-matrix, and resize regressions passed.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.87 MB 1.87 MB +213 B
JS gzip 598.7 kB 598.8 kB +128 B
npm tarball 714.2 kB 714.5 kB +325 B
npm unpacked 2.50 MB 2.50 MB +1.7 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.8 ms 26.1 ms -0.7 ms
CLI --help 54.2 ms 54.0 ms -0.2 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/reporting.js +381 B +156 B
dist/src/session.js -328 B -79 B
dist/src/cli-help.js +160 B +51 B

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-28 14:55 UTC

@thymikee thymikee changed the title fix(replay): secure Maestro failure diagnostics fix(replay): resolve Maestro failures and resize progress Jul 28, 2026
@thymikee

Copy link
Copy Markdown
Member Author

Not ready at 1b2a98c:

  1. Owner-action CI failure: Coverage fails because MAESTRO_COMPAT_LIMITATIONS changed its canonical Environment statement while website/docs/docs/replay-e2e.md split/rephrased it; support-matrix.test.ts requires the contract statement verbatim. Align the website boundary text with the support-matrix contract (or deliberately change contract/test/docs together), then rerun the focused support-matrix test and Coverage.
  2. P2 — resize regression test is too weak. progress.test.ts claims to verify every reflowed row is cleared but only asserts that output contains one cursor-up sequence. In the 80→20-column case the previous row occupies four physical rows; an implementation that clears only two would still pass. Assert the exact full clear prefix/count (three cursor-up moves and four erase-line commands), preferably derived from the prior visible width and resized column count.

The replay failure/redaction production path otherwise reviewed clean: identifiers resolve at the runtime boundary, input text is excluded from failure artifacts, injected diagnostic values are registered centrally, and no device-specific validation is required.

@thymikee

Copy link
Copy Markdown
Member Author

P2 — The new four-row cleanup cap reintroduces stale live-progress rows after a large width decrease. The previous line is truncated to the old terminal width, so a 200-column line resized to 20 columns occupies ten rows in a reflowing terminal; Math.min(MAX_LIVE_PROGRESS_CLEAR_ROWS, ...) clears only four, leaving six stale rows. The new test explicitly pins the incomplete cleanup by expecting only three cursor-ups. Please restore full reflow cleanup and assert nine cursor-ups/ten clears for 200→20, or use a capability strategy that distinguishes non-reflowing terminals without weakening reflowing-terminal behavior. The prior support-matrix and test-strength findings are otherwise resolved, and exact-head checks are green.

@thymikee

Copy link
Copy Markdown
Member Author

Addressed both items:

  1. The canonical support-matrix limitation and website/docs/docs/replay-e2e.md now use the same verbatim failure-diagnostics statement (8f6c1f0ac).
  2. The resize regression now derives the four reflowed rows from the initial visible width and resized column count, then asserts the exact clear prefix: four erase-line commands and three cursor-up moves (f121ac0f7).

Validation is green with deterministic unit execution: tooling, Fallow, 522 test files / 4,655 unit tests, and smoke tests.

@thymikee

Copy link
Copy Markdown
Member Author

P2 remains unresolved at f121ac0. The production code still caps cleanup with Math.min(MAX_LIVE_PROGRESS_CLEAR_ROWS, ...). The new 80→20 test proves only the four-row boundary; it does not cover the failing 200→20 case, and the adjacent test still expects just three cursor-ups there. A reflowing terminal needs nine cursor-ups/ten clears, so six stale rows remain. Please fix the implementation and assert the full 200→20 cleanup rather than strengthening a test that stops at the existing cap. Exact-head checks are otherwise green, with iOS Smoke still running.

@thymikee

Copy link
Copy Markdown
Member Author

Resolved in 791c86d9d.

  • Removed the four-row cap. Reflowing terminals now clear the complete previous width: the 200→20 regression asserts ten erase-line commands and nine cursor-up moves.
  • Added an explicit terminal capability for non-reflowing multiplexers. The default reporter detects tmux/GNU Screen sessions and uses single-row cleanup there, avoiding deletion of completed output.
  • Added a reporter-level tmux regression in addition to the renderer tests.

Validation is green: tooling, Fallow, 522 test files / 4,657 unit tests, and smoke tests.

@thymikee

Copy link
Copy Markdown
Member Author

Re-reviewed at 791c86d: clean and ready for human review. The resize defect is resolved—the reflowing path now clears all computed rows, the 200→20 regression asserts ten clears/nine cursor-ups, and tmux/screen use the explicit non-reflowing one-row path with reporter-level coverage. Exact-head checks are green.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 28, 2026
@thymikee
thymikee merged commit b2b116f into main Jul 28, 2026
30 checks passed
@thymikee
thymikee deleted the agent/maestro-replay-diagnostics branch July 28, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant