Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

uhubctl try-out outlasts the relay's 2.5 s light write timeout: the card shows "the arm server did not answer" while the try-out succeeds #638

opened this

Merged 39d 17h ago

Light writes through the relay now wait at least 10 s for the arm server. The owner now gets the lightTried flash instead of "the arm server did not answer" during a uhubctl try-out. Fix: in src/relay.ts, the light write's timeout is now Math.max(readTimeoutMs, 10000).

Notes

opened this

Light writes through the relay now wait at least 10 s for the arm server. The owner now gets the lightTried flash instead of "the arm server did not answer" during a uhubctl try-out.

  • Fix: in src/relay.ts, the light write's timeout is now Math.max(readTimeoutMs, 10_000). It used to be Math.min(readTimeoutMs, 8000), which was 2.5 s by default. The terminal's /grow … switch uhubctl goes through the same relay write, so it gets the longer wait too.
  • Test: src/admin-relay.test.ts has a new case where the stub arm takes 400 ms to answer a uhubctl switch and readTimeoutMs is 100. The page still redirects and shows the lightTried text. I shrank the timings instead of sleeping past 2.5 s so the test stays fast.
  • Checks: admin-relay.test.ts passes (13 tests). bun x tsc --noEmit still reports errors in other files, such as src/ui/zone-notes.test.ts and src/visitor-counts.ts. None are in relay.ts or this test. I didn't run the rest of the suite; the forge's check does that.

Closes #637

commented

Light writes through the relay now wait at least 10 s for the arm server. The owner now gets the lightTried flash instead of "the arm server did not answer" during a uhubctl try-out.

  • Fix: in src/relay.ts, the light write's timeout is now Math.max(readTimeoutMs, 10_000). It used to be Math.min(readTimeoutMs, 8000), which was 2.5 s by default. The terminal's /grow … switch uhubctl goes through the same relay write, so it gets the longer wait too.
  • Test: src/admin-relay.test.ts has a new case where the stub arm takes 400 ms to answer a uhubctl switch and readTimeoutMs is 100. The page still redirects and shows the lightTried text. I shrank the timings instead of sleeping past 2.5 s so the test stays fast.
  • Checks: admin-relay.test.ts passes (13 tests). bun x tsc --noEmit still reports errors in other files, such as src/ui/zone-notes.test.ts and src/visitor-counts.ts. None are in relay.ts or this test. I didn't run the rest of the suite; the forge's check does that.
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs