Skip to content

feat: add --reload-daemon and shallow profile isolation (#35, #36) - #41

Merged
getappz merged 1 commit into
masterfrom
worktree-auth-daemon-shallow
Jul 7, 2026
Merged

feat: add --reload-daemon and shallow profile isolation (#35, #36)#41
getappz merged 1 commit into
masterfrom
worktree-auth-daemon-shallow

Conversation

@getappz

@getappz getappz commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Closes #35 and #36.

Summary

  • --reload-daemon: restarts codex daemon after auth restore
  • Shallow profile isolation: auth-only copy, everything else symlinked
  • Isolate metadata: mode stored in isolate.json, surfaced in ls output

Test plan

  • cargo build
  • cargo test

Notes for reviewers

  • Risk areas: isolate mode metadata is additive, backwards compatible
  • Backwards compatibility: existing isolate profiles default to deep mode

activate --reload-daemon: restarts codex daemon after auth restore.
isolate add --shallow: auth-only copy, everything else symlinked.
Shallow profiles store mode in isolate.json metadata.
isolate ls shows mode (deep/shallow) for each profile.
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Auth activation gains a reload_daemon flag that controls whether the agent daemon is reloaded or a restart warning is shown after profile activation. Isolate profile creation adds a shallow/deep mode selection affecting which host paths are symlinked, stored in isolate.json metadata and surfaced in isolate listings. CLI flags and dispatch wiring were added accordingly.

Changes

Auth activation and isolate shallow mode

Layer / File(s) Summary
Activate with daemon reload option
src/auth.rs, src/main.rs
activate now delegates to activate_with(..., reload_daemon, json), which checks daemon status and either reloads the daemon (printing a restart message) or warns that changes require a restart; CLI adds a --reload-daemon flag wired through the dispatcher.
Shallow/deep isolate add and mode metadata
src/auth.rs, src/main.rs
isolate_add delegates to isolate_add_with(..., shallow, json), which links different host paths depending on shallow vs deep mode, restores auth files, and writes the mode into isolate.json; isolate_ls and new read_isolate_mode surface the stored mode in JSON and text output; CLI adds a --shallow flag wired through the dispatcher.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant main as main.rs
  participant auth as auth.rs
  participant FS as Filesystem

  CLI->>main: auth activate --reload-daemon
  main->>auth: activate_with(agent, profile, reload_daemon, json)
  auth->>auth: check daemon status
  alt reload_daemon true
    auth->>auth: reload daemon, print "daemon restarted"
  else reload_daemon false
    auth->>auth: warn restart required
  end

  CLI->>main: auth isolate add --shallow
  main->>auth: isolate_add_with(agent, profile, shallow, json)
  alt shallow
    auth->>FS: symlink cache/config/local, Documents/Downloads
  else deep
    auth->>FS: symlink .ssh, .gitconfig, .git-credentials
  end
  auth->>FS: write isolate.json (mode)

  CLI->>auth: auth isolate ls
  auth->>FS: read_isolate_mode(isolate.json)
  auth-->>CLI: list with mode
Loading

Related Issues

Suggested labels: enhancement, cli

Suggested reviewers: none identified from provided data


🐰 Hopping through vaults both shallow and deep,
Symlinks to home while auth files we keep,
A daemon reloads or gives a warning shout,
Isolate modes now proudly written out!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning [ #35 ] Shallow mode, mode persistence, and ls output are covered, but auth exec auto-resolving mode from metadata is not shown. Implement auth exec HOME resolution from isolate metadata so shallow and deep profiles run correctly as required.
Out of Scope Changes check ⚠️ Warning The reload-daemon activation change is outside linked issue #35, which only covers shallow profile isolation. Move the reload-daemon work to its own linked issue or separate PR if it is intended to ship independently.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly names the two main changes: --reload-daemon and shallow profile isolation.
Description check ✅ Passed The description follows the template with Summary, Test plan, and reviewer notes, and is mostly complete.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-auth-daemon-shallow

Comment @coderabbitai help to get the list of available commands.

@getappz
getappz merged commit 4a3de5a into master Jul 7, 2026
9 checks passed
@getappz
getappz deleted the worktree-auth-daemon-shallow branch July 7, 2026 10:09
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auth vault: shallow profile mode for orchestrators

1 participant