feat: add edge test cases for CostEvaluator and LatencyEvaluator#54
Merged
hidai25 merged 1 commit intohidai25:mainfrom Mar 2, 2026
Merged
Conversation
4 tasks
Owner
|
Hey @illbeurs , thanks for the contribution! Good catch on the edge cases — merging this |
muhammadrashid4587
pushed a commit
to muhammadrashid4587/eval-view
that referenced
this pull request
Mar 11, 2026
## Summary - Refactor `git.py` from closure-based callback to stateful `GitWriteStrategy` class - Commits per-write, defers push to background `threading.Timer` (default 30s idle) - Startup recovery: pushes any unpushed local commits on first invocation - `flush()`/`close()` for explicit push control; `Collection.close()` wires through - New env var: `MARKDOWN_VAULT_MCP_GIT_PUSH_DELAY_S` (default 30, 0 = push on shutdown only) - Legacy `git_write_strategy()` preserved as thin wrapper Closes hidai25#54 ## Design Conformance | # | Requirement | Source | Status | Evidence | |---|---|---|---|---| | 1 | `GitWriteStrategy` class replacing closure | Issue hidai25#54 | CONFORMANT | `git.py:52-224` | | 2 | Per-write: `git add + git commit` (no push) | Issue hidai25#54 | CONFORMANT | `_stage_and_commit()` | | 3 | Deferred push via `threading.Timer` | Issue hidai25#54 | CONFORMANT | `_schedule_push()` | | 4 | `flush()` method | Issue hidai25#54 | CONFORMANT | `git.py:208-220` | | 5 | `close()` method | Issue hidai25#54 | CONFORMANT | `git.py:222-225` | | 6 | Startup recovery | Issue hidai25#54 | CONFORMANT | `_push_if_unpushed()` | | 7 | `GIT_PUSH_DELAY_S` env var | Issue hidai25#54 | CONFORMANT | `config.py` + design doc table | | 8 | `collection.close()` dispatches to strategy | Issue hidai25#54 | CONFORMANT | duck-typed `hasattr` | | 9 | Legacy wrapper preserved | Issue hidai25#54 | CONFORMANT | Honest docstring, returns `GitWriteStrategy` | | 10 | Design doc updated | Design doc | CONFORMANT | Three strategies + env var table | Reviewed by @architect-reviewer — all requirements CONFORMANT after fixup commit. ## Test plan - [ ] 235 tests pass locally (15 new git tests) - [ ] Deferred push fires after idle delay - [ ] `flush()`/`close()` push immediately - [ ] Startup recovery pushes unpushed commits - [ ] Token not in command args (GIT_ASKPASS preserved) - [ ] `Collection.close()` calls strategy `close()` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
No description provided.