Repository navigation
[Bug + tested fix] dsh-superagent-prototype: GitHub observation stalls after 100 same-time events #11774
ericcaiwx-star
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The repository-wide observation streams in
deepseek-ai/dsh-superagent-prototyperead only their first page. More than 100 items sharing an update timestamp can keep later items unread while the Source reports a successful poll.Posting here because the prototype repository currently has Issues/Discussions disabled and its PR endpoint returns 404. Harness's contribution guide directs bug reports to Discussions; #11700 already reports prototype defects here.
Baseline:
6337fc823ce20251c8de8085948165c81aaa701e. This concernsreadStream, not #11700's delayed-notification cursor fix.Reproduction and cause
Enable
observeIssues/observePullsorobserveComments, with no notification or subscribed-thread path supplying the missing events. Start with a stream cursor before T. Return 201 valid items updated at T, across pages of 100, 100 and 1.readStreamrequestsper_page=100with ascending update order, ignoresLink: ... rel="next", and advances to the first page's newest update minus five seconds. Subsequent polls see those same first 100 items. Once the cursor stops moving, the first-page ETag can yield 304 without the Source ever reading later pages.The offline regression observes 100 of 201 items on the baseline in each of the issues/PR, conversation-comment and inline-comment streams. Other intake paths can sometimes recover an event; this report isolates repository observation rather than claiming every missing item is lost by the entire system.
Fix
Three files, +115/−12 lines, no dependency/configuration-setting changes:
Commands.pageshelper to read the complete list before advancing the cursor.singlePage; legacy ETags are refreshed unconditionally once because they may represent an incomplete first page.The multi-page case repeats the first request through the existing pagination helper. This keeps the patch small and consistent with notification polling; it costs one extra request on paginated polls. No arbitrary Link target is executed by this code.
Verification
Mac Studio / macOS arm64, Node 26.7.0; dependencies installed with pnpm 11.7.0,
--frozen-lockfile --ignore-scripts. Empty test HOME/configuration, no real account credentials or paid models. The test processes ran with external networking denied; existing HTTP tests used local fixtures.git apply --check --whitespace=error-all).The
checkscript's three commands were run through their locked local executables (tsc --noEmit,vitest run,tsdown); the pnpm version launcher was stopped before checks began when it waited under the offline sandbox. The new tests mock the CLI transport while exercisingpollRound, Engine and SQLite; they do not claim a live GitHub reproduction or real gh process cancellation proof.Patch
Local commit
64a4efe2477403dec00db6e3bb3bd729fb7413fb,Eric Cai <ericcaiwx@gmail.com>. The complete mail-format patch is included below so no fork is required. Save the code block asgithub-stream-pagination.patch; it supportsgit amor inspection withgit apply --checkagainst the baseline. MIT terms remain unchanged.Complete patch: fix(github): read all observed repository stream pages
All reactions