Skip to content

scaffolding fixed#1

Merged
infinyte merged 1 commit intomainfrom
dev
Jan 4, 2026
Merged

scaffolding fixed#1
infinyte merged 1 commit intomainfrom
dev

Conversation

@infinyte
Copy link
Copy Markdown
Owner

@infinyte infinyte commented Jan 4, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 4, 2026 16:14
@infinyte infinyte merged commit 5c83581 into main Jan 4, 2026
6 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the SemanticType class to be a record with immutable properties and updates development environment permissions for dotnet SDK installation.

  • Converted SemanticType from a class to a record with init-only properties for immutability
  • Changed all property setters from set to init to prevent modification after construction
  • Added bash permissions for wget, chmod, and dotnet installation script execution

Reviewed changes

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

File Description
src/DocFlow.Core/CanonicalModel/SemanticEntity.cs Converts SemanticType to a record type with init-only properties to enforce immutability
.claude/settings.local.json Adds bash permissions for dotnet SDK installation tools (wget, chmod, installation script)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/// <summary>
/// Generic type arguments if applicable
/// </summary>
public List<SemanticType> GenericArguments { get; init; } = [];
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GenericArguments property uses a List which is still mutable even with the init accessor. Items can be added or removed after construction. Consider using ImmutableList or IReadOnlyList to maintain true immutability consistent with the record type and init-only properties.

Suggested change
public List<SemanticType> GenericArguments { get; init; } = [];
public IReadOnlyList<SemanticType> GenericArguments { get; init; } = [];

Copilot uses AI. Check for mistakes.
/// Represents a type reference in the semantic model
/// </summary>
public sealed class SemanticType
public sealed record SemanticType
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting SemanticType to a record introduces an inconsistency in the codebase design. Other related types like SemanticProperty (line 95), SemanticOperation (line 167), SemanticParameter (line 183), and SemanticAttribute (line 252) remain as classes with set properties. Consider either converting all these types to records for consistency, or keeping SemanticType as a class. If SemanticType specifically benefits from value semantics and immutability, document why it differs from the others.

Copilot uses AI. Check for mistakes.
"Bash(dotnet build:*)"
"Bash(dotnet build:*)",
"Bash(wget:*)",
"Bash(chmod:*)",
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding wget and chmod permissions to the local settings could introduce security risks. These commands can be used to download and execute arbitrary scripts. Consider documenting why these permissions are needed, or alternatively, use a more restricted approach such as allowing specific script paths or using dotnet SDK installation tools that don't require these broad permissions.

Suggested change
"Bash(chmod:*)",
"Bash(chmod +x /tmp/dotnet-install.sh:*)",

Copilot uses AI. Check for mistakes.
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