Skip to content

fix(kit): a CLI made from a config passes its own coverage floor; kit:e2e makes two - #196

Merged
leemour merged 3 commits into
mainfrom
test/kit-e2e-from-config
Nov 18, 2026
Merged

leemour merged 3 commits into
mainfrom
test/kit-e2e-from-config

Conversation

@leemour

@leemour leemour commented Nov 18, 2026

Copy link
Copy Markdown
Member

Task

A CLI made by new --from-config (a CRM or tracker with auth.verify) must pass its own checks, and kit:e2e must check that path.

Why

Such a CLI failed its own pnpm test:coverage: a tracker reached 52% of branches against a floor of 75%. The seed held the token check and x ? { x } : {} branches on config values that no test of that CLI can take both ways. kit:e2e never made a CLI from a config, so nothing caught it.

What

  • The token check is cli-core's manifestVerify (cli-core #3110, released in 0.699.0); session.ts is one call. The hosts-only fetch is hostsFetch, the CRM store openAppStore, the --offline refusal refuseOffline, all from cli-core.
  • pnpm generate writes the config's values with their exact types; one the config leaves out is a bare undefined, so a removed verify fails typecheck. It also writes LIVE for a CRM.
  • src/program.ts hands the update check to run(): the daily "a newer version exists" line never showed in a CLI made from the template.
  • New seed tests: a sync before session start says to sign in, --offline sends nothing, api show works without calling the service.
  • kit:e2e makes a CRM over an OpenAPI description and a tracker over a GraphQL schema with new --from-config (fixtures in kit/test/from-config/, the spec answered by a fetch preload) and runs the same checks as the other two.
  • A new CLI pins cli-core 0.699.0.

Testing

  • Template: typecheck, lint, docs check and 229 tests pass.
  • Both made CLIs, on cli-core 0.699.0 from npm, pass install, build, doctor, generate, lint, ci:quick, contracts:check, docs:check and test:coverage: tracker lines 97.0%, branches 100%, functions 93.5%; CRM lines 96.8%, branches 100%, functions 93.5%. Left uncovered: the MCP signedIn callback (run only by --profiles all, in a child process) and the upgrade install callback.

🤖 Generated with Claude Code

leemour and others added 3 commits November 18, 2026 11:08
…fy or source fails typecheck

from-config.ts writes VERIFY and SOURCE with their own types when the config has them and a bare undefined when it
does not, and HOOK_OPTIONS to spread into the source's options. The seed's guards against a missing value go, and one
serviceFetch in the api group replaces four copies of the hosts-only fetch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…:e2e makes two

A CRM or tracker CLI made by new --from-config with auth.verify failed pnpm test:coverage (a tracker reached 52% of
branches against 75%): the seed held the token check and branches on the config's values that no test of that CLI
can take both ways (FIND-2767). The check is cli-core's manifestVerify, the hosts-only fetch its hostsFetch, the CRM
store its openAppStore, and the --offline refusal its refuseOffline. pnpm generate writes LIVE beside the exact types.
New seed tests cover a sync before session start, --offline and api show.

src/program.ts now hands the update check to run(): the daily notice never showed in a CLI made from the template.

kit:e2e makes a CRM over an OpenAPI description and a tracker over a GraphQL schema with new --from-config, the spec
answered from kit/test/from-config by a preload, and runs the same checks as the other two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​wirecat/​cli-core@​0.698.0 ⏵ 0.699.098 +11001009670

View full report

@leemour
leemour merged commit 1543cfe into main Nov 18, 2026
16 checks passed
@leemour
leemour deleted the test/kit-e2e-from-config branch November 18, 2026 10:16
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