• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

enboxorg / gitd / 22685569257

04 Mar 2026 07:27PM UTC coverage: 83.114% (-0.9%) from 84.043%
22685569257

push

github

web-flow
fix: daemon spawn, nonce replay, and server crash on missing repo (#172)

* chore: add changeset

* fix: daemon spawn, nonce replay, and server crash on missing repo

Three bugs that prevent push from working:

1. findGitdBin() returned a raw .ts path that spawn() tried to execute
   directly, failing with EACCES. Now returns { command, prefix } so
   the daemon is spawned via `bun src/cli/main.ts serve`.

2. createPushAuthenticator() tracked nonces and rejected reuse. Git
   reuses the same credentials for GET ref-discovery and POST
   receive-pack within a single push, so every push got a 401 on the
   second request. Removed nonce tracking — token expiry is sufficient.

3. getRepoContext() called process.exit(1) in a server context, killing
   the daemon when cloning a nonexistent repo. Now throws instead.

* fix: skip daemon auto-start when no vault password is available

resolveLocalDaemon tried to spawn a daemon even without a password,
which would always fail (vault can't unlock). Previously this failed
instantly (EACCES), but now that spawn works correctly it blocks for
15s before timing out. Skip the attempt entirely when no password is
available — this also fixes CI test timeouts in resolveGitEndpoint.

4 of 6 new or added lines in 2 files covered. (66.67%)

89 existing lines in 2 files now uncovered.

7767 of 9345 relevant lines covered (83.11%)

28.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

29.38
/src/daemon/lifecycle.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc