Skip to content

gstack-timeline-read drops branch filters containing apostrophes #1634

@jbetala7

Description

@jbetala7

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):

  1. Log a timeline event with branch feature/o'hare.
  2. gstack-timeline-read shows the event.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions