Skip to content

fix(cli): plain errors for bad ids, flag checks and refused connections - #174

Open
sanchitrk wants to merge 2 commits into
feat/local-doorfrom
feat/door-followups
Open

sanchitrk wants to merge 2 commits into
feat/local-doorfrom
feat/door-followups

Conversation

@sanchitrk

@sanchitrk sanchitrk commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #173.

CLI

  • Bad session id. codework thread list foo and every other command that takes a session id printed a schema stack. They now print error: foo is not a session ID (ses_…).
  • Flag checks in run. A failure raised before a handler's own catch reached the runtime's logger with a stack. The command wrapper now renders every handler failure as one error: line.
  • A refused connection names its cause. After a socket fails to open, the CLI asks the home's server why. A refused token and a refused host each get their own message; a stopped server keeps the generic one. The request goes only to the URL the token already goes to.
  • Test timeout. The CLI tests spawn the real CLI and server, so they get 30 seconds instead of the 5 second default.

Tests

  • Live sync suite. One case assumed the main thread never commits last among four concurrent writes. When it does, its revision equals the store head, which is legal. The stale-write check now targets whichever thread is older. No production code changed.
  • Live suites run serially. They share the OrbStack machines, so apps/server now has two test projects: server (parallel) and live (one file at a time). vp test run --project server runs only the non-live tests.

Verified

Check Result
vp check, vp run typecheck, knip exports pass
packages/codework tests, in parallel 151 passed, 28 skipped
apps/server non-live suite 42 passed
Live sync and usage suites in one invocation, four OrbStack machines 18 passed

The 28 skips are gated on provider API keys, the standalone binary, and a free default port.

Known gap

One test relies on localhost. resolving to loopback; unchecked on Linux CI.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

sanchitrk and others added 2 commits November 20, 2026 16:15
…used connections

- A session id that is not a session id printed a schema stack; every
  command that takes one now prints one error line.
- A handler failure raised before its own catch reached the runtime's
  logger with a stack. The command wrapper now renders every handler
  failure as an error line.
- A failed connection named no cause. The CLI now asks the home's server
  why and says when it refused the token or the host.
- Give the CLI tests a 30 second timeout: they spawn the real CLI and
  server, which start slowly when many run at once.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ally

The live sync suite assumed the main thread never commits last among four
concurrent writes. When it does, its revision is the store head, which is
legal. The stale-write check now targets whichever thread is older.

The live suites share the OrbStack machines, so they are now a test
project of their own that runs one file at a time.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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