Repository navigation
Say why a render stopped when its unit tests keep failing - #332
Open
gorandodig wants to merge 1 commit into
Open
gorandodig wants to merge 1 commit into
gorandodig wants to merge 1 commit into
Conversation
When a functionality's unit tests still failed after its last render attempt, the render stopped with "ERROR codeplain: None" in the log, and the TUI got a dict it could not display. The stop now reads "Functionality 1: unit tests still fail after 2 render attempts, 20 fix rounds each. Last unit tests output: <path>" in both the log and the TUI. ExitWithError resolves the stop reason once, and every other stop path logs its message instead of a raw payload.
gorandodig
force-pushed
the
fix/eng-325-name-the-render-stop-cause
branch
from
October 14, 2026 10:29
ba39e55 to
432702b
Compare
gorandodig
marked this pull request as ready for review
October 14, 2026 13:48
hisenb3rg
approved these changes
Oct 16, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a functionality's unit tests still fail after its last render attempt, the render now prints why it stopped and where the last test output is, instead of logging
None.What happens now
The log and the TUI show the same stop reason:
The path is the file the client already writes for every unit tests run, the same one the TUI lists as "Unit tests output". The client doesn't keep a total fix-round count per functionality. A render attempt is only restarted after its unit tests use up all 20 fix rounds, though, so "20 fix rounds each" is exact.
The other stop paths change too, because they go through the same code:
{'error': {'message': ..., 'type': ..., 'details': ...}}.Unexpected error format: dict, and the log has that line once. Before, it was followed by a dump of the last unit tests output.Why it happened
When the last render attempt ran out,
RenderFunctionalRequirementstored its message inlast_error_messagebut returned no error payload.ExitWithErrorlogged whatever payload it was handed, which here wasNone. After that,CodeRendereroverwrotelast_error_messagewithExitWithError's payload dict, andModuleRendererpassed that dict to the TUI. The TUI's error display can't handle a dict: it raisedAttributeError: 'dict' object has no attribute 'translate'.Now
ExitWithErrorworks out the stop reason once. It uses the failed action's error payload if there is one, otherwise the stored message. It logs that reason, andModuleRenderersends the same string to the TUI.RenderError.from_payloadtreats a payload that isn't in the error format as "no error" instead of producingUnexpected error format: dict.dispatch_errorstopped logging, sinceExitWithErrornow logs the message.Verification
tests/test_render_stop_reason.pybefore changing anything. Its two main tests run the real render state machine through the last failing unit tests run of functionality 1, using a unit tests script that exits 1 and a fake API:ExitWithErrorlogs for an error payload, a non-error payload, and no payload.['None']. A scratch probe of the same path showed the TUI receiving adictthat the error display rejected with theAttributeErrorabove. After the fix the probe gets the message string and it renders.Summary by CodeRabbit