You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tests: save-session harness failures print an empty stderr, because the script redirects stderr to hook-errors.log #210
Every byte written to stderr after that point in save-session.sh goes to that file. So for any test that drives the script as a subprocess, result.stderr is structurally always empty — and the common assertion idiom in this suite is:
assertresult.returncode==0, result.stderr
which prints nothing on failure. The failure message is guaranteed to be blank exactly when you need it.
What it cost
This is not hypothetical — it cost about an hour on #208 today. Two tests failed on all four Ubuntu legs with:
An empty stderr alongside a 127 reads as "the command was never found and the shell said nothing", which sends you looking at PATH and the harness. Two plausible hypotheses were built and killed against that reading before anyone thought to look in hook-errors.log — where the actual message had been sitting the whole time:
<stub>/tail: 10: exec: command: not found
That one line names the root cause outright (Debian dash cannot exec a builtin). With it in the assertion output, the diagnosis is two minutes instead of several CI rounds.
Proposed fix
A small helper that appends the log to the failure message — roughly:
used as assert result.returncode == 0, _failure_detail(result, project) in the harnesses that drive save-session.sh (test_save_session_gates.py, test_ndc_truncate_race.py, test_ndc_tail_failure_no_truncate.py, and any sibling using the same _run).
Two details worth getting right:
It must not fail when the log is absent or unreadable — a helper that throws inside an assertion message turns one clear failure into a confusing one.
Truncate from the end. The log accumulates across the whole run, and the relevant lines are the last ones.
Why bother
The suite is otherwise good at this — it pins post-conditions and its failure messages usually say what went wrong. This is the one place where the harness is guaranteed to withhold the evidence it has, and it will do it again to the next person, in a CI-only failure they cannot reproduce locally.
Surfaced by the agent that diagnosed #208, which flagged it rather than quietly adding it — correctly, since it was outside that PR's scope.
Addendum from the #206 work: on the save-session.sh --dry path, .remember/logs/hook-errors.log does not exist at all — so there is no diagnostic anywhere, not merely one that is hard to find. Whatever helper closes this should say "no hook-errors.log" explicitly rather than printing an empty string, since the absence is itself informative (the redirect in bootstrap-dirs.sh:112 had not been reached yet).
Activity
fdaviddpt commentedon Jul 28, 2026
Addendum from the #206 work: on the
save-session.sh --drypath,.remember/logs/hook-errors.logdoes not exist at all — so there is no diagnostic anywhere, not merely one that is hard to find. Whatever helper closes this should say "no hook-errors.log" explicitly rather than printing an empty string, since the absence is itself informative (the redirect inbootstrap-dirs.sh:112had not been reached yet).Surface hook-errors.log in test-harness failure assertions (#210) (#214)