Skip to content

chore: make functions public, remove callable paths#180

Merged
stephantul merged 1 commit into
mainfrom
remove-callable-private
Jun 4, 2026
Merged

chore: make functions public, remove callable paths#180
stephantul merged 1 commit into
mainfrom
remove-callable-private

Conversation

@stephantul
Copy link
Copy Markdown
Contributor

This PR makes some functions that were private public again (they were imported as private), and removes the union over Path and Pathresolver. Instead, we just resolve all paths. This simplifies the code.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/semble/installer/agents.py 100.00% <100.00%> (ø)
src/semble/installer/config.py 100.00% <100.00%> (ø)
src/semble/installer/installer.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 4, 2026

Confidence Score: 4/5

Safe to merge for the typical CLI workflow; the only noteworthy change is that opencode's config-format selection is now fixed at module import time rather than at install time.

The refactor is clean and the rename changes are purely mechanical. The one substantive shift — _opencode_mcp_path() being called eagerly — matters only when the module is imported before the opencode config directory exists and the installer is invoked later in the same process. In the standard CLI flow (fresh process per invocation) the pre-computed path and the previously-lazy path are identical, so no regression is expected there.

src/semble/installer/agents.py — the AGENTS list construction now bakes in the opencode and VS Code paths at import time; worth a second look if the module is ever imported in a long-running process or test harness without monkeypatching the paths.

Reviews (1): Last reviewed commit: "chore: make functions public, remove cal..." | Re-trigger Greptile

Comment on lines 173 to +199
@@ -201,7 +196,7 @@ def _vscode_mcp_path() -> Path:
display_name="VS Code",
binary="code",
config_dir=None,
mcp=McpConfig(_vscode_mcp_path, "servers", _STDIO_SERVER_CONFIG),
mcp=McpConfig(_vscode_mcp_path(), "servers", _STDIO_SERVER_CONFIG),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Eager path resolution freezes filesystem-dependent result at import time

_opencode_mcp_path() picks between opencode.jsonc, opencode.json, and a fallback based on which files exist on disk. Calling it eagerly here means the choice is locked in at module import time. Previously it was deferred to install time (via the PathResolver callable), so it would see the actual filesystem state when the user's action is performed. In a programmatic context where the module is imported before the opencode config directory exists, the path will always default to .jsonc even if the user later has an opencode.json — the same path is used for every subsequent call within that process.

Copy link
Copy Markdown
Member

@Pringled Pringled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it

@stephantul stephantul merged commit 1662a4b into main Jun 4, 2026
16 checks passed
@stephantul stephantul deleted the remove-callable-private branch June 4, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants