Repository navigation
fix: infer namespace for namespaced model spec tests edges (v1.0.44) - #32
Merged
Merged
Conversation
Spec files in subdirectories under spec/models/ (e.g. spec/models/salesforce/service_provider_spec.rb) were silently dropped from blast radius impactedTests because the edge builder derived the class name from basename only (ServiceProvider) while extractions.models keyed by FQN (Salesforce::ServiceProvider). Fix: infer namespace from directory structure between models/ and the spec filename, try namespaced FQN first in extractions.models, fall back to plain class name. Plain (non-namespaced) specs are unaffected. Adds test: 'creates tests edge from namespaced model spec to FQN' Fixes blast radius test discovery for namespaced models. Eval: get_blast_radius mean composite 1.000 (6/6 apps, 25 probes) closes eval/blast-radius-v1.0.44
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.
Summary
Spec files nested under namespaced subdirectories of
spec/models/(e.g.spec/models/salesforce/service_provider_spec.rb) were silently dropped from blast radiusimpactedTestsresults.Root Cause
In
src/core/graph.js, the spec→model edge builder derived the model class name purely from the filename:For
spec/models/salesforce/service_provider_spec.rb, this producedServiceProvider. Sinceextractions.models['ServiceProvider']did not exist (only'Salesforce::ServiceProvider'did), no "tests" edge was created and the spec never appeared inimpactedTests.Fix
Before checking
extractions.models, infer the namespace from any subdirectory segments betweenmodels/and the spec filename. The code now tries the namespaced FQN first (Salesforce::ServiceProvider), falls back to the plain class name (ServiceProvider), and silently skips only if neither exists in the model map.Plain (non-namespaced) specs are unaffected.
Test
Adds:
'creates tests edge from namespaced model spec to FQN'intest/core/graph.test.jsEval