Skip to content

typecheck: promote call-arity mismatch from warning to hard error - #1922

Merged
gHashTag merged 1 commit into
masterfrom
feat/arity-check
Aug 8, 2026
Merged

typecheck: promote call-arity mismatch from warning to hard error#1922
gHashTag merged 1 commit into
masterfrom
feat/arity-check

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

The arity check existed but only warned, and nothing reads warnings (tri-net's specs-typecheck hook greps 'Typecheck OK'; gen paths skip typecheck entirely) -- two tri-net specs shipped wrong-arity calls for months (tri-net#323) that every backend silently mangles. Arity mismatch now sets error_count and ok=false, so the gate actually blocks the class. Sweep: zero arity violations remain across tri-net's 100+ specs post-#323 -- the promotion breaks nothing (27 specs carry pre-existing UNRELATED typecheck errors, byte-identical under stock t27c; tracked separately). Unit suite 1537/1537; FROZEN_HASH resealed; NOW.md + docs/NOW.md updated.

Closes #1921

🤖 Generated with Claude Code

The arity check existed but only warned, and nothing reads warnings --
tri-net's specs-typecheck hook greps 'Typecheck OK' and the gen paths skip
typecheck entirely, so two tri-net specs shipped wrong-arity calls for
months (tri-net#323) that every backend silently mangles. Arity mismatch
now sets error_count/ok=false and actually gates. Sweep evidence: zero
arity violations remain across tri-net's 100+ specs post-#323, so the
promotion breaks nothing (27 specs carry PRE-EXISTING unrelated typecheck
errors, byte-identical under stock t27c). Unit suite 1537/1537.
FROZEN_HASH resealed.

Closes #1921

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) August 8, 2026 08:24
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-08 08:24:25 UTC

Summary

Status Count
Total Open PRs 14
PRs with Failing Checks 1
PRs with All Checks Green 13
READY 5
FAILING 1
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=8770de8b22df != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 086a26f into master Aug 8, 2026
18 checks passed
gHashTag added a commit that referenced this pull request Aug 8, 2026
…#1924)

infer_expr pinned every integer literal to I32, so in u32-dominant specs
every 'let x = 0; ... x = u32_expr;' and 'metric = 100 - value' raised a
false 'cannot assign U32 to I32' -- 27 of tri-net's specs failed typecheck
on exactly this, invisible until #1922 made typecheck gate (the hook only
checks staged files). A bare NON-NEGATIVE literal now infers Unknown
(context-polymorphic); only an explicitly negative literal commits to I32;
and promote_types resolves Unknown+Known to the KNOWN operand. tri-net
sweep: 27 failing -> 2 (both 'assign to immutable array element'
singletons, tracked with #1919). Unit suite 1537/1537; FROZEN_HASH
resealed.

Closes #1923

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

typecheck: call-arity mismatches only WARN -- nothing reads warnings

1 participant