Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"permissions": {
"allow": [
"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.
"Bash(/tmp/dotnet-install.sh:*)",
"Bash(export PATH=\"$HOME/.dotnet:$PATH\")"
]
}
}
22 changes: 11 additions & 11 deletions src/DocFlow.Core/CanonicalModel/SemanticEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,34 +191,34 @@ public sealed class SemanticParameter
/// <summary>
/// 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.
{
public required string Name { get; set; }
public required string Name { get; init; }

/// <summary>
/// Is this a primitive/built-in type?
/// </summary>
public bool IsPrimitive { get; set; }
public bool IsPrimitive { get; init; }

/// <summary>
/// Is this a collection type?
/// </summary>
public bool IsCollection { get; set; }
public bool IsCollection { get; init; }

/// <summary>
/// Is this nullable?
/// </summary>
public bool IsNullable { get; set; }
public bool IsNullable { get; init; }

/// <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.

/// <summary>
/// Reference to the entity definition if this type refers to another entity
/// </summary>
public string? ReferencedEntityId { get; set; }
public string? ReferencedEntityId { get; init; }

// Common primitive type helpers
public static SemanticType String => new() { Name = "string", IsPrimitive = true };
Expand Down