Skip to content

Code generation for domains; add QM, AM, Config, TRS, SysMLv2#837

Merged
berezovskyi merged 9 commits into
mainfrom
feat/vocabgen
Jul 1, 2026
Merged

Code generation for domains; add QM, AM, Config, TRS, SysMLv2#837
berezovskyi merged 9 commits into
mainfrom
feat/vocabgen

Conversation

@berezovskyi

@berezovskyi berezovskyi commented Jul 1, 2026

Copy link
Copy Markdown
Member
  • Also bump OpenAPI dep due to GHSA-v5pm-xwqc-g5wc
  • Add OslcRequest support for more rich and dynamic handling of request graphs.
  • Support polymorphic interface-based resolution, e.g. asking for IExtendedResource and getting an instance of TRS CreationEvent in return. The implementation attempts to resolve the most-specific type, just like Lyo's ORDFM.

Summary by CodeRabbit

  • New Features
    • Added attribute-based OSLC vocabulary/shape modeling and expanded domain code generation across architecture management, automation, configuration management, quality management, change management, KerML, SysML v2, and tracked resource sets.
    • Enhanced server-side OSLC RDF request handling with header-aware parsing and polymorphic resource materialization.
    • Added new OSLC shape/vocabulary attributes to drive generated models.
  • Bug Fixes
    • Improved value-type and occurs mapping, including correct binary array handling, plus broader ValueType support.
  • Tests
    • Added unit and integration coverage for generated domain models, RDF polymorphism, and value-type/value-mapping behavior.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR adds OSLC code-generation support and new domain surfaces, migrates Requirements Management to generated records, updates RDF input handling to use request headers and polymorphic materialization, and adds supporting tests, seed-generation tooling, and build/configuration updates.

Changes

OSLC Domain Code Generation and Domains

Layer / File(s) Summary
Core OSLC model infrastructure
OSLC4Net_SDK/OSLC4Net.Core/Attribute/OslcShape.cs, OSLC4Net_SDK/OSLC4Net.Core/Attribute/OslcShapeProperty.cs, OSLC4Net_SDK/OSLC4Net.Core/Attribute/OslcVocabulary.cs, OSLC4Net_SDK/OSLC4Net.Core/Model/OslcUriEqualityComparer.cs, OSLC4Net_SDK/OSLC4Net.Core/Model/ValueType.cs, OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs
Adds OSLC attributes, URI comparison, expanded ValueType mappings, and resource-shape inference changes.
Source generator and analyzer packaging
OSLC4Net_SDK/OSLC4Net.CodeGen/OSLC4Net.CodeGen.csproj, OSLC4Net_SDK/OSLC4Net.CodeGen/OslcSourceGenerator/OslcDomainGenerator.cs
Adds the CodeGen analyzer project and the RDF-driven incremental generator, including parsing and source-emission helpers.
AM, Automation, and Change Management domains
OSLC4Net_SDK/OSLC4Net.Domains.ArchitectureManagement/*, OSLC4Net_SDK/OSLC4Net.Domains.Automation/*, OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/*
Adds domain projects, attributed model types, and RDF vocabulary/shape resources for AM, Automation, and Change Management.
Configuration, KerML, QM, and TRS domains
OSLC4Net_SDK/OSLC4Net.Domains.ConfigurationManagement/*, OSLC4Net_SDK/OSLC4Net.Domains.KerML/*, OSLC4Net_SDK/OSLC4Net.Domains.QualityManagement/*, OSLC4Net_SDK/OSLC4Net.Domains.TrackedResourceSet/*
Adds domain projects, attributed model types, and RDF vocabulary/shape resources for Config, KerML, QM, and TRS.
Requirements Management migration and tests
OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/*, OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/*
Removes the hand-written RM records, adds generated RM declarations and extensions, and adds generator/runtime tests and fixtures.
Domain seed generation and build wiring
OSLC4Net_SDK/scripts/oslc_domain_seed_gen.py, OSLC4Net_SDK/OSLC4Net.Core.slnx, OSLC4Net_SDK/Directory.Packages.props
Adds a Python seed generator and updates solution/package wiring for the new projects and package versions.

Server-side RDF input formatting and polymorphic materialization

Layer / File(s) Summary
Request wrapper and resource materializer
OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcRequest.cs, OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcResourceMaterializer.cs
Adds request wrappers that preserve headers and typed resources, plus polymorphic RDF resource materialization across loaded assemblies.
Formatter header threading and enumerable resolution
OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcRdfInputFormatter.cs
Passes captured headers into request materialization and broadens enumerable/member resolution while parsing RDF bodies.
Server integration tests and project wiring
OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/*
Adds in-memory server tests for polymorphic domain binding and SysML request handling, and updates test project references/packages.

Client, docs, and config updates

Layer / File(s) Summary
Formatting, docs, and config touch-ups
OSLC4Net_SDK/OSLC4Net.Client/OslcResponse.cs, AGENTS.md, docs/docfx.json, .coderabbit.yaml
Reformats client helpers and updates documentation/build/configuration files.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

  • OSLC/oslc4net#224: Related to the RDF input formatting path extended here with header-aware polymorphic handling.
  • OSLC/oslc4net#316: Touches the same OslcResponse<T> methods reformatted in this PR.
  • OSLC/oslc4net#389: Updates ResourceShapeFactory, which this PR expands for more ValueType cases.

Suggested labels: ci:full, xtra:smoke-test

Poem

I hopped through shapes and vocab trails tonight,
With source-gen carrots glowing bright. 🐰
Headers in one paw, RDF in the other,
I leapt from request to record like no other.
Now domains bloom where the old paths were spun —
A tidy little warren, codegen done! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.76% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding code generation support and new domain models for QM, AM, Config, TRS, and SysMLv2.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/vocabgen

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.00%. Comparing base (e5f2172) to head (7dcd29d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #837      +/-   ##
==========================================
+ Coverage   51.60%   53.00%   +1.39%     
==========================================
  Files         178      184       +6     
  Lines       10586    10905     +319     
  Branches     1115     1169      +54     
==========================================
+ Hits         5463     5780     +317     
+ Misses       4848     4828      -20     
- Partials      275      297      +22     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 19

🧹 Nitpick comments (6)
AGENTS.md (1)

130-145: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add language to fenced code block.

markdownlint flags the fenced block (Line 132) for missing a language identifier.

📝 Proposed fix
-  ```
+  ```text
   /*
    * Copyright (c) <YYYY> Andrii Berezovskyi and OSLC4Net contributors.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 130 - 145, The fenced code block in AGENTS.md is
missing a language identifier, which triggers markdownlint. Update the fenced
header for the copyright header example to include a suitable language tag using
the existing block around the “New files” guidance, so the snippet is explicitly
labeled in markdown.

Source: Linters/SAST tools

docs/docfx.json (1)

9-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Explicit csproj list requires manual upkeep.

Switching from a wildcard glob to an explicit list means every future domain project (and this PR itself adds several) must be manually added here, or its API reference will silently be excluded from generated docs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/docfx.json` around lines 9 - 23, The docfx configuration is using an
explicit project list, which will require manual updates whenever new projects
are added. Update the project selection in docfx.json to use a maintainable
wildcard or equivalent automatic discovery so all current and future
OSLC4Net.*.csproj projects are included without needing manual edits, especially
for the domain projects referenced in the list.
OSLC4Net_SDK/OSLC4Net.Domains.Automation/Resources/shapes.nt (1)

1-4: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Mismatched rdfs:label copied from another domain.

Line 3's label reads "OSLC Architecture Management (AM) Constraints" while the title (line 2) and remainder of the file describe Automation. Likely a copy/paste artifact from the AM domain resources. Cosmetic only since title (not label) drives generated shape metadata, but worth a quick fix for accuracy.

✏️ Proposed fix
-<http://open-services.net/ns/auto/shapes/2.1#> <http://www.w3.org/2000/01/rdf-schema#label> "OSLC Architecture Management (AM) Constraints" .
+<http://open-services.net/ns/auto/shapes/2.1#> <http://www.w3.org/2000/01/rdf-schema#label> "OSLC Automation (AUTO) Constraints" .
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@OSLC4Net_SDK/OSLC4Net.Domains.Automation/Resources/shapes.nt` around lines 1
- 4, The shapes.nt resource has a copied rdfs:label that still says “OSLC
Architecture Management (AM) Constraints” instead of Automation. Update the
label in the Automation shapes resource so it matches the OSLC Automation domain
and stays consistent with the existing dcterms:title and description on the same
subject.
OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/OslcRdfInputFormatterSysMLInterfaceTests.cs (1)

98-138: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the remaining new formatter branches.

These tests exercise OslcRequest and List<IElement>, but they still miss the new OslcRequest<T> path and the polymorphic array conversions in OslcRdfInputFormatter. Please add one typed-request case and one array case here so those branches do not regress unnoticed. As per coding guidelines, **/*.cs: Aim for at least 70% branch coverage in modified classes and 95%+ branch coverage in newly added classes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/OslcRdfInputFormatterSysMLInterfaceTests.cs`
around lines 98 - 138, The current tests cover OslcRequest and List<IElement>,
but they do not exercise the new OslcRequest<T> branch or the polymorphic array
conversion paths in OslcRdfInputFormatter. Add one test that posts a typed
request using the existing SysML interface test setup and asserts the typed
result is handled correctly, and add one test that posts an array-shaped payload
so the formatter’s array conversion branch is covered. Use the existing test
helpers and patterns in ControllerCanAcceptMultipleSysMLInterfaceResources and
ControllerCanAcceptOslcRequestForSysMLInterfaceResources to keep the new cases
aligned with the formatter’s supported symbols.

Source: Coding guidelines

OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/RequirementsManagementExtensions.cs (1)

16-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Duplicate RM vocabulary constants across Constants.Domains.RM and generated RM.

RM.P.ManagedBy / RM.Q.ManagedBy here duplicate Constants.Domains.RM.P.ManagedBy / .Q.ManagedBy added in Constants.cs for the same URI. Having two independent sources of truth for the same vocabulary term increases the chance of divergence as the RM domain finishes its migration to the generator.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/RequirementsManagementExtensions.cs`
around lines 16 - 27, The RM managedBy term is defined twice, once in
`Constants.Domains.RM` and again in the generated `RM` vocabulary, creating two
sources of truth for the same URI. Update
`RequirementsManagementExtensions.RM.P.ManagedBy` and `RM.Q.ManagedBy` to reuse
the existing `Constants.Domains.RM.P.ManagedBy` and `.Q.ManagedBy` symbols, or
remove the duplicate declarations if the generated `RM` should be the sole
source. Keep the `RM` and `Constants.Domains.RM` APIs aligned so only one
canonical definition of the managedBy vocabulary remains.
OSLC4Net_SDK/scripts/oslc_domain_seed_gen.py (1)

82-89: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Only the first oslc:describes target is used per shape.

If a shape describes multiple resource types, described_resources[0] silently drops the rest, generating just one declaration. Consider emitting a declaration per described resource, or at least warn/log when len(described_resources) > 1.

♻️ Proposed handling for multiple described resources
-        name = unique_identifier(to_identifier(local_name(str(described_resources[0]))), used_names)
-        declarations.append((str(shape), f"public partial {resource_kind} {name}{class_suffix(resource_kind)}"))
+        for described_resource in described_resources:
+            name = unique_identifier(to_identifier(local_name(str(described_resource))), used_names)
+            declarations.append((str(shape), f"public partial {resource_kind} {name}{class_suffix(resource_kind)}"))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@OSLC4Net_SDK/scripts/oslc_domain_seed_gen.py` around lines 82 - 89, The shape
processing in oslc_domain_seed_gen.py only uses described_resources[0], so any
additional oslc:describes targets are ignored. Update the declaration generation
logic around the described_resources handling to either iterate over every
URIRef in described_resources and append a declaration for each one, or add an
explicit warning/log path when more than one target is present. Use the existing
unique_identifier, to_identifier, local_name, and declarations logic so the fix
stays consistent with the current resource_kind/name generation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@OSLC4Net_SDK/OSLC4Net.CodeGen/OSLC4Net.CodeGen.csproj`:
- Around line 7-8: The OSLC4Net.CodeGen project is overriding the repo-wide C#
version pin with LangVersion=latest, which makes it depend on the installed SDK
instead of the shared setting. Update the OSLC4Net.CodeGen.csproj property group
to either remove the local LangVersion entry or change it to 14 so it matches
the version inherited from Directory.Build.props.
- Around line 1-19: Add the required Eclipse Public License header to the
OSLC4Net.CodeGen.csproj project file so it matches the licensing/copyright
convention used by the new code. Place the full EPL header at the top of the
project file before the Project element, keeping the existing build and package
settings in Project and ItemGroup unchanged.

In `@OSLC4Net_SDK/OSLC4Net.CodeGen/OslcSourceGenerator/OslcDomainGenerator.cs`:
- Around line 421-438: Optional string-valued properties are being generated as
always-present because AppendProperty eagerly initializes every string to
string.Empty even when the shape is not Exactly-one. Update
OslcDomainGenerator.AppendProperty (and any related GetClrType handling) so only
required string properties are initialized, while optional string properties
remain nullable/unset to preserve the missing-vs-empty distinction during
round-tripping.
- Around line 493-502: NamespaceFromShape currently only strips fragment URIs,
so slash-delimited describes values are being returned as full resource URIs and
producing incorrect OslcNamespace metadata. Update NamespaceFromShape to
recognize URI paths as well as hashes: when firstDescribe has no '#', trim it
back to the last '/' segment boundary (preserving the trailing slash) before
returning. Keep the existing shape.Describes/firstDescribe flow and adjust the
namespace derivation logic in OslcDomainGenerator accordingly.
- Around line 116-155: The attribute parsing in OslcDomainGenerator is too
syntax-only: GetSingleStringArgument and GetNamedStringArgument only work for
string literals, so constant expressions used in
OslcShape/OslcVocabulary/OslcShapeProperty attributes get ignored. Update the
attribute handling in OslcDomainGenerator to resolve argument values through the
SemanticModel (using constant value evaluation) for both positional and named
arguments, and keep the existing EndsWith checks so the logic still maps
OslcShape, OslcVocabulary, and OslcShapeProperty attributes correctly.

In
`@OSLC4Net_SDK/OSLC4Net.Domains.ArchitectureManagement/ArchitectureManagementDomain.cs`:
- Around line 1-9: The file header is using an abbreviated copyright banner
instead of the repository’s required full EPL notice. Update the top-of-file
comment in ArchitectureManagementDomain to use the standard full Eclipse Public
License header used by other new source files, keeping the same placement before
the namespace/type declarations.

In
`@OSLC4Net_SDK/OSLC4Net.Domains.ArchitectureManagement/OSLC4Net.Domains.ArchitectureManagement.csproj`:
- Around line 1-21: Add the full Eclipse Public License header banner to this
new project file so it matches the required new-file licensing convention.
Update the OSLC4Net.Domains.ArchitectureManagement.csproj project header area
with the standard EPL copyright/comment block used by the other new domain
project files, keeping the existing Sdk and PropertyGroup content unchanged.

In `@OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/Resources/shapes.nt`:
- Line 11: Update the QM shape triples in shapes.nt so the properties
testedByTestCase, relatedTestScript, blocksTestExecutionRecord,
relatedTestExecutionRecord, affectsTestResult, relatedTestCase, and
relatedTestPlan use the correct core:range targets that match their QM resource
descriptions instead of config:ChangeSet. This change will flow into the
generated OslcRange annotations, so fix the RDF definitions in the shapes file
for those property symbols to advertise the intended TestCase, TestScript,
TestExecutionRecord, and TestResult types.

In `@OSLC4Net_SDK/OSLC4Net.Domains.ConfigurationManagement/Resources/vocab.nt`:
- Around line 14-17: The vocab entry for config#RemoveAll has two text typos
that will propagate into generated metadata: the rdfs:label in vocab.nt says
“RemovalAll” instead of the intended name, and the rdfs:comment in the RemoveAll
definition misspells “overridden.” Update the RemoveAll label/comment strings in
the vocabulary resource so they match the correct terminology while keeping the
same IRI and RDF predicates.

In
`@OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/RequirementsManagementDomain.cs`:
- Around line 15-16: The RM declaration is invalid because `public static
partial class RM;` uses a semicolon instead of a class body. Update the `RM`
type in `RequirementsManagementDomain` to use a proper empty class block,
matching the partial type pattern used elsewhere, so the file compiles
correctly.

In `@OSLC4Net_SDK/OSLC4Net.Domains.SysMLV2/OSLC4Net.Domains.SysMLV2.csproj`:
- Around line 1-21: The new project file is missing the required Eclipse Public
License header at the top. Add the full EPL header comment before the <Project>
element in OSLC4Net.Domains.SysMLV2.csproj, matching the standard header used by
other project files in the repo, so the file complies with the new-file
licensing requirement.

In `@OSLC4Net_SDK/OSLC4Net.Domains.SysMLV2/SysMLDomain.cs`:
- Around line 499-500: The generated public CLR name for the SysML V2 model type
currently uses Type, which collides with System.Type in consuming code and
creates ambiguous references. Update the Type declaration in SysMLDomain so the
generator applies its CLR naming escape or alternate generated name for this
OSLC shape, while preserving the OslcShape mapping to the SysML TypeShape.
- Around line 16-17: The SysMLVocabulary declaration is using invalid
partial-class syntax, so update the SysMLVocabulary symbol in SysMLDomain to
have an empty body instead of a trailing semicolon. Keep the OslcVocabulary
attribute on the same partial class and change the declaration to a valid empty
partial type so the compiler can resolve it correctly.

In
`@OSLC4Net_SDK/OSLC4Net.Domains.TrackedResourceSet/OSLC4Net.Domains.TrackedResourceSet.csproj`:
- Around line 1-21: Add the missing Eclipse Public License header to the new
OSLC4Net.Domains.TrackedResourceSet.csproj file before the <Project>
declaration. Update the top of the project file to match the standard full EPL
header used by other new files, keeping the existing PropertyGroup and ItemGroup
content unchanged.

In `@OSLC4Net_SDK/OSLC4Net.Domains.TrackedResourceSet/Resources/shapes.nt`:
- Line 44: The shape description text contains typos that will be emitted into
generated metadata, so update the affected rdfs:description literals in
shapes.nt to correct “avalable” and the “deletion of resource” phrasing. Locate
the affected description entries by their TRS shape definitions, including the
trs:order description and the deletion-related shape description, and keep the
wording otherwise unchanged.

In `@OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcRdfInputFormatter.cs`:
- Around line 105-115: The polymorphic-resolution branch in
OslcRdfInputFormatter.ReadRequestBodyAsync is matching collection interface
types too early, so IEnumerable/IReadOnlyList element materialization never
runs. Change the direct
OslcResourceMaterializer.RequiresPolymorphicResolution(type) check to only
handle single-resource targets, or move the GetEnumerableMemberType(type)
handling before it. Keep the enumerable-member resolution path as the one that
resolves collection element types via OslcResourceMaterializer.Materialize.

In `@OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcResourceMaterializer.cs`:
- Around line 96-110: GetCandidateResourceTypes currently stores only one Type
per describes URI, so later discoveries overwrite earlier CLR candidates and
hide ambiguity. Change the candidate collection in
OslcResourceMaterializer.GetCandidateResourceTypes to keep all matching types
for each RDF type URI, then update the downstream resolution path that uses
GetMostConcreteType so it can evaluate the full set and choose the most specific
type or surface ambiguity instead of relying on discovery order.
- Around line 99-105: `GetCandidateResourceTypes()` is currently load-order
dependent because it only scans assemblies already present in
`AppDomain.CurrentDomain`, so `ResourcesOfType<IExtendedResource>()` can miss
valid polymorphic resource types. Update
`OslcResourceMaterializer.GetCandidateResourceTypes()` to discover types from
the domain/app model or an explicit assembly registry instead of relying on
`GetAssemblies()`, and make sure the lookup still filters non-abstract,
non-interface types assignable to `requestedType`.

In `@OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/OSLC4Net.CodeGen.Tests.csproj`:
- Around line 1-29: The new OSLC4Net.CodeGen.Tests.csproj is missing the
required Eclipse Public License header. Update the project file to include the
full EPL header at the top before the <Project> element, matching the standard
used by other new files in the repository.

---

Nitpick comments:
In `@AGENTS.md`:
- Around line 130-145: The fenced code block in AGENTS.md is missing a language
identifier, which triggers markdownlint. Update the fenced header for the
copyright header example to include a suitable language tag using the existing
block around the “New files” guidance, so the snippet is explicitly labeled in
markdown.

In `@docs/docfx.json`:
- Around line 9-23: The docfx configuration is using an explicit project list,
which will require manual updates whenever new projects are added. Update the
project selection in docfx.json to use a maintainable wildcard or equivalent
automatic discovery so all current and future OSLC4Net.*.csproj projects are
included without needing manual edits, especially for the domain projects
referenced in the list.

In `@OSLC4Net_SDK/OSLC4Net.Domains.Automation/Resources/shapes.nt`:
- Around line 1-4: The shapes.nt resource has a copied rdfs:label that still
says “OSLC Architecture Management (AM) Constraints” instead of Automation.
Update the label in the Automation shapes resource so it matches the OSLC
Automation domain and stays consistent with the existing dcterms:title and
description on the same subject.

In
`@OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/RequirementsManagementExtensions.cs`:
- Around line 16-27: The RM managedBy term is defined twice, once in
`Constants.Domains.RM` and again in the generated `RM` vocabulary, creating two
sources of truth for the same URI. Update
`RequirementsManagementExtensions.RM.P.ManagedBy` and `RM.Q.ManagedBy` to reuse
the existing `Constants.Domains.RM.P.ManagedBy` and `.Q.ManagedBy` symbols, or
remove the duplicate declarations if the generated `RM` should be the sole
source. Keep the `RM` and `Constants.Domains.RM` APIs aligned so only one
canonical definition of the managedBy vocabulary remains.

In `@OSLC4Net_SDK/scripts/oslc_domain_seed_gen.py`:
- Around line 82-89: The shape processing in oslc_domain_seed_gen.py only uses
described_resources[0], so any additional oslc:describes targets are ignored.
Update the declaration generation logic around the described_resources handling
to either iterate over every URIRef in described_resources and append a
declaration for each one, or add an explicit warning/log path when more than one
target is present. Use the existing unique_identifier, to_identifier,
local_name, and declarations logic so the fix stays consistent with the current
resource_kind/name generation.

In
`@OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/OslcRdfInputFormatterSysMLInterfaceTests.cs`:
- Around line 98-138: The current tests cover OslcRequest and List<IElement>,
but they do not exercise the new OslcRequest<T> branch or the polymorphic array
conversion paths in OslcRdfInputFormatter. Add one test that posts a typed
request using the existing SysML interface test setup and asserts the typed
result is handled correctly, and add one test that posts an array-shaped payload
so the formatter’s array conversion branch is covered. Use the existing test
helpers and patterns in ControllerCanAcceptMultipleSysMLInterfaceResources and
ControllerCanAcceptOslcRequestForSysMLInterfaceResources to keep the new cases
aligned with the formatter’s supported symbols.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f575e0ea-3038-407c-8418-84610024d713

📥 Commits

Reviewing files that changed from the base of the PR and between e5f2172 and b9c0617.

📒 Files selected for processing (66)
  • .coderabbit.yaml
  • AGENTS.md
  • OSLC4Net_SDK/Directory.Packages.props
  • OSLC4Net_SDK/OSLC4Net.Client/OslcResponse.cs
  • OSLC4Net_SDK/OSLC4Net.CodeGen/OSLC4Net.CodeGen.csproj
  • OSLC4Net_SDK/OSLC4Net.CodeGen/OslcSourceGenerator/OslcDomainGenerator.cs
  • OSLC4Net_SDK/OSLC4Net.Core.slnx
  • OSLC4Net_SDK/OSLC4Net.Core/Attribute/OslcShape.cs
  • OSLC4Net_SDK/OSLC4Net.Core/Attribute/OslcShapeProperty.cs
  • OSLC4Net_SDK/OSLC4Net.Core/Attribute/OslcVocabulary.cs
  • OSLC4Net_SDK/OSLC4Net.Core/Model/OslcUriEqualityComparer.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.ArchitectureManagement/ArchitectureManagementDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.ArchitectureManagement/OSLC4Net.Domains.ArchitectureManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.ArchitectureManagement/Resources/shapes.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.ArchitectureManagement/Resources/vocab.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.Automation/AutomationDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.Automation/OSLC4Net.Domains.Automation.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.Automation/Resources/shapes.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.Automation/Resources/vocab.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/ChangeManagementDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/OSLC4Net.Domains.ChangeManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/Resources/shapes.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/Resources/vocab.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.ConfigurationManagement/ConfigurationManagementDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.ConfigurationManagement/OSLC4Net.Domains.ConfigurationManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.ConfigurationManagement/Resources/shapes.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.ConfigurationManagement/Resources/vocab.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.KerML/KerMLDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.KerML/OSLC4Net.Domains.KerML.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.KerML/Resources/shapes.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.KerML/Resources/vocab.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.QualityManagement/OSLC4Net.Domains.QualityManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.QualityManagement/QualityManagementDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.QualityManagement/Resources/shapes.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.QualityManagement/Resources/vocab.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/Constants.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/OSLC4Net.Domains.RequirementsManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/Requirement.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/RequirementCollection.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/RequirementsManagementDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/RequirementsManagementExtensions.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/Resources/shapes.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/Resources/vocab.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.SysMLV2/OSLC4Net.Domains.SysMLV2.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.SysMLV2/Resources/shapes.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.SysMLV2/Resources/vocab.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.SysMLV2/SysMLDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.TrackedResourceSet/OSLC4Net.Domains.TrackedResourceSet.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.TrackedResourceSet/Resources/shapes.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.TrackedResourceSet/Resources/vocab.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.TrackedResourceSet/TrackedResourceSetDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcRdfInputFormatter.cs
  • OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcRequest.cs
  • OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcResourceMaterializer.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/ChangeManagementDomainTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/GeneratedClassResource.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/KerMLDomainTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/OSLC4Net.CodeGen.Tests.csproj
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/QualityManagementDomainTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/RequirementsManagementDomainTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/SysMLV2DomainTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/OSLC4Net.Server.Providers.Tests.csproj
  • OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/OslcRdfInputFormatterDomainPolymorphismTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/OslcRdfInputFormatterSysMLInterfaceTests.cs
  • OSLC4Net_SDK/scripts/oslc_domain_seed_gen.py
  • docs/docfx.json
💤 Files with no reviewable changes (2)
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/Requirement.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/RequirementCollection.cs

Comment thread OSLC4Net_SDK/OSLC4Net.CodeGen/OSLC4Net.CodeGen.csproj
Comment thread OSLC4Net_SDK/OSLC4Net.CodeGen/OSLC4Net.CodeGen.csproj Outdated
Comment thread OSLC4Net_SDK/OSLC4Net.CodeGen/OslcSourceGenerator/OslcDomainGenerator.cs Outdated
Comment thread OSLC4Net_SDK/OSLC4Net.CodeGen/OslcSourceGenerator/OslcDomainGenerator.cs Outdated
<http://open-services.net/ns/trs/shapes/3.0#changed> <http://open-services.net/ns/core#propertyDefinition> <http://open-services.net/ns/core/trs#changed> .
<http://open-services.net/ns/trs/shapes/3.0#changed> <http://open-services.net/ns/core#name> "changed" .
<http://open-services.net/ns/trs/shapes/3.0#changed> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://open-services.net/ns/core#Property> .
<http://open-services.net/ns/trs/shapes/3.0#order> <http://purl.org/dc/terms/description> "A non-negative integer number indicating the sequence in time of the Change Event.}} {{There MAY be gaps in the sequence}}, but {{a more recently available Change Event MUST have a larger number than any previously avalable Change Event as accessed by GET on the change log}}."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the typos in these shape descriptions before they become generated metadata.

avalable on Line 44 and deletion of resource on Line 154 will leak into generated descriptions verbatim.

Also applies to: 154-154

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@OSLC4Net_SDK/OSLC4Net.Domains.TrackedResourceSet/Resources/shapes.nt` at line
44, The shape description text contains typos that will be emitted into
generated metadata, so update the affected rdfs:description literals in
shapes.nt to correct “avalable” and the “deletion of resource” phrasing. Locate
the affected description entries by their TRS shape definitions, including the
trs:order description and the deletion-related shape description, and keep the
wording otherwise unchanged.

Comment thread OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcRdfInputFormatter.cs Outdated
Comment thread OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcResourceMaterializer.cs Outdated
Comment thread OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcResourceMaterializer.cs Outdated
Literal support for all OSLC and RDF 1.2 values but with the limitation of mapping xsd:integer to long instead of BigInteger (same as in Lyo)
@github-code-quality

github-code-quality Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: C#

C# / dotnet/cobertura

The overall coverage in the branch is 24%. The coverage in the branch is 56%.

Show a code coverage summary of the most impacted files.
File e5f2172 7dcd29d +/-
/home/runner/wo...putFormatter.cs 0% 61% +61%
/home/runner/wo...Plan.Shape.g.cs 0% 92% +92%
/home/runner/wo...line.Shape.g.cs 0% 93% +93%
/home/runner/wo.../OslcRequest.cs 0% 94% +94%
/home/runner/wo...fect.Shape.g.cs 0% 94% +94%
/home/runner/wo...ment.Shape.g.cs 0% 95% +95%
/home/runner/wo...uest.Shape.g.cs 0% 95% +95%
/home/runner/wo...ship.Shape.g.cs 0% 96% +96%
/home/runner/wo...ment.Shape.g.cs 0% 96% +96%
/home/runner/wo...Materializer.cs 0% 97% +97%

Updated July 01, 2026 21:16 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs (1)

536-565: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Restrict AnyResource to resource-backed CLR types.

The new ValueType.AnyResource branch is unconditional, so [OslcValueType(ValueType.AnyResource)] now passes validation for any mapped CLR type, including literals like string, long, or byte[]. That lets invalid model annotations generate contradictory shapes instead of failing fast.

Suggested fix
-            ValueType.AnyResource.Equals(userSpecifiedValueType)
+            (ValueType.AnyResource.Equals(userSpecifiedValueType)
+             &&
+             ValueType.Resource.Equals(calculatedValueType)
+            )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs` around lines 536 -
565, The validation in ResourceShapeFactory’s value-type compatibility check
currently treats ValueType.AnyResource as always valid, which allows literal CLR
types to pass. Update the conditional in the calculated/user-specified value
type comparison so AnyResource is accepted only for resource-backed mapped CLR
types, and reject scalar/literal types such as string, numeric, and byte[]; keep
the logic aligned with the existing ValueType.LocalResource handling in the same
validation block.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@OSLC4Net_SDK/OSLC4Net.Core/Model/ValueType.cs`:
- Around line 23-166: The ValueType enum in ValueType should keep its existing
public numeric contract instead of being renumbered by inserting new members at
the top. Update the ValueType declaration to assign explicit integer values that
preserve the historical ordering for all existing members, then append the newly
added XML/RDF/OSLC members after the original set; this keeps default(ValueType)
and any numeric serialization/persistence behavior stable. Use the ValueType
enum and its existing members like AnyUri, String, Resource, and Unknown as the
anchor when applying the .NET design-guideline-safe ordering.

In
`@OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/MultiplicityCodeGenerationTests.cs`:
- Around line 33-34: The `MultiplicityCodeGenerationTests.AssertProperty` calls
for `MultiplicityProbe.OptionalAnyResource` and
`MultiplicityProbe.OptionalLocalResource` only validate `Uri?`, so they can miss
a regression in the generated OSLC value type. Update these test assertions to
also pass the expected `ValueType` for both properties, using the existing
`AssertProperty` helper and the `MultiplicityProbe` members to verify the
generated model matches both nullability and OSLC value semantics.

In `@OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/Resources/multiplicity-shapes.nt`:
- Around line 1-333: The new N-Triples fixture is missing the required Eclipse
Public License header. Add the full EPL header at the top of
multiplicity-shapes.nt using N-Triples comment lines prefixed with # so the RDF
remains valid. Keep the existing resource data unchanged and place the header
before the first triple in this fixture file.

In `@OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/Resources/multiplicity-vocab.nt`:
- Around line 1-30: Add the repository’s full Eclipse Public License header to
the new N-Triples fixture and keep it valid by using # comment lines at the top
of multiplicity-vocab.nt. Update the file before the existing triples so the
resource remains parseable, and ensure the header matches the project’s standard
new-file license block.

---

Outside diff comments:
In `@OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs`:
- Around line 536-565: The validation in ResourceShapeFactory’s value-type
compatibility check currently treats ValueType.AnyResource as always valid,
which allows literal CLR types to pass. Update the conditional in the
calculated/user-specified value type comparison so AnyResource is accepted only
for resource-backed mapped CLR types, and reject scalar/literal types such as
string, numeric, and byte[]; keep the logic aligned with the existing
ValueType.LocalResource handling in the same validation block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e83ea9a3-43d3-45f5-ae1e-04a9a1178821

📥 Commits

Reviewing files that changed from the base of the PR and between b9c0617 and f298547.

📒 Files selected for processing (9)
  • OSLC4Net_SDK/OSLC4Net.CodeGen/OslcSourceGenerator/OslcDomainGenerator.cs
  • OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs
  • OSLC4Net_SDK/OSLC4Net.Core/Model/ValueType.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/MultiplicityCodeGenerationTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/MultiplicityProbeDomain.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/OSLC4Net.CodeGen.Tests.csproj
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/Resources/multiplicity-shapes.nt
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/Resources/multiplicity-vocab.nt
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.Tests/ValueTypeMappingTests.cs
✅ Files skipped from review due to trivial changes (1)
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/MultiplicityProbeDomain.cs
🚧 Files skipped from review as they are similar to previous changes (2)
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/OSLC4Net.CodeGen.Tests.csproj
  • OSLC4Net_SDK/OSLC4Net.CodeGen/OslcSourceGenerator/OslcDomainGenerator.cs

Comment thread OSLC4Net_SDK/OSLC4Net.Core/Model/ValueType.cs Outdated
Comment thread OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/MultiplicityCodeGenerationTests.cs Outdated
Signed-off-by: Andrew Berezovskyi <andriib@kth.se>
Comment thread OSLC4Net_SDK/OSLC4Net.CodeGen/OslcSourceGenerator/OslcDomainGenerator.cs Dismissed
Comment thread OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcResourceMaterializer.cs Dismissed

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs (1)

62-63: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

DateTimeStamp-annotated DateTimeOffset properties still fail shape generation.

MultiplicityCodeGenerationTests now expects generated DateTimeOffset? members annotated as ValueType.DateTimeStamp, but TYPE_TO_VALUE_TYPE still maps DateTimeOffset to DateTime and this validator never treats DateTimeStamp as compatible. CreateResourceShape() will still throw OslcCoreInvalidValueTypeException for those generated models.

Possible minimal fix
         if (
             userSpecifiedValueType.Equals(calculatedValueType)
             || ValueType.LocalResource.Equals(userSpecifiedValueType)
             ||
             // REVISIT: restrict AnyResource to resource-backed CLR types after existing domain annotations are audited.
             ValueType.AnyResource.Equals(userSpecifiedValueType)
+            || (
+                ValueType.DateTimeStamp.Equals(userSpecifiedValueType)
+                && typeof(DateTimeOffset).Equals(componentType)
+            )
             || (
                 ValueType.XMLLiteral.Equals(userSpecifiedValueType)
                 && ValueType.String.Equals(calculatedValueType)
             )

Also applies to: 622-648

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs` around lines 62 -
63, The ResourceShapeFactory mapping and validation still treat DateTimeOffset
as ValueType.DateTime, so DateTimeStamp-annotated members fail during shape
generation. Update ResourceShapeFactory’s TYPE_TO_VALUE_TYPE and the
CreateResourceShape()/validator path so DateTimeOffset can be recognized as
ValueType.DateTimeStamp where appropriate, and allow that value type to pass
compatibility checks instead of throwing OslcCoreInvalidValueTypeException. Make
the fix around the existing TYPE_TO_VALUE_TYPE initialization and the
DateTimeOffset handling logic in CreateResourceShape().
🧹 Nitpick comments (1)
OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/ChangeManagementExtensions.cs (1)

30-30: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Preserve the fragment-aware comparer when these URI sets are reassigned.

These public setters let callers replace the preconfigured HashSet<Uri> with one that uses the default comparer, which changes deduplication semantics for fragment-bearing links. Prefer a getter-only/init-only collection, or normalize assigned sets back to OslcUriEqualityComparer.Instance. As per coding guidelines, **/*.{cs,csx}: Follow the .NET design guidelines from https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/ where possible.

Also applies to: 42-43, 55-55, 67-68, 80-80, 92-92, 104-104

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/ChangeManagementExtensions.cs`
at line 30, The URI set properties in ChangeManagementExtensions currently
expose public setters that can replace the fragment-aware HashSet comparer with
the default one, changing deduplication behavior. Update these collection
properties (including AffectsTestResult and the other affected URI set members)
to preserve OslcUriEqualityComparer.Instance by making them
getter-only/init-only or by normalizing any assigned value back into a new
HashSet<Uri> using that comparer. Keep the comparer behavior consistent across
all affected collection properties in ChangeManagementExtensions.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs`:
- Around line 626-628: The ValidateUserSpecifiedValueType check currently lets
ValueType.AnyResource pass for any CLR member, which allows scalar members to be
treated as resource-valued. Tighten the AnyResource exemption in
ResourceShapeFactory so it only applies when the member’s CLR type is
resource-backed, and keep the existing validation path for non-resource-backed
types like string or int.

---

Outside diff comments:
In `@OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs`:
- Around line 62-63: The ResourceShapeFactory mapping and validation still treat
DateTimeOffset as ValueType.DateTime, so DateTimeStamp-annotated members fail
during shape generation. Update ResourceShapeFactory’s TYPE_TO_VALUE_TYPE and
the CreateResourceShape()/validator path so DateTimeOffset can be recognized as
ValueType.DateTimeStamp where appropriate, and allow that value type to pass
compatibility checks instead of throwing OslcCoreInvalidValueTypeException. Make
the fix around the existing TYPE_TO_VALUE_TYPE initialization and the
DateTimeOffset handling logic in CreateResourceShape().

---

Nitpick comments:
In
`@OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/ChangeManagementExtensions.cs`:
- Line 30: The URI set properties in ChangeManagementExtensions currently expose
public setters that can replace the fragment-aware HashSet comparer with the
default one, changing deduplication behavior. Update these collection properties
(including AffectsTestResult and the other affected URI set members) to preserve
OslcUriEqualityComparer.Instance by making them getter-only/init-only or by
normalizing any assigned value back into a new HashSet<Uri> using that comparer.
Keep the comparer behavior consistent across all affected collection properties
in ChangeManagementExtensions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 52739de0-f040-4f27-a837-85df27aacb49

📥 Commits

Reviewing files that changed from the base of the PR and between f298547 and 7dcd29d.

📒 Files selected for processing (30)
  • AGENTS.md
  • OSLC4Net_SDK/OSLC4Net.CodeGen/OSLC4Net.CodeGen.csproj
  • OSLC4Net_SDK/OSLC4Net.CodeGen/OslcSourceGenerator/OslcDomainGenerator.cs
  • OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs
  • OSLC4Net_SDK/OSLC4Net.Core/Model/ValueType.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.ArchitectureManagement/OSLC4Net.Domains.ArchitectureManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.Automation/OSLC4Net.Domains.Automation.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/ChangeManagementExtensions.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/OSLC4Net.Domains.ChangeManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.ConfigurationManagement/OSLC4Net.Domains.ConfigurationManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.KerML/OSLC4Net.Domains.KerML.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.QualityManagement/OSLC4Net.Domains.QualityManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/OSLC4Net.Domains.RequirementsManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/RequirementsManagementExtensions.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.SysMLV2/OSLC4Net.Domains.SysMLV2.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.SysMLV2/SysMLDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.TrackedResourceSet/OSLC4Net.Domains.TrackedResourceSet.csproj
  • OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcRdfInputFormatter.cs
  • OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcResourceMaterializer.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/ChangeManagementDomainTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/MultiplicityCodeGenerationTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/MultiplicityProbeDomain.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/OSLC4Net.CodeGen.Tests.csproj
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/Resources/multiplicity-shapes.nt
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/Resources/multiplicity-vocab.nt
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/SysMLV2DomainTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.Tests/ValueTypeMappingTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/OslcRdfInputFormatterDomainPolymorphismTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/OslcRdfInputFormatterSysMLInterfaceTests.cs
  • OSLC4Net_SDK/scripts/oslc_domain_seed_gen.py
✅ Files skipped from review due to trivial changes (3)
  • OSLC4Net_SDK/OSLC4Net.Domains.KerML/OSLC4Net.Domains.KerML.csproj
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/Resources/multiplicity-vocab.nt
  • AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (21)
  • OSLC4Net_SDK/OSLC4Net.Domains.TrackedResourceSet/OSLC4Net.Domains.TrackedResourceSet.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.Automation/OSLC4Net.Domains.Automation.csproj
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/MultiplicityProbeDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.QualityManagement/OSLC4Net.Domains.QualityManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.CodeGen/OSLC4Net.CodeGen.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.SysMLV2/OSLC4Net.Domains.SysMLV2.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.ConfigurationManagement/OSLC4Net.Domains.ConfigurationManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/RequirementsManagementExtensions.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.ArchitectureManagement/OSLC4Net.Domains.ArchitectureManagement.csproj
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/SysMLV2DomainTests.cs
  • OSLC4Net_SDK/OSLC4Net.Domains.ChangeManagement/OSLC4Net.Domains.ChangeManagement.csproj
  • OSLC4Net_SDK/OSLC4Net.Core/Model/ValueType.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/OSLC4Net.CodeGen.Tests.csproj
  • OSLC4Net_SDK/OSLC4Net.Domains.RequirementsManagement/OSLC4Net.Domains.RequirementsManagement.csproj
  • OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/OslcRdfInputFormatterDomainPolymorphismTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.Server.Providers.Tests/OslcRdfInputFormatterSysMLInterfaceTests.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.CodeGen.Tests/Resources/multiplicity-shapes.nt
  • OSLC4Net_SDK/OSLC4Net.Domains.SysMLV2/SysMLDomain.cs
  • OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcResourceMaterializer.cs
  • OSLC4Net_SDK/OSLC4Net.Server.Providers/OslcRdfInputFormatter.cs
  • OSLC4Net_SDK/OSLC4Net.CodeGen/OslcSourceGenerator/OslcDomainGenerator.cs

Comment thread OSLC4Net_SDK/OSLC4Net.Core/Model/ResourceShapeFactory.cs
@berezovskyi berezovskyi added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit ce6116d Jul 1, 2026
14 checks passed
@berezovskyi berezovskyi deleted the feat/vocabgen branch July 1, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant