feat(mma): Implement TrackDAG for dependency resolution and cycle detection

This commit is contained in:
2026-02-27 19:58:10 -05:00
parent 3c0d412219
commit a3cfeff9d8
3 changed files with 130 additions and 0 deletions

View File

@@ -99,8 +99,19 @@ def _is_allowed(path: Path) -> bool:
rp = path.resolve(strict=True)
except (OSError, ValueError):
rp = path.resolve()
if rp in _allowed_paths:
return True
# Allow current working directory and subpaths by default if no base_dirs
cwd = Path.cwd().resolve()
if not _base_dirs:
try:
rp.relative_to(cwd)
return True
except ValueError:
pass
for bd in _base_dirs:
try:
rp.relative_to(bd)