GeezerVison is showing github.com — id(directory_view): the explorer's no-argument commands silently ignore trailing text — 'signout junk' signs out, 'view junk' looks filtered but is not · Issue #1803 · developing-today/code
id(directory_view): the explorer's no-argument commands silently ignore trailing text — 'signout junk' signs out, 'view junk' looks filtered but is not #1803Labels app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests DescriptionProblem
In the directory explorer's typed-line parser, the five no-argument commands silently ignore everything after the command word, while every argument-taking command in the same parser enforces its exact argument count with a usage error. A mistyped or pasted line therefore does something the user did not ask for instead of being refused:
signout anything ends the session (and drops admin rights for the login) anyway.
session anything opens a session anyway.
view anything shows the full directory — there is no filtered view, so a user who typed an argument believes a filter applied when none did.
help anything, quit anything, exit anything, ? anything likewise act as if the extra text were not there.
Evidence (verified this run on main e91098f1)
pkgs/id/src/directory_view.rs:612-627 — parse_line: "help" | "?" returns Line::Help, "quit" | "exit" returns Line::Quit, and "view" / "session" / "signout" build their actions with Vec::new() pairs — none of them look at rest/words at all.
- Same function, contrast:
addkey/removekey/addemail/verify go through words_n (exact count or usage: … error), friend_target matches an exact token shape, and group member validates its level — wrong counts are refused everywhere else.
pkgs/id/src/directory_view.rs test a_malformed_line_is_refused_with_its_usage pins refusal for wrong counts on argument-taking commands (group member 3 account:x wizard, publish tag abc, …) but has no trailing-argument case for a no-argument command.
- Both transports build actions through this parser /
action_from_fields ("Both SSH and the HTML explorer build their actions through action_from_fields, so the two agree on every name and format", directory_view.rs:606-610), so the typed-line behaviour is the SSH explorer's command contract.
Reproduction (probe in the real crate, run on the laptop)
Probe test (id::directory_view::parse_line, --no-default-features) in a laptop worktree of origin/main e91098f1; probe + full log in the goal bookkeeping (probe-2026-10-28-laneA-dirview/):
PROBE "view junk" -> Ok(Action(View)) (expected usage error)
PROBE "session junk" -> Ok(Action(OpenSession)) (expected usage error)
PROBE "signout junk" -> Ok(Action(SignOut)) (expected usage error)
PROBE "help junk" -> Ok(Help) (expected usage error)
PROBE "quit junk" -> Ok(Quit) (expected usage error)
PROBE "exit junk" -> Ok(Quit) (expected usage error)
PROBE "? junk" -> Ok(Help) (expected usage error)
test result: ok. 1 passed
Controls in the same probe: bare view parses as View; addkey with zero or two arguments and group member 3 account:x wizard are all refused — the exact-count commands behave as documented.
Why it matters
The explorer is an admin-capable surface (sign-up, verify, group administration, friend envelopes). A parser that silently discards trailing text turns typos into actions: the harmful direction is signout/session, where a line the user expected to be rejected changes their session state, and view, where ignored text can masquerade as a filter that never ran. The parser's own malformed-line test shows the house rule is "wrong shape → usage error"; the no-argument commands are the one hole in it.
Acceptance criteria
-
parse_line refuses a non-empty remainder for view, session, signout, help, ?, quit and exit, with a usage message naming the command (e.g. usage: signout takes no arguments — exact wording is the fixer's choice, pinned by tests).
- Bare forms keep working exactly as today (
view, session, signout, help, ?, quit, exit, blank line).
- Regression tests cover trailing arguments on each no-argument command, added alongside
a_malformed_line_is_refused_with_its_usage (or an equivalent test in the same module).
- Argument-taking commands are unchanged (existing
parse_line tests keep passing).
- Existing directory_view tests pass (
cargo test for the id crate on laptop or CI).
Dedup
Searched open + closed issues for directory_view, parse_line, "explorer", "trailing" and signout before filing: no filing covers the explorer parser's argument handling. #1770/#1778/#1674 are about control/format characters in names, a different layer; #1611/#1613 are about raw rendering of names in plain-text output, not parsing. Activitydeveloping-today commented on Oct 28, 2026 added kind/bugSomething isn't working (prefixed form of the classic bug label) task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests app/idPackage/app: id (pkgs/ or apps/ in this repo) effort/sSmall: expected under 2 hours of work on Oct 28, 2026dezren39 commented on Oct 28, 2026 🤖 Agent note · filed
- Agent: new-issue-creator job (new-issue-creator-code-a)
- Session / ID: new-issue-creator-code-a run 2026-10-28 15:05 CDT (20:05Z)
- Found via: filed this run
- Task: Explorer no-argument commands (view/session/signout/help/?/quit/exit) silently ignore trailing text in parse_line, unlike every exact-count command in the same parser — verified with a probe in the real crate on the laptop (main e91098f; probe + log in goal bookkeeping probe-2026-10-28-laneA-dirview/).
- Expectation: effort/s — refuse a non-empty remainder with a usage error for those commands, bare forms unchanged, regression tests alongside the malformed-line test; done when the acceptance criteria in the issue body pass.
- Links: queue packet enqueued this run (repo-health-code-pilot)
dezren39 commented on Oct 28, 2026 🤖 Agent note · correction to the filing evidence
- Agent: new-issue-creator job (new-issue-creator-code-a)
- Session / ID: new-issue-creator-code-a run 2026-10-28 15:05 CDT
- Found via: filed this run — evidence re-verified after a tooling discrepancy
- Task: Correction: the probe command recorded in the issue body was incomplete.
directory_view is gated on the world feature (src/lib.rs), so the probe only compiles/runs as cargo test --no-default-features --features world --test probe_dirview. Re-run cleanly on the laptop (worktree of origin/main e91098f) after the discrepancy was spotted: CARGO_EXIT:0, test passed, with exactly the PROBE lines quoted in the issue body ("view junk" -> Ok(Action(View)), "session junk" -> Ok(OpenSession), "signout junk" -> Ok(SignOut), help/?/quit/exit junk likewise Ok; exact-count controls refused). The finding itself is unchanged; only the recorded command was wrong. The queue packet's test line should likewise read cargo test --features world (or the crate's default features, which include world).
- Expectation: no change to the fix scope or acceptance criteria.
- Links: full genuine log in goal bookkeeping: probe-2026-10-28-laneA-dirview/probe-real-run.log
dezren39 commented on Oct 31, 2026 dezren39 commented on Oct 31, 2026
MetadataMetadataapp/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests DevelopmentNo branches or pull requestsIssue actions
|