Feat/conductor parity#8
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
dwm | 82a400c | May 21 2026, 09:51 AM |
New trait method returns the repo's trunk/main branch (e.g. "main"). jj detects via `jj log -r 'trunk()' -T 'bookmarks'`, git via the existing detect_trunk helper which already checks main/master/origin HEAD. Both fall back to "main" when detection fails. Used by the Conductor-compat hooks layer to populate `CONDUCTOR_DEFAULT_BRANCH`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each workspace gets a stable, unique 10-port slot persisted in `<repo>/.dwm/<name>/.dwm-port`. ensure_port() reads the marker if present, otherwise scans sibling workspaces for occupied slots and picks the lowest free multiple of 10 starting at 3000. Holes left by deleted workspaces are filled. Allocations are idempotent — repeat calls return the same number. Malformed marker files are silently treated as "not occupied" so a corrupt file in one workspace doesn't bork others. Tests cover empty repo, sequential allocation, hole-filling, idempotence, self-marker exclusion, and malformed-file tolerance. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…port) Extends src/hooks.rs to cover the rest of Conductor's lifecycle surface: - New `run_run_script` runner. Honours `runScriptMode`: in concurrent mode (default) the child is spawned detached via `setsid` (Unix) and inherits dwm's stdio, returning immediately. In nonconcurrent mode it blocks like setup. - New `run_archive_script` runner. Returns Ok(true) on success/no-script, Ok(false) on non-zero exit so the caller can prompt. - New `RunScriptMode` enum, parsed from top-level `runScriptMode` in both `.dwm.toml` and `conductor.json` (concurrent default; invalid values fall back to concurrent rather than erroring). - Single `apply_env` helper shared by all three runners. Now sets the full DWM_*/CONDUCTOR_* set: WORKSPACE_NAME, WORKSPACE_PATH, ROOT_PATH, DEFAULT_BRANCH, PORT, plus DWM_FROM_WORKSPACE conditionally. - HookContext gains `default_branch: String`, populated by callers from VcsBackend::default_branch_name. Bug fix: CONDUCTOR_ROOT_PATH was previously aliased to the workspace path, which broke recipes like `cp $CONDUCTOR_ROOT_PATH/.env.local .` that rely on it being the *source* repo. It now points at ctx.repo_root, matching Conductor's actual semantics. The `run_setup_executes_script_with_env` test was updated to assert the distinction. Detached-spawn tradeoff: the concurrent run-script child inherits stdout/stderr (so the user sees output) and gets its own session via `setsid` (so Ctrl-C in dwm's terminal doesn't kill it). The dwm process returns immediately and `mem::forget`s the child handle; the OS reaps it when the user kills it or its session ends. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- New `dwm run` subcommand. Loads hooks from the repo and invokes
`scripts.run` for the workspace dwm thinks the user is currently in
(determined from cwd via find_dwm_workspace). Errors clearly when
invoked outside a workspace or when `scripts.run` is missing. Not
added to the shell wrapper's CD_SUBCOMMANDS list, since it doesn't
produce a path.
- delete_workspace_inner now runs `scripts.archive` (if configured)
before tearing the workspace down. Hooks are loaded once per delete
so the behaviour is consistent across all entry points (named delete,
cwd-inferred delete, TUI delete).
- Verbose deletes prompt on archive failure ("delete anyway? [y/N]"),
reading from /dev/tty so piped invocations don't hang. If stdin is
not a tty, deletion is aborted with a clear error.
- TUI delete (DeleteOutput::Quiet) does NOT prompt — a failed archive
script is logged to stderr and deletion proceeds. This is option (a)
from the design discussion: ratatui has the alternate screen, so an
inline prompt would be awkward, and TUI deletion is a deliberate user
gesture they've already committed to. The warning becomes visible
once the TUI tears down.
- new_workspace_inner now populates HookContext.default_branch via the
new VcsBackend::default_branch_name call.
Tests cover: archive hook running on success, quiet path proceeding on
archive failure, no-archive workspaces deleting cleanly, and the
existing `dwm run` clap parsing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
drivasperez
force-pushed
the
feat/conductor-parity
branch
from
May 12, 2026 08:13
c385813 to
7a80083
Compare
- New "Lifecycle hooks" section documenting all three scripts (setup, run, archive), when each fires, and their failure semantics. - Document `runScriptMode` (concurrent default, nonconcurrent alternative) with the tradeoff that concurrent run scripts inherit the parent's stdio. - Full DWM_*/CONDUCTOR_* env-var table, calling out that CONDUCTOR_ROOT_PATH is the source repo path (not the workspace). - Document the CONDUCTOR_PORT allocator: 10-port slots from 3000 up, persisted to <repo>/.dwm/<name>/.dwm-port, holes are filled. - "Conductor users" callout: drop conductor.json into the repo and dwm reads it as-is. - New `dwm run` row in the usage table. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
drivasperez
force-pushed
the
feat/conductor-parity
branch
from
May 21, 2026 09:51
7a80083 to
82a400c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.