auto_onboard_service() in src/orchestrator.py creates services with status='approved' and sets active_version — making them look fully validated when they never went through the 8-stage pipeline. Additionally, set_active_service_version() overwrites reviewed_by from 'orchestrator' to 'Deployment Validated', hiding the auto-onboard origin.
Change auto_onboard_service() to only do prep work (create service entry + ARM template + draft version) without approving. Use status='not_approved' with reviewed_by='auto_prepped' as a marker. Composition continues to work via draft version fallback.
- Change
status: "approved"→"not_approved"andreviewed_by: "orchestrator"→"auto_prepped" - Remove the
set_active_service_version()call (line 157) — no approval, no active version - Change return from
"onboarded"to"prepped" - Add early return for already-prepped services (
reviewed_by == "auto_prepped")
- After the existing
status == "approved"check, add a branch for prepped services (reviewed_by == "auto_prepped") that fetches the draft version's ARM template - Update the auto-onboard result check (line 285) to accept
"prepped"and"already_prepped"as success
- Update status check from
"onboarded"to"prepped"/"already_prepped"
- Update status check to accept
"prepped"/"already_prepped"
- After
get_active_service_version()returnsNoneand before thehas_builtin_skeleton()fallback, add a fallback toget_latest_service_version()to retrieve the draft ARM template
- No change needed — it just creates the service entry then runs the full pipeline on it
- Update the existing
isStubcheck to also matchreviewed_by === 'auto_prepped'so these services show "Needs Full Onboarding" with an onboard button - The default
not_approvedcatch-all (line 2359) already shows the onboard button, so this is a cosmetic enhancement
- Prepped services will now have
status='not_approved'so they won't hit theapproved && !activeVersioncase — no change needed
- The full onboarding pipeline (
POST /api/services/{id}/onboard) — untouched set_active_service_version()— still used by the real pipelinepromote_service_after_validation()— still used by the real pipeline- Existing fully-validated services — unaffected
- The 5 already-auto-onboarded networking services stay as-is (they have
status='approved'withactive_versionfrom the old code — users can re-validate them manually)