fix(bench): add timeout and remove redundant stdio option#199
fix(bench): add timeout and remove redundant stdio option#199carlos-alm merged 12 commits intomainfrom
Conversation
The branch-compare command was registered in cli.js and its exports
added to index.js, but the implementation file src/branch-compare.js
was never created. This caused two issues:
1. `codegraph branch-compare` crashed with ERR_MODULE_NOT_FOUND
2. `import('@optave/codegraph')` crashed entirely because index.js
has a top-level re-export from the missing file, making the
programmatic API completely unusable
Remove the dead references until an implementation exists.
Closes #166
The branch-compare command was registered in cli.js and index.js but src/branch-compare.js was never committed — it was lost as untracked files in the fix/complexity-sql-sanitize worktree. Recovered the full implementation (568 lines) and integration test (192 lines, 7 tests) from git object 22c8185. This restores the cli.js command and index.js exports that were removed in 746aa65, now that the implementation file exists. Updated the dogfood report to reflect the recovery (no bugs found, rating 8.5/10). Closes #166 Impact: 13 functions changed, 4 affected
Dev builds always produced 2.4.1-dev.<sha> because PATCH was hardcoded to +1 from package.json. Now uses git rev-list to count commits since the release tag, giving monotonically increasing versions like 2.4.5, 2.4.15, etc. Benchmark scripts now use getBenchmarkVersion() (via git describe) to detect dev vs release state, preventing dev runs from overwriting release benchmark data in historical reports. Impact: 2 functions changed, 6 affected
The bench-config.js local mode returned 'dev' as the version string. Now uses getBenchmarkVersion() to derive a proper semver from git state, so all 4 benchmark scripts that use bench-config get dev-aware versions. Impact: 1 functions changed, 4 affected
Both now use git describe --tags --match "v*" to find the nearest
release tag and count commits from it. Previously publish.yml
constructed the tag from package.json (v${CURRENT}) while
bench-version.js used git describe, which would diverge if
package.json was bumped but not yet tagged.
Impact: 1 functions changed, 0 affected
When no git tags exist, bench-version.js now produces PATCH+1 (e.g. "2.5.1-dev") matching publish.yml's fallback, instead of the bare "2.5.0-dev" which diverged. Impact: 1 functions changed, 0 affected
Refactor getBenchmarkVersion to use --abbrev=0 + git rev-list (same as publish.yml) instead of parsing full git describe output. Both now use identical steps: find tag, count commits, get short SHA. Impact: 1 functions changed, 0 affected
Impact: 1 functions changed, 0 affected
…om/optave/codegraph into fix/benchmark-all-reports # Conflicts: # .github/workflows/publish.yml Impact: 3 functions changed, 7 affected
Merges PR #173 (commit-count versioning for dev builds) and fixes a bug where embedding, query, and incremental benchmark reports were never persisted. The "Check for changes" step used `git diff` which only detects modifications to tracked files — newly created report files (untracked) were invisible, so the PR was never created. Now also checks for untracked files via `git ls-files --others`.
Add 10s timeout to GIT_OPTS to prevent execFileSync from hanging on git operations. Remove redundant stdio config (already the default).
|
Claude finished @carlos-alm's task —— View job Reviewing PR: fix(bench): add timeout and remove redundant stdio optionTodo List
Phase 1: Root Cause Analysis ✅Problem Being Solved: Why This Approach:
Phase 2: Configuration Change Detection ✅Assessment: ✅ NO HIGH-RISK CHANGES
Phase 3: Test Integrity Review ✅Assessment: ✅ NO TEST INTEGRITY CONCERNS
Phase 4: Code Quality Assessment ✅Strengths:
Technical Correctness:
Final AssessmentRoot Cause AnalysisProblem Being Solved: Preventing indefinite hangs in benchmark scripts when git operations become unresponsive Critical ConcernsNone identified. This is a straightforward defensive fix that follows established patterns in the codebase. Final Recommendation
|
Greptile SummaryAdded 10-second timeout to git operations in
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: e5a75f4 |
Impact: 17 functions changed, 14 affected
|
Claude finished @carlos-alm's task —— View job Reviewing PR: fix(bench): add timeout and remove redundant stdio optionTodo List
Phase 1: Root Cause Analysis ✅Problem Being Solved: Why This Approach:
Phase 2: Configuration Change Detection ✅Assessment: ✅ NO HIGH-RISK CHANGES
Phase 3: Test Integrity Review ✅Assessment: ✅ NO TEST INTEGRITY CONCERNS
Phase 4: Code Quality Assessment ✅Strengths:
Technical Correctness:
Final AssessmentRoot Cause AnalysisProblem Being Solved: Preventing indefinite hangs in benchmark scripts when git operations become unresponsive Critical ConcernsNone identified. This is a straightforward defensive fix that follows established patterns in the codebase. Final Recommendation
|
Summary
GIT_OPTSinbench-version.jsto preventexecFileSyncfrom hanging indefinitely on git operationsstdio: ['pipe', 'pipe', 'pipe'](already the default forexecFileSync)Test plan