Full legacy rip-out. Onboarded targets are now the sole persisted entity. 47 files, −1.7k LOC.
Removed
TrackedRepository model, the repositories collection + accessor, the /api/v1/repositories API, the Repositories dashboard page, the one-shot migrate onboarding CLI, and the UNIFIED_PIPELINE flag + legacy orchestrator::run.
The key safety property
The working unified path already flowed OnboardedTarget → repo_view_from_target → TrackedRepository → run_pipeline. This PR just turns that mapping into an internal, non-persisted RepoView (RepoView::from_target) and deletes the persisted model — so the scan / PR-review pipeline runs the same behaviour it already ran. Only the type's origin changed.
delete_target now cascades the full downstream set (findings, sbom, scans, cve, tracker issues, graph, embeddings, DAST targets + pentest sessions/children) — matching the old repository delete. get_ssh_public_key moved to the health handler.
Tests
Legacy repositories-API + migration integration tests removed; tenant-isolation / cascade-delete / stats repointed to /targets. git.rs gains a sanitize_repo_dir unit test.
⚠️Please review before merge — this rewrites the core scan pipeline's type contract. It's green locally but can't be runtime-tested from CI (no live Mongo scan). I did not auto-merge; merge when you've eyeballed it, and I'll watch the deploy.
Full legacy rip-out. Onboarded targets are now the **sole persisted entity**. **47 files, −1.7k LOC.**
## Removed
- `TrackedRepository` model, the `repositories` collection + accessor, the `/api/v1/repositories` API, the Repositories dashboard page, the one-shot `migrate onboarding` CLI, and the `UNIFIED_PIPELINE` flag + legacy `orchestrator::run`.
## The key safety property
The working unified path already flowed `OnboardedTarget → repo_view_from_target → TrackedRepository → run_pipeline`. This PR just turns that mapping into an **internal, non-persisted `RepoView`** (`RepoView::from_target`) and deletes the persisted model — so the scan / PR-review pipeline runs the **same behaviour it already ran**. Only the type's origin changed.
## Repointed to `onboarded_targets`
Webhooks (github/gitea/gitlab), CVE monitor, graph build, chat embeddings, health stats, pentest repo lookup, scheduler. `run_scan` always runs `run_target`; `run_pr_review` resolves from targets.
## Cascade parity
`delete_target` now cascades the **full** downstream set (findings, sbom, scans, cve, tracker issues, graph, embeddings, DAST targets + pentest sessions/children) — matching the old repository delete. `get_ssh_public_key` moved to the health handler.
## Tests
Legacy repositories-API + migration integration tests removed; tenant-isolation / cascade-delete / stats repointed to `/targets`. `git.rs` gains a `sanitize_repo_dir` unit test.
## Verification (local)
fmt clean; agent + mcp clippy clean; dashboard server + web compile; core + agent lib tests (32) pass; integration tests compile.
> ⚠️ **Please review before merge** — this rewrites the core scan pipeline's type contract. It's green locally but can't be runtime-tested from CI (no live Mongo scan). I did **not** auto-merge; merge when you've eyeballed it, and I'll watch the deploy.
Onboarded targets are now the sole persisted entity. The legacy
`TrackedRepository` model, the `repositories` collection, the `/repositories`
API, the Repositories dashboard page, the one-shot migration, and the
`UNIFIED_PIPELINE` transition flag are all removed. Net −1.7k LOC.
Agent
- New internal `pipeline::repo_view::RepoView` (non-persisted) replaces the
`TrackedRepository` model; it's projected from an `OnboardedTarget` + its code
artifact by `RepoView::from_target` (the old `repo_view_from_target`), so the
scan/PR-review pipeline is byte-for-byte the same behaviour it already ran on
the unified path — only the type's origin changed.
- `run_scan` always runs the unified `run_target`; the legacy `orchestrator::run`
and the `unified_pipeline` flag are gone. `run_pr_review` resolves the target
from `onboarded_targets`.
- Webhooks (github/gitea/gitlab), the CVE monitor, graph build, chat embeddings,
health stats, and the pentest repo lookup all read `onboarded_targets`.
- `delete_target` now cascades the full downstream set (findings, sbom, scans,
cve, tracker issues, graph, embeddings, DAST targets + pentest sessions and
their children) — matching the old repository delete.
- `get_ssh_public_key` moved to the health handler; `repositories()` accessor,
`repos.rs`, and `migrate/` deleted.
Core
- `TrackedRepository` removed; `ScanTrigger` stays. `unified_pipeline` config
field removed.
Dashboard
- Repositories page + route deleted; overview / graph / chat / pentest-wizard
read onboarded targets; `infrastructure/repositories.rs` trimmed to just the
SSH-key fetch.
Tests
- Legacy repositories-API and migration integration tests removed; tenant
isolation, cascade-delete, and stats tests repointed to `/targets` /
`onboarded_targets`. `git.rs` gains a `sanitize_repo_dir` unit test.
Local: fmt clean; agent/mcp clippy clean; dashboard server+web compile; core +
agent lib tests (32) pass; integration tests compile.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sharang
merged commit a981311413 into main2026-07-16 07:25:46 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Full legacy rip-out. Onboarded targets are now the sole persisted entity. 47 files, −1.7k LOC.
Removed
TrackedRepositorymodel, therepositoriescollection + accessor, the/api/v1/repositoriesAPI, the Repositories dashboard page, the one-shotmigrate onboardingCLI, and theUNIFIED_PIPELINEflag + legacyorchestrator::run.The key safety property
The working unified path already flowed
OnboardedTarget → repo_view_from_target → TrackedRepository → run_pipeline. This PR just turns that mapping into an internal, non-persistedRepoView(RepoView::from_target) and deletes the persisted model — so the scan / PR-review pipeline runs the same behaviour it already ran. Only the type's origin changed.Repointed to
onboarded_targetsWebhooks (github/gitea/gitlab), CVE monitor, graph build, chat embeddings, health stats, pentest repo lookup, scheduler.
run_scanalways runsrun_target;run_pr_reviewresolves from targets.Cascade parity
delete_targetnow cascades the full downstream set (findings, sbom, scans, cve, tracker issues, graph, embeddings, DAST targets + pentest sessions/children) — matching the old repository delete.get_ssh_public_keymoved to the health handler.Tests
Legacy repositories-API + migration integration tests removed; tenant-isolation / cascade-delete / stats repointed to
/targets.git.rsgains asanitize_repo_dirunit test.Verification (local)
fmt clean; agent + mcp clippy clean; dashboard server + web compile; core + agent lib tests (32) pass; integration tests compile.