Observed problem
gstack-timeline-read --branch <name> embeds the branch argument directly into the inline Bun program:
const branch = '${BRANCH}';
A branch name containing a single quote makes the generated JavaScript invalid. The wrapper redirects Bun stderr to /dev/null and exits 0, so the caller receives empty output even though matching timeline entries exist.
Current behavior on upstream main
Verified on current origin/main (029356e1):
- Log a timeline event with branch
feature/o'hare.
gstack-timeline-read shows the event.
gstack-timeline-read --branch "feature/o'hare" exits 0 with no output.
Expected behavior
The branch filter should treat branch names as data and return matching entries, including names with quotes or other shell/JavaScript metacharacters. --since and --limit should also be passed into Bun as data rather than interpolated into source code.
Duplicate searches performed
No existing issue or PR found for this behavior. Searches checked:
Candidate fix shape
Pass the parsed CLI filter values to the Bun subprocess through environment variables, parse and validate --limit inside the Bun code, and add a regression test that reads a timeline entry for a branch containing a single quote.
Observed problem
gstack-timeline-read --branch <name>embeds the branch argument directly into the inline Bun program:A branch name containing a single quote makes the generated JavaScript invalid. The wrapper redirects Bun stderr to
/dev/nulland exits 0, so the caller receives empty output even though matching timeline entries exist.Current behavior on upstream main
Verified on current
origin/main(029356e1):feature/o'hare.gstack-timeline-readshows the event.gstack-timeline-read --branch "feature/o'hare"exits 0 with no output.Expected behavior
The branch filter should treat branch names as data and return matching entries, including names with quotes or other shell/JavaScript metacharacters.
--sinceand--limitshould also be passed into Bun as data rather than interpolated into source code.Duplicate searches performed
No existing issue or PR found for this behavior. Searches checked:
gstack-timeline-read branch quotetimeline read branch apostrophegstack-timeline-read timeline branch quote injectiontimelineopen PRs, including nearby session/telemetry PRs fix: office-hours marks sessions "success" without writing design doc #1049, fix: persist session state across Bash tool calls for accurate telemetry #1050, fix(telemetry): gate preamble session tracking #1188, and feat: add local-first data layer for BI, workflow analytics, and dashboard-ready metrics #1199Candidate fix shape
Pass the parsed CLI filter values to the Bun subprocess through environment variables, parse and validate
--limitinside the Bun code, and add a regression test that reads a timeline entry for a branch containing a single quote.