apiVersion: jenkins.io/v1 kind: PipelineActivity metadata: annotations: lighthouse.jenkins-x.io/cloneURI: https://github.com/greencapitaltrade/bifrost.git lighthouse.jenkins-x.io/job: release creationTimestamp: "2026-09-04T10:31:34Z" generation: 7 labels: branch: main build: "214" context: release created-by-lighthouse: "true" event-GUID: c6ed366a-a84b-11f1-9fbc-9b88f3279d7d lighthouse.jenkins-x.io/baseSHA: d59bedffb09b132265662b481ef3137ea4df34b7 lighthouse.jenkins-x.io/branch: main lighthouse.jenkins-x.io/buildNum: "1788517894480" lighthouse.jenkins-x.io/context: release lighthouse.jenkins-x.io/id: apitaltrade-bifrost-main-release-wzj27 lighthouse.jenkins-x.io/job: release lighthouse.jenkins-x.io/lastCommitSHA: d59bedffb09b132265662b481ef3137ea4df34b7 lighthouse.jenkins-x.io/refs.org: greencapitaltrade lighthouse.jenkins-x.io/refs.repo: bifrost lighthouse.jenkins-x.io/type: postsubmit owner: greencapitaltrade podName: apitaltrade-bifrost-main-release-bktj4-from-build-pack-pod provider: github repository: bifrost tekton.dev/pipeline: apitaltrade-bifrost-main-release managedFields: - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:labels: f:branch: {} f:context: {} f:owner: {} f:provider: {} f:repository: {} f:spec: f:lastCommitMessage: {} f:lastCommitSHA: {} f:releaseNotesURL: {} f:version: {} manager: jx-changelog-0.10.29 operation: Update time: "2026-09-04T10:34:59Z" - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:spec: f:completedTimestamp: {} manager: jx-promote-0.6.45 operation: Update time: "2026-09-04T10:36:04Z" - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:annotations: .: {} f:lighthouse.jenkins-x.io/cloneURI: {} f:lighthouse.jenkins-x.io/job: {} f:labels: .: {} f:build: {} f:created-by-lighthouse: {} f:event-GUID: {} f:lighthouse.jenkins-x.io/baseSHA: {} f:lighthouse.jenkins-x.io/branch: {} f:lighthouse.jenkins-x.io/buildNum: {} f:lighthouse.jenkins-x.io/context: {} f:lighthouse.jenkins-x.io/id: {} f:lighthouse.jenkins-x.io/job: {} f:lighthouse.jenkins-x.io/lastCommitSHA: {} f:lighthouse.jenkins-x.io/refs.org: {} f:lighthouse.jenkins-x.io/refs.repo: {} f:lighthouse.jenkins-x.io/type: {} f:podName: {} f:tekton.dev/pipeline: {} f:spec: .: {} f:baseSHA: {} f:batchPipelineActivity: {} f:build: {} f:context: {} f:gitBranch: {} f:gitOwner: {} f:gitRepository: {} f:gitUrl: {} f:message: {} f:pipeline: {} f:startedTimestamp: {} f:status: {} f:steps: {} manager: jx-build-controller operation: Update time: "2026-09-04T10:41:37Z" name: greencapitaltrade-bifrost-main-214 namespace: jx resourceVersion: "322591616" uid: 3711a145-77d7-414b-a998-6e3293fa6448 spec: baseSHA: d59bedffb09b132265662b481ef3137ea4df34b7 batchPipelineActivity: {} build: "214" completedTimestamp: "2026-09-04T10:35:40Z" context: release gitBranch: main gitOwner: greencapitaltrade gitRepository: bifrost gitUrl: https://github.com/greencapitaltrade/bifrost.git lastCommitMessage: | feat(asset): provision operator teams and roles from the legacy roster SPARQ's operator roster lives only in `hr.employee` — operators hang off a Team Lead via `parent_id`, the Team Lead off a Senior Team Lead. The asset_management equivalents are empty in production (`asset.team` = 0, `asset.team.member` = 0, `asset.role` = 1), so every resolver built on the team surface returns nothing and the migration off the `riders` microservice has nothing to stand on. This is the one-time re-root. Canonical partner: an existing company partner wins; otherwise the operator's own `work_contact_id` row is scoped onto the company rather than a second partner being created. 16 of 29 operators are in that state, and their ledger is already entirely company-4 (1,055 account.move.line rows), so the scoping records what accounting already says. Creating parallel company partners is what produced the duplicates this script has to reason around in the first place — some refs already carry two company-less rows, which the employee's own work contact settles. Planning is a pure function over plain dicts, and that is what the tests cover: the test database has no `hr.employee`, which is why the hr-dependent tests in test_team_management.py were removed. The mapping is where the risk lives — binding an operator to the wrong partner or the wrong team propagates into every assignment, due and payment afterwards. Also handles two shapes the live data actually has: a Team Lead who is his own manager (dropped rather than becoming his own parent), and operators whose manager has no provisioned team (skipped and named, never silently reparented). Idempotent: roles match by code, teams by manager, members by (partner, company). Safe to re-run while the roster is still moving. Co-Authored-By: Claude Opus 5 lastCommitSHA: 55816007c5bf257219fea7825faf7087d4402ef5 message: 'Tasks Completed: 1 (Failed: 0, Cancelled 0), Skipped: 0' pipeline: greencapitaltrade/bifrost/main releaseNotesURL: https://github.com/greencapitaltrade/bifrost/releases/tag/v6.95.10 startedTimestamp: "2026-09-04T10:31:34Z" status: Running steps: - kind: Stage stage: completedTimestamp: "2026-09-04T10:35:40Z" name: Release startedTimestamp: "2026-09-04T10:34:40Z" status: Succeeded - kind: Promote promote: environment: staging pullRequest: pullRequestURL: https://github.com/greencapitaltrade/mcu/pull/5652 startedTimestamp: "2026-09-04T10:35:40Z" status: Succeeded startedTimestamp: "2026-09-04T10:35:40Z" status: Succeeded - kind: Stage stage: completedTimestamp: "2026-09-04T10:41:36Z" name: from build pack startedTimestamp: "2026-09-04T10:31:39Z" status: Succeeded steps: - completedTimestamp: "2026-09-04T10:31:56Z" name: Git Clone startedTimestamp: "2026-09-04T10:31:39Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:02Z" name: Next Version startedTimestamp: "2026-09-04T10:31:57Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:06Z" name: Jx Variables startedTimestamp: "2026-09-04T10:32:02Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:09Z" name: Setup Pip Cache startedTimestamp: "2026-09-04T10:32:06Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:10Z" name: Process Config Templates startedTimestamp: "2026-09-04T10:32:10Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:11Z" name: Update Asset Management Version startedTimestamp: "2026-09-04T10:32:11Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:14Z" name: Check Registry startedTimestamp: "2026-09-04T10:32:11Z" status: Succeeded - completedTimestamp: "2026-09-04T10:34:49Z" name: Build Container Build startedTimestamp: "2026-09-04T10:32:14Z" status: Succeeded - completedTimestamp: "2026-09-04T10:34:59Z" name: Promote Changelog startedTimestamp: "2026-09-04T10:34:49Z" status: Succeeded - completedTimestamp: "2026-09-04T10:35:03Z" name: Promote Helm Release startedTimestamp: "2026-09-04T10:35:00Z" status: Succeeded - completedTimestamp: "2026-09-04T10:36:07Z" name: Promote Jx Promote startedTimestamp: "2026-09-04T10:35:04Z" status: Succeeded - completedTimestamp: "2026-09-04T10:41:36Z" name: Publish Org Kb startedTimestamp: "2026-09-04T10:36:08Z" status: Succeeded - kind: Stage stage: name: from build pack startedTimestamp: "2026-09-04T10:31:39Z" status: Running steps: - completedTimestamp: "2026-09-04T10:31:56Z" name: Git Clone startedTimestamp: "2026-09-04T10:31:39Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:02Z" name: Next Version startedTimestamp: "2026-09-04T10:31:57Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:06Z" name: Jx Variables startedTimestamp: "2026-09-04T10:32:02Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:09Z" name: Setup Pip Cache startedTimestamp: "2026-09-04T10:32:06Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:10Z" name: Process Config Templates startedTimestamp: "2026-09-04T10:32:10Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:11Z" name: Update Asset Management Version startedTimestamp: "2026-09-04T10:32:11Z" status: Succeeded - completedTimestamp: "2026-09-04T10:32:14Z" name: Check Registry startedTimestamp: "2026-09-04T10:32:11Z" status: Succeeded - completedTimestamp: "2026-09-04T10:34:49Z" name: Build Container Build startedTimestamp: "2026-09-04T10:32:14Z" status: Succeeded - completedTimestamp: "2026-09-04T10:34:59Z" name: Promote Changelog startedTimestamp: "2026-09-04T10:34:49Z" status: Succeeded - completedTimestamp: "2026-09-04T10:35:03Z" name: Promote Helm Release startedTimestamp: "2026-09-04T10:35:00Z" status: Succeeded - completedTimestamp: "2026-09-04T10:36:07Z" name: Promote Jx Promote startedTimestamp: "2026-09-04T10:35:04Z" status: Succeeded - name: Publish Org Kb startedTimestamp: "2026-09-04T10:32:05Z" status: Running version: 6.95.10 status: {}