Skip to content

Add optional managed worktree root policy - #1414

Merged
swjnxyf merged 3 commits into
yyjeqhc:mainfrom
HarpeLm:harpelm-managed-worktree-root
Nov 10, 2026
Merged

swjnxyf merged 3 commits into
yyjeqhc:mainfrom
HarpeLm:harpelm-managed-worktree-root

Conversation

@HarpeLm

@HarpeLm HarpeLm commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Closes #1272

Adds optional [policy].managed_worktree_root for central placement of newly created managed worktrees while preserving the existing derived placement when unset.

The configured root is validated as an absolute, existing, non-redirected directory inside effective allowed_roots; invalid values fail closed during config check/reload and are revalidated at creation and resume. Existing worktrees remain in place, with operation identity, collision handling, lineage, and recovery preserved.

Also updates the English and zh-CN Runner guides and adds focused multi-root, invalid-path, hot-reload, redirected-path, placement, and resume coverage.

Validation:

  • cargo test -p webcodex-runner --profile dogfood managed_worktree (22 passed)
  • cargo test -p webcodex-runner --profile dogfood config_reload (21 passed)
  • cargo fmt --all -- --check
  • python3 scripts/check_markdown_links.py
  • git diff --check

The full Runner suite had one unrelated pre-existing failure in webcodex_runner::coding_agent::tests::diagnostics::explicit_path_mapping_restores_an_interpreter_outside_default_search_paths; 1225 passed, 11 ignored.

@swjnxyf swjnxyf 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.

Reviewed PR #1414 on special without creating a worktree. The optional policy.managed_worktree_root remains confined to effective allowed_roots, is revalidated at creation/resume, and preserves the derived placement when absent and existing managed-worktree identities on resume. I identified a Windows-only test compilation omission caused by the added RunnerPolicy field and pushed a focused follow-up commit 7a4e1d01f adding managed_worktree_root: None to the Windows persistent-shell fixture. The focused special-host test suites passed: managed_worktree (22) and config_reload (21), as did cargo fmt --all -- --check and git diff --check. The original CI run failed in the test-macos aggregate gate because changes was abandoned, not because the code tests ran and failed. A new full CI run was triggered by the fix; its native platform jobs are currently in progress. No further code-review blockers found; approving, with final integration still subject to CI results.

@swjnxyf
swjnxyf merged commit cf2266f into yyjeqhc:main Nov 10, 2026
18 checks 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.

Optional central directory for managed worktrees (managed_worktree_root)

3 participants