Skip to content

T-8O1A-eopt-clear-obsidian-and-agent-call

State: closed/done · Impact: medium · Complexity: medium

The three packages holding 61 of the 77 errors the ratchet costs. Unlike the cheap six these need judgment rather than mechanical edits — agent-call alone is 34, and it is also the package furthest from the rest of the repo (the only one on NodeNext). Clearing these three is what makes moving the flag into the shared base a no-op.

LocationRole today
packages/ts/agent-call/tsconfig.json0 as of 2026-09-05. It was +34 when this was written; #1530 since widened 69 optional properties across its 8 source files to ?: T | undefined, which satisfies the flag by the means step 4 warns against
packages/ts/obsidian-md/tsconfig.json+19
packages/ts/obsidian-editor/tsconfig.json+24, of which 12 are obsidian-md’s source, which it compiles
packages/ts/tsconfig/presets/base.jsonCarries the measured breakdown and names these three as the expensive tail

All three declare exactOptionalPropertyTypes: true locally and compile clean, leaving zero packages between the repo and the shared bar taking the flag.

  1. Re-measure first — these counts are from 2026-09-01.
  2. obsidian-md BEFORE obsidian-editor. The editor compiles the renderer’s source through its bun export condition, so half its errors are really the renderer’s and clear when it does.
  3. agent-call last — and as of 2026-09-05 it needs only the flag, because its optional properties were widened wholesale by another change. Whether to keep that widening is a live question, not a settled one.
  4. Prefer omitting the property over widening the type. Widening everything to | undefined satisfies the compiler and discards exactly the information the flag exists to preserve.
  5. agent-call is on the publish channel, so changes to its public types are semver-relevant — check whether any fix alters an exported signature and note it for the next release.
LocationKindChange
packages/ts/obsidian-editor/tsconfig.jsonmodifyset the flag
packages/ts/obsidian-md/tsconfig.jsonmodifyset the flag
packages/ts/agent-call/tsconfig.jsonmodifyset the flag
packages/ts/agent-call/src/modifythe type fixes behind the 34 errors
  • AC-1: All three declare the flag and their own checks pass.
  • AC-2: With the flag added to presets/base.json locally, no package on the shared bar reports an error — the precondition for T-PAUA-eopt-lands-in-the-shared-base.
  • AC-3: Any change to an exported agent-call type is called out in the PR body, since the package publishes.

Measured while answering a review question on #1644.

Re-measured 2026-09-05. The two obsidian packages grew (19 and 24, from 14 and 13) and agent-call fell to zero. The fall is not repair: spec.ts, adapters/types.ts, conversation.ts and five siblings had 69 optional properties rewritten from ?: T to ?: T | undefined. That is the whole public surface of a package on the publish channel, and it makes the flag a no-op there — an explicit undefined is assignable again, which is the distinction the flag exists to draw.


← Back to Tasks