Remove plugin hooks feature flag (#22552)

# Why

This is a follow-up stacked on top of the `plugin_hooks` default-on
change. Once we are comfortable making plugin hooks part of the normal
plugin behavior, the separate feature flag stops buying us much and
leaves extra branching/cache state behind.

# What

- remove the `PluginHooks` feature and generated config-schema entries
- make plugin hook loading/listing follow plugin enablement directly
- drop plugin-manager cache/state that only existed to distinguish
hook-flag toggles
- remove tests and fixtures that modeled `plugin_hooks = true/false`
This commit is contained in:
Abhinav authored and GitHub committed 2026-05-21 19:15:18 +00:00
1 parent ac0bff27e7
commit 24faf49b2a
12 files changed
+58 -166

No files matched your search

+23 -6
View File
@@ -76,6 +76,13 @@ fn apply_patch_freeform_is_removed_and_disabled_by_default() {
);
}
#[test]
fn plugin_hooks_is_removed_and_disabled_by_default() {
assert_eq!(Feature::PluginHooks.stage(), Stage::Removed);
assert_eq!(Feature::PluginHooks.default_enabled(), false);
assert_eq!(feature_for_key("plugin_hooks"), Some(Feature::PluginHooks));
}
#[test]
fn code_mode_only_requires_code_mode() {
let mut features = Features::with_defaults();
@@ -194,12 +201,6 @@ fn tool_search_is_removed_and_disabled_by_default() {
assert_eq!(feature_for_key("tool_search"), Some(Feature::ToolSearch));
}
#[test]
fn plugin_hooks_are_stable_and_enabled_by_default() {
assert_eq!(Feature::PluginHooks.stage(), Stage::Stable);
assert_eq!(Feature::PluginHooks.default_enabled(), true);
}
#[test]
fn browser_controls_are_stable_and_enabled_by_default() {
assert_eq!(Feature::InAppBrowser.stage(), Stage::Stable);
@@ -499,6 +500,22 @@ fn from_sources_ignores_removed_apply_patch_freeform_feature_key() {
assert_eq!(features, Features::with_defaults());
}
#[test]
fn from_sources_ignores_removed_plugin_hooks_feature_key() {
let features_toml = FeaturesToml::from(BTreeMap::from([("plugin_hooks".to_string(), true)]));
let features = Features::from_sources(
FeatureConfigSource {
features: Some(&features_toml),
..Default::default()
},
FeatureConfigSource::default(),
FeatureOverrides::default(),
);
assert_eq!(features, Features::with_defaults());
}
#[test]
fn multi_agent_v2_feature_config_deserializes_boolean_toggle() {
let features: FeaturesToml = toml::from_str(