Skip to content

Release v0.125.0: names the lights menu could not reach, a web terminal that needs a login, a pinned cordless tool - #151

Merged
tesseractAZ merged 4 commits into
mainfrom
claude/v01250-code-defects
Nov 21, 2026
Merged

tesseractAZ merged 4 commits into
mainfrom
claude/v01250-code-defects

Conversation

@tesseractAZ

Copy link
Copy Markdown
Owner

Fixes found by the documentation accuracy review, plus what two review rounds of those fixes turned up.

Lights menu (dial 43)

  • "Unassigned" can be chosen. The no-area bucket's key '' doubled as pick_area's cancel answer, so saying "Unassigned" hung up. Each step now returns a CANCELLED sentinel for a cancel and None when the tries run out.
  • Names that hold a command word can be chosen. match_intent ran first, so "Top Floor" (fuzzy top~stop), "Exit Sign" and "All Lights" were taken as cancel or list. A new lights_match.said_whole_name is checked first and compares every word, filler included (FILLER holds "lights"/"lamp", so normalize() would make "All Lights" equal "all"). A lone "left" still lists beside "Left Hallway".
  • A real area named "Unassigned" (any case) takes the no-area lights, except one named like a light already in it (lights_match.same_name), so nothing that was reachable becomes a tie.
  • Goodbyes match what happened: cancel at the light step was answered as a mishearing, two misses at the action step as a cancel.

Standalone web terminal (:8100)

  • Starts only with a login. With no valid console_users row it idles with a NOTICE; under host_network its old no-login loopback bind was reachable by every program on the host and every host-network add-on. The Ingress console is unaffected.
  • webauth.parse_users (shared with the SSH console) counts a row only when both fields are text or a whole number, so null/false/[] no longer become the password "None" etc.
  • The "Starting … on" line moved below the gate; the notice says "no valid entry".
  • Option help (translations/en.yaml), README, docs/reference/security.md, SECURITY.md, configuration.md (the overlay's one start/stop exception) and code comments no longer describe the removed open mode.

tools/wp826.mjs (not in the image)

  • Pins every request. The pin was checked on a throwaway connection, then the login went out on unchecked ones. send() now runs each request on a checked socket (delete opts.agent plus createConnection; agent: false would make a new agent that ignores createConnection), with defaultPort = 443 so Host stays <ip> as before.
  • fingerprint works without a password file; WP826_PORT is new and validated; a mismatch names the refused request; the check connection is destroyed, so a peer that never closes cannot hang the tool.
  • CodeQL may raise new js/disabling-certificate-validation alerts on the changed rejectUnauthorized: false lines in this file (same accepted risk as the four already dismissed; a self-signed handset certificate cannot chain).

Tests

  • test_automation_agi.py (new, drives main() end to end), test_lights_match.py, test_run_gates.py (the run script's real count lines, and the whole script in strict mode), test_webauth.py, test_wp826_tool.py (new: a local HTTPS stand-in that swaps certificates per connection, including after login and before the upload, and one that never closes).
  • Full suite 1610 passed. test_console_ssh.py with asyncssh 2.18 in a venv: 35 passed, same as main.
  • Mutation: 31 distinct mutants across the three areas, all killed against a green baseline; the last 21 re-run on the final tree, each mutated file syntax-checked.
  • Three review rounds (code reading, then old-vs-new differential runs, then a closure check), every finding adversarially verified; all confirmed findings fixed except two pre-existing ones outside this change (an IPv6 console_web_bind crash-loops server.py, which binds AF_INET only; wp826.mjs login prints the first 10 characters of the session id).

Deploy check (this install)

No change to switchboard-config, so extensions.conf/pjsip.conf must hash the same after the restart. This install has a valid console_users row, so the web terminal keeps running behind its sign-in.

🤖 Generated with Claude Code

tesseractAZ and others added 4 commits November 21, 2026 16:23
- Lights menu: "Unassigned" (lights with no area, key '') doubled as the
  cancel sentinel, so choosing it hung up. pick_area now returns a distinct
  CANCELLED object; tests drive main() end to end.
- The standalone web terminal idles unless console_users has a valid entry
  (fails closed on any count that is not a positive integer). Under
  host_network its 127.0.0.1:8100 listener was reachable by every host
  process and host-network add-on with no login.
- tools/wp826.mjs: every request runs on a connection whose certificate was
  checked against WP826_CERT_SHA256 first (no agent: `agent: false` would open
  its own unchecked socket); the password file is read only when logging in,
  so `fingerprint` works without one; WP826_PORT for tests. A local stand-in
  handset that swaps certificates after the first connection pins the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing, the tool's pin

Lights menu: a room or light whose whole name is what the caller said is
chosen before the cancel and list words are checked, so "Top Floor" (close
to "stop"), "Exit Sign" and "All Lights" can be reached; the words alone
still cancel or list. Every word counts there, filler included, so "all"
alone stays the list request. A real area named "Unassigned" (any case)
takes the lights with no area. The light and action steps return the cancel
sentinel too, so cancel and two mishearings each get their own goodbye.

Web terminal: the "Starting ... on" line moved below the login gate, the
notice says "no valid entry" (it fires for unusable rows too), and the
option help, README, security page, SECURITY.md and code comments no longer
say an empty console_users means an open terminal. A test runs the run
script's real count lines against the source tree's parser.

tools/wp826.mjs: an invalid WP826_PORT is refused at start; pinned requests
send Host without :443 again, as the unpinned ones do; a mismatch names the
refused request instead of saying nothing was sent. Tests swap the
certificate after login, for a read and for the ringtone upload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… users

Lights: a no-area light named like one already in a real "Unassigned" area
stays out of it, so the two no longer tie and the area's own light stays
reachable (lights_match.same_name, the same comparison said_whole_name uses).
The docs say what the menu does: a name that IS a command word wins, two
same-named lights in a room cannot be told apart, and the two-miss limit is
per step, not "in a row".

Web terminal and SSH: parse_users counts a row only when both fields are text
or a whole number, so null/false/[] no longer become the password "None" etc.
A test runs the whole console-web run script in strict mode, so nothing
between the count and the gate can start an unauthenticated terminal. The
overlay note in configuration.md names its one exception (console_users), and
SECURITY.md, webauth.py, consoleproto.py, switchboard-opt and the run script
no longer describe the removed open mode.

tools/wp826.mjs: the check connection is destroyed rather than half-closed,
so a handset that never closes its side cannot keep the tool from exiting;
the WP826_PORT comment states the rule, not a history no release had. Test
names no longer claim more than they assert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… names

The end-to-end run-script test now counts, with the server's own parser,
the users the server would inherit, and requires that count to equal the
logged one: deleting or clearing the CONSOLE_WEB_USERS export used to log
"login gate ACTIVE (1 user(s))" over a terminal serving with no login, with
every test green.

fold_unassigned keeps a no-area light out of a real "Unassigned" area when
its words match a light already there once filler is set aside
(lights_match.would_tie): "Porch Lights" beside "Porch Light" tied for every
reply but the exact names, so "porch" no longer reached the area's own light.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread tools/wp826.mjs Dismissed
Comment thread tools/wp826.mjs Dismissed
@tesseractAZ
tesseractAZ merged commit fa80a68 into main Nov 21, 2026
11 checks passed
@tesseractAZ
tesseractAZ deleted the claude/v01250-code-defects branch November 21, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants