Skip to content

fix: no traceback after failed builds, and aligned test statuses - #962

Merged
kvlonge merged 2 commits into
mainfrom
fix/build-output-traceback-and-alignment
Oct 6, 2026
Merged

kvlonge merged 2 commits into
mainfrom
fix/build-output-traceback-and-alignment

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Why

A build that failed early (a compile error, or missing upstream models) ended with an "Exception ignored ... TypeError" traceback. Separately, the PASS/FAIL statuses of test rows and their expect rows sat in different columns in sqb build and sqb test output.

Changes

  • Compute log capture reports write failures through a one-argument callback and detaches its stdout/stderr tees on cleanup, so late writes go to the terminal only.
  • Error dispatch clears any live spinner before printing the error, so it no longer redraws at exit.
  • Child rows in the failing-test tree (sqb build) and in sqb test are padded for their tree indent, so statuses line up with the parent row, including long names; the error label lines up with the expectation names.

Verification

  • New unit tests for the capture callback, tee detach and spinner clearing; a new pty E2E test that failed builds exit 1 with no traceback; alignment tests for short and long names. The new tests fail on the old code.
  • Focused pytest, ruff, fensu check and make check-ci.

The compute log tees called their failure callback with the error
positionally, but ScopedComputeLogCapture bound _report with a keyword-only
error, so any capture write failure raised TypeError. After an early
planning or compile failure the transient status line was left running;
its atexit close then wrote through the stale stdout tee to closed storage
and printed the TypeError as an ignored exception.

Report write failures through a matching one-argument method, detach the
tees when capture ends so late writers reach only the terminal, and clear
any live transient line before the dispatch error is reported.
Expectation rows under a failing test are indented further than their
parent row but padded to the same name width, so their PASS/FAIL sat four
columns to the right. Pad tree child names by their extra indentation in
sqb build and sqb test, include that indentation when sizing the name
column so long expectation names still align, and align the nested error
label with the expectation names.
@kvlonge
kvlonge enabled auto-merge (squash) October 6, 2026 06:54
@kvlonge
kvlonge merged commit 12ce749 into main Oct 6, 2026
30 checks passed
@kvlonge
kvlonge deleted the fix/build-output-traceback-and-alignment branch October 6, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant