feat(#303): Slice 0 — worktree_isolation enum + execution_wave_mode scaffolding#305
Conversation
…onfig scaffolding Migrates `worktree_isolation` from `bool` to a 3-value enum string (`off` / `auto` / `required`) and adds a new `execution_wave_mode` field (`off` / `auto` / `on`) to `MapConfig` as no-behavior-change scaffolding for the parallel wave rollout (#303). Key changes: - `project_config.py`: add `VALID_WORKTREE_ISOLATION`, `VALID_WAVE_MODE` frozensets; migrate `worktree_isolation: bool = False` to `str = "off"`; add `execution_wave_mode: str = "auto"`; alias `execution.wave_mode` dotted YAML key; backward-compat bool→str coercion in `load_map_config`; post-load enum validation with warning+fallback for both fields; update `generate_default_config` comments/examples. - `map_step_runner.py.jinja` (+ rendered copies): update `_wt_isolation_enabled` to handle new enum values — `"required"` and YAML-1.1 `"on"` are truthy; `"auto"` and `"off"` remain falsy in Slice 0 (sequential everywhere until Slice 3/5). - `tests/test_worktree_isolation.py`: update all `is False`/`is True` assertions to `== "off"` / `== "required"`; add parametrized enum coverage, backward-compat bool-migration tests, and a new `TestWaveModeConfig` class covering all `execution_wave_mode` paths. - `tests/test_mapify_cli.py`: skip the read-only-file OSError test when running as root (root bypasses POSIX permission enforcement; the skip makes the pre-existing root-CI failure disappear cleanly). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TiSdo3Y2J5BtLzGVy2n98C
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughConverts ChangesEnum config for worktree isolation and wave mode
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…lice 0 with #305 #305 landed #303 Slice 0 (worktree_isolation enum + execution_wave_mode) in MapConfig while #304 was in flight. Reconcile per 'MapConfig = single source': - Adopt main's _wt_isolation_enabled (auto->False until Slice 5); keep _worktree_isolation_mode as the runner-side enum reader for probe/fallback. - Align _execution_wave_mode default off->auto to match MapConfig; behavior stays neutral via the isolation gate. - select_execution_strategy now gates wave-loop on worktree.isolation != off (mirrors #305): default (wave_mode=auto, isolation=off) -> legacy sequential. - Update decision tables (claude+codex) + neutrality tests for the new defaults. make check green (3019 passed); render parity clean.
Summary
Slice 0 of the 7-slice parallel wave rollout (#303). Config scaffolding only — no behavior change in this slice.
worktree_isolationmigrated frombool = Falsetostr = "off"(enum:off/auto/required). The old booleanfalse/truein existing YAML configs migrates automatically inload_map_config.execution_wave_modenew field (str = "auto", enum:off/auto/on), aliased from dotted YAML keyexecution.wave_mode. YAML 1.1 bareoff/on(parsed as Python booleans) coerced back to strings._wt_isolation_enabledin step runner updated to treat"required"and"on"as truthy;"auto"remains falsy until Slice 3/5.TestWorktreeConfigupdated to== "off"/== "required"assertions, new parametrized enum-coverage tests, backward-compat bool-migration tests; newTestWaveModeConfigclass covering allexecution_wave_modepaths including YAML 1.1 coercion.test_write_project_mcp_json_permission_errorskipped when running as root (pre-existing failure —chmod(0o444)has no effect for root, soOSErroris never raised).Test plan
uv run pytest tests/test_worktree_isolation.py -v— 56 passeduv run pytest --tb=short -q— 2982 passed, 4 skippeduv run make check-render— generated trees match templates_srcuv run make check(ruff, mypy, pyright, lint-hooks, pytest) — all greenCloses part of #303 (Slice 0 of 7).
Generated by Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests