Skip to content

Conversation

@sbryngelson
Copy link
Member

@sbryngelson sbryngelson commented Feb 13, 2026

User description

Summary

  • parse_bib_authors() stored bib keys lowercased (e.g. allaire02), but Doxygen HTML preserves the original case in CITEREF_ anchors (e.g. Allaire02), so all author-prefix lookups in process_html() and check_bare_citations() failed silently
  • Removed the .lower() call so keys match naturally between the bib parser and Doxygen output

Test plan

  • Build docs with cmake -D MFC_DOCUMENTATION=ON and verify author prefixes appear before citation numbers
  • Run python3 docs/postprocess_citations.py --check <html_dir> and confirm no bare citations are reported

🤖 Generated with Claude Code


CodeAnt-AI Description

Preserve original BibTeX key case so citation author prefixes match generated docs

What Changed

  • The bibliography parser now keeps BibTeX keys in their original case instead of lowercasing them
  • Author-prefix lookups now match Doxygen's case-preserved citation anchors, restoring author name prefixes before citation numbers in generated HTML
  • The postprocess citation checker no longer reports false "bare citation" errors caused by case mismatch

Impact

✅ Citations show author prefixes in generated docs
✅ Fewer false positive citation errors during docs checks
✅ Consistent citation linking between .bib and Doxygen HTML

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Bug Fixes
    • Bibliography entry keys now preserve their original casing instead of being automatically converted to lowercase. If your workflows rely on lowercase key lookups, they may need to be updated accordingly.

Bib keys were lowercased during parsing but Doxygen HTML preserves
original case, causing all author-prefix lookups to fail silently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 13, 2026 04:20
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Feb 13, 2026

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@qodo-code-review
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Case Handling

Removing lowercasing will fix Doxygen CITEREF_ anchor matching when the .bib key case matches the generated HTML, but it may break lookups if citations appear with different casing across inputs. Consider validating/normalizing both sides consistently (e.g., use a case-insensitive mapping while preserving original keys) so mixed-case .bib keys or HTML anchors don’t reintroduce silent misses.

    first = authors[0].strip()
    surname = _extract_surname(first)

    # Also get second author surname for 2-author papers
    second_surname = None
    if count == 2:
        second_surname = _extract_surname(authors[1].strip())

    entries[key] = (surname, count, second_surname)

return entries

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

A function in the documentation processing module was updated to preserve the original case of bibliography entry keys in its returned dictionary, rather than converting them to lowercase. The docstring was updated accordingly to reflect this behavioral change.

Changes

Cohort / File(s) Summary
Bibliography Key Casing
docs/postprocess_citations.py
Modified dictionary key storage to preserve original case of bib-entry keys instead of lowercasing them. Updated docstring to remove note about lowercase conversion. Affects how callers index into the returned dictionary.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through citations fine,
Preserving cases, each one divine,
No more lowercase, the keys now bright,
Original forms dancing in the light! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description provides a clear summary of the issue and fix, but is missing required sections from the template. Add missing template sections: Type of change, Testing methodology, and the Checklist items (tests, documentation updates). Include issue number with 'Fixes #' format.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix case mismatch in citation key lookup' is clear, concise, and directly describes the main change—removing the .lower() call to preserve bibliography key casing.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into master

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@codeant-ai codeant-ai bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Feb 13, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the documentation citation post-processing script where bib keys were being lowercased during parsing but Doxygen HTML preserves the original case in citation anchors, causing all author-name lookups to fail silently.

Changes:

  • Removed .lower() call in parse_bib_authors() so dictionary keys match the case-sensitive format used by Doxygen anchors (e.g., Allaire02 instead of allaire02)

@codeant-ai
Copy link
Contributor

codeant-ai bot commented Feb 13, 2026

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Lookup Mismatch
    The parser now preserves the original case of BibTeX keys (no lowercasing). Ensure callers that match Doxygen CITEREF anchors will consistently find keys; consider fallbacks for keys that might be referenced in a different case. Also verify that Doxygen and .bib always use identical casing for keys (otherwise lookups will miss entries).

@codeant-ai
Copy link
Contributor

codeant-ai bot commented Feb 13, 2026

CodeAnt AI finished reviewing your PR.

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.03%. Comparing base (56bff68) to head (4e80772).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1141   +/-   ##
=======================================
  Coverage   44.03%   44.03%           
=======================================
  Files          70       70           
  Lines       20649    20649           
  Branches     2054     2054           
=======================================
  Hits         9093     9093           
  Misses      10368    10368           
  Partials     1188     1188           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

Review effort 1/5 size:XS This PR changes 0-9 lines, ignoring generated files

Development

Successfully merging this pull request may close these issues.

1 participant