Skip to content

Compiler floor: refuse a call supplying fewer arguments than the callee declares (deficit direction of the arity wall) - #7848

Merged
gunbai-bot[bot] merged 6 commits into
mainfrom
session/bright-fox-355
Aug 5, 2026
Merged

gunbai-bot[bot] merged 6 commits into
mainfrom
session/bright-fox-355

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session bright-fox-355.
Pushing to session/bright-fox-355 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

Brian Searls and others added 2 commits August 5, 2026 10:41
Land the deficit direction of the call-shape arity wall: interpreter
refusal in call_function_inner (default-value-aware) mirrored at the
compile seam via CallPositionalDeficit, with discriminating witnesses.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 5, 2026 11:04
@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Skip param_is_generic_decl slots in scan_call_shape_arity and mirror the
value-param filter in call_function_inner so fold_node/fold_list calls
compile; also fix RED fixture and update direct_call_shape_wall_note per
review 48720.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Addressed review 48720 in da6abcbc0 + 5f413d0c6:

  1. RED fixture — deficit_positional now calls takes_two(true) against fn takes_two(a: Bool, b: Bool) (one value arg to a two-value-param callee), matching the two(1) specimen shape in compiler_tests.rs.

  2. direct_call_shape_wall_note — updated in both 04_infer.dag and v1_compiler_infer.rs to describe three walled states (unknown label, surplus, deficit); deficit removed from "deliberately not walled."

CI fix (5f413d0c6): regen/heal were failing because scan_call_shape_arity counted generic type parameters (R, T, …) as missing value arguments. The scan and interpreter deficit check now skip param_is_generic_decl slots — same authority split_sig_params already uses for type-compat.

— sent from bright-fox-355

Reorder call-label-surplus probes lexicographically (deficit before green),
add call_deficit_source + executing witness per review 48728, split deficit
RED into ct_call_deficit_red_witness_test to stay under concat depth, and
regen committed stage0 (infer + compiler_tests) so self-host fixed-point passes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Addressed review 48728 in e6f67b0de:

  1. Probe ordering — guarantee_probe_rows() and dark-suite dag_probes now list call-shape probes lexicographically: deficit → green → mislabel → surplus (call-label-surplus-deficit-red before call-label-surplus-green-control).

  2. Witness parity — added call_deficit_source and call_deficit_red_refuses_blocking_call_positional_deficit() beside the mislabel/surplus fixtures in guarantee_probe_corpus_witness_test.dag.

Regen (loyal-ram-550 sequence): ran regen_stage0 → generated_artifact_gate main_wet → cargo fmt; committed fresh v1_compiler_infer.rs, compiler_tests.rs, and v1_compiler_compiler_tests_rust.rs. regen_stage0 --verify is clean. Split deficit RED into ct_call_deficit_red_witness_test() — nesting it inside ct_call_shape_wall_witness_test exceeded concat depth and the tail was silently dropped at emit time.

— sent from bright-fox-355

@gunbai-bot
gunbai-bot Bot merged commit 709d83b into main Aug 5, 2026
5 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/bright-fox-355 branch August 5, 2026 14:03
gunbai-bot Bot pushed a commit that referenced this pull request Aug 5, 2026
Restore emitted infer/core/compiler_tests artifacts for Horn 3
constructor admission on the merged main + admission import surface.

Co-authored-by: Cursor <cursoragent@cursor.com>
gunbai-bot Bot pushed a commit that referenced this pull request Aug 5, 2026
Restore emitted infer/core/compiler_tests artifacts for Horn 3
constructor admission on the merged main + admission import surface.

Co-authored-by: Cursor <cursoragent@cursor.com>
gunbai-bot Bot pushed a commit that referenced this pull request Aug 5, 2026
Restore emitted infer/core/compiler_tests artifacts for Horn 3
constructor admission on the merged main + admission import surface.

Co-authored-by: Cursor <cursoragent@cursor.com>
gunbai-bot Bot pushed a commit that referenced this pull request Aug 5, 2026
Restore emitted infer/core/compiler_tests artifacts for Horn 3
constructor admission on the merged main + admission import surface.

Co-authored-by: Cursor <cursoragent@cursor.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.

1 participant