Skip to content

CLI: count crashes on unmarshal; "is" exits 0 on false; find timeout not adjustable #206

Description

@paulsmith

Environment: vibium v26.3.18, node v24.15.0, macOS darwin 25.4.0 arm64, headless daemon mode. All findings verified today.

Context

I'm using the vibium CLI as the deterministic assertion layer of an exit-code-gated CI script (agent-loop harness). The wait family is excellent for this — wait <sel> --state visible, wait text, and wait fn all correctly exit 1 on timeout and accept --timeout. But three commands can't be used in scripts that rely on exit codes:

1. count crashes (bug)

Against any page:

$ vibium count '[data-testid="issue-row"]' --headless
Error: failed to count: failed to parse script result: json: cannot unmarshal number into Go struct field .result.result.value of type string

Exits 1 even when matching elements exist. Looks like the count result comes back as a JSON number where the CLI expects a string.

2. is subcommands exit 0 regardless of answer (scripting gap)

vibium is visible '<missing selector>' prints false and exits 0. Understandable as a query command, but it makes is unusable as a shell assertion. A --fail flag (nonzero exit when the answer is false), or documented guidance to use wait --state instead, would help.

3. find has no --timeout flag (gap)

find IS exit-honest (missing element → rc=1 after the 30s default timeout), but unlike click, the timeout isn't adjustable, so any negative-path or fast-fail script stalls 30s. Suggest supporting the same --timeout flag click has.

Cosmetic

On failure paths the CLI prints a raw node child_process stack trace after the useful error line, which adds noise to CI logs.

Repro

Repro page used (served via python3 -m http.server):

<table><tr data-testid="issue-row"><td>#1 alpha</td></tr><tr data-testid="issue-row"><td>#2 beta</td></tr></table>

Steps: vibium daemon start --headless, vibium go http://127.0.0.1:8951/, then the commands above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions