Skip to content

Guard Starter Code method names across Languages; fix 10 problems - #343

Merged
Kyu-seok merged 11 commits into
masterfrom
starter-method-names
Nov 14, 2026
Merged

Kyu-seok merged 11 commits into
masterfrom
starter-method-names

Conversation

@Kyu-seok

Copy link
Copy Markdown
Owner

Summary

New guard StarterMethodNamesTest (common, beside DriverStarterMethodTest): a problem's four Starter Codes must name the same public methods, spelled the same. DriverStarterMethodTest checks each Driver against its own Starter Code only, so a snake_case Python method next to camelCase Java passed.

for each problem
  publicMethods(Python | Java | JavaScript | C++ Starter Code)   # comments skipped
    Python: def not starting with _      Java: public methods
    JS: class methods but constructor    C++: methods with a body, not constructors
  fail unless all four sets are equal and non-empty

The red run found 10 problems. One commit each renames the Starter Code and Driver method (no Slug, statement or Test Case change, so no migration):

Problem Before After (all 4 Languages)
add-score-lists py add_two_numbers / tallyPickRoutes addScoreLists
biggest-clear-floor py largest_square / biggestClearBay biggestClearFloor
crush-heaviest-blocks py last_stone_weight / crushHeaviestBales crushHeaviestBlocks
merge-cafe-queues py merge_k_lists / mergeFlightRosters mergeCafeQueues
min-cheat-code-edits py min_distance / minZoneEdits minCheatCodeEdits
drop-conflicting-classes py erase_overlap_intervals dropClassConflicts
find-battery-peak py find_peak_element pinpointPeak
min-wait-drive py cheapest_path minWaitRoute
nearest-cafe-stops py k_closest selectNearestStops
username-trie py PrefixIndex.starts_with startsWith

The first five also rename Java/JavaScript/C++: their camelCase name was left from an older statement's theme (pick routes, bays, bales, flight rosters, zones). Each commit adds Java, JavaScript and C++ reference solutions. The restate-problem skill now points at the new test.

Evidence

  • Before: StarterMethodNamesTest.everyProblemsStarterCodesNameTheSameMethods fails: 10 problems' Starter Codes name different methods (the 10 above). aStarterOutOfStepIsCaught (snake_case Python, a design problem's one method off in JS, an extra C++ method, empty Starter Codes, and a case just outside each exception: _-prefix, comments, C++ constructor) and startersThatAgreePass pass.
  • After: ./gradlew :common:test --tests '*StarterMethodNamesTest' --tests '*DriverStarterMethodTest' --tests '*ProblemAssetsTest' green.
    ./gradlew :backend:test --tests 'com.codebite.problem.*' green.
    scripts/judge-local.sh <slug> over every Test Case: ACCEPTED in all 4 Languages for all 10 problems.
    Run endpoint on branch servers (Judge0): every sample ACCEPTED for all 10 problems x 4 Languages.

Merge Danger

Door: two-way

Revert restores the old names; no migration, no data touched.

Blast Radius: user code

Code written against the old method names no longer compiles/runs if resubmitted or loaded from a past submission: Python users on all 10 problems, and Java/JavaScript/C++ users on the first five. Stored Verdicts are untouched.

Closes #244

🤖 Generated with Claude Code

Kyu-seok and others added 11 commits November 15, 2026 07:22
Starter Code method add_two_numbers (Python) and tallyPickRoutes (Java,
JavaScript, C++) are both addScoreLists now, in every Starter Code and
Driver. tallyPickRoutes was left from an older statement. Adds Java,
JavaScript and C++ reference solutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Starter Code method largest_square (Python) and biggestClearBay (Java,
JavaScript, C++) are both biggestClearFloor now, in every Starter Code
and Driver. biggestClearBay was left from an older statement. Adds Java,
JavaScript and C++ reference solutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Starter Code method last_stone_weight (Python) and crushHeaviestBales
(Java, JavaScript, C++) are both crushHeaviestBlocks now, in every
Starter Code and Driver. crushHeaviestBales was left from an older
statement. Adds Java, JavaScript and C++ reference solutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python's Starter Code method erase_overlap_intervals is dropClassConflicts,
the name the other three Languages use. Adds Java, JavaScript and C++
reference solutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python's Starter Code method find_peak_element is pinpointPeak, the name
the other three Languages use. Adds Java, JavaScript and C++ reference
solutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Starter Code method merge_k_lists (Python) and mergeFlightRosters (Java,
JavaScript, C++) are both mergeCafeQueues now, in every Starter Code and
Driver. mergeFlightRosters was left from an older statement. Adds Java,
JavaScript and C++ reference solutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Starter Code method min_distance (Python) and minZoneEdits (Java,
JavaScript, C++) are both minCheatCodeEdits now, in every Starter Code
and Driver. minZoneEdits was left from an older statement. Adds Java,
JavaScript and C++ reference solutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python's Starter Code method cheapest_path is minWaitRoute, the name the
other three Languages use. Adds Java, JavaScript and C++ reference
solutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python's Starter Code method k_closest is selectNearestStops, the name
the other three Languages use. Adds Java, JavaScript and C++ reference
solutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python's PrefixIndex.starts_with is startsWith, the name the other three
Languages and the statement use. Adds Java, JavaScript and C++ reference
solutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StarterMethodNamesTest checks that a problem's four Starter Codes name
the same public methods, spelled the same. DriverStarterMethodTest only
checks each Driver against its own Starter Code, so a snake_case Python
method beside camelCase Java passed until review caught it. Fixtures show
each way a mismatch can slip past the extraction.

Closes #244

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Kyu-seok
Kyu-seok merged commit 3d2b6bd into master Nov 14, 2026
4 checks passed
@Kyu-seok
Kyu-seok deleted the starter-method-names branch November 14, 2026 22:28
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.

Statement checks: method names in constraints and across Starter Code

1 participant