Repository navigation
Fix code-health matching for namespace moves and metatype macros - #235
Merged
Merged
Conversation
This was referenced Nov 6, 2026
dayfine
marked this pull request as ready for review
November 6, 2026 08:52
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.
Base:
agents. Tooling-only prerequisite for the namespace cleanup in fork PR #234 (also consumed by #233); no code branch is merged into this branch.Nesting Main.cpp's existing file-local helpers in
PokemonAutomationchanges the qualified name of its legacyrun_program()function. Code health then treats that function as new debt. Its namespace-comment lexer also loses the namespace name when it followsQ_DECLARE_METATYPE(...)without a semicolon.Match a moved function's previous metric ceilings only when its declaration text is unchanged, the file is unchanged, exactly one old/current function matches, and the old qualified symbol disappeared. Existing metric limits and growth checks remain unchanged; retained copies, ambiguity and cross-file moves get no fallback. Recognize the trailing namespace declaration after a metatype macro when checking its closing comment.
Validation: reproduced both false positives with failing tests before the fix. The complete suite now runs 116 tests successfully (one platform-dependent skip), including negative coverage for copies, ambiguous matches, cross-file moves and metric growth. Updated code health reports zero failures for #234 against main and #233 against lab/main. The C++ pre-push checks used the documented PA_AGENTS_DIR override to test this linter revision; canonical Code Health CI still depends on this PR merging into agents.
Review
metrics.py/policy.pywith their regression cases, then the small namespace-name fix instyle.pyand its contract test. This changes no application code or controller behavior.