feat(util): RFD R2+R4+R5 — surface precision marker + soundness check + live unsound detection - #463
Merged
Merged
Conversation
…undness check, R5 unsound detection
Stacks on the R1 precision-marker primitive (resolutionPrecision.ts).
R5 — live suspected-unsound detection in traceEffects: when a member call's
receiver is a real non-relative import but the call resolved to a PURE/empty
ecma-GLOBAL via runtime-globals (the axios.get→GLOBAL::get suffix-collapse
defect), traceEffects now surfaces it. Adds TraceEffectsResult.suspected_unsound
(per-call UnsoundResolutionLeaf) and a per-leaf precision marker, reusing
classifyResolution + the R1 receiver walk. Complementary to PART A (which
recovers the EFFECTS via effects-db); R5 is the explicit PRECISION mark on top.
R2 — surface the marker in consumers (additive, optional fields only):
- CallInfo.precision (findCallsInFunction / find_calls): classifies each
resolved call WITHOUT the receiver walk → precise / heuristic-superset from
fan-out + resolvedVia, never suspected-unsound (reserved for the full-walk
paths).
- LeafSource.precision + suspected_unsound on the traceEffects result shape.
- MCP describe/get_function_details annotates non-precise resolutions; the
trace-effects MCP handler renders per-leaf precision + a suspected-unsound
block.
R4 — soundness taxonomy + util-layer invariant check: soundnessOf maps the
three precision classes onto {sound, sound-superset, unsound}, and
checkResolutionSoundness(backend) hard-flags every unsound resolution as a
violation — caught even though it passes the ≤1-target "is-a-function"
guarantee. A plain function, NOT a guarantees.yaml rule.
Tests: test/unit/ResolutionPrecisionConsumers.test.js (R2/R4/R5 against
FixtureStorageView backends mirroring the live sep-test graph). R1 marker test,
trace-effects, traceEffectsTaxonomy, and findCallsInFunction suites stay green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Disentinel
force-pushed
the
feat/precision-marker-consumers
branch
from
June 17, 2026 17:20
c6bc966 to
9dd6d2a
Compare
Disentinel
changed the base branch from
spike/resolution-precision-marker
to
main
June 17, 2026 17:21
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.
Stacked on R1 (#462). Consumes the precision marker. TS-only (util + mcp); no rust/.dl/SCIP/guarantees.yaml.
traceEffectssurfacessuspected_unsound[]+ per-leafprecision: a member call whose receiver IS a non-relative import but resolved to a PURE ecma-GLOBAL::method(theaxios.get→GLOBAL::getdefect) is explicitly marked unsound (complementary to PART A fix(util): propagate effects-db effects through member calls on default-imported modules (SEP PART A) #460's effect-recovery).find_calls(CallInfo.precision), the traceEffects result, and the MCPdescribe/trace-effectssurfaces.soundnessOf(precise | sound-superset | unsound) +checkResolutionSoundness(backend)hard-flags unsound resolutions as violations, even though they pass the ≤1-target is-a-function guarantee.Verify (live /tmp/sep-test)
Tests: ResolutionPrecisionConsumers (7) + R1 + trace-effects = 28/0; findCallsInFunction 26/0; ContextCommand 10/0.
Merge order (3-PR stack touching traceEffects.ts)
Merge #462 (R1) + #460 (PART A effect-recovery) to main first, then rebase this branch onto main (reconcile the
processTargetreceiver path — PART A recovers effects, R5 adds the unsound mark; complementary). After both land, a consumer sees BOTH the recoveredIO:HTTP:REQUESTand the suspected-unsound flag.🤖 Generated with Claude Code