# CLI 0.0.4-microsoft-preview.28

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

## Planning workflow correction

- Prevent repeated `migration_planning_storeWorkflowDefinition` submissions from
  hiding the underlying validation problem. Structured schema errors and the
  concrete repair action remain in subsequent prompts and in a terminal
  `MODEL_TOOL_LOOP` report.
- Return all side-effect-free workflow corrections together before writing a
  planning file. This includes misplaced `/actions/metadata`, invalid runtime
  types such as `Decision`, malformed ServiceProvider and XSLT inputs,
  undeclared parameters or variables, missing source coverage, and missing or
  invalid per-workflow Mermaid.
- Normalize legacy bare definitions to a complete Stateful `workflow.json`
  wrapper so orchestration coverage pointers continue to address
  `/definition/actions` and `/definition/triggers`.
- Require a successful documentation search and complete reference-document
  read, plus a workflow-reference search and complete workflow read, before the
  planning host accepts a workflow definition. Search-only or tail-page reads do
  not satisfy the prerequisite.
- For every ServiceProvider trigger/action, require a fully read eligible
  packaged example with the exact trigger/action role, provider ID, operation ID,
  and compatible parameter shape. Incorrect reference fixtures cannot authorize
  an operation, and File System metadata triggers cannot feed XSLT directly
  without a documented get-file-content action.

## Fail-closed runtime validation and resume

- Use runtime JSON type `If` for source/Designer labels such as Decision or
  Condition, and `Workflow` for child-workflow calls. Invalid aliases are
  rejected with their exact replacement rather than retained as warnings.
- Validate File System ServiceProvider configuration and polling recurrence,
  XSLT `content` plus `map`, control-action containers, `runAfter` dependencies,
  migration metadata, and parameter/variable declarations.
- Require a Mermaid diagram for every planned workflow, including the first,
  and require one migration correlation ID/timestamp across the flow.
- A workflow stored by an older preview is not counted as completed coverage if
  it is a bare definition, lacks Mermaid, or fails the strengthened validator. The
  next action names that workflow and directs the model to repair it under the
  same name instead of silently skipping it or creating duplicate coverage.
- Obsolete invalid workflow files that cannot be repaired in place can be moved
  out of the active plan by a host-gated archive tool. The original file remains
  preserved under `invalid-workflows`; valid workflow files cannot be archived.

The reported FINACCONT2024Backup-BT audit placed `MigrationMetadata` under
`actions` on call 13 and repeated the identical rejected payload through call
16. Its preceding stored workflow also used the non-runtime `Decision` type.
Regression tests reproduce both checkpoint states and verify that neither can
be finalized as a runnable migration plan.

## Verification and limits

- 142 Microsoft migration-core tests and 252 CLI tests pass. Repository lint,
  TypeScript compilation, all workspace tests, and production builds pass; the
  VS Code compatibility suite has 23 passing tests and one platform-specific
  pending test.
- Representative packaged File System trigger/create-file and XSLT reference
  workflows pass the strengthened validator after migration metadata is added.
- All 147 previously published public assets through preview.27 matched the
  local staging tree byte-for-byte over HTTPS before this release was added.
- This release does not claim a completed live FINACCONT2024Backup-BT migration,
  deployed Logic Apps runtime test, or business equivalence. Invalid or
  source-incomplete model output still fails closed.

## PowerShell update

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

Expected version: `0.0.4-microsoft-preview.28`. This preview is not promoted to
the stable `latest` alias. Preserve existing reports and generated output. The
new host can identify and request repair of stale invalid planning workflows,
but a fresh generated workspace remains the cleanest qualification path because
the Microsoft engine fingerprint changed. Do not edit fingerprint records to
force checkpoint reuse. Installation does not reset license counters.
