Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

Proposed changes

The Reference Server's Int32Value node (ns=3;i=2808 at Objects->Data->Dynamic->Scalar->Int32Value) had Historizing=true and AccessLevel.HistoryRead set, but history read requests returned BadHistoryOperationUnsupported. This occurred because TestDataNodeManager implemented HistoryReadRaw() but didn't override the base class's HistoryReadRawModified() method, which defaults to rejecting all history requests.

Changes:

  • Override HistoryReadRawModified() to route history read requests to the existing HistoryReadRaw() implementation
  • Override HistoryReleaseContinuationPoints() to properly release continuation points for paginated history reads
  • Add comprehensive test HistoryReadInt32ValueNodeAsync in ReferenceServerTest.cs that validates the fix by performing history read operations on the Int32Value node

Both override methods follow the standard pattern: iterate nodes, validate as BaseVariableState, delegate to HistoryReadRaw().

Related Issues

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

The new test HistoryReadInt32ValueNodeAsync validates that:

  • Node ns=3;i=2808 has Historizing=true and HistoryRead access level set
  • History read operations succeed (returns GoodMoreData status code)
  • Historical data is properly retrieved (10 values in the test run)

The test passes successfully on .NET 8.0, 9.0, and 10.0, confirming that history data is now accessible to clients like UAExpert.

Original prompt

This section details on the original issue you should resolve

<issue_title>Node in ReferenceServer is tagged as historizing, but does not allow historical access</issue_title>
<issue_description>### Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

The Reference Server offers a node with node id ns=3;i=2808 with browse path:
Objects -> Data -> Dynamic -> Scalar -> Int32Value
which has the attribute 'Historizing' set to true, but which does not allow access to historical data. When you try to look at the history in UAExpert in the History Trend View the error "Added item does not support historizing" comes up.
The node is configured as historizing in the TestDataNodeManager.cs file in the Quickstarts.Servers project,
line 198ff (method CreateAddressSpace).

Expected Behavior

The expected behaviour is that the node is recognized as history enabled by a client.

Steps To Reproduce

No response

Environment

- OS:
- Environment:
- Runtime:
- Nuget Version:
- Component:
- Server:
- Client:

Anything else?

Just a guess why it does not work: the HistoricalAccessServer in the Samples solution provides history enabled nodes. If you look at the source code you will note that the nodes are created as ArchiveItems/ArchiveItemStates, while, in the reference server, they aare created as ScalarValues/ScalarValueObjectStates. </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@CLAassistant
Copy link

CLAassistant commented Dec 3, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ marcschier
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI and others added 2 commits December 3, 2025 06:46
…cess

Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix historizing node access in ReferenceServer Fix: Enable historical data access for historizing nodes in Reference Server Dec 3, 2025
Copilot AI requested a review from romanett December 3, 2025 07:04
@romanett
Copy link
Contributor

romanett commented Dec 3, 2025

@copilot please add a Test doing a History read of that node

Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 3, 2025

@copilot please add a Test doing a History read of that node

Added test HistoryReadInt32ValueNodeAsync that validates:

  • Node ns=3;i=2808 has Historizing=true and HistoryRead access level
  • History read operation succeeds (returns GoodMoreData status)
  • Historical data is retrieved (10 values in the test)

The test is in ReferenceServerTest.cs and passes successfully. (50b9c7b)

@marcschier marcschier marked this pull request as ready for review December 3, 2025 16:22
@marcschier
Copy link
Collaborator

@copilot please resolve the merge conflicts with master

Copy link
Contributor Author

Copilot AI commented Dec 3, 2025

@copilot please resolve the merge conflicts with master

I'm unable to resolve merge conflicts directly because I cannot pull from or merge with the master branch in my sandboxed environment. You'll need to resolve the merge conflicts manually or use GitHub's conflict resolution UI. Once the conflicts are resolved, I can continue with any further changes if needed.

@marcschier marcschier merged commit 05e171a into master Dec 5, 2025
154 of 157 checks passed
@romanett romanett deleted the copilot/fix-historizing-node-access branch December 5, 2025 05:43
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.

Node in ReferenceServer is tagged as historizing, but does not allow historical access

4 participants