diff --git a/docs/plans/2026-08-05-inter-app-comms-implementation.md b/docs/plans/2026-08-05-inter-app-comms-implementation.md index bae0aca9..62709e86 100644 --- a/docs/plans/2026-08-05-inter-app-comms-implementation.md +++ b/docs/plans/2026-08-05-inter-app-comms-implementation.md @@ -22,6 +22,7 @@ - Only procedures explicitly marked `.idempotent()` may be retried. - Errors crossing an app boundary are opaque by default: code and message only, no stack, no internal detail. - Test files live in `packages//test/*.test.ts` and use `import { describe, expect, test } from "bun:test"`. +- `bun test` strips type-only imports before resolution, so a "verify it fails" step does NOT reproduce for a test whose only import from the new module is `import type`. Expect it to pass; that is a Bun behaviour, not a missing failure. - Test fixtures must NOT be scaffolded under `os.tmpdir()`. A scaffolded file importing `@wrnexus/*` by bare specifier cannot resolve outside the repo tree. Use a repo-local `.tmp-*` directory (`**/test/.tmp-*/` is gitignored). - Do NOT use `git stash`. This repo has `core.autocrlf=true`; a stash round-trip rewrites files to CRLF and fails `format:check`. - Write control-character checks as codepoint loops, never regex literals — escapes get mangled on the round-trip through tooling in this repo. @@ -83,9 +84,11 @@ import type { InferInput, ProcedureDef, ServiceContract } from "../src/types.ts" describe("rpc types", () => { test("InferInput extracts the validated shape from a schema", () => { - const schema = v.object({ userId: v.string(), amountCents: v.number() }); + // Prefixed with _ : used only via `typeof`, and the lint config requires + // that prefix for a binding that is never read at runtime. + const _schema = v.object({ userId: v.string(), amountCents: v.number() }); // Compile-time assertion: assigning a correctly-shaped value must typecheck. - const value: InferInput = { userId: "u1", amountCents: 10 }; + const value: InferInput = { userId: "u1", amountCents: 10 }; expect(value.userId).toBe("u1"); }); @@ -178,8 +181,9 @@ export interface ProcedureDef { * A procedure map with its element types erased. The `any` is deliberate and * confined to this alias: the phantom `__input`/`__output` markers make * ProcedureDef invariant, so no narrower erasure accepts a real contract. + * (No eslint-disable needed — `no-explicit-any` is off repo-wide, and a + * redundant directive is itself a lint warning.) */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnyProcedures = Record>; export interface ServiceContract {