Skip to content

fix: stop treating connector root components as a build error in sln import - #236

Merged
TomProkop merged 1 commit into
masterfrom
claude/exciting-ritchie-ocf6d2
Oct 25, 2026
Merged

TomProkop merged 1 commit into
masterfrom
claude/exciting-ritchie-ocf6d2

Conversation

@TomProkop

Copy link
Copy Markdown
Member

Summary

txc env sln import <project folder> refuses to import a Build SDK solution containing a custom connector: SolutionBuildOutput.Classify() (added in #234, merged just before this issue was filed) treats any dotnet build output line matching "Following root components are not defined in customizations" as a hard error, with no awareness of component type.

This is a known false positive for connectors (type 372, ECConnector): tools-devkit-build's own InvokeSolutionPackager task (#114, already released) independently confirms the connector was actually staged before letting such a build succeed — a genuinely missing connector still fails the build with a non-zero exit code, which this import command already checks separately. tools-cli's text scan is a second, independent implementation that never carried over that exception.

Closes #235.

Fix

SolutionBuildOutput.Classify():

  • The "Following root components are not defined in customizations" header line alone no longer counts as an error — it carries no component type, so by itself it's now only a warning (hint).
  • The per-component detail line that follows it (Type='...', Id (or schema name)='...'.) is what decides severity. ECConnector is excluded from counting as an error there; every other type still is.
  • The older "Following objects, required by the solution, are not present" packager line (no known false positive) is untouched — still always an error.

This is a scoped, low-risk fix for an active lab blocker. The underlying root-component false-positive logic now lives independently in three places (tools-cli, tools-devkit-build, platform-metadata) and should eventually be consolidated — tracked as a separate follow-up, out of scope here.

Verification

  • dotnet build on the affected project: clean.
  • dotnet test tests/TALXIS.CLI.Tests: 809/809 passed (full suite), including updated/new cases in SolutionBuildOutputTests covering the exact line text from the issue's repro (Type='ECConnector', Id (or schema name)='ECConnector-lab_connectorsopenfoodfacts'.) and confirming other component types (Entity, SystemForm) are still treated as errors.
  • Independently verified (outside this PR) that tools-devkit-build's own packager-level check already succeeds for connectors end-to-end — this CLI-side text scan was the only remaining false positive.

Generated by Claude Code

…import (#235)

txc env sln import's dotnet-build output scan counted any "Following root
components are not defined in customizations" line as an error, even for
connectors (type 372, ECConnector), which the Build SDK's own
InvokeSolutionPackager task already treats as a known false positive after
independently confirming the connector was actually staged - a genuinely
missing connector still fails the build with a non-zero exit code, which
this scan already honors separately.

The header line itself carries no component type, so it's now only a
warning; the per-component "Type='...', Id='...'" detail line that follows
is what decides severity, and ECConnector is excluded from it. Every other
type, and the older "Following objects, required by the solution, are not
present" packager line, are still treated as errors unchanged.

This is a quick, scoped fix for the lab's immediate blocker; the duplicate
root-component false-positive logic now living independently in tools-cli,
tools-devkit-build and platform-metadata should eventually be consolidated.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PfPrXnV6KJVEv7gTYwr2wY

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The unconditional connector exception can allow incomplete ZIP imports with older Build SDKs that lack independent connector validation.

1 open issue
What changed in this PR

This PR adjusts build-output classification for txc env sln import to avoid rejecting valid custom-connector solutions, addressing the false positive reported in #235.

Changes:

  • Downgrades the missing-root-components header and ECConnector details to warnings.
  • Preserves errors for other component types and missing required objects.
  • Adds regression cases for connector diagnostics, case-insensitive matching, and non-connector errors.
File Description
tests/​TALXIS.CLI.Tests/​Environment/​Solution/​SolutionBuildOutputTests.cs Updates expected severities and adds component-specific regression cases.
src/​TALXIS.CLI.Features.Environment/​Solution/​SolutionBuildOutput.cs Separates header and detail classification and introduces the connector exception.

Review effort: Balanced

Comment on lines +56 to +58
return KnownFalsePositiveRootComponentTypes.Contains(detail.Groups[1].Value)
? BuildOutputSeverity.Warning
: BuildOutputSeverity.Error;
@TomProkop
TomProkop merged commit 92948ad into master Oct 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sln import refuses connector solutions: "root components are not defined" is a false positive for ECConnector

3 participants