Skip to content

Add explicit published WoT Binding 1.00 consumer interoperability - #4892

Open
marcschier wants to merge 30 commits into
masterfrom
marcschier-wot-binding-1-0-interoperability
Open

marcschier wants to merge 30 commits into
masterfrom
marcschier-wot-binding-1-0-interoperability

Conversation

@marcschier

@marcschier marcschier commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Implement the approved published OPC 10101 v1.00 consumer- Baseline: OPC 10101 v1.00, published 2026-01-08. Reviewed plaintext SHA-256: 4ec1170c1c33c63907e7810e6ab0537d62b55735bc2d1191ec7f57bbf9926d93. Later draft vocabulary is not normative 1.00 evidence.

  • Explicit WotBindingProcessingMode.PublishedOneZero in planner/extractor and MCP options. Current remains the default; no heuristic selection from vocabulary/revision. Original TDs need no invented revision annotation.
  • Published numeric namespaces use original effective document context, not the connected NamespaceArray or unrelated later planning context.
  • Actions require action-level array-valued uav:componentOf (§7.1.3). Native Core ownership/endpoint checks select one valid Object receiver; a valid explicit form receiver can disambiguate. No retired scalar form fallback.
  • Native InputArguments/OutputArguments establish object-schema argument ordering, DataTypes and ranks without later argumentLayout/fieldOrder or JSON-order guesses. Native integer widths constrain actual values too.
  • Shared Method/receiver resolution pins the same pair for MCP authorization and dispatch. Direct/captured channels retain preflight/session checks.
  • Planning uses the live source-routed resolver document alongside local declarations from NodeSet import; serialized resolvedFrom markers and local containment cannot manufacture source ownership authority.

Read/write/observe/default operations, property mapping annotations, exact channel/auth/allOf constraints and external token-provider applicability have version-qualified evidence. Documentation distinguishes converter identifier options from runtime processing selection. The 25-requirement traceability ledger includes concrete tests, assertion-level evidence and qualifications. Locator completeness is not implementation completeness.

Related Issues

Checklist

Put an x in the boxes that apply. You can complete these step by step after opening the PR.

  • I have signed the CLA and read the CONTRIBUTING doc.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added all necessary documentation.
  • I have verified that my changes do not introduce (new) build or analyzer warnings.
  • I ran all tests locally using the UA.slnx solution against at least .net framework and .net 10, and all passed.
  • I fixed all failing and flaky tests in the CI pipelines and all CodeQL warnings.
  • I have addressed all PR feedback received.

marcschier and others added 24 commits October 21, 2026 21:10
The planner emits callObjectId, but MCP target selection and mutation authorization still read componentOf. Align both consumers and the protected-action fixture with current receiver metadata; exercise protected methods and protected receivers.
Prefer explicit receivers and capture omitted receivers only from trusted original Object and endpoint facts. Validate inferred Core ownership before dispatch while preserving explicit ObjectType imports. Keep live projection provenance internal and reject unprovable persisted inference. Add planning, live Call, authorization and provenance regressions with precise support limits.
Insert the blank line required by RCS0009 before the trusted receiver field documentation. This final-cleanup formatting omission caused the common CI build, grading, desktop and AOT compilation failures. Validate the exact corrected source with analyzer-enabled Types net10 Release/net48 Debug builds, full UA.slnx net10 Release build, and receiver/Binding/MCP regression suites.
…ing-1-0-interoperability

# Conflicts:
#	docs/WotBindings.md
#	src/Opc.Ua.Types/Wot/WotCallReceiver.cs
#	src/Opc.Ua.Types/Wot/WotDocument.cs
#	src/Opc.Ua.Types/Wot/WotProjectionResolver.cs
#	src/Opc.Ua.WotCon.Bindings/OpcUa/OpcUaWotBindingChannel.CapturedActions.cs
#	src/Opc.Ua.WotCon.Bindings/OpcUa/OpcUaWotBindingChannel.Paths.cs
#	src/Opc.Ua.WotCon.Bindings/OpcUa/OpcUaWotBindingChannel.cs
#	src/Opc.Ua.WotCon.Bindings/Planners/OpcUaBindingPlanner.cs
#	src/Opc.Ua.WotCon.Bindings/WotAffordanceForm.Paths.cs
#	src/Opc.Ua.WotCon.Bindings/WotAffordanceForm.cs
#	tests/Opc.Ua.Tools.Tests/Mcp/WotCon/WotRuntimeOpcUaTests.cs
#	tests/Opc.Ua.WotCon.Bindings.Tests/CallReceiverPlanningTests.cs
#	tests/Opc.Ua.WotCon.Bindings.Tests/OpcUaWotBindingChannelTests.cs
#	tests/Opc.Ua.WotCon.Bindings.Tests/OpcUaWotInvocationStatusTests.cs
Copilot AI balanced review requested due to automatic review settings October 23, 2026 13:53

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

Preflight security enforcement and namespace, receiver, and argument-validation errors remain unresolved.

7 open issues
What changed in this PR

Adds an explicit published OPC 10101 v1.00 consumer mode to the existing WoT binding stack, building on #4877 while keeping Current processing as the default.

Changes:

  • Adds explicit mode selection and document-context namespace resolution.
  • Introduces published action-owner resolution, native argument validation, and shared MCP target pinning.
  • Expands interoperability tests, traceability, and documentation without claiming full conformance or UA Binary serialization support.
File Description
tools/​Opc.Ua.Mcp.WotCon/​Tools/​WotRuntimeTools.cs Propagates mode selection and pins resolved Call targets.
tools/​Opc.Ua.Mcp.WotCon/​Runtime/​WotRuntimeInputs.cs Exposes the processing-mode option.
tests/​Opc.Ua.WotCon.Tests/​WotBindingTraceabilityTests.cs Validates local traceability test references.
tests/​Opc.Ua.WotCon.Tests/​Opc.Ua.WotCon.Tests.csproj Includes shared traceability resources.
tests/​Opc.Ua.WotCon.Tests/​Materialization/​WotProjectedMethodRuntimeTests.cs Tests rejection of fabricated source ownership.
tests/​Opc.Ua.WotCon.Tests/​Materialization/​WotMaterializationImportTests.cs Tests source ownership across NodeSet import.
tests/​Opc.Ua.WotCon.Tests/​Binding/​WotTargetMappingTests.cs Tests property-scoped mapping metadata.
tests/​Opc.Ua.WotCon.Bindings.Tests/​WotTransmittedUriTests.cs Tests complete endpoint-path preservation.
tests/​Opc.Ua.WotCon.Bindings.Tests/​WotPayloadCodecTests.cs Distinguishes octet-stream handling from UA Binary.
tests/​Opc.Ua.WotCon.Bindings.Tests/​WotFormExtractorTests.cs Tests explicit selection and namespace authority.
tests/​Opc.Ua.WotCon.Bindings.Tests/​WotActionLayoutTests.cs Tests native argument ordering and type constraints.
tests/​Opc.Ua.WotCon.Bindings.Tests/​OpcUaWotPropertyContextTests.cs Tests typed property reads and writes.
tests/​Opc.Ua.WotCon.Bindings.Tests/​OpcUaWotPathTargetTests.cs Tests published numeric targets and rejection paths.
tests/​Opc.Ua.WotCon.Bindings.Tests/​OpcUaWotInvocationStatusTests.cs Removes obsolete receiver-error text expectations.
tests/​Opc.Ua.WotCon.Bindings.Tests/​OpcUaWotExecutorTests.cs Tests server-enforced write denial.
tests/​Opc.Ua.WotCon.Bindings.Tests/​OpcUaWotExactSecurityTests.cs Tests security constraints and invalid policies.
tests/​Opc.Ua.WotCon.Bindings.Tests/​OpcUaWotCallContractTests.cs Tests typed UA arguments with octet-stream MIME.
tests/​Opc.Ua.WotCon.Bindings.Tests/​OpcUaWotBindingChannelTests.Properties.cs Exercises property context handling in both modes.
tests/​Opc.Ua.WotCon.Bindings.Tests/​OpcUaWotBindingChannelTests.cs Adds live published-action execution coverage.
tests/​Opc.Ua.WotCon.Bindings.Tests/​CallReceiverPlanningTests.cs Tests owner candidates, ambiguity, and dispatch.
tests/​Opc.Ua.Types.Tests/​Wot/​WotTraceabilityLedger.cs Recognizes MCP test-assembly evidence.
tests/​Opc.Ua.Types.Tests/​Wot/​WotPortableIdentityTests.cs Tests URI decoding and stable identities.
tests/​Opc.Ua.Types.Tests/​Wot/​WotBrowsePathTargetTests.cs Tests context-mapped paths and anchors.
tests/​Opc.Ua.Types.Tests/​Wot/​Assets/​wot-binding-traceability.json Adds version-qualified evidence and limitations.
tests/​Opc.Ua.Tools.Tests/​Opc.Ua.Tools.Tests.csproj Includes shared traceability resources.
tests/​Opc.Ua.Tools.Tests/​Mcp/​WotCon/​WotRuntimeOpcUaTests.cs Tests authorized and denied published Calls.
tests/​Opc.Ua.Tools.Tests/​Mcp/​WotCon/​WotBindingTraceabilityTests.cs Validates MCP traceability references.
src/​Opc.Ua.WotCon.Bindings/​WotPayloadDescriptor.Arguments.cs Resolves native layouts and validates argument types.
src/​Opc.Ua.WotCon.Bindings/​WotFormExtractor.cs Adds explicit published-mode extraction.
src/​Opc.Ua.WotCon.Bindings/​WotBindingPlan.cs Carries processing mode into extraction and planning.
src/​Opc.Ua.WotCon.Bindings/​WotBindingIdentification.cs Defines processing modes and selection validation.
src/​Opc.Ua.WotCon.Bindings/​WotAffordanceForm.Paths.cs Captures published identities and ownership metadata.
src/​Opc.Ua.WotCon.Bindings/​WotAffordanceForm.cs Preserves captured metadata during href resolution.
src/​Opc.Ua.WotCon.Bindings/​Planners/​OpcUaBindingPlanner.cs Compiles published targets and owner candidates.
src/​Opc.Ua.WotCon.Bindings/​OpcUa/​OpcUaWotCallReceiverResolver.cs Shares Method and receiver ownership resolution.
src/​Opc.Ua.WotCon.Bindings/​OpcUa/​OpcUaWotBindingChannel.Paths.cs Resolves receivers and reads native signatures.
src/​Opc.Ua.WotCon.Bindings/​OpcUa/​OpcUaWotBindingChannel.cs Applies resolved payload contracts during invocation.
src/​Opc.Ua.WotCon.Bindings/​OpcUa/​OpcUaWotBindingChannel.CapturedActions.cs Applies published validation to captured actions.
src/​Opc.Ua.WotCon.Bindings/​IWotProtocolBinder.cs Defers published named-argument ordering.
src/​Opc.Ua.WotCon.Bindings/​IWotBindingPlanner.cs Adds processing mode to planning context.
src/​Opc.Ua.Types/​Wot/​WotProjectionResolver.cs Preserves original action ownership through resolution.
src/​Opc.Ua.Types/​Wot/​WotNodeSetConverter.MethodArguments.cs Allows unresolved named argument layouts.
src/​Opc.Ua.Types/​Wot/​WotMethodArgumentLayout.cs Resolves declared names against native order.
src/​Opc.Ua.Types/​Wot/​WotDocument.cs Retains trusted ownership metadata in memory.
src/​Opc.Ua.Types/​Wot/​WotCallReceiver.cs Captures and normalizes action owner declarations.
src/​Opc.Ua.Types/​Wot/​WotBrowsePathTarget.cs Enables explicitly selected numeric path prefixes.
src/​Opc.Ua.Types/​BuiltIn/​RelativePathFormatter.cs Parses context-mapped numeric prefixes.
docs/​WotCon.md Separates converter options from consumer selection.
docs/​WotBindings.md Documents published mode and its limitations.

Review effort: Balanced

Comment thread src/Opc.Ua.WotCon.Bindings/OpcUa/OpcUaWotCallReceiverResolver.cs
Comment thread src/Opc.Ua.WotCon.Bindings/Planners/OpcUaBindingPlanner.cs Outdated
Comment thread tools/Opc.Ua.Mcp.WotCon/Tools/WotRuntimeTools.cs
Comment thread src/Opc.Ua.Types/Wot/WotBrowsePathTarget.cs
Comment thread src/Opc.Ua.WotCon.Bindings/Planners/OpcUaBindingPlanner.cs
Comment thread src/Opc.Ua.WotCon.Bindings/Planners/OpcUaBindingPlanner.cs Outdated
Comment thread src/Opc.Ua.WotCon.Bindings/WotPayloadDescriptor.Arguments.cs Outdated
@marcschier

Copy link
Copy Markdown
Collaborator Author

Review fixes are published in dab922ac3452420d2e0cf866aef1ab92bd70eda6. All seven review threads have been addressed and resolved.

Final-source validation for this review-fix commit:

Command Result
dotnet build tools\Opc.Ua.Mcp.WotCon\Opc.Ua.Mcp.WotCon.csproj --no-restore -f net10.0 -m:1 -nodeReuse:false -p:UseSharedCompilation=false Passed; 0 warnings/errors.
dotnet test tests\Opc.Ua.WotCon.Bindings.Tests\Opc.Ua.WotCon.Bindings.Tests.csproj --no-restore -f net10.0 -p:CustomTestTarget=net10.0 -m:1 -nodeReuse:false -p:UseSharedCompilation=false -v:quiet Passed; 1,344 tests.
dotnet build tests\Opc.Ua.Tools.Tests\Opc.Ua.Tools.Tests.csproj --no-restore -f net10.0 -p:CustomTestTarget=net10.0 -p:BuildProjectReferences=false -m:1 -nodeReuse:false -p:UseSharedCompilation=false -v:quiet Passed; 0 warnings/errors, using the already-built final production references.
dotnet test tests\Opc.Ua.Tools.Tests\Opc.Ua.Tools.Tests.csproj --no-build --no-restore -f net10.0 -p:CustomTestTarget=net10.0 --filter FullyQualifiedName~WotRuntime Passed; 196 tests, including channel/identity preflight rejection and direct/browse-path resource admission.
dotnet test tests\Opc.Ua.Types.Tests\Opc.Ua.Types.Tests.csproj --no-restore -f net10.0 -p:CustomTestTarget=net10.0 -m:1 -nodeReuse:false -p:UseSharedCompilation=false --filter FullyQualifiedName~Wot -v:quiet Passed; 3,731 tests.
dotnet build src\Opc.Ua.WotCon.Bindings\Opc.Ua.WotCon.Bindings.csproj --no-restore -f net48 -m:1 -nodeReuse:false -p:UseSharedCompilation=false -v:quiet Passed; 0 warnings/errors.
dotnet test tests\Opc.Ua.Types.Tests\Opc.Ua.Types.Tests.csproj --no-restore -f net48 -p:CustomTestTarget=net48 -m:1 -nodeReuse:false -p:UseSharedCompilation=false --filter FullyQualifiedName~Wot -v:quiet Passed; 3,731 tests.
git diff --check Passed.

These are focused review-fix gates, not another full-solution run. Bindings.Tests and MCP runtime execution are modern-only; no empty net48 run is counted as a pass. The PR's UA Binary serialization and complete runtime schema-validation limitations remain open and unchanged.

The Markdown edit pass covered all three changed Markdown files relative to the PR base: docs/WotBindings.md, docs/WotCon.md, and tools/Opc.Ua.Mcp.WotCon/NugetREADME.md. No stock-phrasing edits were warranted; technical qualifications, commands, code, and links were retained.

@marcschier
marcschier requested a balanced review from Copilot October 23, 2026 15:06

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.

Comment thread src/Opc.Ua.WotCon.Bindings/OpcUa/OpcUaWotCallReceiverResolver.cs
Comment thread tools/Opc.Ua.Mcp.WotCon/Tools/WotRuntimeTools.cs Outdated
Comment thread src/Opc.Ua.WotCon.Bindings/OpcUa/OpcUaWotBindingChannel.Paths.cs
Comment thread src/Opc.Ua.WotCon.Bindings/WotAffordanceForm.Paths.cs
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Code coverage

✅ Coverage gate passed.

Check Result Threshold
✅ Project line rate 88.94% (453728/510136 lines) >= 70.00%
✅ Project branch rate 79.36% >= 60.00%
✅ Patch coverage 82.84% (898/1084 changed lines) >= 75.00% (> 100 changed lines)
ℹ️ Baseline delta (advisory) +15.34 pp 73.60% recorded
Uncovered changed lines
  • src/Opc.Ua.WotCon.Bindings/OpcUa/OpcUaWotCallReceiverResolver.cs: 68, 69, 77, 78, 82, 83, 92, 93, 99, 100, 104, 105, 106, 128, 136, 137, 142, 143, 149, 158, 159, 164, 165, 178, 183, 233, 234, 235, 255, 257, 258, 263, 264, 273, 274, 299, 300, 301, 307, 388, 389, 434, 435, 448, 449, 453, 454, 474, 475, 477, 478, 480, 487, 498, 500
  • src/Opc.Ua.Types/Wot/WotMethodArgumentLayout.cs: 120, 132, 133, 146, 147, 164, 165, 186
  • src/Opc.Ua.WotCon.Bindings/WotPayloadDescriptor.Arguments.cs: 162, 315, 316
  • src/Opc.Ua.WotCon.Bindings/WotAffordanceForm.Paths.cs: 210, 211, 220, 234, 235, 240, 258, 259, 264, 266, 267, 272, 273, 288, 289, 304, 322, 323, 324, 325, 327, 329, 362, 363, 388, 389, 393, 394
  • tools/Opc.Ua.Mcp.WotCon/Tools/WotRuntimeTools.cs: 182, 255, 256, 260, 261, 272, 273, 711, 715, 721, 722, 729, 730, 740, 741, 749, 750, 776, 798, 808, 809, 816, 817
  • src/Opc.Ua.Types/Wot/WotBrowsePathTarget.cs: 256, 267, 292, 296, 297, 304
  • src/Opc.Ua.Types/Wot/WotCallReceiver.cs: 169, 230, 238, 242, 243, 250, 251, 252
  • src/Opc.Ua.WotCon.Bindings/OpcUa/OpcUaWotBindingChannel.Paths.cs: 104, 109, 119, 124, 125, 139, 140, 141, 156, 157, 158, 159, 160, 161, 162, 163, 165, 166
  • src/Opc.Ua.WotCon.Bindings/Planners/OpcUaBindingPlanner.cs: 138, 139, 140, 141, 142, 143, 970, 971, 972, 973, 974, 982, 1030, 1031, 1032, 1033, 1042, 1071, 1073, 1075, 1076, 1077, 1078, 1079, 1081, 1083, 1085, 1086, 1088, 1089, 1091, 1093, 1094, 1095, 1105, 1106, 1107

Coverage is above the recorded baseline - consider ratcheting coverage-thresholds.json.

Thresholds live in coverage-thresholds.json. Whole report before exclusions: line 88.26%, branch 78.70%.

Comment thread docs/WotBindings.md Outdated
Comment thread docs/WotBindings.md Outdated
Comment thread docs/WotBindings.md Outdated
Comment thread docs/WotBindings.md Outdated
Comment thread docs/WotBindings.md Outdated
Comment thread docs/WotBindings.md Outdated
Comment thread docs/WotBindings.md Outdated
Comment thread docs/WotBindings.md Outdated
Comment thread docs/WotBindings.md Outdated
Comment thread docs/WotBindings.md Outdated
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.33948% with 289 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.32%. Comparing base (5d6c10a) to head (1dd0297).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...Con.Bindings/OpcUa/OpcUaWotCallReceiverResolver.cs 66.66% 55 Missing and 36 partials ⚠️
...Ua.WotCon.Bindings/Planners/OpcUaBindingPlanner.cs 64.88% 37 Missing and 9 partials ⚠️
.../Opc.Ua.WotCon.Bindings/WotAffordanceForm.Paths.cs 73.05% 28 Missing and 17 partials ⚠️
tools/Opc.Ua.Mcp.WotCon/Tools/WotRuntimeTools.cs 77.27% 23 Missing and 12 partials ⚠️
...Con.Bindings/OpcUa/OpcUaWotBindingChannel.Paths.cs 61.90% 18 Missing and 6 partials ⚠️
src/Opc.Ua.Types/Wot/WotBrowsePathTarget.cs 67.44% 6 Missing and 8 partials ⚠️
src/Opc.Ua.Types/Wot/WotCallReceiver.cs 74.54% 8 Missing and 6 partials ⚠️
src/Opc.Ua.Types/Wot/WotMethodArgumentLayout.cs 61.29% 8 Missing and 4 partials ⚠️
....WotCon.Bindings/WotPayloadDescriptor.Arguments.cs 86.53% 3 Missing and 4 partials ⚠️
src/Opc.Ua.Types/BuiltIn/RelativePathFormatter.cs 92.30% 0 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (73.33%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4892      +/-   ##
==========================================
- Coverage   83.35%   83.32%   -0.03%     
==========================================
  Files        3504     3505       +1     
  Lines      509202   510136     +934     
  Branches    86451    86633     +182     
==========================================
+ Hits       424438   425074     +636     
- Misses      55967    56168     +201     
- Partials    28797    28894      +97     
Flag Coverage Δ
actions 83.32% <73.33%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/Opc.Ua.Types/Wot/WotDocument.cs 93.88% <100.00%> (+0.13%) ⬆️
...a.Types/Wot/WotNodeSetConverter.MethodArguments.cs 92.01% <100.00%> (+0.17%) ⬆️
src/Opc.Ua.Types/Wot/WotProjectionResolver.cs 86.95% <100.00%> (+0.11%) ⬆️
src/Opc.Ua.WotCon.Bindings/IWotBindingPlanner.cs 85.41% <100.00%> (+0.15%) ⬆️
src/Opc.Ua.WotCon.Bindings/IWotProtocolBinder.cs 90.09% <100.00%> (+0.22%) ⬆️
...gs/OpcUa/OpcUaWotBindingChannel.CapturedActions.cs 75.86% <100.00%> (+2.52%) ⬆️
...Ua.WotCon.Bindings/OpcUa/OpcUaWotBindingChannel.cs 85.12% <100.00%> (-0.17%) ⬇️
...a.WotCon.Bindings/OpcUa/OpcUaWotBindingExecutor.cs 86.59% <100.00%> (+0.15%) ⬆️
src/Opc.Ua.WotCon.Bindings/WotAffordanceForm.cs 95.45% <100.00%> (+0.29%) ⬆️
...Opc.Ua.WotCon.Bindings/WotBindingIdentification.cs 60.71% <100.00%> (+6.54%) ⬆️
... and 13 more

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

2 participants