fix(plugins): address review feedback for Matrix recovery paths (#52899)

1. Narrow loadConfigForInstall() to catch only INVALID_CONFIG errors,
   letting real failures (fs permission, OOM) propagate.
2. Assert allow array is properly cleaned in stale-cleanup test.
3. Add comment clarifying version-resolution is already addressed via
   the shared VERSION constant.
4. Run cleanStaleMatrixPluginConfig() during install so
   persistPluginInstall() → writeConfigFile() does not fail validation
   on stale Matrix load paths.
This commit is contained in:
Catalin Lupuleti
2026-03-23 23:25:33 +02:00
committed by Peter Steinberger
parent 3ae100a8d7
commit 489797ceaf
3 changed files with 24 additions and 3 deletions

View File

@@ -170,6 +170,8 @@ describe("doctor matrix provider helpers", () => {
// Config should have stale refs removed
expect(result.config.plugins?.installs?.matrix).toBeUndefined();
expect(result.config.plugins?.load?.paths).toEqual(["/other/path"]);
// Allowlist should have matrix removed but keep other entries
expect(result.config.plugins?.allow).toEqual(["other-plugin"]);
});
it("returns no changes when Matrix install path exists", async () => {