Skip to content

Add ISA95 JobControl and ManagedSession regression coverage - #3998

Merged
marcschier merged 9 commits into
OPCFoundation:masterfrom
marcschier:copilot/publisher3-upstream-parity-session-cleanup
Jul 17, 2026
Merged

Add ISA95 JobControl and ManagedSession regression coverage#3998
marcschier merged 9 commits into
OPCFoundation:masterfrom
marcschier:copilot/publisher3-upstream-parity-session-cleanup

Conversation

@marcschier

@marcschier marcschier commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the official ISA95 JobControl 2.0.0 NodeSet2 as a complete source-generator regression fixture.
  • Extends the lightweight generated-stack test stub with NamespaceMetadataState, required by the complete model.
  • Adds a deterministic ManagedSession cancellation regression proving that a started connect attempt is stopped.

The ManagedSession cleanup implementation and Quickstarts utility coverage now come from master; this PR retains the additional deterministic cleanup regression.

ISA95 fixture provenance and integrity

The fixture is byte-for-byte the official file:

  • Source: OPCFoundation/UA-Nodeset@e0b5d80cfff698f0276393e28df138a7fbc4b541
  • Path: ISA95-JOBCONTROL/opc.ua.isa95-jobcontrol.nodeset2.xml
  • Git blob: 82f008cd126ade54e5f2c737bcc116621a8c3087
  • SHA-256: 52327e736beb604c7253a5a5393d1ad525b9ecf35b71fbacb4f429cacb334064

The fixture test retains the OPC Foundation MIT header and verifies the 2.0.0 model/date, 258 nodes (including 134 variables), representative late variables, and that every ns=1 reference target resolves locally.

Validation

  • ManagedSession tests: 17 passing on net10.0; 15 passing and 2 framework-gated skips on net48.
  • Quickstarts server utility tests: 3 passing on net10.0 and net48.
  • ISA95 generator and fixture integrity regression: 5 passing on net10.0.

marcschier and others added 3 commits July 13, 2026 12:27
Verify default registration keeps classic and async factory paths separate and the Reference Server helper flags remain reusable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the current ISA95 JobControl NodeSet2 input as a focused source-generator regression without changing generator or codec behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.40%. Comparing base (007cfaf) to head (ff8e9a9).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3998      +/-   ##
==========================================
- Coverage   73.72%   73.40%   -0.32%     
==========================================
  Files        1340     1340              
  Lines      179309   179309              
  Branches    31541    31541              
==========================================
- Hits       132188   131622     -566     
- Misses      36385    36997     +612     
+ Partials    10736    10690      -46     

see 54 files with indirect coverage changes

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

@marcschier marcschier changed the title Add OPC Publisher 3.0 upstream regression coverage Add test node managers and fix bugs found during porting Jul 13, 2026
marcschier and others added 4 commits July 13, 2026 16:34
Replace the incomplete resource with the unmodified official ISA95 JobControl 2.0.0 NodeSet and assert its model, node coverage, and local references.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verify cancellation preserves the caller token and stops the connect attempt started by ManagedSession.CreateAsync.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the caller-visible cancellation and primary disposal path covered while excluding only the defensive secondary disposal-failure classifier.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…upstream-parity-session-cleanup

# Conflicts:
#	Libraries/Opc.Ua.Client/Session/ManagedSession.cs
#	Tests/Opc.Ua.Server.Tests/QuickstartsServerUtilitiesTests.cs
@marcschier marcschier changed the title Add test node managers and fix bugs found during porting Add ISA95 JobControl and ManagedSession regression coverage Jul 15, 2026
@marcschier
marcschier marked this pull request as ready for review July 16, 2026 05:40
Copilot AI review requested due to automatic review settings July 16, 2026 05:40

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.

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds ISA95 JobControl NodeSet2 as a regression fixture for the source generator and strengthens test scaffolding and client cancellation regression coverage.

Changes:

  • Adds generator coverage for the ISA95 JobControl 2.0.0 NodeSet2 fixture and validates fixture integrity.
  • Extends the generated-stack test stub with NamespaceMetadataState required by richer models.
  • Adds a deterministic regression test ensuring ManagedSession.CreateAsync cancellation stops an in-progress connect attempt.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
Tests/Opc.Ua.SourceGeneration.Tests/ModelGeneratorTests.cs Adds ISA95 JobControl generator compilation test and fixture integrity assertions.
Tests/Opc.Ua.SourceGeneration.Core.Tests/CompilerUtils.cs Extends the lightweight generated-stack stub with NamespaceMetadataState APIs.
Tests/Opc.Ua.Client.Tests/Session/ManagedSessionTests.cs Adds a deterministic cancellation regression and a blocking connect gate test helper.

Comment thread Tests/Opc.Ua.Client.Tests/Session/ManagedSessionTests.cs Outdated
Comment thread tests/Opc.Ua.Client.Tests/Session/ManagedSessionTests.cs
Comment thread Tests/Opc.Ua.SourceGeneration.Tests/ModelGeneratorTests.cs Outdated
@marcschier marcschier added the ready Ready to merge once CI Passes label Jul 16, 2026
…upstream-parity-session-cleanup

# Conflicts:
#	tests/Opc.Ua.SourceGeneration.Core.Tests/Resources/Isa95JobControl.NodeSet2.xml
@marcschier
marcschier merged commit d05536d into OPCFoundation:master Jul 17, 2026
155 checks passed
@marcschier
marcschier deleted the copilot/publisher3-upstream-parity-session-cleanup branch July 17, 2026 04:48
marcschier added a commit that referenced this pull request Jul 17, 2026
## Summary

- Adds the official ISA95 JobControl 2.0.0 NodeSet2 as a complete
source-generator regression fixture.
- Extends the lightweight generated-stack test stub with
`NamespaceMetadataState`, required by the complete model.
- Adds a deterministic ManagedSession cancellation regression proving
that a started connect attempt is stopped.

The ManagedSession cleanup implementation and Quickstarts utility
coverage now come from `master`; this PR retains the additional
deterministic cleanup regression.

## ISA95 fixture provenance and integrity

The fixture is byte-for-byte the official file:

- Source:
`OPCFoundation/UA-Nodeset@e0b5d80cfff698f0276393e28df138a7fbc4b541`
- Path: `ISA95-JOBCONTROL/opc.ua.isa95-jobcontrol.nodeset2.xml`
- Git blob: `82f008cd126ade54e5f2c737bcc116621a8c3087`
- SHA-256:
`52327e736beb604c7253a5a5393d1ad525b9ecf35b71fbacb4f429cacb334064`

The fixture test retains the OPC Foundation MIT header and verifies the
2.0.0 model/date, 258 nodes (including 134 variables), representative
late variables, and that every `ns=1` reference target resolves locally.

## Validation

- ManagedSession tests: 17 passing on net10.0; 15 passing and 2
framework-gated skips on net48.
- Quickstarts server utility tests: 3 passing on net10.0 and net48.
- ISA95 generator and fixture integrity regression: 5 passing on
net10.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Ready to merge once CI Passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants