ompsure
All reviews
Enforcement catches

Non-null assertion (!)

2026-06-09

enforcement hook — composure-pro · 2026-06-09
[composure:enforcement] The write you just attempted to MobileNav.tsx matches a pattern this codebase doesn't want shipped. What the rule caught (1 item): - Non-null assertion (!) detected. Use optional chaining (?.) with a null guard.

The agent conceded immediately: “The enforcement rule rightly flags my `tab.children!` non-null assertion. I'll use optional chaining instead (`tab.children?.map`) — safe since `hasChildren` already guards it.” Fixed in one pass.

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.