fix(derive): SEP PART B / R6 — receiver-import guard (axios.get→GLOBAL::get unsoundness) - #464
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-globalget, stripping the receiver and minting an unsoundCALLS → 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 anIMPORT_BINDING:All three edges are analyzer-committed EDB (verified: no
resolvedViastamp;js_local_refsexplicitly excludes IMPORT_BINDING as the import skip-set) — so there is no pack-ordering dependency.Genuine ecma-globals are untouched:
JSON.parsewins on the full name (not a stripped suffix) → keptprocess.exitkeepsexit(processis not an IMPORT_BINDING) → keptVerification
axios.getno longer mintsGLOBAL::get;fetchUserrecoversIO:HTTP:REQUESTvia the unresolved-path effects-db lookup and is no longer suspected-unsound;loadConfigunchanged.js_runtime_globals_edges_receiver_import_guard(defectaxios.getsuppressed vs identical-suffixfoo.geton a local receiver kept); existing..._first_match_and_endpoint_pinstill green.Note
Touches the resolver pack zone (normally vm's). Done with explicit owner sign-off to close SEP. Release note:
rfdb-serversource changed → rfdb prebuilt binaries must be rebuilt at next release.🤖 Generated with Claude Code