Repository navigation
Make BizTalk grouping deterministic and conversions testable offline - #49
Open
Shreyansh Gupta (code-scannner) wants to merge 10 commits into
Open
Shreyansh Gupta (code-scannner) wants to merge 10 commits into
Shreyansh Gupta (code-scannner) wants to merge 10 commits into
Conversation
Discovery grouping was decided by Copilot, which took minutes, returned different groups on each run, and merged flows into very large groups once shared canonical-schema and common-code projects were added (every cross-group schema or binding edge was rejected). - Add FlowGroupDetector: orchestrations joined only by Call/Start Orchestration form a flow; maps, message schemas, pipelines, ports and projects attach to the flows that reference them; artifacts used by several flows (canonical schemas, binding files) are marked shared instead of merging flows. Same inventory -> same groups and IDs. - Attribute binding ports per flow (orchestration bindings, subscription filters, messaging-only routes) and scope shared binding files to each flow's ports when the analyser reads a group. - Report referenced projects missing from the source folder; offer to re-detect groups after a rescan changes the inventory, keeping progress of flows whose ID is unchanged. - Add discovery.groupingMode (auto/deterministic/copilot) and a Re-detect Logical Groups command; Copilot grouping now starts from the deterministic proposal. - Remove the contradictory "one group per receive location" instruction, allow shared artifacts in the store tool's independence check, and match call targets exactly. - Read map tree references, project references and send-port maps in the parsers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Users could not tell which functionality sat in which of dozens of groups. - Flow cards show the entry receive location, orchestrations and send ports, the flow ID, and an expandable artifact list with shared artifacts marked. - Add a filter box (flow, orchestration, port, schema or map name), a shared-artifact count, a missing-projects banner, and how the groups were formed. - Add Re-detect Groups and Export Inventory actions; the inventory is a Markdown map of every group with its ports, artifacts, shared and ungrouped artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the logicAppsMigrationAgent.planning.defaultChoices setting (question ID to option ID). Planning applies a configured default to a matching non-hosting question when there is no explicit answer, no reconsideration, and no per-flow user answer, recording it with source 'configuration'. Configuration-sourced answers are re-resolved when the default changes or is removed. Hosting still comes from deploymentModel and its behavior is unchanged. After a user answers a non-hosting question, offer 'Apply to All Flows' without blocking planning; accepting saves the answer to the workspace defaults. Add configuredDefaultOption and PLANNING_QUESTION_IDS with unit tests. Skills define the map-strategy and workflow-topology questions with stable IDs, exclude configured answers from the question budget, and add planning rules for Azure Functions-hosted maps and receiver, processor, and sender workflows for BizTalk, MuleSoft, and TIBCO. Document the setting and choices in the README. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a Markdown export of the finalized migration plan so it can feed skill-based build pipelines that work from a requirements.md. A pure renderer emits decisions, brief, Mermaid architecture and per-workflow diagrams, mapping, disposition, component, gap, and pattern tables, effort, and acceptance criteria derived only from plan content. The Planning view gains an "Export requirements.md" button backed by the new logicAppsMigrationAgent.exportPlanMarkdown command. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Conversion stalled when Service Bus could not be provisioned, left no re-runnable tests behind, and gave no way to tell which generated file implements which source artifact. - Add azure.provisioningMode (provision/offline). Offline conversions never sign in to Azure: they generate Bicep under infra/ and test with Azurite, the Service Bus emulator and mocked unit tests. Skills now treat Service Bus as emulator-capable. - Add the automated-test-generation skill and a required generate-tests task: Logic Apps Standard workflow unit tests with mocked connectors, map regression tests (the converted XSLT stays the oracle when maps move to functions) and schema tests, run with dotnet test; the task is rejected without test files and dotnet test results. - Require task artifactIds for traceability: names resolve to IDs, unknown references are rejected, uncovered flow artifacts are reported; task cards list their sources and TRACEABILITY.md in the generated project maps artifacts to tasks and files. - Plan map-function and receiver/processor/sender tasks from the planning choices. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pilot users found that their own targeted skills worked better, and that even one-artifact flows took long because every stage loaded large skills. - Merge .github/skills/<skill>/CUSTOM.md into each provisioned skill as an authoritative Customer Overrides section, and have agents read an optional customer-standards skill first. Provisioned skills carry a content hash: edited copies are backed up to SKILL.md.bak (with a warning) instead of being lost. - Add the migration_lookupMapping tool, which returns only the rows of the source-to-logic-apps-mapping skill (109 KB for BizTalk) that mention the given components; agents, prompts and skills use it instead of loading the whole skill. - Add a fast path for small flows without custom code: no decompilation, mapping lookups only, one reference-doc search per adapter. - Bump skill and agent versions so workspaces receive the updated files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Review fixes for the deterministic grouping: - Finishing a flow analysis no longer rebuilds the cached groups without their endpoint scopes and shared artifacts; the group lookup reads the disk-backed cache. - Flows that share a name are all suffixed from their own entry orchestration, so a re-detect cannot hand one flow's ID and saved progress to another. - Link maps to schemas by exact name in the connection graph, so names such as Order and PurchaseOrder do not create false cross-group dependencies. - Copilot re-detection keeps Home usable with the current groups instead of a spinner that a stopped agent run would never clear. - Resolve .btproj project references with Windows separators on every OS. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CodeQL flagged incomplete escaping in the requirements, traceability and group inventory exports: cells escaped pipes but not backslashes, so a value ending in a backslash could still break the table. Escape backslashes before pipes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The upgrade can overwrite customer-edited skills without backup or warning, and the simple-flow logic can skip decompilation of dependencies needed to understand business logic.
2 open issues
What changed in this PR
This PR makes BizTalk discovery more predictable and improves the migration extension’s planning and conversion workflow with offline testing, source traceability, and team customization.
Changes:
- Adds deterministic grouping, shared-artifact handling, scoped port analysis, and searchable/exportable flow inventories.
- Adds offline conversion guidance, automated test generation, and source-to-output traceability.
- Adds reusable planning choices,
requirements.mdexport, customer skill overrides, and targeted mapping lookups.
| File | Description |
|---|---|
src/views/planning/PlanningWebviewPanel.ts |
Adds the requirements export action. |
src/views/discovery/SourceFlowVisualizer.ts |
Adds richer flow cards, filtering, re-detection, and inventory export. |
src/views/conversion/ConversionWebviewPanel.ts |
Displays each task’s source artifacts. |
src/test/unit/skills-lookup.test.ts |
Tests skill overlays, mapping lookup, and small-flow prompts. |
src/test/unit/planning-requirements-markdown.test.ts |
Tests requirements rendering and acceptance criteria. |
src/test/unit/planning-defaults.test.ts |
Tests configured planning answers. |
src/test/unit/flow-group-inventory.test.ts |
Tests flow summaries, search text, and inventory export. |
src/test/unit/flow-group-detector.test.ts |
Tests deterministic grouping, shared artifacts, and endpoint scoping. |
src/test/unit/conversion-traceability.test.ts |
Tests artifact resolution, traceability, and offline prompts. |
src/stages/planning/PlanningDecisionService.ts |
Applies defaults and offers workspace-wide answer reuse. |
src/stages/planning/PlanningDecisions.ts |
Defines stable question IDs and validates defaults. |
src/stages/discovery/FlowGroupInventory.ts |
Builds flow summaries, search text, and Markdown inventories. |
src/stages/discovery/DiscoveryCacheService.ts |
Preserves progress by flow ID during re-detection. |
src/stages/conversion/Traceability.ts |
Resolves task artifacts and renders traceability matrices. |
src/services/SkillOverlay.ts |
Composes customer overrides and detects managed-file edits. |
src/services/reports/PlanningRequirementsMarkdown.ts |
Renders finalized plans as requirements documents. |
src/services/ReportExporterService.ts |
Saves Markdown requirements exports. |
src/services/MappingSkillLookup.ts |
Searches mapping skills for relevant rows and rules. |
src/services/LLMFlowGenerator.ts |
Extends grouping metadata and tightens reference matching. |
src/services/AgentFileProvisioner.ts |
Provisions updated skills, overlays, and edit backups. |
src/parsers/biztalk/BizTalkProjectParser.ts |
Normalizes project-reference paths and exposes references in IR. |
src/parsers/biztalk/BizTalkMapParser.ts |
Reads schema references nested inside map trees. |
src/parsers/biztalk/BizTalkBindingsParser.ts |
Includes send-port maps in parsed endpoints. |
src/constants/UserMessages.ts |
Adds grouping, planning-default, and backup messages. |
src/constants/ChatPrompts.ts |
Adds offline, scoped-analysis, testing, and lookup guidance. |
src/commands/CommandRegistry.ts |
Wires grouping, exports, and provisioning settings into commands. |
resources/skills/workflow-json-generation-rules/tibco/SKILL.md |
Uses targeted mapping lookups for workflow generation. |
resources/skills/workflow-json-generation-rules/mulesoft/SKILL.md |
Uses targeted mapping lookups for workflow generation. |
resources/skills/workflow-json-generation-rules/biztalk/SKILL.md |
Uses targeted mapping lookups for workflow generation. |
resources/skills/runtime-validation-and-testing/tibco/SKILL.md |
Adds emulator, offline, and generated-test guidance. |
resources/skills/runtime-validation-and-testing/mulesoft/SKILL.md |
Adds emulator, offline, and generated-test guidance. |
resources/skills/runtime-validation-and-testing/biztalk/SKILL.md |
Adds emulator, offline, and generated-test guidance. |
resources/skills/planning-decision-guidance/SKILL.md |
Defines reusable map-strategy and workflow-topology choices. |
resources/skills/logic-apps-planning-rules/tibco/SKILL.md |
Adds topology and map-hosting guidance. |
resources/skills/logic-apps-planning-rules/mulesoft/SKILL.md |
Adds topology and map-hosting guidance. |
resources/skills/logic-apps-planning-rules/biztalk/SKILL.md |
Adds topology and map-hosting guidance. |
resources/skills/detect-logical-groups/tibco/SKILL.md |
Starts grouping from proposals and separates shared configuration. |
resources/skills/detect-logical-groups/mulesoft/SKILL.md |
Starts grouping from proposals and separates shared configuration. |
resources/skills/detect-logical-groups/biztalk/SKILL.md |
Defines deterministic proposals, shared artifacts, and port scope. |
resources/skills/conversion-task-plan-rules/tibco/SKILL.md |
Adds infrastructure, map-function, test, and traceability requirements. |
resources/skills/conversion-task-plan-rules/mulesoft/SKILL.md |
Adds infrastructure, map-function, test, and traceability requirements. |
resources/skills/conversion-task-plan-rules/biztalk/SKILL.md |
Adds infrastructure, map-function, test, and traceability requirements. |
resources/skills/cloud-deployment-and-testing/tibco/SKILL.md |
Defines template-only output in offline mode. |
resources/skills/cloud-deployment-and-testing/mulesoft/SKILL.md |
Defines template-only output in offline mode. |
resources/skills/cloud-deployment-and-testing/biztalk/SKILL.md |
Defines template-only output in offline mode. |
resources/skills/automated-test-generation/SKILL.md |
Defines reusable workflow, map, and schema tests. |
resources/skills/analyse-source-design/tibco/SKILL.md |
Directs analysis to targeted mapping lookups. |
resources/skills/analyse-source-design/mulesoft/SKILL.md |
Directs analysis to targeted mapping lookups. |
resources/skills/analyse-source-design/biztalk/SKILL.md |
Adds flow-scoped analysis and targeted mapping lookups. |
resources/agents/migration-planner.md |
Adds mapping lookup and customer-standard guidance. |
resources/agents/migration-converter.md |
Adds testing, traceability, offline, and customization guidance. |
resources/agents/migration-analyser.md |
Adds proposal-based grouping and scoped-analysis guidance. |
README.md |
Documents grouping, exports, offline conversion, and customization. |
package.json |
Registers new settings, commands, and mapping-tool schemas. |
Review effort: Balanced
| continue; | ||
| } | ||
| // Keep direct edits before updating; teams should move them to CUSTOM.md | ||
| if (isEditedManagedSkill(existing)) { |
| '- `source-to-logic-apps-mapping` — component equivalents, service provider IDs, operation names. Look up components with migration_lookupMapping; read the full skill only when a lookup finds nothing relevant\n'; | ||
|
|
||
| const FAST_PATH = | ||
| 'FAST PATH: this flow is small and has no custom code. Do not decompile assemblies, look up components with migration_lookupMapping instead of reading the full `source-to-logic-apps-mapping` skill, and run at most one reference-doc search per adapter or connector.\n'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Addresses feedback from a BizTalk pilot customer. On a real estate the agent:
The pilot team also wanted maps in Azure Functions, a receiver → processor → sender topology,
requirements.mdoutput, and their own skills.Changes
FlowGroupDetector) in seconds and are the same for the same source. Orchestrations linked by Call/Start Orchestration form one flow. Maps, message schemas, pipelines, ports and projects join the flows that reference them. New settingdiscovery.groupingMode(auto/deterministic/copilot); Copilot grouping now starts from the same proposal..btprojproject references are reported when groups are detected (notification, Home banner, inventory). After a rescan, the extension offers to re-detect groups. Flows that keep their ID keep their progress.azure.provisioningMode = offline: no Azure sign-in. Generates Bicep underinfra/and tests locally with Azurite, the Service Bus emulator and mocks.automated-test-generationskill and a requiredgenerate-teststask. It produces Logic Apps Standard workflow unit tests with mocked connectors, map regression tests (the XSLT is the reference output) and schema tests, all runnable withdotnet test.artifactIdsare validated: names are resolved, unknown IDs are rejected, and uncovered artifacts are reported. Task cards list their sources, and each generated project gets aTRACEABILITY.md.map-strategyandworkflow-topologyplanning choices, carried into the conversion tasks.planning.defaultChoices, plus an Apply to All Flows option after answering a question.requirements.md.github/skills/<skill>/CUSTOM.mdoverrides and an optionalcustomer-standardsskill. Provisioned skills a user edited are backed up instead of overwritten.migration_lookupMappingtool returns only the matching rows of the 109 KB mapping skill. Small flows without custom code skip decompilation.Also fixes the BizTalk parsers: map tree references (
<SrcTree><Reference Location>), project references in project IR, and send-port maps.Validation
npm test: 112 unit and 2 integration tests pass (main: 70 + 2). Each commit passes on its own.npm run lintis clean andnpm run buildsucceeds.Notes
autogrouping is deterministic for BizTalk. MuleSoft and TIBCO keep Copilot grouping, now starting from the deterministic proposal.