Skip to content

refactor(content-lane): retire the dead legacy candidate model - #1342

Merged
JSONbored merged 1 commit into
mainfrom
chore/retire-legacy-candidate-model
Jun 25, 2026
Merged

refactor(content-lane): retire the dead legacy candidate model#1342
JSONbored merged 1 commit into
mainfrom
chore/retire-legacy-candidate-model

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

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:

  • 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 (containsSecretLikeText, REVIEWER_SAFE_KINDS, isBaseLayerKind, OBSERVED_STATE_KEYS, isSafeEndpointUrl).

Validation

  • Verified zero remaining references to the removed symbols repo-wide (src/ + test/ + packages/).
  • Verified no orphaned internal helpers — the surface validators still call every shared helper.
  • npm run typecheck clean; npm run test:ci green (109 registry-logic tests pass; 34 dead-symbol tests removed).
  • ~430 lines of dead code removed; no behaviour change (pure deletion + comment rewording).

Follows #1340.

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.
@dosubot dosubot Bot added the size:L label Jun 25, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jun 25, 2026
@JSONbored
JSONbored merged commit 2e99233 into main Jun 25, 2026
16 checks passed
@JSONbored
JSONbored deleted the chore/retire-legacy-candidate-model branch June 25, 2026 09:09
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.25%. Comparing base (d6748c4) to head (bb78788).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

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              
Files with missing lines Coverage Δ
src/review/content-lane/registry-logic.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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