fix: benchmark script regex + workflow branch naming#124
Conversation
The performance section regex in update-benchmark-report.js was matching from ## Performance all the way to the next ## heading, swallowing any ### subsections (like Lightweight Footprint) in between. Changed the lookahead to also stop at h3 headings and restored the deleted section.
The benchmark workflow created branches with benchmark/ prefix which doesn't match the required branch naming convention (feat/, fix/, docs/, etc.). Changed all four jobs to use docs/benchmark-* instead.
|
Claude finished @carlos-alm's task —— View job PR Review: Benchmark Script Regex + Workflow Branch NamingTodo List:
Root Cause AnalysisProblem Being Solved: Two distinct bugs flagged by Greptile on #122:
Why This Approach: Both fixes are precise and surgical:
Risk Assessment: LOW RISK - Both are targeted fixes addressing specific reported bugs. Critical ConcernsNone identified. This is a clean bug fix addressing legitimate issues. Technical AnalysisRegex Fix ✅ EXCELLENTBefore:
After:
The fix is technically correct and precisely targets the root cause. Workflow Changes ✅ CORRECTAll four jobs consistently changed
Branch naming now aligns with repository conventions. File Updates ✅ APPROPRIATE
The README and BUILD-BENCHMARKS changes appear to be from normal benchmark runs, not manual edits. Code Quality Assessment✅ Strengths
✅ Verification
Final RecommendationThis PR demonstrates best practices: surgical changes, clear problem identification, and systematic consistency across related files. |
Greptile SummaryThis PR fixes two issues in the benchmark automation: a regex bug that was deleting the "Lightweight Footprint" subsection from README, and incorrect branch naming that didn't follow the repository's
Both fixes address root causes flagged in #122. The regex fix prevents the bug that was manually patched in commit 744f95a from recurring. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 7f102f6 |
Summary
Fixes two issues flagged by Greptile on #122:
scripts/update-benchmark-report.js: The performance section regex matched from## Performanceall the way to the next##heading, swallowing### Lightweight Footprintsubsection. Changed lookahead from(?=\r?\n## (?!#)|$)to(?=\r?\n#{2,3} |$)so it stops at h3 headings too. Restored the deleted subsection in README.benchmark/prefix which doesn't match the required convention. Changed todocs/benchmark-*.Supersedes #122.
Test plan
### Lightweight Footprintsubsection##heading