Skip to content

Conversation

@sentientsergio
Copy link
Collaborator

Adds two identically named cpp files (foo/alpha.cpp and bar/alpha.cpp) to repro Claude Code action review bug where one file is missed or comments apply to removed code.

@sentientsergio
Copy link
Collaborator Author

@claude review the pull request; highlight any issues, especially coverage of both alpha.cpp files.

@claude
Copy link

claude bot commented Dec 9, 2025

Claude finished @sentientsergio's task in 45s —— View job


PR Review

Todo List

  • Read both alpha.cpp files (bar/alpha.cpp and foo/alpha.cpp)
  • Analyze the PR changes with git diff
  • Review both files for code quality and standards
  • Post comprehensive review feedback

Review Findings

Both files successfully reviewed - bar/alpha.cpp and foo/alpha.cpp

File 1: bar/alpha.cpp

Lines reviewed: 1-2

// alpha.cpp in bar
int bar_value() { return 2; }

Issues identified:

  1. Missing header guards - C++ source files in a library context should typically have corresponding headers
  2. Missing documentation - Per CLAUDE.md, functions should have Javadoc-style comments
  3. Code style violation - Braces should be on their own line for functions (CLAUDE.md requirement)
  4. Missing namespace - No namespace encapsulation; global scope pollution risk

Expected format per CLAUDE.md:

/** Return the bar value.
    
    @return The integer value 2.
*/
int bar_value()
{
    return 2;
}

File 2: foo/alpha.cpp

Lines reviewed: 1-2

// alpha.cpp in foo
int foo_value() { return 1; }

Issues identified:

  1. Missing header guards - C++ source files in a library context should typically have corresponding headers
  2. Missing documentation - Per CLAUDE.md, functions should have Javadoc-style comments
  3. Code style violation - Braces should be on their own line for functions (CLAUDE.md requirement)
  4. Missing namespace - No namespace encapsulation; global scope pollution risk

Expected format per CLAUDE.md:

/** Return the foo value.
    
    @return The integer value 1.
*/
int foo_value()
{
    return 1;
}

Summary

Both bar/alpha.cpp and foo/alpha.cpp were successfully reviewed. The files are structurally identical (aside from their content), and both violate the same coding standards defined in CLAUDE.md:

  • Brace placement: Functions should have opening braces on their own line
  • Documentation: Missing Javadoc-style comments
  • Namespace usage: Functions are in global scope

Since this PR is explicitly labeled as a reproduction case for testing Claude's ability to handle identically-named files in different directories, I can confirm: Both files were properly identified and reviewed. No coverage gaps detected.


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.

2 participants