Show LOC on concluded rankings#251
Merged
Merged
Conversation
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
line_countafter the main ranking query using Python decoding that supports both text and bytea code storage.Root Cause
leaderboard.code_files.codeasBYTEA.regexp_replace(cf.code, ...)in SQL, which works on the seedTEXTschema but fails on production-styleBYTEAwithfunction regexp_replace(bytea, unknown, unknown) does not exist.Validation
kernelboard_loc_testfromtests/data.sqland verified/api/leaderboard/339and/api/leaderboard/340return 200 with LOC.kernelboard_loc_bytea_testfromtests/data.sql, applied the kernelbot bytea migration shape toleaderboard.code_files.code, reproduced the old 500, then verified the patched API returns 200 with LOC.127.0.0.1:5055against the bytea DB and curled/api/leaderboard/339: 200,loc_count=12, sample[56, 56, 56, 56, 56]..venv/bin/ruff check kernelboard/api/leaderboard.py kernelboard/api/submission.py tests/api/test_leaderboard_api.py tests/api/test_submission_api.pynpm run lintnpm run buildgit diff --checkNotes