Unify benchmarkVersion with package.json version field #24
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.
This PR consolidates version management by replacing hardcoded
benchmarkVersion
values with dynamic reading from thepackage.json
version field, addressing the issue of having two sources of version information that could lead to inconsistencies.Problem
The codebase had hardcoded
benchmarkVersion: "1.0.0"
values scattered across multiple files:This created maintenance issues:
package.json
Solution
Added version field to package.json:
Created dynamic version utility:
Replaced all hardcoded values:
BenchmarkReporter.generateBasicJSONData()
now reads version dynamicallyBenchmarkReporter.saveResult()
now reads version dynamicallyLeaderboardGenerator.generateLeaderboardData()
now reads version dynamicallyBenefits
✅ Single source of truth - Version managed only in
package.json
✅ Automatic consistency - All benchmark outputs use the same version
✅ Simplified maintenance - Version updates happen in one place
✅ Backward compatibility - Existing data structures unchanged
✅ Robust fallback - Graceful handling if
package.json
unavailableThe implementation includes multiple path resolution strategies and error handling to ensure reliability across different execution contexts.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.