Skip to content

feat: startup validation (config, --url, --cmd), --version, query/filter docs - #6

Merged
catesandrew merged 4 commits into
mainfrom
sweep/robustness
Nov 16, 2026
Merged

catesandrew merged 4 commits into
mainfrom
sweep/robustness

Conversation

@catesandrew

Copy link
Copy Markdown
Collaborator

Batch B of the backlog sweep: startup robustness and docs.

  • log-cli-nm2.1: config.ts now tells ENOENT, JSON-parse and zod errors apart. An explicit --config throws a typed ConfigError. The library never calls process.exit. main.tsx catches the error at both the summary and the interactive call sites and calls exitWithMessage. A malformed auto-discovered config prints a warning to stderr and the defaults are used. When no config exists, nothing is printed.
  • log-cli-nm2.6: validateSources accepts only http and https for --url, and turns a throwing new URL() into a clean error. It also rejects an empty --cmd. An empty --url or --cmd value used to fall through to stdin; now it reaches validation.
  • log-cli-w0b.9: Adds --version / -V. The version check exits before the non-TTY summary gate, so a piped call does not hang. An e2e test covers this.
  • log-cli-w0b.1: The README gets a filter-vs-query operator table, and the hint text in QueryBar and FilterBar no longer suggests the syntax is interchangeable.
  • log-cli-w0b.2: The README documents the existing directory-rejection message and the other startup validation errors.
  • Changeset (minor) and docs/sessions/2026-11-14-backlog-sweep/FOLLOWUPS.md.

Verification: tested by hand, both piped and in a TTY (via script). --version, --config missing.jsonc / bad JSON / wrong type, --url ftp://x, --url notaurl and --cmd '' all behave as expected. Typecheck is clean, lint has 0 errors, 104/104 tests pass, and the build succeeds.

This PR is independent of #5. Both branch from main.

🤖 Generated with Claude Code

catesandrew and others added 4 commits November 14, 2026 13:23
…d --version/-V (log-cli-nm2.1, log-cli-w0b.9)

config.ts now distinguishes ENOENT / JSON / zod errors. Explicit --config
throws a typed ConfigError (lib never exits); main.tsx catches it at both the
summary and interactive call sites via exitWithMessage. Malformed
auto-discovered files warn on stderr and use defaults; none found is silent.

--version/-V early-exits before the non-TTY summary gate, so a piped call
does not wait on stdin. Both share main.tsx's early-exit block, hence one commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…p (log-cli-nm2.6)

new URL() throws on bad input; it is caught and turned into a clean
validation error. resolveSources now keeps empty --url/--cmd values so they
reach validation instead of silently falling through to stdin.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…g errors, --version (log-cli-w0b.1, log-cli-w0b.2)

Query/filter bar hint text no longer implies interchangeable syntax. README
also documents the new config error handling (nm2.1), source validation
(nm2.6) and --version (w0b.9).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@catesandrew
catesandrew merged commit 3dae730 into main Nov 16, 2026
1 check passed
@catesandrew
catesandrew deleted the sweep/robustness branch November 16, 2026 21:56
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.

1 participant