fix(e2e): retain local dev output on failure - #2398
Conversation
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Small, well-targeted test-only diagnostic improvement. The previous error messages interpolated pendingOutput, which only ever contains the trailing partial line (everything up to the last newline is consumed by lines = pendingOutput.split(...); pendingOutput = lines.pop()), so failure messages were nearly always empty. Accumulating a separate devOutput and using that in errors — plus fixing the stdout/stdout → stdout/stderr typo — makes flaky failures much easier to debug. devOutput growing unbounded is fine for a short-lived e2e test process. No new production code, so telemetry/mocking concerns don't apply. LGTM.
|
Claude Security Review: no high-confidence findings. (run) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2398 +/- ##
=========================================
Coverage 97.25% 97.25%
=========================================
Files 612 612
Lines 41004 41004
=========================================
Hits 39878 39878
Misses 1126 1126 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Problem
Follow-up to #2394. That PR added logging of the last message written to stdout/stderr, but this is not enough information.
Solution
This PR dumps the entire output into the error.
Verification
Ran tests locally with a failure in dev and verified the output was there in local logs.
after adding:
into the dev handler.