feat: make repo mandatory, remove default source & ref#208
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
| @pytest.mark.parametrize( | ||
| "argv", | ||
| [ | ||
| ["semble", "/some/path", "--ref", "main"], |
There was a problem hiding this comment.
I left this as a parameterize, even though there's only a single option now , seemed sensible given that we want to expand this again.
Confidence Score: 5/5Safe to merge — the change is a clean removal of optional startup configuration and its downstream machinery, with no remaining dead code and fully updated tests. All removed code paths (start_watcher, _watch_loop, _watcher_task, default_source, SearchResult.to_dict) have no remaining callers in the repo. The mandatory repo enforcement is correctly propagated through _get_index, create_server, and the tool schemas. Tests were updated comprehensively to match the new signatures. The watchfiles package is removed from both pyproject.toml and uv.lock consistently. No files require special attention. Reviews (2): Last reviewed commit: "Merge branch 'main' into make-repo-manda..." | Re-trigger Greptile |
| chunk: Chunk | ||
| score: float | ||
|
|
||
| def to_dict(self) -> dict[str, Any]: |
There was a problem hiding this comment.
This was somehow a pre-existing piece of dead code. Strange!
|
@greptileai review |
| def evict(self, source: str) -> None: | ||
| self._tasks.pop(self._compute_cache_key(source), None) | ||
|
|
||
| async def start_watcher(self, path: str) -> None: |
There was a problem hiding this comment.
Maybe I'm missing something, but by removing this the MCP index never updates anymore I think?
This PR makes the
repoargument mandatory for the MCP. The MCP used to take apathandrefargument on startup, but since MCP startup is hardcoded (not controlled by the agent/harness), it was difficult to use this parameter. The consequence of this was that it was possible for agents to send queries without a "repo", as the schema allowed this. This then led to exceptions in the MCP server (i.e., the calls returned no data, just an error message).The one use case for adding a path, which is enterprise hosting of MCP servers, remains, but should be turned into another MCP server, which we'll add later.
Of note: no docs changes were needed, since this
pathoption was not even mentioned there.