refactor(content-lane): retire the dead legacy candidate model - #1342
Merged
Conversation
The metagraphed candidate-file model is fully superseded by the live surface model (#1340) and has zero src callers — only tests referenced it. Remove it: - the legacy scope classifier: classifyPrScope, isDirectSubmissionScope, PrScope, ScopeResult (superseded by classifyRegistryPrScope / RegistryPrScope / RegistryScopeResult); - the legacy validator assessCandidateDocument; - the now-dead patterns CANDIDATE_PATTERN, PROVIDER_PATTERN, PROVIDER_ANY_PATTERN; - the dead candidate dedup helpers candidateRegistryKey, registryDedupKeys, registryUrls; - their index.ts re-exports and 34 now-orphaned tests. KEPT (shared with the live surface validators): CandidateLike, Assessment, fail, ARTIFACT_PATTERN (used by METAGRAPHED_LANE_SPEC), and the secret/kind/url/observed-state checks. Verified no orphaned internal helpers and zero remaining references repo-wide. ~430 lines of dead code removed; no behaviour change. Follows #1340.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1342 +/- ##
==========================================
- Coverage 95.26% 95.25% -0.02%
==========================================
Files 188 188
Lines 20377 20314 -63
Branches 7347 7319 -28
==========================================
- Hits 19413 19350 -63
Misses 378 378
Partials 586 586
🚀 New features to boost your workflow:
|
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
The metagraphed candidate-file model is fully superseded by the live surface model (#1340) and has zero
src/callers — only tests referenced it. This removes it:classifyPrScope,isDirectSubmissionScope,PrScope,ScopeResult(superseded byclassifyRegistryPrScope/RegistryPrScope/RegistryScopeResult);assessCandidateDocument;CANDIDATE_PATTERN,PROVIDER_PATTERN,PROVIDER_ANY_PATTERN;candidateRegistryKey,registryDedupKeys,registryUrls;index.tsre-exports and 34 now-orphaned tests.KEPT (shared with the live surface validators):
CandidateLike,Assessment,fail,ARTIFACT_PATTERN(used byMETAGRAPHED_LANE_SPEC), and the secret/kind/url/observed-state checks (containsSecretLikeText,REVIEWER_SAFE_KINDS,isBaseLayerKind,OBSERVED_STATE_KEYS,isSafeEndpointUrl).Validation
src/+test/+packages/).npm run typecheckclean;npm run test:cigreen (109 registry-logic tests pass; 34 dead-symbol tests removed).Follows #1340.