Repository navigation
Guard Starter Code method names across Languages; fix 10 problems - #343
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New guard
StarterMethodNamesTest(common, besideDriverStarterMethodTest): a problem's four Starter Codes must name the same public methods, spelled the same.DriverStarterMethodTestchecks each Driver against its own Starter Code only, so a snake_case Python method next to camelCase Java passed.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):
add_two_numbers/tallyPickRoutesaddScoreListslargest_square/biggestClearBaybiggestClearFloorlast_stone_weight/crushHeaviestBalescrushHeaviestBlocksmerge_k_lists/mergeFlightRostersmergeCafeQueuesmin_distance/minZoneEditsminCheatCodeEditserase_overlap_intervalsdropClassConflictsfind_peak_elementpinpointPeakcheapest_pathminWaitRoutek_closestselectNearestStopsPrefixIndex.starts_withstartsWithThe 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
StarterMethodNamesTest.everyProblemsStarterCodesNameTheSameMethodsfails: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) andstartersThatAgreePasspass../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