fix(FN-XXXX): guard Database against nested .fusion/.fusion paths
Throws if a caller passes a path whose last two segments are both `.fusion` — that pattern only happens when a Store class joins `.fusion` onto a path that already ends in `.fusion`. Surfaces the bug at the call site instead of silently creating a stray nested directory under the project. Complements the recent in-process-runtime PluginStore fix by catching any other call paths still passing the wrong rootDir. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
.changeset/guard-nested-fusion-database.md
Normal file
5
.changeset/guard-nested-fusion-database.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
Add a defensive guard in `Database` constructor that throws when opening a database at a path whose last two segments are both `.fusion`. This catches caller bugs where a `.fusion` directory is passed in place of a project root (causing `.fusion/.fusion/fusion.db` to be silently created). Future regressions of this class of bug now fail loudly at the originating call site instead of leaving stray nested directories.
|
||||
Reference in New Issue
Block a user