Repository navigation
Description
Problem
pkgs/id/src/world_line.rs declares itself the single parser for the world's line grammar — its module docs (lines 1–7) say the SSH command mode, the id world join stdin pump, and the id world CLI subcommands "all speak the same verbs", with parse_line mapping one line to one action "so a sentence works identically" on every surface. The command-mode pump honours that (pump_command, pkgs/id/src/commands/world.rs:1694 calls parse_line). The plain (non-command-mode) pump does not: at pkgs/id/src/commands/world.rs:1630–1633 it hand-rolls /input handling —
match line.strip_prefix("/input ") {
Some(hex) => serde_json::json!({"type": "input", "data_hex": hex.trim()}),
None => serde_json::json!({"type": "chat", "text": line}),
}— with no hex validation, no lowercase normalisation, and no usage message. The same typed line therefore behaves differently depending on whether the user passed --command-mode:
| Line typed | Shared grammar (parse_line, command mode / SSH) |
Plain pump |
|---|---|---|
/input ZZ |
local usage: /input <hex>, nothing sent |
frame sent; server replies error frame input data must be hexadecimal (world_session/mod.rs:2212–2219), input dropped |
/input 0 (odd length) |
local usage: /input <hex>, nothing sent |
frame sent; same server error, input dropped |
/input (bare) |
local usage: /input <hex>, nothing sent |
sent as chat text — the literal word /input is posted into the world |
/input 00af (two spaces) |
local usage: /input <hex>, nothing sent |
accepted (hex.trim()), input delivered — the inverse divergence |
/input 00AF |
normalised to 00af before sending |
sent as typed (00AF); the server happens to accept it |
Verified this run with a verbatim-copy probe (parse_line copied byte-for-byte from main b878339e, diff-checked; the plain-pump arm and the server's decode_hex gate replicated): laptop ~/git/fleet/probe-2026-10-31-laneA-pump-input/probe.txt.
Why it matters
- The plain pump is the scripted surface (
id world joinreading stdin lines from a pipe). A typo'd hex string silently becomes a dropped input plus a server error frame on stdout — the pump's own contract is that stdout stays a clean stream of frames and user-facing notes go to stderr (commands/world.rspump docs) — instead of an immediate local usage message. - A bare
/input(easy to type when a script emits a verb with an empty argument) is posted into the world as chat text. - The two surfaces disagree in both directions (the plain pump also accepts the two-space form the grammar rejects), so a script tested against one surface breaks on the other.
Distinct from existing issues
- id(world): /document and /input reject two spaces after the command — sibling commands in the same grammar trim, these two do not #1946 is about
parse_lineinternally:/documentand/inputthere reject two spaces while siblings trim. This issue is the plain pump not callingparse_lineat all for/input. Fixing id(world): /document and /input reject two spaces after the command — sibling commands in the same grammar trim, these two do not #1946 does not fix this, and vice versa. - id(world-line): /logs5 is silently executed as /logs 5 — the logs verb has no word boundary, and bare /document / /input report 'unknown command' instead of their usage #1507 / id(world-line): PR #808 — join pump --command-mode kills the session on a parse Message (SSH shows it and continues), and /logs [seconds] is parsed then discarded by both consumers #819 covered word boundaries and the command-mode pump's handling of parse messages; neither touches the plain pump's
/inputarm.
Acceptance criteria
- The plain pump validates
/inputthrough the shared grammar's rules (even length, ASCII hex only) before sending: invalid hex and a bare/inputproduce the localusage: /input <hex>message on stderr and send nothing. /inputis never delivered to the world as chat text.- Valid hex is normalised the same way on both pump paths (lowercased), so the frame bytes do not depend on
--command-mode. - The two-space behaviour matches the grammar's (whatever id(world): /document and /input reject two spaces after the command — sibling commands in the same grammar trim, these two do not #1946 decides there, both surfaces agree).
- Tests cover the plain-pump mapping for: valid hex, uppercase hex, non-hex, odd-length hex, bare
/input, and a non-/inputchat line.
Activity
dezren39 commentedon Oct 31, 2026
🤖 Agent note · filed
id world joinstdin pump hand-rolls/inputat commands/world.rs:1630-1633 instead of using the shared world_line::parse_line grammar, so unvalidated hex is sent to the server and dropped with an error frame, a bare/inputis posted as chat text, and the two-space form is accepted here but rejected by the grammar. Verified on main b878339 with a verbatim-copy laptop probe (parse_line diff-checked byte-for-byte; plain-pump arm and server decode_hex gate replicated). Enqueued as a triage packet in queue repo-health-code-pilot./inputthrough the shared grammar's validation so both pump paths agree; invalid/bare forms answer locally with usage and send nothing.38 remaining items
dezren39 commentedon Nov 3, 2026
Agent note — picked up (PR shepherd)
queue/5640-3134-world-pump-input-fix(single commit 6e31d6a) onto current main, adapting the pump match toPumpLine::Say { level, message }, run the focused pkgs/id suites on the laptop, then merge PR fix(id): validate /input in the plain world join pump (#3134) #3731 under the standing criteria.id world joinpump bypasses the shared line grammar for /input — unvalidated hex is sent to the server and dropped, a bare /input is posted as chat, and the two-space form is accepted here but rejected by the grammar #3134 OPEN, no hard-stop labels; PR fix(id): validate /input in the plain world join pump (#3134) #3731 OPEN, no competing PR (it is the canonical artifact for id(world): the plainid world joinpump bypasses the shared line grammar for /input — unvalidated hex is sent to the server and dropped, a bare /input is posted as chat, and the two-space form is accepted here but rejected by the grammar #3134).fix(id): validate /input in the plain world join pump (#3134)
Merge pull request #3731 from developing-today/queue/5640-3134-world-…
dezren39 commentedon Nov 3, 2026
Agent note — done (PR shepherded and merged)
error, matchingpump_command's handling ofWorldLine::Message), test evidence, and the Codex usage-limit state are recorded on PR fix(id): validate /input in the plain world join pump (#3134) #3731 (comment 6609409214).commands::world::tests12 passed,world_line::tests6 passed (laptop, locked).fixed_merged; issue id(world): the plainid world joinpump bypasses the shared line grammar for /input — unvalidated hex is sent to the server and dropped, a bare /input is posted as chat, and the two-space form is accepted here but rejected by the grammar #3134 CLOSED; claim labels removed.developing-today commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 30 (priority/low). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03