Skip to content

Keep identifiers like handleInvalidInput in filter_leaf_nodes - #102

Open
StefanZoerner wants to merge 1 commit into
FSoft-AI4Code:mainfrom
StefanZoerner:fix/leaf-node-identifier-filter
Open

Keep identifiers like handleInvalidInput in filter_leaf_nodes#102
StefanZoerner wants to merge 1 commit into
FSoft-AI4Code:mainfrom
StefanZoerner:fix/leaf-node-identifier-filter

Conversation

@StefanZoerner

@StefanZoerner StefanZoerner commented Sep 5, 2026

Copy link
Copy Markdown

filter_leaf_nodes rejects any candidate containing error, exception, failed or invalid as a substring, case-insensitively. The intent is to catch error strings that reach leaf-node selection instead of an identifier, but the check also silently discards ordinary names — handleInvalidInput, gameFailedCheck, ErrorLog.

This matches on word boundaries instead, and only for candidates that are not known components: a string that resolves to a component cannot be an error message.

Adds tests/test_leaf_selection.py; the function was previously uncovered. The test for identifier survival fails on main and passes with this change.

This is a part of #101, which I closed after the discussion there.

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