Skip to content

gh-pulse: quiet cron, a clamped spinner, a rescan that rescans (0.36.1) - #73

Merged
ralyodio merged 1 commit into
masterfrom
gh-pulse-busy-fixes
Sep 13, 2026
Merged

ralyodio merged 1 commit into
masterfrom
gh-pulse-busy-fixes

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

What

Follow-ups from an adversarial review of the busy indicator shipped in 0.35.0 (each finding verified against the source):

  • Cron log is quiet again. The daily run passed its per-ten progress counts to the plain logger whenever stderr was not a terminal, so cron.log gained ~2×ceil(N/10) lines per run that it never had. The counts now ride the spinner only on a terminal; cron prints exactly the coarse lines it printed before 0.35.0 (verified with env -i).
  • Spinner row clamped to the terminal width. \r\x1b[K only clears the last physical row of a wrapped line, so an overlong row walked down the screen a row per tick. Clamped with an ellipsis; the final line still prints whole.
  • done() is idempotent. The --range path could call it twice (once on success, again from the catch if the read after it threw) and print the last line twice; it is now a try/finally and stops once.
  • r rescans. force was dropped at the ShowOptions.loadRange boundary, so within an hour of any scan r showed "rescanning" for a microtask and returned the cache. Threaded through.
  • No stale "still scanning" notice after the scan finishes; the success handler clears it.
  • ASCII glyph on non-Unicode terminals for the loading range button, matching what the spinner line already does via capabilities.unicode.
  • Tests for the spinner's non-TTY, clamping and idempotent-stop behaviour.

Tested

tsc --noEmit baseline only; full suite 969 pass; cron-like dry run shows coarse lines only.

🤖 Generated with Claude Code

https://claude.ai/code/session_011gfb1vcQH5rf82HfbJvf1Z

Follow-ups from a review of the busy indicator. The daily run handed its
per-ten progress counts to the plain logger when stderr was not a terminal,
so every cron.log grew ~70 lines it never had; the counts now ride the
spinner only on a terminal and cron prints exactly what it printed before.
The command-line spinner clamps its row to the terminal width (an overlong
row walked down the screen a row per tick) and stops exactly once (the
range path could stop it twice and print the last line twice). In the TUI,
`r` finally forces a rescan (force was dropped at the ShowOptions boundary
and the hour-fresh cache came back), a "still scanning" notice no longer
outlives the scan, and the loading range button uses the ascii frames on a
terminal without Unicode, like the spinner line does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gfb1vcQH5rf82HfbJvf1Z
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

13 finding(s)

HIGH/CRITICAL: 4 | MEDIUM: 5 | LOW: 4

Severity Rule Location
HIGH sh-remote-script-execution root-ubuntu.sh:3227
HIGH sh-remote-script-execution root-ubuntu.sh:3228
HIGH sh-remote-script-execution root-ubuntu.sh:4840
HIGH sh-remote-script-execution root-ubuntu.sh:4844
MEDIUM sh-remote-script-execution root-ubuntu.sh:4993
MEDIUM sh-remote-script-execution root-ubuntu.sh:6055
MEDIUM redos-nested-quantifier src/domain-free.ts:56
MEDIUM redos-nested-quantifier src/mail.ts:1042
MEDIUM redos-nested-quantifier src/wcag.ts:556
LOW secret-generic-credential src/credentials.ts:36
LOW secret-generic-api-key test/credentials.test.ts:208
LOW secret-generic-credential test/mail.test.ts:135
LOW secret-generic-credential test/shorten.test.ts:36

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 9f7610f into master Sep 13, 2026
5 checks passed
@ralyodio
ralyodio deleted the gh-pulse-busy-fixes branch September 13, 2026 07:17
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.

1 participant