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>