Clear the five typecheck errors in the CLI's own test tree

e753d0b60f46 · AtlantisPleb · · parent cf63540b5abe

Clear the five typecheck errors in the CLI's own test tree

Pre-existing on `main`, and red for long enough that `pnpm run typecheck` was
not a gate anybody could read: two fixture literals set `memory_max_mib`, which
the capability type does not model and nothing reads; two imports were unused;
and `vendored-memory-drift.test.ts` imported the vendor script as an implicit
`any`, which is a hole in exactly the guard that exists to stop the vendored
tree drifting silently. The script stays plain `.mjs` -- it is build tooling
run by `node`, not compiled -- and a `.d.mts` beside it gives the two symbols
the test uses their types.

Found while landing #122, fixed rather than stepped around. Root `typecheck`
goes from nine errors to four; the remaining four are in
`packages/agent-experience-memory` and `packages/khala-sync-server` and are
entangled with the AFS unsafe-cast boundary finding, which needs its owner.

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • added packages/openagents-cli/scripts/vendor-memory.d.mts
  • modified packages/openagents-cli/test/coder-capability.test.ts
  • modified packages/openagents-cli/test/coder-image.test.ts
  • modified packages/openagents-cli/test/coder-paste.test.ts

Diff

4 files changed, +18 -4

packages/openagents-cli/scripts/vendor-memory.d.mts added +16

@@ -0,0 +1,16 @@

1
// The types `test/vendored-memory-drift.test.ts` imports from the vendor
2
// script. The script itself stays plain `.mjs` — it is build tooling, run by
3
// `node` and not compiled — but importing it from a checked test file left the
4
// module implicitly `any` (TS7016), which is a hole in exactly the guard that
5
// exists to stop the vendored tree drifting silently.
6
7
/** Each vendored file: source package, destination path, and its rewrites. */
8
export declare const VENDORED: ReadonlyArray<
9
  readonly [string, string, ReadonlyArray<readonly [string, string]>]
10
>;
11
12
/** Apply one file's rewrites, the single definition of the transform. */
13
export declare const renderVendored: (
14
  source: string,
15
  rewrites: ReadonlyArray<readonly [string, string]>,
16
) => string;
packages/openagents-cli/test/coder-capability.test.ts modified +2 -2

@@ -259,7 +259,7 @@ describe("matchCapabilities", () => {

259 259
      description: "Read a conversation back from this machine: a Claude Code or Codex session.",
260 260
      manifestPath: "/tmp/a.json",
261 261
      artifact: { path: "a.wasm", digest: "sha256:aa" },
262
      capabilities: { mounts: [], hosts: [], timeout_ms: 1000, memory_max_mib: 64 },
262
      capabilities: { mounts: [], hosts: [], timeout_ms: 1000 },
263 263
    },
264 264
    {
265 265
      name: "word_stats",

@@ -267,7 +267,7 @@ describe("matchCapabilities", () => {

267 267
      description: "Compute statistics for a piece of text.",
268 268
      manifestPath: "/tmp/b.json",
269 269
      artifact: { path: "b.wasm", digest: "sha256:bb" },
270
      capabilities: { mounts: [], hosts: [], timeout_ms: 1000, memory_max_mib: 64 },
270
      capabilities: { mounts: [], hosts: [], timeout_ms: 1000 },
271 271
    },
272 272
  ];
273 273
packages/openagents-cli/test/coder-image.test.ts modified -1

@@ -4,7 +4,6 @@ import * as os from "node:os";

4 4
import { describe, expect, it } from "vitest";
5 5
import {
6 6
  asImageFilePath,
7
  expandImageRefsForModel,
8 7
  mimeTypeForImage,
9 8
  parseDroppedImagePaths,
10 9
  removeOuterQuotes,
packages/openagents-cli/test/coder-paste.test.ts modified -1

@@ -5,7 +5,6 @@ import {

5 5
  expandPastedTextRefs,
6 6
  formatPastedTextRef,
7 7
  getPastedTextRefNumLines,
8
  PASTE_MAX_LINES,
9 8
  PASTE_TEXT_THRESHOLD,
10 9
  shouldCollapsePaste,
11 10
} from "../src/coder-paste.js";

This page updates live while a promote is in flight · changelog