Files
compliance-scanner-agent/compliance-agent
Sharang ParnerkarandClaude Fable 5 fa3a6b71fb feat(migrate): id-preserving mapping core for onboarding backfill (#132 part 1)
Pure transforms folding legacy records into the unified model, preserving _id so
every downstream collection keyed by that hex id keeps resolving:
- repo_to_target: TrackedRepository -> OnboardedTarget (GitRepo artifact with
  branch/watermark/auth; tracker config -> scan_config; webhook/schedule/counts).
- dast_to_artifact / dast_to_standalone_target: DastTarget -> LiveUrl artifact
  (crawl config + auth), or a standalone target when repo-less.
- fold_dast_into_target: append a LiveUrl to a repo-derived target (idempotent),
  promoting BackendService -> WebApp for a browser app.

5 unit tests. The per-tenant DB orchestration (idempotent backfill + revert) and
the `migrate onboarding` CLI subcommand are the next increment.

Refs #132.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 18:25:46 +02:00
..