Skip to content

fix: don't return continuation points on BadNoContinuationPoints (#4022) [backport to master378] - #4268

Merged
marcschier merged 1 commit into
master378from
romanett-backport-399747f-to-378
Aug 18, 2026
Merged

fix: don't return continuation points on BadNoContinuationPoints (#4022) [backport to master378]#4268
marcschier merged 1 commit into
master378from
romanett-backport-399747f-to-378

Conversation

@romanett

Copy link
Copy Markdown
Contributor

Summary

Backport of commit 399747f (#4022) from master to master378.

Fixes Browse and BrowseNext so they do not return a usable continuation point when the server reports BadNoContinuationPoints, and adds regression tests covering both code paths.

Problem

Per OPC UA Part 4, if the server cannot allocate another continuation point for a Browse/BrowseNext operation, the result should be Bad_NoContinuationPoints and the server must not also return a usable continuation point. Previously FetchReferences could return BadNoContinuationPoints while still passing a live continuation point back to its callers, producing a contradictory response (BadNoContinuationPoints with a non-empty ContinuationPoint), and BrowseNext could overwrite the error with Good.

Changes

  • Dispose and clear the continuation point when FetchReferences hits the no-continuation-points path.
  • Only copy a continuation point into Browse and BrowseNext results when the operation completed successfully (ServiceResult.IsGood(error)).
  • Add deterministic regression tests for both Browse and BrowseNext, adapted to the master378 server API.

Notes

The upstream commit targets the v2.0 APIs (ArrayOf/ByteString); the source fix and tests here were adapted to the master378 API (byte[] continuation points, BrowseResultCollection/ByteStringCollection, 4-arg OperationContext constructor). Both new tests pass.

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.16%. Comparing base (db256c6) to head (5f0830d).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##           master378    #4268      +/-   ##
=============================================
- Coverage      60.19%   60.16%   -0.04%     
=============================================
  Files            378      378              
  Lines          79067    79068       +1     
  Branches       13838    13838              
=============================================
- Hits           47598    47572      -26     
- Misses         27047    27079      +32     
+ Partials        4422     4417       -5     
Files with missing lines Coverage Δ
...ies/Opc.Ua.Server/NodeManager/MasterNodeManager.cs 66.45% <100.00%> (+0.01%) ⬆️

... and 14 files with indirect coverage changes

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

Backport of 399747f from master to master378.

- Dispose and clear the continuation point when FetchReferences hits the
  no-continuation-points path.
- Only copy a continuation point into Browse and BrowseNext results when
  the operation completed successfully.
- Add regression tests verifying both Browse and BrowseNext return
  BadNoContinuationPoints without a continuation point when the
  continuation-point quota is exhausted.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@romanett romanett added the 1.5.378 Only affects 1.5.378 (pre 2.0) label Aug 16, 2026
@marcschier
marcschier merged commit 10b948d into master378 Aug 18, 2026
93 checks passed
@marcschier
marcschier deleted the romanett-backport-399747f-to-378 branch August 18, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.5.378 Only affects 1.5.378 (pre 2.0)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants