Fit W4 group A together on main: every CLI test runs signed out, the binary runs on the real client, usage errors exit 2 as typed failures, and the heaviest tests get a hang limit
Before adoption: this commit came in with the history the project adopted, so no landing records it.
- apps/cli/test/signed-out.ts, and the service layers in check, env-set, hook, init, why and remote-server (policy, remote, schema, surfaces): 412's `login`, `logout` and `credential` put `Credentials` in the command tree's requirements, so `program` needs it, and the tests 404, 405, 413, 414 and 415 wrote provided none (typecheck failed in 9 files). `SignedOut` holds no profile for any host; its `put` and `remove` die, so a test that writes a profile through it says so. - The merges of 413 and 414 took 404's `program` (90a806c, c92f070): a failure whose `Runtime.errorExitCode` is 2 is a usage error, printed in one line and ended as `Misused` (exit 2), which keeps 413's `InitMisused`; `init` fails with the shared `ApprovalNeeded` from `@repo/protocol/cli` (413 Comment 1); `refuseStrangeFlags(argv)` runs first (414 Comment 12). The stub table in main.test.ts is gone: every group A command is built. - 414's `usage` and 415's `HookUsage` are typed failures now, not defects: each carries its line as `message`, and `program` prints it once and exits 2 (414's and 415's leftovers, open until 404's `program` landed). Their tests pass unchanged. - apps/cli/src/bin.ts runs on `CliServices` (404 leftover 1; bin.ts's own comment said "until issue 404"): the binary called the platform through a placeholder that died. build.test.ts's helper case also asserts exit 0 and an empty stdout with no stored profile (416 Comment 1), and apps/cli/tsconfig.json includes build.ts (416 Comment 4; a tightening, typechecks clean). - build.test.ts's workspace-import pattern matched prose that tsdown keeps in doc comments ("from `@repo/git`'s `treeDiff`", from 405 and 413 sources now in bin.js). A static import or export names its module in quotes, never backticks, so only `import(`/`require(` accept a template literal. Probed: `from "…"`, `from '…'`, `import "…"`, `import("…")`, import with a template and `require("…")` still match. - init.test.ts and env-set.test.ts read 404's dry-run envelope, `data: {dryRun: true, payload}` (413 Comment 2). packages/protocol/test/cli.test.ts lists `evidence`, 418's contract on the cli surface, among the CLI paths. - Hang limits, 30 s, as the CLI's build, login and init tests already carry: the full `turbo run test` failed 3 of its first 5 runs with "Test timed out in 5000ms" on landing.model's invariant case (worst 5.8 s) and project.test.ts' story (worst 5.6 s). Alone they take 0.5 s and 0.4 s, and 2-3 s in a full run before group A merged; group A adds over 550 tests (2,280 to 2,833 in a full run), so the parallel run is busier. The limit now covers each test whose worst full-run time passed 3.3 s: the landing, claim and ratchet model describes, the project story, git's tree-diff longest-common-run case, the debt tally, and rules' equal-policies replay. No assertion changed. A planted 50 ms limit made landing.model's and the story's cases time out, so a describe-level option reaches its tests. After: verify and four more full runs green in a row. - verify green: cli 234, platform 323, protocol 356, project 330, checks 292, gate 185, config 743, agent-kit 56; debt at baseline; gen current; platform entry 1,547,725 of 1,665,000, sandbox 474,690. - ASSUMPTION: the platform entry's growth (1,513,290 to 1,547,725) is 418's evidence store, 419's Google sign-in and 420's releases; not measured per branch here.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
21 files+146 added−74 removed
- tests:+123 added−40 removed
- other:+23 added−34 removed