Repository navigation
dsh-superagent-prototype: two defects with fixes (service process on Node 24; late GitHub mentions lost) #11700
mikel38487
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.
I installed
deepseek-ai/dsh-superagent-prototypefollowing itsSETUP.mdand ran it against a real repository (Ubuntu 26.04 under WSL2, Node.js 24.22.2, dsh 0.2.1-rc.5, GitHub CLI 2.103). Two defects showed up in the first hour. I fixed both, added regression tests and verified them; the prototype repository has pull requests and issues disabled, so I am posting the report here.1. The service script cannot find a running service on Node.js 24
Node 24 names its main thread
MainThread, andps -o comm=/ucomm=reports that name for the process.processes()inscripts/dsh-superagentmatched it againstnodeanddsh, sostatusprintedpids: []and exited 1 while the service was listening and its tmux session was alive.startthen waited out its 60-second health check and reported a timeout, andstopfound nothing to stop.Fix: take the process name from the first word of its command line instead of the
commcolumn. Thepsformat stays the same, sotmux,sleepanddsh plugin …are still rejected. A regression test uses a fixture whosecommisMainThread.2. A comment can be lost for good when GitHub reports the mention late
pollNotificationsread a notified thread frommax(thread cursor, notifications window), where the window starts at the previous round start minus five seconds.intakeCommentsdrops comments older than that, andreadNotifiedthen moved the thread's cursor to the new round start — past the dropped comment. The comment is never read again, while the notification stays unread in the account's inbox because thesincequery no longer returns it ("only show results that were last updated after the given time").Reproduced twice on a live repository:
19:42:59→19:47:05with no trigger in between;gh api notificationsstill listed the thread withupdated_at 19:42:07, older than the window being read.Fix: a thread read before starts at its own read position; a thread the Source never read starts an hour before the notifications window. Re-reading is harmless — trigger ids are deterministic and
Intake.receivedrops duplicates. Two regression tests cover both cases.Verification
pnpm typecheckis clean, the fullpnpm vitest runpasses (59 files, 1200 tests),pnpm buildsucceeds, and the patch applies to a fresh clone ofmain. Both new tests fail without the patch. Two independent reviewers looked at the change; their findings (a weaker first version of fix 2, an existing false positive inserves()for one-offdsh --profile …commands, and apsparsing caveat with spaces in the binary path) are documented with the branch.Minor documentation gaps
SETUP.mdanddocs/006-deployment.mddo not say that the bundle is POSIX-only:worker-binis#!/bin/shshims and the service script usesps,tmuxandfcntl, so native Windows cannot work — WSL was needed. Alsogh2.48+ is required, but the probe only prints the version; Ubuntu 26.04's apt package is 2.46, which fails later in setup.Where the code is
The changes are on branches of a fork, ready to become pull requests if the repository is opened for contributions:
pr/service-command— https://github.com/mikel38487/dsh-superagent-prototype/tree/pr/service-commandpr/notified-thread— https://github.com/mikel38487/dsh-superagent-prototype/tree/pr/notified-threadI can attach the patch or a short reproduction script for the second defect on request.
P.S. The author address in the prototype's
package.json(team@dsh.dev) does not deliver:dsh.devhas an SOA record but no MX, A or AAAA.All reactions