Repository navigation
fix(coverage): keep unknown evidence tag keys as strings - #1122
Conversation
EvidenceFormatter turned every string key of an `@tag evidence:` map into an atom with String.to_atom/1. Hypatia's own code_safety rule flags this (elixir_atom_from_user, high), and since #1107 merged it has turned the "Validate Hypatia Baseline" gate red on every open PR. Keys the formatter reads already exist as atoms, so String.to_existing_atom/1 keeps them; any other key stays a string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZkGCWGEyedTtdEHAPT
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 23 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
|



What
Hypatia.Coverage.EvidenceFormatterturned every string key of an@tag evidence:map into an atom withString.to_atom/1(line 197). With this change it usesString.to_existing_atom/1and keeps the string when no atom exists.Why
Since #1107 merged,
mainhas a high finding from Hypatia's owncode_safety/elixir_atom_from_userrule. #1107's own baseline run was cancelled, so the gate never saw it. Nowgovernance / Validate Hypatia Baselineis red on every open PR, for example #1109: job "1 unfiltered finding(s) at or above 'info'", which is this line.Behaviour is unchanged for the keys the formatter reads. They are atom literals in the module, so they already exist.
Evidence
main(23 tests, 1 failure) and passes with the fix (23 tests, 0 failures).~r/String\.to_atom\(/, which does not matchto_existing_atom.mix format --check-formattedpasses on both files.gen-rules-praxis.sh --checkandcheck-readme-claims.shalso pass.Not done
test/coveragetests fail in my local copy of the repo. They fail the same way on unchangedmain, because the copy lacks some modules. CI runs the full suite.Generated by Claude Code