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

Migrated from github.com/Trevato/SO-ARM100

Relay's /admin routes live in their own module, src/admin-routes.ts - no behaviour change #107

Parked opened this
Closed without merging

The /admin handling now lives in Software/so101/src/admin-routes.ts, and relay.ts calls it. I couldn't run bun x tsc --noEmit here, so the type check is still open; the forge's check on this push will be the first to run it. The earlier preview failed in the place it ran, not in the change.

Notes

stopped parked by the crew deploy db2fe4c

opened this

The /admin handling now lives in Software/so101/src/admin-routes.ts, and relay.ts calls it. I couldn't run bun x tsc --noEmit here, so the type check is still open; the forge's check on this push will be the first to run it.

The earlier preview failed in the place it ran, not in the change. This push is a one-line comment in the relay.ts header, mainly to start a fresh deploy and check.

  • What moved: adminRoutes(lobby, req, res, url, { json, readBody }) holds the code that was in relay.ts, unchanged. That covers the GET page, the 401/403 refusals, the 16 KiB form limit, and the save, mod-add, mod-remove, pause, resume, end and take actions. json and readBody stay in relay.ts, since other routes use them, and are passed in through a small AdminIo interface.
  • Tests: admin-relay.test.ts, relay.test.ts and admin.test.ts pass untouched (26 pass, 0 fail).
  • Type check: bun install and bun x tsc --noEmit both fail in this sandbox because bun can't write to its temp directory. That is a sandbox limit, not a type error.

🤖 Generated with Claude Code

Closes #94

3 earlier comments
commented

The /admin handling now lives in Software/so101/src/admin-routes.ts, and relay.ts calls it. I couldn't run bun x tsc --noEmit here, so the type check is still open; the forge's check on this push will be the first to run it.

The earlier preview failed in the place it ran, not in the change. This push is a one-line comment in the relay.ts header, mainly to start a fresh deploy and check.

  • What moved: adminRoutes(lobby, req, res, url, { json, readBody }) holds the code that was in relay.ts, unchanged. That covers the GET page, the 401/403 refusals, the 16 KiB form limit, and the save, mod-add, mod-remove, pause, resume, end and take actions. json and readBody stay in relay.ts, since other routes use them, and are passed in through a small AdminIo interface.
  • Tests: admin-relay.test.ts, relay.test.ts and admin.test.ts pass untouched (26 pass, 0 fail).
  • Type check: bun install and bun x tsc --noEmit both fail in this sandbox because bun can't write to its temp directory. That is a sandbox limit, not a type error.

🤖 Generated with Claude Code

commented

The failing run on #107 is the preview deploy, and the cause isn't in this change. The check itself hasn't run yet; it is still queued. I haven't pushed anything new.

The deploy failed with ready: /status answered 503 for 30s — arm on http://127.0.0.1:40551 (arm 100.89.95.68:8101: reconnecting; data in so101). /status deliberately returns 503 until the real arm at 100.89.95.68:8101 has answered once (src/relay.ts:367). The preview can't reach that arm, so it never becomes ready. Pull #98 failed the same way, and the log shows it reconnecting to the arm and never connecting.

I did not touch that code. Changing the 503 would alter behaviour, and this issue is no-behaviour-change. If the preview should come up without the arm, that needs its own issue.

What changed: the /admin handling now lives in Software/so101/src/admin-routes.ts, as adminRoutes(lobby, req, res, url, { json, readBody }), and relay.ts calls it. The code is moved unchanged.

Tests: admin-relay.test.ts, relay.test.ts and admin.test.ts pass untouched (26 pass, 0 fail).

Type check: I couldn't run bun x tsc --noEmit because bun can't write to its temp directory in my sandbox. The queued check will be the first to run it.

🤖 Generated with Claude Code

commented

The only failure on #107 is still the preview deploy. The check run is still queued on db2fe4c, and there is no log of a failing test or type error to fix. I've pushed nothing new, because the cause isn't in this change.

The deploy died with /status answered 503 for 30s — arm on http://127.0.0.1:40551 (arm 100.89.95.68:8101: reconnecting). By design, the relay answers 503 on /status until the real arm has answered once (Software/so101/src/relay.ts:367). The preview never reached the arm at 100.89.95.68:8101, so it never became ready. Production's /status does answer 200.

I did not change that readiness behaviour, because this issue is no-behaviour-change. If previews should come up without the arm, that needs its own issue. For example, /status could return 200 with reconnecting: true, or the preview could use the simulated arm.

What changed: the /admin handling now lives in Software/so101/src/admin-routes.ts, as adminRoutes(lobby, req, res, url, { json, readBody }), and relay.ts calls it. The code is moved unchanged. json and readBody stay in relay.ts and are passed in.

Tests: admin-relay.test.ts, relay.test.ts and admin.test.ts pass untouched (26 pass, 0 fail).

Type check: I couldn't run bun x tsc --noEmit here, because bun can't write to its temp directory in this sandbox. The forge's check will be the first to run it.

🤖 Generated with Claude Code

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs