ompsure
All reviews
Enforcement catches

Double cast through unknown

2026-06-09

enforcement hook — composure-pro · 2026-06-09
[composure:enforcement] The write you just attempted to LiveSessionMap.tsx matches a pattern this codebase doesn't want shipped. What the rule caught (1 item): - 'as unknown as T' detected. Use a type guard to narrow unknown to T.

The cast wasn't even new — it was pre-existing code the edit happened to carry along. The agent: “The rule caught the pre-existing `as unknown as Edge[]` cast that my edit carried over. Fair — I'll replace it with a proper mapper instead.” The debt got paid the moment it was touched.

Why this matters: Bugs that wait for a customerThe failure mode this catch prevents — in App architecture, in practice.

Composure enforcement hook, firing mid-session in the composure-pro repo. Catch message reproduced verbatim.