Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ dependencies = [
# imports win32security/win32file/etc. directly — declare pywin32 rather than
# relying on the concurrent-log-handler → portalocker transitive chain.
"pywin32>=306,<312; sys_platform == 'win32'",
# Host-projected plugins use cross-process locks on every platform. Keep
# portalocker direct: its existing lockfile entries are otherwise reachable
# only through platform/optional transitive dependencies, so a fresh lean
# Linux install can load the plugin but fail closed on its first lock.
"portalocker>=2.8.0,<4",
Comment on lines +118 to +122

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 Badge Keep plugin-only locking out of base dependencies

On Linux and macOS installations without the opt-in host-projected plugin, a repo-wide search of this commit shows no in-tree runtime use of portalocker (the POSIX MCP lock uses fcntl), yet this unconditional base dependency installs it for every user and makes the core update verifier treat it as mandatory. Declare it in the plugin package or its gated installation path instead of expanding Hermes core to compensate for a plugin's undeclared runtime dependency.

AGENTS.md reference: AGENTS.md:L122-L125

Useful? React with 👍 / 👎.

# Image resize recovery for the vision tools. Pillow shrinks oversized images
# (>5 MB or >8000px) at embed time; without it the byte AND pixel-dimension
# shrink paths no-op, so an oversized image bakes into immutable history and
Expand Down
16 changes: 16 additions & 0 deletions tests/test_packaging_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ def test_packaging_declared_as_core_dependency():
)


def test_portalocker_declared_as_core_dependency():
"""Host-projected plugins must not depend on incidental lock packages.

``portalocker`` was present in ``uv.lock`` only through Windows and optional
dependency chains. A fresh lean Linux sync therefore omitted it, allowing
lock-using plugins to load before failing closed on their first operation.
"""
data = tomllib.loads((REPO_ROOT / "pyproject.toml").read_text(encoding="utf-8"))
core = data["project"]["dependencies"]
names = {_distribution_name(dep) for dep in core}
assert "portalocker" in names, (
Comment on lines +56 to +59

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 Badge Replace the literal dependency guard with a lock-path test

When the workspace-lock implementation or providing package changes while preserving behavior, this test still fails solely because the literal portalocker name disappeared from pyproject.toml; conversely, it passes without proving that a lean installation can import and exercise the projected-plugin lock path. Replace it with an installation/runtime test that acquires the actual workspace lock so the regression guard follows the behavior rather than the current dependency choice.

AGENTS.md reference: AGENTS.md:L1373-L1380

Useful? React with 👍 / 👎.

"portalocker is required by host-projected runtime plugins and must be "
"a declared core dependency, not an optional or platform-only transitive"
)


def test_faster_whisper_is_not_a_base_dependency():
data = tomllib.loads((REPO_ROOT / "pyproject.toml").read_text(encoding="utf-8"))
deps = data["project"]["dependencies"]
Expand Down
2 changes: 2 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading