Skip to content

🔧 feat: Normalize artifact names to uppercase with proper spacing#1948

Merged
mkmccarty merged 1 commit intomainfrom
mm-branch-1
Dec 15, 2025
Merged

🔧 feat: Normalize artifact names to uppercase with proper spacing#1948
mkmccarty merged 1 commit intomainfrom
mm-branch-1

Conversation

@mkmccarty
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 15, 2025 21:08
@mkmccarty mkmccarty merged commit 771cb21 into main Dec 15, 2025
12 checks passed
@mkmccarty mkmccarty deleted the mm-branch-1 branch December 15, 2025 21:08
Copy link
Copy Markdown
Contributor

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 normalizes artifact names in the codebase to use uppercase with proper spacing for consistency. The changes update the ArtifactMap keys from PascalCase (e.g., "CarbonFiber") to uppercase with spaces (e.g., "CARBON FIBER"), and add two new artifact entries (P.E.G.G. and SILICON). Transformation logic is also added in two locations to convert legacy artifact names to the new format.

  • Updated 7 artifact keys in ArtifactMap from PascalCase to uppercase with spaces
  • Added 2 new artifact entries (P.E.G.G. and SILICON)
  • Added transformation logic in boost.go and artifacts.go to convert legacy names to uppercase format

Reviewed changes

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

File Description
src/ei/ei_artifacts.go Updated ArtifactMap keys from PascalCase to uppercase with spaces for 7 artifacts, and added 2 new artifact entries (P.E.G.G. and SILICON)
src/boost/boost.go Added transformation logic to convert artifact names to uppercase and handle spacing for CARBONFIBER and FLAMERETARDANT in getUserArtifacts function
src/boost/artifacts.go Added transformation logic to convert artifact names to uppercase and handle spacing for CARBONFIBER and FLAMERETARDANT in getArtifactsComponents function

Comment thread src/boost/boost.go
Comment on lines +720 to +721
art = strings.ReplaceAll(art, "FLAMERETARDANT", "FLAME RETARDANT")

Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The code transforms "FLAMERETARDANT" to "FLAME RETARDANT", but there is no corresponding entry for "FLAME RETARDANT" in the ArtifactMap in ei_artifacts.go. This will cause artifact lookups to fail for this artifact type. Either add "FLAME RETARDANT" to the ArtifactMap or remove this transformation if it's not needed.

Suggested change
art = strings.ReplaceAll(art, "FLAMERETARDANT", "FLAME RETARDANT")

Copilot uses AI. Check for mistakes.
Comment thread src/boost/artifacts.go
coll = strings.ReplaceAll(coll, "FlameRetardant", "Flame Retardant")
coll = strings.ToUpper(coll)
coll = strings.ReplaceAll(coll, "CARBONFIBER", "CARBON FIBER")
coll = strings.ReplaceAll(coll, "FLAMERETARDANT", "FLAME RETARDANT")
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The code transforms "FLAMERETARDANT" to "FLAME RETARDANT", but there is no corresponding entry for "FLAME RETARDANT" in the ArtifactMap in ei_artifacts.go. This will cause artifact lookups to fail for this artifact type. Either add "FLAME RETARDANT" to the ArtifactMap or remove this transformation if it's not needed.

Suggested change
coll = strings.ReplaceAll(coll, "FLAMERETARDANT", "FLAME RETARDANT")
// coll = strings.ReplaceAll(coll, "FLAMERETARDANT", "FLAME RETARDANT")

Copilot uses AI. Check for mistakes.
Comment thread src/boost/boost.go
art = strings.ReplaceAll(art, "CARBONFIBER", "CARBON FIBER")
art = strings.ReplaceAll(art, "FLAMERETARDANT", "FLAME RETARDANT")

if a != "" {
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The transformation logic has a critical bug: the variable art is being reassigned but the condition on line 722 still checks the original variable a. This means the transformed uppercase value with proper spacing will never be used in the lookup. The condition should check art != "" instead of a != "".

Suggested change
if a != "" {
if art != "" {

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