Skip to content

fix(derive): SEP PART B / R6 — receiver-import guard (axios.get→GLOBAL::get unsoundness) - #464

Merged
Disentinel merged 1 commit into
mainfrom
fix/sep-part-b-runtime-globals
Jun 18, 2026
Merged

fix(derive): SEP PART B / R6 — receiver-import guard (axios.get→GLOBAL::get unsoundness)#464
Disentinel merged 1 commit into
mainfrom
fix/sep-part-b-runtime-globals

Conversation

@Disentinel

Copy link
Copy Markdown
Owner

What

The runtime-globals derive pack (js_runtime_globals_edges.dl) resolved a dotted member call on a default/namespace-imported module — axios.get — onto the bare ecma-global get, stripping the receiver and minting an unsound CALLS → GLOBAL::get. Downstream effects-db lookup then saw a PURE stand-in, so side effects didn't propagate (the SEP gap in _ai/gaps.md).

This is PART B / R6 — the root fix. PART A (#460, merged) recovered the effect consumer-side; R5 (#463, merged) flags the unsoundness. This removes the bad edge at the source.

How

A negative guard suppresses win(C,S) on a stripped suffix when the receiver chain reaches an IMPORT_BINDING:

CALL -DERIVES_FROM-> PROPERTY_ACCESS -READS_FROM-> REFERENCE -READS_FROM-> IMPORT_BINDING

All three edges are analyzer-committed EDB (verified: no resolvedVia stamp; js_local_refs explicitly excludes IMPORT_BINDING as the import skip-set) — so there is no pack-ordering dependency.

Genuine ecma-globals are untouched:

  • JSON.parse wins on the full name (not a stripped suffix) → kept
  • process.exit keeps exit (process is not an IMPORT_BINDING) → kept
  • False negatives degrade to prior behavior — sound, never a regression.

Verification

  • e2e on the sep-test fixture (clean re-analyze with the rebuilt server): axios.get no longer mints GLOBAL::get; fetchUser recovers IO:HTTP:REQUEST via the unresolved-path effects-db lookup and is no longer suspected-unsound; loadConfig unchanged.
  • Unit regression test js_runtime_globals_edges_receiver_import_guard (defect axios.get suppressed vs identical-suffix foo.get on a local receiver kept); existing ..._first_match_and_endpoint_pin still green.

Note

Touches the resolver pack zone (normally vm's). Done with explicit owner sign-off to close SEP. Release note: rfdb-server source changed → rfdb prebuilt binaries must be rebuilt at next release.

🤖 Generated with Claude Code

…obals_edges

A dotted member call on a default/namespace-imported module (`axios.get`) was
resolved by the runtime-globals pack onto the bare ecma-global `get`, stripping
the receiver and minting an unsound `CALLS → GLOBAL::get`. Downstream effects-db
lookup then saw a PURE stand-in — the side-effect-propagation gap (_ai/gaps.md).

Add a negative guard: suppress `win(C,S)` on a STRIPPED suffix when the receiver
chain — CALL -DERIVES_FROM-> PROPERTY_ACCESS -READS_FROM-> REFERENCE -READS_FROM->
IMPORT_BINDING (all analyzer-committed EDB ⇒ no pack-ordering dependency) — reaches
an IMPORT_BINDING. Genuine ecma-globals are untouched: `JSON.parse` wins on the
full name (not a stripped suffix); `process.exit` keeps `exit` (process is not an
IMPORT_BINDING). False negatives degrade to prior behavior — sound, never a regression.

Verified e2e on the sep-test fixture: `axios.get` no longer mints `GLOBAL::get`;
`fetchUser` recovers IO:HTTP:REQUEST via the unresolved-path effects-db lookup and
is no longer flagged suspected-unsound; `loadConfig` unchanged. Unit regression
test `js_runtime_globals_edges_receiver_import_guard` added.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Disentinel
Disentinel merged commit 6322dbc into main Jun 18, 2026
13 checks passed
@Disentinel
Disentinel deleted the fix/sep-part-b-runtime-globals branch June 18, 2026 06:16
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