infer_expr types every integer literal as I32, so in u32-dominant specs every 'let x = 0; ... x = u32_expr;' and 'metric = 100 - value' raises a false 'cannot assign U32 to I32' -- 27 of tri-net's specs fail typecheck TODAY on exactly this (invisible until #1922 made typecheck matter, since the hook only checks staged files). Fix: a bare NON-NEGATIVE literal is context-polymorphic (Unknown); only explicitly negative literals commit to I32; and promote_types resolves Unknown+Known to the Known operand. tri-net sweep: 27 failing -> 2 (the two remaining are 'assign to immutable array element' singletons, tracked with the C-tail in #1919).
infer_expr types every integer literal as I32, so in u32-dominant specs every 'let x = 0; ... x = u32_expr;' and 'metric = 100 - value' raises a false 'cannot assign U32 to I32' -- 27 of tri-net's specs fail typecheck TODAY on exactly this (invisible until #1922 made typecheck matter, since the hook only checks staged files). Fix: a bare NON-NEGATIVE literal is context-polymorphic (Unknown); only explicitly negative literals commit to I32; and promote_types resolves Unknown+Known to the Known operand. tri-net sweep: 27 failing -> 2 (the two remaining are 'assign to immutable array element' singletons, tracked with the C-tail in #1919).