RFC-0001: its decisions in full¶
Rows of the decision inventory, from the RFC.
RFC-0001-1: The NXT UI is a standard-library Python server and one HTML file, with a fake brick behind the same methods¶
- Decided:
nxt-webuses only the Python standard library for the server (no web framework, no new runtime dependency beyond nxt-python) and one HTML page with no build step and no outside libraries.NxtRobot(real) andFakeRobot(--fake) sit behind the same methods so everything above them is tested without hardware. - Why: "polling at 300 ms is enough at these rates"; a framework with WebSockets would give smoother updates "but new dependencies" (§5). The fake backend is so the smoke test covers every endpoint without a brick (§3.1, §4).
- How:
apps/nxt-web/src/nxt_lab/(web.py,robot.py,static/index.html);make test-unit(smoke test),make nxt-web-fake(§8). - Alternatives rejected: a web framework (FastAPI, Flask) with WebSockets; a desktop app (no
phone access); nxt-python's own
nxt-serveras the UI (a byte pipe, no UI) (§5). - RFC status and section: Proposed (as built), §3.1, §5.
- Who decided and when: the RFC states it as built; the operator asked for the first version on 2026-11-13 (§8). The RFC does not record the operator choosing "no framework" as such.
- Existing ADR: none.
- Later changed by: RFC-0014 §2 table C1 (docs/rfc/RFC-0014-mission-control.md line 91): Mission
Control is "a new app.
nxt-webstays the NXT's small playground and is not generalised". That changes RFC-0006's plan to grow nxt-web into the product, not this decision itself. Also RFC-0017 cites nxt-web as an existing client. Checked: RFC-0010 to RFC-0032 by grep. - In code: Yes:
apps/nxt-web/src/nxt_lab/{web.py,robot.py,static/index.html}exist.
RFC-0001-2: PC-side motor safety: hold-to-drive watchdog, stop on exit and on connect, program interlock, clamped power¶
- Decided: Because stock NXT firmware keeps a motor's last command, the server (a) resends drive every 200 ms and stops motors when none arrives for 0.6 s, (b) stops motors on Ctrl-C and SIGTERM, (c) stops motors on every connect and logs it, (d) refuses driving and firing and stops sensor reads while a program runs on the brick, (e) clamps power to ±100, validates upload names, limits request bodies to 256 KB.
- Why: "The NXT's stock firmware has no deadman" (§3.3); incident 1 (a test left both tracks at power 50 after a kill) and review finding MAJ-3 (a fresh connection believes the motors are stopped when they are not).
- How:
apps/nxt-web/src/nxt_lab/robot.py,web.py,lock.py; smoke test andmake test-hardware(§4). - Alternatives rejected: none named for these rules; leJOS firmware replacement is rejected in §5 (see 0001-4).
- RFC status and section: Proposed (as built), §3.3, §6.
- Who decided and when: not stated as an operator decision; written from incidents of 2026-11-14.
- Existing ADR: none (the deadman half is RFC-0003-2; no ADR on robot safety rules).
- Later changed by: RFC-0003 §2.3 and §2.4 (the on-brick deadman becomes the default drive mode; robotd-lite is the one program under which driving is allowed). RFC-0014 §3.8 (docs/rfc/RFC-0014-mission-control.md around lines 700 to 715) cites RFC-0001 §3.3 for the safety layer Mission Control keeps. Checked: RFC-0010 to RFC-0032 by grep.
- In code: Yes:
apps/nxt-web/src/nxt_lab/lock.py,deadman.pyexist; the smoke test was not run by me.
RFC-0001-3: The shooter is off unless switched on in Setup¶
Architecture ADR: ADR-0024.
- Decided:
shooter_enableddefaults to off and Fire is disabled until the operator turns it on in Setup. - Why: "its 2 cm balls are small enough for a dog to swallow" (§3.3 item 6).
- How:
apps/nxt-web/config.json/nxt_lab/config.pysettingshooter_enabled; Fire disabled in the page. - Alternatives rejected: none named.
- RFC status and section: Proposed (as built), §3.3.
- Who decided and when: not stated.
- Existing ADR: none.
- Later changed by: RFC-0003 §2.3 extends it:
robot.do fireis "alwaysproposein a mission and refused unless the shooter is enabled". RFC-0014 §3.8 decides firing over MCP or from an agent is "no". Checked: RFC-0010 to RFC-0032 by grep. - In code: Partial:
grep shooter_enabled apps/nxt-web/srcnot run; the setting is documented in the RFC as built, andconfig.jsonexists.
RFC-0001-4: NXC programs on the stock firmware, compiled by nbc in Docker; the firmware is not replaced¶
- Decided: Programs for the brick are written in NXC, compiled with Debian's
nbcinside Docker, and uploaded from the UI. The firmware stays stock. - Why: leJOS gives "more capable programs on the brick, but a reflash"; "NXC on the stock firmware covers what is needed" (§5). The operator chose Docker over an AUR install (§8, 2026-11-13).
- How:
apps/nxt-web/toolchain/,scripts/nxc.sh,apps/nxt-web/programs/*.nxc. - Alternatives rejected: replacing the firmware (leJOS); AUR install of the toolchain (§5, §8).
- RFC status and section: Proposed (as built), §3.6, §5, §8.
- Who decided and when: the operator, 2026-11-13 (Docker over AUR); firmware stays stock is stated in §5 without an operator citation.
- Existing ADR: none.
- Later changed by: not found in my RFCs (RFC-0010 to RFC-0032 by grep; RFC-0003 §5 repeats the rejection of leJOS).
- In code: Yes:
apps/nxt-web/programs/{first,chase,patrol,robotd}.nxcandapps/nxt-web/toolchain/exist.
RFC-0001-5: The UI binds to localhost only; remote access is an ssh tunnel until there is a login¶
- Decided: The server binds
127.0.0.1; other devices use an ssh tunnel over the tailnet. Opening the port needs a firewall rule and, before that, some form of login. - Why: "the UI can drive a robot" (§7 item 4).
- How: server bind address in
nxt_lab/web.py; no auth in nxt-web. - Alternatives rejected: none named; listed as an open question.
- RFC status and section: Proposed, §2 non-goals, §7.4 (open).
- Who decided and when: not stated as a decision; a v1 non-goal.
- Existing ADR: none.
- Later changed by: RFC-0014 §3.8 (docs/rfc/RFC-0014-mission-control.md line 725) says it answers RFC-0003 §4's transport and authentication question for Mission Control (per-client tokens, line 867). RFC-0017 (robot access) also discusses it. Not read by me beyond the grep hits.
- In code: Partial:
apps/mission-control/src/mission_control/auth.pyexists (tokens); nxt-web's bind was not checked.