fix(recon): resolve Classroom 50 roster columns in discover_repos - #32
Merged
Conversation
A Classroom 50 roster.csv and a legacy GitHub Classroom roster collide on the `github_id` column: C50 stores the immutable NUMERIC id there and puts the login in `username`, while legacy rosters store the LOGIN in `github_id`. Feeding a C50 roster to `lectern recon` therefore built repo names like `<prefix>-1548364` instead of `<prefix>-agiacalone`, dropped every row whose numeric id was unresolved, and left the student name blank (C50 splits the name across first_name/last_name). Identifier precedence is now github_username -> username -> github_id, so behavior is unchanged whenever `username` is absent and the explicit github_username override still outranks both. Student name falls back to first_name + last_name. Verified against the live c50-throwaway-tst0 roster: 11/11 rows resolve and agiacalone's repo name matches the real repo on GitHub. Full suite 411 passed / 1 skipped. The three C50 tests were confirmed RED against the unpatched module before landing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P2mBwr8n3r97t4g9AUV8j5
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.
Problem
A Classroom 50
roster.csvand a legacy GitHub Classroom roster collide on thegithub_idcolumn, and they mean different things by it:github_idbruce-wayne)1548364)usernamename/canonical_namefirst_name+last_nameBecause
discover_repos()readgithub_idbefore anything else, feeding it a C50 roster produced three failures at once — none of them loud:<prefix>-1548364instead of<prefix>-agiacaloneReproduced against the live
c50-throwaway-tst0roster: 1 of 11 rows resolved, and the one that did was named wrong.Fix
Identifier precedence is now
github_username→username→github_id, with afirst_name+last_namefallback for the student name.github_idstays last in the chain, so legacy behavior is unchanged wheneverusernameis absent, and the explicitgithub_usernameoverride still outranks both.Verification
agiacalone's repo name matches the real repo on GitHub exactlyNot in this PR
repo_prefixcarries two incompatible join conventions:recon_discoverandtriage_reportrequire a trailing-, whilefeedback_deliverbuildsf"{org}/{repo_prefix}-{gid}"and requires none. It isn't broken today — those load from separate manifest files with separate values — but the C50 migration is exactly when a prefix gets copied between them and yields...test--agiacalone. Left alone here to keep this fix clean and narrowly tested.