You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[foundation] activator skips reinstall when a module's source changes, so a repointed module keeps running the old editable checkout #398
amplifier_foundation/modules/activator.py skips the editable install of a module whenever a distribution with the same name is already installed in the tool venv (Package '<name>' already installed from wheels, skipping editable install from <path>). The check keys only on the distribution name. It does not compare the requested module path with where the installed distribution actually lives. So after a module's source is repointed (a sources.modules.<id> override in settings, a bundle behavior's source: line, or a removed pin), the old editable checkout keeps running on every host that installed the module before the change. Nothing in a run's output says so.
Repro
amplifier with a bundle whose hooks-routing source is fork A. Run once. The venv now has _editable_impl_amplifier_module_hooks_routing.pth -> ~/.amplifier/cache/<fork-A>/modules/hooks-routing.
Change the source to upstream B (settings sources.modules.hooks-routing, or the bundle file). Run again.
uv pip list --python ~/.local/share/uv/tools/amplifier/bin/python | grep hooks-routing still shows the fork-A path. Log: Package 'amplifier-module-hooks-routing' already installed from wheels, skipping editable install from ~/.amplifier/cache/<upstream-B>/modules/hooks-routing.
uv pip uninstall --python <venv python> amplifier-module-hooks-routing, run again. Now the .pth points at upstream B.
Versions: amplifier 2026.09.08-dfa56a7, amplifier-core 1.6.1, amplifier-foundation 1.0.0 (activator.py around lines 596-612, the _distribution_installed(pkg_name) guard; the same guard exists at ~397 in activate_bundle_package).
What it cost us
One Mac ran a fork of hooks-routing from June for three months after the fork override was superseded. That fork predates the model_role_resolver capability, so every recipe step with model_role: and every delegate(model_role=...) logged "no model_role_resolver capability is registered" and fell back to the default provider. The bundle and settings both said upstream. The same happened to tool-recipes after a fork pin was removed; the recipes engine's own provenance guard (engine_provenance.py, "editable install ... points at X but this engine was imported from Y") is what finally made it visible.
Suggestion
Keep the name-based skip for packages that came from PyPI wheels (that is the #326 case). For editable installs, compare the installed distribution's direct_url.json / .pth target with the module path being activated and reinstall when they differ. At minimum, log at WARNING when the requested path and the installed editable location disagree, so a repointed source is not silent.
A second shape of the same skip, seen on three Macs this week: the module's cache directory is deleted, not repointed, and the venv keeps the old editable install.
When a module's source URL or content changes, the cache path rotates to a new hash (~/.amplifier/cache/amplifier-module-provider-openai-<newhash>) and the old directory goes away. The .pth written by the earlier uv pip install -e still names the old directory. The next run resolves the module, sees the distribution is installed, and skips the install. Import then fails, and every headless run logs
Module 'provider-openai' not found in prepared bundle.
and continues without the provider. Nothing else says anything. On one machine provider-openai, provider-gemini and provider-github-copilot were all in this state.
Fix, per stale distribution: uv pip uninstall --python ~/.local/share/uv/tools/amplifier/bin/python <dist>, then run amplifier once. With nothing installed under that name the activator installs from the live cache directory. Rewriting the .pth by hand is not equivalent: it leaves direct_url.json pointing at the old directory.
The same check before skipping would cover both shapes: if the installed distribution's direct_url.json root is not the module path just resolved, or does not exist, reinstall instead of skipping.
Activity
Joi commentedon Sep 10, 2026
A second shape of the same skip, seen on three Macs this week: the module's cache directory is deleted, not repointed, and the venv keeps the old editable install.
When a module's source URL or content changes, the cache path rotates to a new hash (
~/.amplifier/cache/amplifier-module-provider-openai-<newhash>) and the old directory goes away. The.pthwritten by the earlieruv pip install -estill names the old directory. The next run resolves the module, sees the distribution is installed, and skips the install. Import then fails, and every headless run logsand continues without the provider. Nothing else says anything. On one machine provider-openai, provider-gemini and provider-github-copilot were all in this state.
Diagnostic:
Fix, per stale distribution:
uv pip uninstall --python ~/.local/share/uv/tools/amplifier/bin/python <dist>, then run amplifier once. With nothing installed under that name the activator installs from the live cache directory. Rewriting the.pthby hand is not equivalent: it leavesdirect_url.jsonpointing at the old directory.The same check before skipping would cover both shapes: if the installed distribution's
direct_url.jsonroot is not the module path just resolved, or does not exist, reinstall instead of skipping.