Skip to content

fix(coverage): keep unknown evidence tag keys as strings - #1122

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/evidence-formatter-atom
Nov 14, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
claude/evidence-formatter-atom

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What

Hypatia.Coverage.EvidenceFormatter turned every string key of an @tag evidence: map into an atom with String.to_atom/1 (line 197). With this change it uses String.to_existing_atom/1 and keeps the string when no atom exists.

Why

Since #1107 merged, main has a high finding from Hypatia's own code_safety/elixir_atom_from_user rule. #1107's own baseline run was cancelled, so the gate never saw it. Now governance / Validate Hypatia Baseline is 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

  • New test: "an unknown string key in the tag does not create an atom". It fails on main (23 tests, 1 failure) and passes with the fix (23 tests, 0 failures).
  • The rule's pattern is ~r/String\.to_atom\(/, which does not match to_existing_atom.
  • mix format --check-formatted passes on both files. gen-rules-praxis.sh --check and check-readme-claims.sh also pass.

Not done

  • 28 other test/coverage tests fail in my local copy of the repo. They fail the same way on unchanged main, because the copy lacks some modules. CI runs the full suite.

Generated by Claude Code

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
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 3aad26a5-ba4a-4fbd-98ad-8152c54a7285
Commits

Reviewing files that changed from the base of the PR and between ff8e5f5 and fab7cdb.

Files selected for processing: 1

  • test/coverage/evidence_formatter_test.exs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 14, 2026 19:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T19:46:18.420806Z fab7cdb New commits
🔒 Security Review ✅ Completed 2026-11-14T19:46:35.606984Z fab7cdb New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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>
@hyperpolymath
hyperpolymath merged commit f294d4b into main Nov 14, 2026
67 of 72 checks passed
@hyperpolymath
hyperpolymath deleted the claude/evidence-formatter-atom branch November 14, 2026 19:44
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants