fix: stale HookRef in TaskProcessor, and cmf vs. bare compatibility - #113
Open
tedhabeck wants to merge 23 commits into
Open
fix: stale HookRef in TaskProcessor, and cmf vs. bare compatibility#113tedhabeck wants to merge 23 commits into
tedhabeck wants to merge 23 commits into
Conversation
Signed-off-by: habeck <habeck@us.ibm.com>
…s declared with a Python class path (e.g. pkg.module.ClassName) instead of a standard kind — by auto-converting them to isolated_venv plugins that install their package into the venv without requiring a requirements.txt. Work items are tagged U2/U4/U5/U6/R3 in the code comments. Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
tedhabeck
marked this pull request as ready for review
July 21, 2026 01:52
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
…rong Pydantic membership tests, and added oversized-line truncation handling with prefix-length logging, refactored into a tested read_task_line helper Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
3 tasks
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
araujof
requested changes
Aug 7, 2026
araujof
left a comment
Contributor
There was a problem hiding this comment.
Nice work! The FQN conversion looks good. The PR also include several fixes to prior issues.
Minor Findings
- Cache metadata is written before the package install. Order is persist manifest →
initialize()(create venv →_save_cache_metadata) → catalog's_install_package_into_venv. Pre-PR, metadata was written only afterinstall_requirementssucceeded. Converted plugins have norequirements.txt, so that catalog-side pip install is the only thing making the venv usable — if it fails, the install errors but the cache reads valid, and at runtimeinitialize()skips everything and the worker can't import the class. Only an explicit reinstall heals it. Save metadata after the package install. - Changes in
worker.py(commits39a1f59,b6f9f7c,919800f) add credential reconstruction, log/stdout/stderr/result scrubbing,Extensionsreconstruction, and acapabilitieshandshake. None of it is in the PR description or CHANGELOG. It mutates process-global state (setLogRecordFactory,redirect_stdout/stderr) and is security-sensitive. Please document it in the PR and CHANGELOG.
Non-critical Findings
--no-convertsilently no-ops for monorepo installs:_normalize_manifest_contentconverts unconditionally at catalog update, and the command refreshes the catalog before dispatch. Documented in the help text, but an accepted-and-ignored flag should warn at the call site._extract_credential_tokenaccepts any non-empty token, so a 1–2 char token makes_result_contains_token's substring check fire spuriously and fail the task closed, and_scrub_tokenmangles every header; length guard it.- Credential present with payload absent is dropped silently — inconsistent with how loudly the rest of that path fails closed.
uv.lockbumpsmcp1.27.0 → 1.29.0 with nopyproject.tomlchange and no CHANGELOG entry. Two branch commits suggest a constraint edit that was reverted while the lock bump stayed. Legal undermcp>=1.26.0,<2, just unexplained.- CHANGELOG missing a blank line before
## [0.1.3].
Also, need to rebase from 0.1.x, and retarget this PR to 0.1.4.
- Commit venv cache metadata only after the catalog-side package install succeeds. Converted bare-FQN plugins have no requirements.txt, so a failed package install previously left the cache reading valid while the venv was unusable, and only an explicit reinstall healed it. - Guard credential-token substring use behind MIN_SCRUBBABLE_TOKEN_LENGTH (12) at the three consumers rather than at extraction, so a short token no longer fires _result_contains_token spuriously or mangles headers, while still being delivered to the plugin. _scrub_token now no-ops on an empty needle. - Log a warning when a credential-bearing hook arrives with a credential but no payload, instead of dropping the credential silently. - Warn when --no-convert is ignored on monorepo installs, naming the install types that honor it. - Document the worker.py credential reconstruction, leak scrubbing, Extensions support, and capabilities handshake in the CHANGELOG, and note the uv.lock mcp 1.27.0 -> 1.29.0 resolution. - Fix CHANGELOG blank lines around the 0.1.3/0.1.4 headings and add the 0.1.4 compare link. - Bump version to 0.1.4. Signed-off-by: habeck <habeck@us.ibm.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.
Summary
On 0.1.x, declaring a plugin's manifest kind as a Python class path (e.g. package.module.ClassName) was how in-process Python plugins were declared. This PR makes such bare-FQN plugins run out-of-process by default: at install time the FQN kind is auto-converted to isolated_venv, so the plugin executes in a per-plugin virtual environment instead of in-process. The conversion requires no requirements.txt — the plugin's package is installed directly into the venv from its source.
What changed
Bare-FQN auto-conversion (default on)
--no-convert escape hatch
New framework surface
Fixes bundled in
Because conversion is on by default, upgrading moves existing FQN-declared Python plugins from the in-process model to the out-of-process isolated_venv model. Install with --no-convert to keep the in-process behavior.### Checks
make lintpassesmake testpassesCHANGELOGupdated