Repository navigation
fix(pr-management): use ERE residue groups and precheck empty matches - #36
Draft
MakerFlyFly wants to merge 2 commits into
Draft
MakerFlyFly wants to merge 2 commits into
MakerFlyFly wants to merge 2 commits into
Conversation
The residue command selects git grep -E but wraps variants in non-capturing groups that the tested Git ERE engines reject. Use ordinary groups so the emitted command can search the stack head. Exercise the CLI JSON and real Git argv for matches, no matches, grouping, case folding, quoting and exclusions, and regenerate the packaged source. Generated-by: Codex (GPT-6)
Reuse each variant's Python compilation to reject common empty-matching patterns before the CLI emits a command. This is a limited precheck, not a full validator for Git's POSIX ERE dialect. Document ERE spelling, leading-hyphen arguments and the remaining dialect and backreference limits. Cover rejection without JSON output and real Git matching for a leading dash, digit classes and an escaped pipe. Generated-by: Codex (GPT-6)
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.
Upstream submission: apache/magpie issue #2008 and PR #2009. This fork item is retained as an audit record; the contributor has completed human review.
Summary
stack-review residue-commandwith ordinary ERE groups sogit grep -Ecan search the saved stack ref. Preserve the grouping that also keeps leading-hyphen tokens from being parsed as Git options.[0-9],--variant=-x, and the remaining dialect and backreference limitations.Type of change
Test plan
tests/stack_review/test_findings.pypass.0979b20c; Magpie pre-first-PR checks report all five categories passing,ready, zero blocking and advisory items.RFC-AI-0004 compliance
This repair adds no network access, privileged operations or configuration. Tests use synthetic data and isolate temporary repositories from contributor Git configuration. The guidance makes the supported spelling and the precheck's limitations explicit.
Linked issues
Refs #35
Review decisions and limits
--variant=-xcoverage, and reject patterns that the existing Python check recognises as matching the empty string. Compilation happens once per variant; rejection precedes command JSON output.py310|has an empty alternative;py310\|matches a literal pipe. They have distinct regression coverage. Capturing groups preserve matching only when no numbered backreference relies on the original group numbering.[[:digit:]]*can pass the Python precheck despite matching empty strings in Git;\dand numeric backreferences remain problematic. The implementation and guidance explicitly disclose these limits.This remains a fork-only Draft PR against
audit/m-072-baseat upstream17abc4c8c6137f466b60bf698dd2684618e32358. The final change spans four files. The reviewed change has been submitted upstream through the independent publication branch linked above.Generative AI disclosure
AI-generated with Codex (GPT-6), including code, tests, reproduction and drafting. Commits carry
Generated-by:trailers. The review feedback has been addressed as described above and the contributor has completed human review of the final changes.