Skip to content

fix(paths): resolve default output and composer paths from the repo root - #691

Merged
calesthio merged 1 commit into
OpenMontageInc:mainfrom
jeremieLouvaert:pr/cwd-independent-paths
Nov 8, 2026
Merged

calesthio merged 1 commit into
OpenMontageInc:mainfrom
jeremieLouvaert:pr/cwd-independent-paths

Conversation

@jeremieLouvaert

Copy link
Copy Markdown
Contributor

Summary

A few tools still resolved paths against the current working directory instead of the repo root, so running them from outside the repo (e.g. a Claude Code session started in another project with OpenMontage invoked by absolute path) wrote projects/ into the caller's folder or failed to find remotion-composer. This routes them through the existing lib/paths.py, which is already the single source of truth for REPO_ROOT / PROJECTS_DIR.

Related issue

None filed; found while running OpenMontage alongside another project.

Changes

  • tools/analysis/video_analyzer.py: default output_dir is PROJECTS_DIR / "_analysis" / ... (also honours OPENMONTAGE_PROJECTS_DIR now)
  • tools/character/character_animation.py: default output_path is under PROJECTS_DIR
  • tools/video/remotion_caption_burn.py: look up remotion-composer at REPO_ROOT only, so a stray remotion-composer/ in the cwd can't shadow the repo's
  • scripts/scaffold_atelier_project.py: --root defaults to the repo instead of ., and the progress printing no longer raises ValueError when cwd is outside the repo

Explicit inputs (output_dir, output_path, --root) behave exactly as before.

Testing

  • pytest tests on this branch: 1828 passed, 12 skipped, 3 xfailed (Windows 11, Python 3.12)
  • From a different working directory: python <repo>/scripts/scaffold_atelier_project.py some-slug now creates <repo>/projects/some-slug; on main the same command creates ./projects/some-slug in the caller's folder
  • From a different working directory, RemotionCaptionBurn()._find_remotion_root() returns <repo>/remotion-composer

Checklist

  • The change is focused on a single logical concern.
  • I ran the relevant tests locally (make test-contracts / make test) where applicable.
  • I updated docs/README if behavior or usage changed. (No usage change; only defaults now anchor to the repo.)
  • No unrelated files (build artifacts, local config) are included in the diff.

🤖 Generated with Claude Code

A few tools still resolved paths against the current working directory,
so running them from outside the repo wrote projects/ into the caller's
folder or could not find remotion-composer. Route them through lib.paths:

- video_analyzer: default output_dir under PROJECTS_DIR/_analysis
- character_animation: default output_path under PROJECTS_DIR
- remotion_caption_burn: look up remotion-composer at REPO_ROOT only
- scaffold_atelier_project: --root defaults to the repo, and progress
  printing no longer raises when cwd is outside the repo

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@calesthio calesthio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making default paths independent of the caller's working directory. Reviewed all four changed files against main 63d1087a; defaults now use the canonical repository/projects roots and explicit caller paths remain usable. Validation: 10 character/caption contract and workspace tests passed. An additional actual scaffold run from a different working directory succeeded and exercised the safe path reporting. Composer dependencies are absent, so no full Remotion render was run.

@calesthio calesthio closed this Nov 7, 2026
@calesthio calesthio reopened this Nov 7, 2026
calesthio pushed a commit that referenced this pull request Nov 8, 2026
@calesthio
calesthio merged commit 55de6c3 into OpenMontageInc:main Nov 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants