Skip to content

fix(timeline): validate read limit - #1724

Closed
jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-1723-timeline-limit
Closed

jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-1723-timeline-limit

Conversation

@jbetala7

Copy link
Copy Markdown
Contributor

Summary

  • reject malformed gstack-timeline-read --limit values before the formatter pipeline
  • keep valid positive integer limits working, including the existing output path
  • add timeline CLI coverage for malformed, zero, negative, and decimal limits

Validation

  • bun test --timeout 20000 test/timeline.test.ts
  • bash -n bin/gstack-timeline-read
  • direct repro: ./bin/gstack-timeline-read --limit 1abc exits 1 with gstack-timeline-read: --limit requires a positive integer; --limit 1 still returns one recent event
  • git diff --check
  • git merge-tree --write-tree HEAD origin/main

Fixes #1723

@time-attack

time-attack commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

@jbetala7 Please rewrite the validation to reject arbitrarily long digit strings as well as malformed, zero, negative, and decimal values.

@capy-ai

capy-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, @jbetala7. The fix is now on main: bin/gstack-timeline-read parses the limit safely and falls back to 20 (already on main as of v1.91.16.0). Closing as superseded; if you still see the problem on the latest gstack, please open an issue with ./setup --status output.

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.

gstack-timeline-read accepts malformed --limit values

2 participants