refactor(feishu): drop dead ensure_deps_fn path, fold lazy-install into check_fn - #81522
refactor(feishu): drop dead ensure_deps_fn path, fold lazy-install into check_fn#81522GodJones wants to merge 1 commit into
Conversation
…to check_fn ensure_deps_fn is no longer referenced anywhere in the codebase (grep across the tree returns zero call sites), so the feishu_deps_present() passive probe + the separate ensure_deps_fn registration is dead config. check_feishu_requirements() is the only live availability function; fold it directly into check_fn so the registry entry has a single source of truth instead of two functions that must stay in sync.
Related: #80305 separated the passive check_fn from the active lazy installer to avoid status/config checks causing SDK installation. This diff reassigns the active check_feishu_requirements() function to check_fn, so it needs behavior review rather than being treated as a no-op refactor. |
|
Closing per the triage note — thanks @alt-glitch. #80305 deliberately separated the passive |
What
Removes the
feishu_deps_present()passive probe and theensure_deps_fn=registration inplugins/platforms/feishu/adapter.py::register(), folding the only live availability function (check_feishu_requirements) directly intocheck_fn.Why it's safe (no behavior change in practice)
ensure_deps_fnis not referenced anywhere in the codebase. A tree-wide grep returns zero call sites — the field is dead config left over from whencreate_adapter()consumed it:So the prior registration:
already had its install path disabled. The only function that can actually run is
check_feishu_requirements, which is now the singlecheck_fn.The effective runtime behavior is identical:
FEISHU_AVAILABLEis true, both returnTrueimmediately — no SDK import, no install.check_feishu_requirementscallsensure("platform.feishu"), which was already the only reachable path (thefeishu_deps_presentbranch could not install and the deadensure_deps_fnnever ran).Motive
Two functions that must stay in sync to represent one concept (feishu availability) is a maintenance trap. Collapsing to one
check_fnremoves the dead field and the misleading "passive probe + active installer" split that no longer matches how the registry consumes it.Risk note for reviewers
This touches the same
register()entry the root_id fix PR (#81496) touched, but is otherwise unrelated and intentionally kept as a separate PR so each change traces to one clear request. No message-threading / root_id logic is modified here.Refs: #79812 (original ensure_deps_fn wiring)