Lombard Odier EuropePrivate banking

Checking Behaviour After AI Assisted System Migration

A release engineer and portfolio reviewer need to know whether migrated statement logic preserves holdings, values and unresolved exceptions.

System overviewVisual summary
Same input. One position disappears.

Synthetic statement example

Legacy projection2 positionsPOS-B: 4 shares · unpriced
Migrated projection1 positionPOS-B: missing

A missing price must remain an exception, rather than erase the holding.

A successful run can still lose a holding

Before a proposed statement-system release, a release engineer gives a portfolio-operations reviewer the old and new outputs for the same holdings and prices. Both jobs finish successfully. The old output contains an unpriced holding; the new output silently omits it. Comparing only priced amounts would miss the disappearance of an item that still needs investigation.

This is the opening synthetic example: POS-B has four shares and no price. Its expected result is a visible position with pricing_status: unpriced and a null value. The migration reviewer needs to identify the lost record, assign a correction and repeat the comparison before accepting that fixture.

MongoDB’s public story describes Lombard Odier’s group-level SQL/application modernisation, including a portfolio-management system and AI-assisted migration of the Publications application. Lombard Odier separately describes its Modernization Factory partnership and a T&O unit based in Switzerland and Luxembourg. These establish relevant context; they do not demonstrate this implementation at Lombard Odier (Europe) S.A. The workflow below is an independent design. MongoDB case · Lombard Odier technology

Agree what the migration must preserve

The proposed deliverable is a review pack for one statement projection, rather than a claim that an entire banking platform is equivalent. Its job input includes a snapshot, reference versions, old/new build identifiers, a business contract and reviewed expectations.

The local contract is deliberately narrow: long-only synthetic equity holdings, share quantities, EUR/USD amounts and no FX conversion or aggregation.

RequirementWhy the reviewer needs it
Each source position appears exactly once.A keyed comparison must not hide dropped or duplicate records.
Instrument, date, quantity and currency remain bound to the source.The same number under a different identity or currency is a different fact.
Unpriced, zero and missing remain distinct.An unresolved price must not erase a holding; zero shares must not become null.
Expected behaviour is independently reviewed.Agreement between old and new code does not establish correctness.

The missing-price trap has a concrete database analogue. SQL LEFT JOIN retains an unmatched holding. Default MongoDB $unwind omits an empty or missing joined array unless preservation is requested. The Python example simulates that row-loss behaviour; it executes neither database and describes no reported bank incident. PostgreSQL join semantics · MongoDB $unwind

Separate execution, comparison and approval

Compare the same business snapshot through both implementations

Logical modules in the local Python prototype, with production connections shown separately.

INPUT

Frozen business fixture

One synthetic portfolio snapshot, independently reviewed expectations and an explicit change manifest.

fixtures.json

PROCESSING RESPONSIBILITIES

  1. Paired execution

    Toy legacy and migrated projections process the same snapshot. Declared fault profiles expose migration risks.

    legacy_projection / migrated_projection
  2. Canonical contract

    Validate position identity, date, currency, quantity and amount. Reject invalid shapes, duplicate keys and missing rows.

    canonicalize / validate_snapshot
  3. Behavior adjudication

    Compare fields and the reviewed oracle. Accept an intentional change only against its exact old/new values.

    compare_case / classify_change

REVIEW OUTPUT

Migration review packet

Input, raw and canonical outputs, differences and business expectations linked to a reproducible run.

results.json

DATA AND STATE KEPT BY THE PROTOTYPE

Fixture and expectation

Versioned synthetic JSON with reviewed or pending expectation status.

Run identity

Source, code and fixture fingerprints in the exported result.

Difference evidence

Raw outputs, field-level differences and change classification; no live database.

Human decision

Portfolio operations owns the business expectation and any intended change. The release engineer fixes regressions and reruns the same fixture; a release owner decides on delivery.

Production connections · proposed

Read-only redacted snapshots → shadow old/new workers → immutable run storage + reviewed business contracts → CI release gate and controlled delivery.

legacy_projection() produces flat records; migrated_projection() produces nested documents from the same snapshot. Both are toy functions with declared fault profiles and a shared arithmetic helper. They are not independent implementations of a production platform.

canonicalize() maps those shapes to a common record: position, instrument, date, currency, quantity/unit, market value/unit and pricing status. It checks coverage before dictionary-based matching, retaining raw outputs and explicit issues. Source-owned context is checked against the snapshot on both outputs and the oracle; an approval cannot legalise an accidental currency conversion.

Amounts use bounded decimal strings and local Decimal arithmetic. Canonicalisation rejects excess monetary precision instead of quietly rounding it. The declared two-decimal rounding policy belongs to the synthetic projection contract, not a universal valuation rule.

compare_case() then records old/new field differences, differences from the expected target and exact intentional-change matches. results.json retains raw/canonical records, issue codes, fixture/snapshot digests and code hashes. These identify an execution; hashes do not authenticate a reviewer.

For production, immutable object storage would retain snapshots and outputs. A persistent review store would hold contract versions, expectations, change approvals, run references and exception ownership. Read-only shadow workers would replace the toy functions; delivery to CI or a statement-release service would be a separate integration.

Follow the difference to its next owner

From incoming information to an accountable handoff

People and systems have separate responsibilities. Dashed steps connect the prototype to a proposed operational process.

  1. Portfolio operations

    Approve the business expectation

    Confirm position keys, date, currency and monetary behavior. AI-proposed examples remain pending until reviewed.

  2. System

    Run old and new on one input

    Pin the same synthetic snapshot and code versions; retain both raw result shapes.

  3. System

    Locate a meaningful difference

    Validate structure before field comparison. Check independent expectations even when both implementations agree.

  4. Business owner

    Explain the change

    An approved intentional change must name the fixture, field and exact old/new values; other differences require review.

  5. Release engineer

    Repair and rerun the snapshot

    Fix the mapping or behavior and reproduce the comparison against the same reviewed business contract.

  6. Release ownerProposed integration

    Approve controlled delivery

    Use the proposed CI gate alongside operational, security and rollback evidence before a production release.

The local prototype compares Python toy adapters and reviewed synthetic expectations. It does not migrate SQL, Java or MongoDB, generate fixtures with AI, or authorize a production release.

For MISSING_PRICE, the engineer supplies one snapshot to both workers. The new projection returns only the priced position. Coverage produces missing_position; the fixture becomes contract_failure. The developer restores row preservation, then reruns the whole fixture, including typed fields and expected behaviour. Fixing cardinality alone could still leave the wrong currency or status.

Recorded Python executions on synthetic holdings, fault profiles and review metadata. This page does not run a live migration or approve a release.

MISSING_PRICE

A holding disappears when its price is missing

Shared source snapshot

2026-10-30 · 2 positions · immutable input for both toy projectors

  • POS-A · 10 sharesDEMO-EQUITY-A · EUR 12.345 per share
  • POS-B · 4 sharesDEMO-EQUITY-B · Missing price · USD

Contract failure · review required

Legacy output

2 canonical records

POS-A

DEMO-EQUITY-A

Quantity
10 shares
Market value
EUR 123.45
Status
priced
As of
2026-10-30
POS-B

DEMO-EQUITY-B

Quantity
4 shares
Market value
Not priced
Status
unpriced
As of
2026-10-30

Migrated output

1 canonical record

POS-A

DEMO-EQUITY-A

Quantity
10 shares
Market value
EUR 123.45
Status
priced
As of
2026-10-30

Expected target

Independent, simulated review

POS-A

DEMO-EQUITY-A

Quantity
10 shares
Market value
EUR 123.45
Status
priced
As of
2026-10-30
POS-B

DEMO-EQUITY-B

Quantity
4 shares
Market value
Not priced
Status
unpriced
As of
2026-10-30

What the reviewer must investigate

  • migrated · POS-B · missing_positionRestore the record / field contract before treating keyed outputs as comparable.

Migration developer

Restore the missing / invalid record or field, then repeat the full comparison.

The unpriced position must remain visible for follow-up. Comparing only surviving rows would hide a coverage regression.

Inspect raw shapes, contract issues and exact change evidence

statement-contract-1 · snapshot 3ed7882e65f774b7…

Review names are local fixture metadata. Original raw outputs remain in this recording even when a canonical field is rejected.

{
  "id": "MISSING_PRICE",
  "title": "A holding disappears when its price is missing",
  "snapshot": {
    "as_of": "2026-10-30",
    "positions": [
      {
        "position_id": "POS-A",
        "instrument_id": "DEMO-EQUITY-A",
        "currency": "EUR",
        "quantity": "10",
        "price": "12.345"
      },
      {
        "position_id": "POS-B",
        "instrument_id": "DEMO-EQUITY-B",
        "currency": "USD",
        "quantity": "4",
        "price": null
      }
    ]
  },
  "fixture_origin": "human_authored",
  "profiles": {
    "legacy": "standard",
    "migrated": "lookup_unwind"
  },
  "oracle": {
    "status": "reviewed",
    "reviewer": "Demo portfolio reviewer",
    "reference": "DEMO-CONTRACT-001",
    "rationale": "Synthetic expectation manually specified outside both projection functions; not a bank approval.",
    "expected": [
      {
        "position_id": "POS-A",
        "instrument_id": "DEMO-EQUITY-A",
        "as_of": "2026-10-30",
        "currency": "EUR",
        "quantity": "10",
        "quantity_unit": "shares",
        "market_value": "123.45",
        "value_unit": "currency",
        "pricing_status": "priced"
      },
      {
        "position_id": "POS-B",
        "instrument_id": "DEMO-EQUITY-B",
        "as_of": "2026-10-30",
        "currency": "USD",
        "quantity": "4",
        "quantity_unit": "shares",
        "market_value": null,
        "value_unit": "currency",
        "pricing_status": "unpriced"
      }
    ]
  },
  "change_manifest": [],
  "expected_status": "contract_failure",
  "lesson": "The unpriced position must remain visible for follow-up. Comparing only surviving rows would hide a coverage regression.",
  "result": {
    "status": "contract_failure",
    "fixture_accepted": false,
    "contract_version": "statement-contract-1",
    "rule_version": "migration-review-1",
    "fixture_sha256": "80f5f5630387db7a029c60f3aee3af05d0dbf02f079ff2482e743aba11af8302",
    "snapshot_sha256": "3ed7882e65f774b7ec612fb17ad6c8767a54f980a7f0cad7225972abb821a791",
    "raw": {
      "legacy": [
        {
          "position": "POS-A",
          "security": "DEMO-EQUITY-A",
          "date": "2026-10-30",
          "ccy": "EUR",
          "qty": "10",
          "qty_unit": "shares",
          "value": "123.45",
          "value_unit": "currency",
          "pricing": "priced"
        },
        {
          "position": "POS-B",
          "security": "DEMO-EQUITY-B",
          "date": "2026-10-30",
          "ccy": "USD",
          "qty": "4",
          "qty_unit": "shares",
          "value": null,
          "value_unit": "currency",
          "pricing": "unpriced"
        }
      ],
      "migrated": [
        {
          "id": "POS-A",
          "instrument": {
            "id": "DEMO-EQUITY-A"
          },
          "holding": {
            "quantity": "10",
            "unit": "shares"
          },
          "valuation": {
            "date": "2026-10-30",
            "currency": "EUR",
            "marketValue": "123.45",
            "unit": "currency",
            "status": "priced"
          }
        }
      ]
    },
    "canonical": {
      "legacy": [
        {
          "position_id": "POS-A",
          "instrument_id": "DEMO-EQUITY-A",
          "as_of": "2026-10-30",
          "currency": "EUR",
          "quantity": "10",
          "quantity_unit": "shares",
          "market_value": "123.45",
          "value_unit": "currency",
          "pricing_status": "priced"
        },
        {
          "position_id": "POS-B",
          "instrument_id": "DEMO-EQUITY-B",
          "as_of": "2026-10-30",
          "currency": "USD",
          "quantity": "4",
          "quantity_unit": "shares",
          "market_value": null,
          "value_unit": "currency",
          "pricing_status": "unpriced"
        }
      ],
      "migrated": [
        {
          "position_id": "POS-A",
          "instrument_id": "DEMO-EQUITY-A",
          "as_of": "2026-10-30",
          "currency": "EUR",
          "quantity": "10",
          "quantity_unit": "shares",
          "market_value": "123.45",
          "value_unit": "currency",
          "pricing_status": "priced"
        }
      ],
      "oracle": [
        {
          "position_id": "POS-A",
          "instrument_id": "DEMO-EQUITY-A",
          "as_of": "2026-10-30",
          "currency": "EUR",
          "quantity": "10",
          "quantity_unit": "shares",
          "market_value": "123.45",
          "value_unit": "currency",
          "pricing_status": "priced"
        },
        {
          "position_id": "POS-B",
          "instrument_id": "DEMO-EQUITY-B",
          "as_of": "2026-10-30",
          "currency": "USD",
          "quantity": "4",
          "quantity_unit": "shares",
          "market_value": null,
          "value_unit": "currency",
          "pricing_status": "unpriced"
        }
      ]
    },
    "contract_issues": [
      {
        "side": "migrated",
        "position_id": "POS-B",
        "code": "missing_position"
      }
    ],
    "differences": [],
    "oracle_differences": [],
    "approved_changes": [],
    "unapproved_changes": [],
    "oracle_status": "reviewed",
    "oracle_reviewed": true,
    "review": {
      "owner": "Migration developer",
      "next_action": "Restore the missing / invalid record or field, then repeat the full comparison."
    }
  },
  "checks": [
    {
      "name": "declared business outcome",
      "passed": true
    }
  ]
}

Other examples answer different review questions. BOTH_WRONG returns EUR 90.00 from both versions, while the separately specified expectation is EUR 100.00. APPROVED_CHANGE deliberately changes rounding from half-even to half-up. Its entry names the position, monetary field, exact old/new values, snapshot, fixture and contract version; it is not a blanket ignore rule.

The local review names and approval references are simulated fixture metadata. No live review queue, bank access or deployment approval is provided by this page.

Keep agreement separate from acceptance

This exact function runs after contract checks and field comparison. It makes one important boundary visible: an unreviewed expected result cannot pass merely because two outputs agree.

Classify the fixture after collecting the evidencePython10 lines
def release_status(*, contract_issues, oracle_reviewed, oracle_differences, differences, unapproved):
    if contract_issues:
        return "contract_failure"
    if not oracle_reviewed:
        return "oracle_review_required"
    if oracle_differences:
        return "behaviour_regression"
    if unapproved:
        return "unapproved_change"
    return "approved_change" if differences else "equivalent"

fixture_accepted is true only for equivalent or approved_change. It means this example meets the local contract. It does not establish sufficient coverage, approve an unresolved price for customer delivery or authorise a real release.

Use AI to propose work, not its own oracle

A future model could suggest field mappings or boundary fixtures from a migration patch, returning a candidate snapshot, intended rule, source-code reference and unresolved assumptions. Portfolio operations would establish the expected business result independently. The local CANDIDATE_ORACLE is an authored simulation of that pending state; no model is called.

Airbnb’s migration article, found in CSV row 34, contributes staged validation, failure-specific reruns and manual handling of the remaining difficult cases. Its evaluation guidance supports deterministic checks and human ground truth. TFDV adds type, presence and domain contracts; it does not supply position identity, valuation policy or release approval. This prototype uses no TensorFlow runtime. Airbnb migration · Evaluation guidance · TFDV tutorial

Exact monetary differences create review work, but a generic tolerance could conceal a changed rounding policy. Reviewed, narrowly bound changes are preferable here. A real rollout also needs representative portfolios, known legacy defects and downstream statement checks; eight constructed examples cannot establish that coverage.

Make the review pack actionable

The useful output is a reason and a next action, not a migration success percentage.

OwnerAction before progressing
Migration developerCorrect missing rows, invalid fields or unexpected transformations; rerun the same input.
Portfolio-operations reviewerIndependently specify expectations and resolve ambiguous business behaviour.
Business change ownerApprove an exact intentional change with its supporting reference.
Release owner · proposed integrationCheck coverage, unresolved items and downstream delivery policy before release.

The next practical step would be one agreed statement slice with de-identified snapshots and business-owned expectations. Start with missing prices, duplicate identities and known rounding boundaries; add new fixtures when a real review exposes another failure mode.

Download and reproduce the local review

Download the stdlib Python prototype, extract it, then run:

python3 run.py
python3 smoke.py

In the portfolio repository, python3 scripts/prepare-lombard.py regenerates executed recordings, the exact code excerpt and an allowlisted ZIP. Preparation stops on failed boundary checks or declared scenario outcomes. Sources, fixtures, explicit fault profiles and the independent local README are included.