Skip to content

Fix Copilot review findings on the naming pass - #376

Merged
philoserf merged 1 commit into
mainfrom
naming-pass-copilot-fixups
Aug 5, 2026
Merged

Fix Copilot review findings on the naming pass#376
philoserf merged 1 commit into
mainfrom
naming-pass-copilot-fixups

Conversation

@philoserf

Copy link
Copy Markdown
Owner

Summary

  • Follow-up to Naming pass: Go readability without being slaves to the terminology #375. Copilot's review posted after that PR was merged and flagged two real issues, both fixed here:
    • worldgen.importance's own parameter was named importance, shadowing the function itself — renamed to value.
    • TestRogueFixedCCChosenOnce still referenced the pre-rename FixedCC identifier — renamed to TestRogueFixedControllingCharChosenOnce.
  • Also proactively fixed two more test names left stale by the same pattern (TestCheckMishapTestEvaluateMishap, TestSizeAtTestSize), since Copilot's rationale applies equally to those.

Test plan

  • task check green
  • go test ./cmd/...: goldens/READMEs byte-identical, no -update

worldgen.importance's own parameter was named importance, shadowing the
function itself. Also renames three test functions left over from the
naming pass whose names still referenced pre-rename identifiers
(TestCheckMishap, TestSizeAt, TestRogueFixedCCChosenOnce), for consistent
grep-based navigation.

Co-Authored-By: Claude
Copilot AI lite review requested due to automatic review settings August 5, 2026 23:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Renames a few identifiers introduced/left stale by the naming pass (#375), addressing Copilot review findings and aligning test/function names with the updated terminology without changing behavior.

Changes:

  • Rename worldgen.importance’s parameter to avoid shadowing the importance function.
  • Update stale test names to match renamed identifiers (Rogue fixed controlling characteristic, mishap evaluation, benchmark size lookup).

Reviewed changes

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

File Description
internal/worldgen/world.go Renames importance helper parameter (importancevalue) to avoid name shadowing.
internal/task/mishap_test.go Renames test TestCheckMishapTestEvaluateMishap to match EvaluateMishap.
internal/chargen/rogue_test.go Renames test TestRogueFixedCCChosenOnceTestRogueFixedControllingCharChosenOnce to match FixedControllingChar terminology.
internal/benchmark/benchmark_test.go Renames test TestSizeAtTestSize to match the Size lookup function name.

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

@philoserf
philoserf merged commit 931c684 into main Aug 5, 2026
2 checks passed
@philoserf
philoserf deleted the naming-pass-copilot-fixups branch August 5, 2026 23:05
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