Skip to content

feat(guarantee): calls-resolution-is-a-function (severity:error)#479

Merged
Disentinel merged 1 commit into
mainfrom
feat/resolution-is-a-function-guarantee
Jun 21, 2026
Merged

feat(guarantee): calls-resolution-is-a-function (severity:error)#479
Disentinel merged 1 commit into
mainfrom
feat/resolution-is-a-function-guarantee

Conversation

@Disentinel

Copy link
Copy Markdown
Owner

What

A new grafema check datalog guarantee: a CALL must not resolve to two distinct targets under the same resolvedVia tag — resolution must be a function. This is the enforcement layer for the #23 rust_calls rework (#466 + #467) — with rust-calls now a true function, this locks the property and catches regressions.

Supersedes the stale vm #431 branch (which carried no actual rule — it only removed a guarantee main has since added).

Carve-outs (one-to-many BY DESIGN, not bugs)

  • rust-dyn-dispatch — trait-object method call dispatches to every impl by design.
  • rust-cross-method — cross-impl x.len() with no local receiver type fans to every len impl; the heuristic parity ceiling (precise = team-server SCIP tier).

Verification (fresh rust graph, derive engine via checkGuarantee)

  • WITH carve-outs: 0 violations
  • WITHOUT carve-outs (control): 561 = rust-cross-method 237 + rust-dyn-dispatch 324 — exactly the two excluded resolvers; nothing else over-resolves.

The rule uses the derive builtin edge_attr to read the CALLS edge resolvedVia; the edge() generator legs lead so the planner binds before the edge_attr point-probes (otherwise E-PLAN-002). YAML validated; rule follows the schema of the 50 existing guarantees.

Gate semantics

severity:error, but grafema check is not wired into CI — so this is opt-in enforcement (grafema checkexit 1 on violation), not a per-PR CI blocker.

Known scope (follow-up)

The JS resolvers (runtime-globals residual, cross-file-calls, same-file-calls) have their own over-resolution not yet closed — the JS analogue of the #23 rust work. On a graph where they fire, this rule reports them (correctly — they are real over-resolutions to fix). Closing them is a separate effort before this gate is green JS-wide.

🤖 Generated with Claude Code

…ck resolver soundness

A new datalog guarantee: a CALL must not resolve to two distinct targets under
the same resolvedVia tag — resolution must be a function. Carves out the two
resolvers that are one-to-many BY DESIGN: rust-dyn-dispatch (trait-object
semantic dispatch) and rust-cross-method (the heuristic parity ceiling; precise
resolution = the team-server SCIP tier).

This is the enforcement layer for the #23 rust_calls rework (#466 + #467): with
rust-calls now a true function, the guarantee locks the property and catches
regressions. Verified on a fresh rust graph via the derive engine
(backend.checkGuarantee): 0 violations WITH the carve-outs, 561 WITHOUT them
(= rust-cross-method 237 + rust-dyn-dispatch 324 — exactly the two excluded
one-to-many resolvers, nothing else over-resolves). Uses the derive builtin
edge_attr to read the CALLS edge's resolvedVia; the edge() generator legs lead so
the planner binds before the edge_attr point-probes (E-PLAN-002 otherwise).

severity:error. `grafema check` is NOT wired into CI, so this is opt-in
enforcement (grafema check → process.exit(1) on violation), not a per-PR CI
blocker. Known scope: the JS resolvers (runtime-globals residual, cross-file-calls,
same-file-calls) have their own over-resolution not yet closed — the JS analogue
of the #23 rust work; on a graph where they fire, this rule reports them
(correctly, as real over-resolutions to fix). Supersedes the stale vm #431 branch
(which carried no actual rule).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Disentinel Disentinel merged commit 5e5622c into main Jun 21, 2026
12 checks passed
@Disentinel Disentinel deleted the feat/resolution-is-a-function-guarantee branch June 21, 2026 08:33
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