feat(FN-2087): finalize canonical memory path migration
- Remove legacy .fusion/memory.md fallback references and normalize prompts/docs to .fusion/memory/MEMORY.md - Stop legacy mirror writes and fallback reads in core memory backend and project memory flows - Update engine worktree boundary checks and tests for canonical memory file handling - Align dashboard memory/settings surfaces and route tests with canonical memory behavior - Add model-favorites persistence test coverage for mission interview and new agent dialogs
This commit is contained in:
@@ -559,7 +559,7 @@ async function assertValidWorktreeSession(cwd: string, projectRoot: string): Pro
|
||||
* Check if a path is allowed to be accessed from a worktree session.
|
||||
* Rules:
|
||||
* - Paths inside the worktree are always allowed
|
||||
* - Project root .fusion/memory/ directory is allowed (MEMORY.md, YYYY-MM-DD.md, DREAMS.md)
|
||||
* - Project root .fusion/memory/* is allowed (for durable project learnings)
|
||||
* - Task attachments under .fusion/tasks/N/attachments/ are allowed (for reading context files)
|
||||
* - All other paths outside the worktree are rejected
|
||||
*
|
||||
@@ -580,9 +580,9 @@ function isWorktreeAllowedPath(worktreePath: string, projectRoot: string, reques
|
||||
return true; // Path is inside the worktree
|
||||
}
|
||||
|
||||
// Exception: project root `.fusion/memory/` directory for durable project learnings
|
||||
const relToProjectRoot = relative(projectRootResolved, requestedResolved);
|
||||
if (relToProjectRoot === ".fusion/memory.md" || relToProjectRoot.startsWith(".fusion/memory/")) {
|
||||
// Exception: project root `.fusion/memory/*` for durable project learnings
|
||||
const relToProjectRoot = relative(projectRootResolved, requestedResolved).replace(/\\/g, "/");
|
||||
if (/^\.fusion\/memory\/[^/]+\.md$/.test(relToProjectRoot)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -640,7 +640,7 @@ export function wrapToolsWithBoundary(
|
||||
ok: false,
|
||||
error: `Path "${relToProject}" is outside the worktree boundary. ` +
|
||||
`Coding agents can only modify files inside the current worktree. ` +
|
||||
`Exception: .fusion/memory/ directory (project root) and .fusion/tasks/*/attachments/* are permitted for reading.`,
|
||||
`Exception: .fusion/memory/* (project root) and .fusion/tasks/*/attachments/* are permitted for reading.`,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user