Skip to content

fix: preserve comment stream cursor on invalid responses - #33

Merged
carlrannaberg merged 3 commits into
display-dev:mainfrom
RachitSrivastava12:fix/comment-stream-cursor-recovery
Nov 24, 2026
Merged

carlrannaberg merged 3 commits into
display-dev:mainfrom
RachitSrivastava12:fix/comment-stream-cursor-recovery

Conversation

@RachitSrivastava12

@RachitSrivastava12 RachitSrivastava12 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

comments-stream.sh could advance the polling cursor even when jq failed to parse the response, potentially missing comments from the failed polling window. Parsing errors during initial priming were also silently ignored.

This change validates the response before emitting comments or advancing the cursor, so failed polls are retried with the previous cursor instead of skipping feedback.

It preserves the existing deduplication, reply handling, sentinel filtering and seen-file behavior, and synchronizes all five generated skill mounts.

Added 22 regression tests covering malformed responses, cursor recovery, partially invalid batches, nested replies and priming.

Tested

  • node --test — 34 passed, 0 failed
  • bash tests/run.sh — all 10 passed
  • bash tests/claude-hooks.sh — all 22 passed
  • bin/sync-mounts.sh --check
  • ShellCheck (-S warning)
  • git diff --check

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@carlrannaberg
carlrannaberg merged commit 6abd601 into display-dev:main Nov 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants