fix: preserve hand-written notes in query benchmark reports#551
Conversation
Add NOTES_START/NOTES_END block preservation to update-query-report.js, matching the existing pattern in update-benchmark-report.js. Without this, any hand-written footnotes in QUERY-BENCHMARKS.md get overwritten on the next benchmark run. Add note explaining that 3.3.0→3.3.1 fnDeps/fnImpact deltas are not comparable due to hub target change from auto-selected src/types.ts to pinned buildGraph (PR #528).
|
Claude finished @carlos-alm's task —— View job Root Cause AnalysisProblem Being Solved: The Why This Approach: Mirrors the existing pattern in Risk Assessment: Very low risk - this is a pure additive change that preserves existing functionality while adding note preservation capability. Backlog Compliance
Code Quality Assessment✅ Pattern ConsistencyThe implementation exactly matches the established pattern in
✅ Implementation Quality// lines 149-160 in update-query-report.js
let notes = '';
if (fs.existsSync(reportPath)) {
const existing = fs.readFileSync(reportPath, 'utf8');
const notesMatch = existing.match(/\n([\s\S]*?)/);
if (notesMatch) {
notes = notesMatch[1];
}
}
if (notes) {
md += `\n${notes}\n\n`;
}The code is:
✅ Footnote Content QualityThe added footnote is well-written and factually accurate:
Critical ConcernsNone identified. This is a straightforward, low-risk fix that follows established patterns. Final Recommendation
Minor Suggestions
|
Greptile SummaryThis PR adds two closely related improvements: notes preservation to
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Run update-query-report.js] --> B{reportPath exists?}
B -- Yes --> C[Read existing file]
B -- No --> E[notes = empty string]
C --> D{Match NOTES_START...NOTES_END?}
D -- Yes --> F[Capture notes content]
D -- No --> E
F --> G{notes non-empty?}
E --> G
G -- Yes --> H[Append NOTES_START block to md]
G -- No --> I[Skip notes block]
H --> J[Append QUERY_BENCHMARK_DATA block]
I --> J
J --> K[Write QUERY-BENCHMARKS.md]
Last reviewed commit: "fix: preserve hand-w..." |
Summary
<!-- NOTES_START -->/<!-- NOTES_END -->preservation toupdate-query-report.js, matching the existing pattern inupdate-benchmark-report.jssrc/types.tstobuildGraph)Context
PR #548 showed ↑157-192% regressions in fnDeps/fnImpact — but this is an artifact of the hub target changing, not an engine regression.
diffImpactactually improved 20-44% in the same release.Without the notes preservation fix, adding a footnote to the report would be overwritten on the next benchmark run.
Test plan
update-query-report.jspreserves notes between<!-- NOTES_START -->and<!-- NOTES_END -->QUERY-BENCHMARKS.md