Repository navigation
Fix duplicate role key in committee roster JSON - #326
Merged
Merged
Conversation
The roster entries use a symbol :role key, but the chair role was set with a string 'role' key. This produced a hash with both keys, and newer versions of the json gem reject it with "detected duplicate key", which makes /roster/committee/<name>.json fail with HTTP 500. Assisted-by: Claude Code (claude-opus-5-5)
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
The committee roster JSON endpoint fails with HTTP 500 for committees with a chair. Example: https://whimsy.apache.org/roster/committee/pulsar.json
Cause
Roster entries store the role under the symbol key
:role, but the chair's role was set with the string key'role'. The chair's hash therefore has both:roleand"role". Older versions of thejsongem wrote"role"twice, while newer versions raise "detected duplicate key".Fix
Set the chair role with
:roleinCommittee(www/roster/models/committee.rb) andNonPMC(www/roster/models/nonpmc.rb), so that it replaces the existing value rather than adding a second key.