fix(onboarding): targets visibility + unified pipeline by default #154

Merged
sharang merged 1 commits from fix/targets-visibility-unified-default into main 2026-07-13 07:29:05 +00:00
Owner

Why

The onboarding wizard created targets you couldn't see, and clicking Run scan failed:

ERROR ...onboarding: Manual target scan failed for <id>: Repository <id> not found

/targets/{id}/scan routed through run_scan, which consults the global unified_pipeline flag and fell to the legacy repository pipeline (reads repositories, not onboarded_targets). And there was no dashboard page listing onboarded targets.

Agent

  • run_target_scan — the /targets/{id}/scan endpoint now always uses the unified run_target pipeline, independent of the transition flag (it operates on onboarded_targets by construction).
  • Default UNIFIED_PIPELINE on (no legacy repo data in prod). UNIFIED_PIPELINE=0 opts back out.
  • Scheduler now scans onboarded_targets instead of the legacy repositories collection.

Dashboard

  • New Targets page (/targets): onboarded targets with detected type, artifacts, findings count, applicable-scans matrix (expand), Run scan, Delete. Sidebar RepositoriesTargets.
  • Removed the Add Repository form — onboarding is the single entry point.
  • delete_target server fn.

Follow-up (next PR)

  • Fold private-repo auth + issue tracker into the onboarding flow, editable on a target detail view ("revisit and modify at all times").

Verification

Local, matching CI: cargo fmt --all --check; clippy clean on agent, dashboard (server + web), mcp; cargo test -p compliance-core -p compliance-agent --lib → 32 passed.

## Why The onboarding wizard created targets you couldn't see, and clicking **Run scan** failed: ``` ERROR ...onboarding: Manual target scan failed for <id>: Repository <id> not found ``` `/targets/{id}/scan` routed through `run_scan`, which consults the global `unified_pipeline` flag and fell to the **legacy** repository pipeline (reads `repositories`, not `onboarded_targets`). And there was no dashboard page listing onboarded targets. ## Agent - **`run_target_scan`** — the `/targets/{id}/scan` endpoint now *always* uses the unified `run_target` pipeline, independent of the transition flag (it operates on `onboarded_targets` by construction). - **Default `UNIFIED_PIPELINE` on** (no legacy repo data in prod). `UNIFIED_PIPELINE=0` opts back out. - **Scheduler** now scans `onboarded_targets` instead of the legacy `repositories` collection. ## Dashboard - **New Targets page** (`/targets`): onboarded targets with detected type, artifacts, findings count, applicable-scans matrix (expand), **Run scan**, **Delete**. Sidebar *Repositories* → *Targets*. - **Removed the Add Repository form** — onboarding is the single entry point. - `delete_target` server fn. ## Follow-up (next PR) - Fold private-repo **auth** + **issue tracker** into the onboarding flow, editable on a target detail view ("revisit and modify at all times"). ## Verification Local, matching CI: `cargo fmt --all --check`; clippy clean on agent, dashboard (server + web), mcp; `cargo test -p compliance-core -p compliance-agent --lib` → 32 passed.
sharang added 1 commit 2026-07-13 07:22:57 +00:00
fix(onboarding): targets visibility + unified pipeline by default
CI / Check (pull_request) Successful in 5m36s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
9717a1efda
The onboarding wizard created OnboardedTargets that were invisible in the
dashboard, and triggering a scan failed with "Repository <id> not found":
`/targets/{id}/scan` went through `run_scan`, which consulted the global
`unified_pipeline` flag and fell to the legacy repository pipeline (reads
`repositories`, not `onboarded_targets`).

Agent
- Add `ComplianceAgent::run_target_scan`, always dispatching to the unified
  `run_target` pipeline. The target-scan endpoint operates on
  `onboarded_targets` by construction, so it must not depend on the
  transition flag. `trigger_target_scan` now calls it.
- Default `UNIFIED_PIPELINE` to on (no legacy `repositories` data in prod);
  set `UNIFIED_PIPELINE=0` to opt back to the legacy pipeline.
- Scheduler now scans `onboarded_targets` (via `run_target_scan`) instead of
  the legacy `repositories` collection.

Dashboard
- New Targets page (`/targets`): lists onboarded targets with detected type,
  artifacts, findings count, applicable-scans matrix (on expand), plus Run
  scan and Delete. Sidebar "Repositories" nav becomes "Targets".
- Remove the "Add Repository" form from the Repositories page — onboarding
  is the single entry point (private-repo auth + issue tracker move into the
  onboarding flow, revisable on the target).
- Add `delete_target` server fn.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sharang force-pushed fix/targets-visibility-unified-default from a799a9890a to 9717a1efda 2026-07-13 07:22:57 +00:00 Compare
sharang merged commit bf32b9939a into main 2026-07-13 07:29:05 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sharang/compliance-scanner-agent#154