You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tools/strict_shape_contract.py pins each exempt builtin by the SHA-256 of its raw body and of every helper in its closure. Comments are part of that text, so an edit that changes only a comment fails the gate ("exempt source/helper changed; review the contract") exactly as a code change does. Because tools/strict_differential.sh aborts its preflight on the same hashes, one such edit fails about seven full-lane jobs at once.
What it cost on 2026-10-24:
R1.6z needed two reviewed repins (builtin_exec_capture, builtin_tensor_load) where only a constructor's spelling inside a comment had changed;
Each review was a closure diff whose answer was "comments only", and a gate whose reds are mostly false invites rubber-stamp repins.
Proposal: hash a normalized body, with comments stripped by a real tokenizer (string, character-literal and comment state; mechanical-gates §57) and whitespace collapsed. The gate still reds on any token change in the function or its helpers.
Done when
The body and helper hashes are taken over the comment-stripped, whitespace-normalized token stream. The stripper honours string and char literals, and its selftest covers /* inside a string and // inside a char literal.
A comment-only edit to an exempt builtin passes. A one-token code change in the builtin, or in a helper of its closure, fails, naming the function. Both are planted in the selftest.
All existing contracts are repinned once, in the same PR, with a closure diff showing that only the hash function changed.
Activity
Fix issues from PR #1971 feedback (#1962)