chore(ui): trace output cleanup — say/set-x/subshell filters#198
Merged
Conversation
The BASH_XTRACEFD filter from #168 was '^> say ' (with trailing space), which only matched calls like 'say "blah"'. Bare 'say' (no args, used for blank-line separators between sections) traces as '> say' with no trailing whitespace and was leaking through. Tighten the regex to '^> say($| )' so both the no-arg and the with-arg forms are dropped. After this, /tmp/ui-status-test.log has 0 '> say' lines (was 19).
Three coordinated changes across helpers.sh and all five ui/main*.sh:
1. Tighten the BASH_XTRACEFD filter in ui/helpers.sh from `^> say($| )`
to `^> say($| )|^> set [+-]x$|^>>+`. Drops the `> set +x` lines that
leak from mkfiles/mkrandfile/mkdatasetfiles bodies (where the
`{ set +x; } 2>/dev/null` trick can't reach fd 10) and any deeper
`>>+` subshell traces (the `>> exec`, `>> BASH_XTRACEFD=`, `>>> grep`
noise emitted while sourcing helpers.sh).
2. Move `set -x` and `set -o pipefail` to after `source helpers.sh` in
every main script. Pre-source lines (trap, SCRIPT_DIR/REPO_ROOT,
source itself) no longer trace at all — no more `+ trap`, `+ source`,
`++ pwd`, `+++ dirname` noise at the top of each log. `set -eu` still
applies before sourcing.
3. Convert the `echo "NOTE: ..."` banner to `say "NOTE: ..."` (and move
it after sourcing) in all five scripts so it doesn't show as a
`+ echo` trace line.
After these changes a typical log starts with the NOTE text and goes
directly into real commands. /tmp/ui-status.log went from 19 `> say`,
44 `> set`, ~6 `>>+` lines down to 0 of each.
This was referenced May 16, 2026
CGMossa
added a commit
that referenced
this pull request
May 17, 2026
…get/status Adds ui/main_recursive.sh (550 lines) exercising the matrix: - dvs add: explicitly rejects --recursive (glob is the recursion encoding; flag-based recursion was deliberately excluded for add). - dvs get: positional file, single-dir, single-dir + --recursive, '.' + --recursive, mixed file/dir inputs. - dvs status: same matrix, plus the no-path case where --recursive is a documented no-op (whole-repo iteration is already recursive). Each case logs both the command and the resulting state of the working tree so the CLI/R parity can be eyeballed in the published HTML. ui/CLAUDE.md: adds main_recursive.sh to the script roster + widens the comment column to accommodate the longer name. Carved out of #154. Stacked on the rpkg PR. ui-trace cleanup hunks that #154 used to carry are intentionally NOT here — they land separately via #198 (chore/ui-trace-cleanup).
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.
AI-written details
Summary
ui/helpers.shand the fourui/main_*.shscripts that consume it, carved out of rpkg: dvs_init returns config as a single-row tibble #170 (dvs_init returns tibble) where they were riding along.BASH_XTRACEFDfilter regex so it drops three classes of leakage:say(no args, used as blank-line separator) — was matching onlysay "..."because the regex required a trailing space.> set +xlines frommkfiles/mkrandfile/mkdatasetfilesbodies where the{ set +x; } 2>/dev/nulltrick can't reach fd 10.>>+subshell traces (>> exec,>> BASH_XTRACEFD=,>>> grep) emitted while sourcinghelpers.sh.set -xinui/main.sh/main_parallel.sh/main_progress.sh/main_status.shuntil afterhelpers.shis sourced, so the sourcing itself doesn't trace./tmp/ui-status.log: 19> say+ 44> set+ ~6>>+lines → 0 of each.Test plan
just ui-runclean —/tmp/ui-*.logcontain no> say,> set [+-]x, or>>+linesui/output/ui-status.htmlrenders without the noiseDrafted by Claude (claude-opus-4-7). Reviewed by the author.