Skip to content

test-hardening: remove runPreparedReply shield mock + add real-chain regression test (#2336 Area 8) #2468

@alexey-pelykh

Description

@alexey-pelykh

Follow-up to #2336 (umbrella) / PR #2463 (partial sweep). Covers Area 8 deferred from that PR.

Context

The global `runPreparedReply` mock in `src/auto-reply/reply/get-reply.test-mocks.ts:39-40` replaces the real function with `vi.fn(async () => undefined)`, preventing any integration test from exercising the `resolveReplyDirectives` → `runPreparedReply` boundary. This is one of the five shields that hid #2334 from CI until a user-facing crash surfaced.

Scope

  • Delete the global `runPreparedReply` shield mock in `get-reply.test-mocks.ts:39-40`.
  • Add a regression test that drives `runPreparedReply` with `resolvedThinkLevel: undefined` (or whatever the replacement contract is post-gut(auto-reply): finish thinking-level and model-selection sweep — follow-up to #2335 #2336) through the real `resolveReplyDirectives` chain — no fabricated fixtures.
  • Consider a lint rule that flags `as never` / `as any` in test arrangement code (every fabricated shape is a pending production crash).

AC

  • Mock removed, existing tests still pass (may require fixture updates where they implicitly relied on the shield).
  • New regression test fails on the resolveReplyDirectives → runPreparedReply integration boundary when the chain is broken.
  • `pnpm check` + `pnpm test` pass.

Context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions