# CLI 0.0.4-microsoft-preview.18

Microsoft migration engine preview. Stable `latest` remains 0.0.3.

## Invalid flow-reference recovery

- Graph lookups now reject nonexistent, malformed and out-of-scope flow IDs with explicit corrective feedback instead of a fatal lookup exception. No graph is returned and no group is created for rejected inputs.
- During grouping, feedback distinguishes a missing initial graph read from an already available inventory. The model is directed to read the inventory without an invented ID or submit evidence-backed groups, respectively.
- During later phases, feedback identifies the host-selected flow. The host does not silently replace an explicitly wrong ID or broaden the source scope.
- Three rejected graph references stop with `INVALID_FLOW_REFERENCE`, the affected tool/ID, and the exact next action. Changing invented IDs or interleaving valid reads does not reset the budget. Corrections stay visible and exact requests/results remain audited.
- Storage, handler and audit failures remain fatal. This narrowly scoped input correction does not retry side effects, weaken grouping validation or bypass Microsoft finalization.

## PowerShell update

```powershell
Invoke-WebRequest 'https://tools.lambogenius.com/lambogenius-integration-migration/0.0.4-microsoft-preview.18/install-cli.ps1' -OutFile install-cli-preview18.ps1
# Review the downloaded script before running it.
& .\install-cli-preview18.ps1 -SkipDependencies
li.cmd --version
```

Expected version: `0.0.4-microsoft-preview.18`. Keep supported YAML context settings from preview.16/17. No further context increase is needed for this fix. Preserve earlier output and use a fresh generated workspace because the engine fingerprint changes. Do not edit checkpoint fingerprints to force resume. License counters are not reset by installation.

## Verification

88 Microsoft-core tests, 222 CLI tests and 24 installer/release tests passed (334 total); compilation and lint passed.

FINACCONT-BT regression used the invalid request captured during inspection of the customer's audit: `migration_detectFlowGroups` with `groupId: flow-1-order-processing`. The original audit was no longer present at its former path at test time, so a labeled reconstructed request fixture was used. Four scripted calls against the actual parser/source selection covered inventory, custom-code listing, rejection, and a valid synthetic grouping submission. All 98 artifacts and five orchestrations were retained; source bytes were unchanged and the nonexistent group was not created.

The test performs zero model calls and validates input recovery, not the semantic correctness of a live model's grouping or an end-to-end migration. Synthetic outputs exist only in a disposable test directory. No customer output, global CLI, license state or cloud migration resources were changed.
