Skip to content

feat(minimald): add debug log on workspace unpack error - #883

Merged
twitchyliquid64 merged 3 commits into
mainfrom
tom/session-sop
Jul 22, 2026
Merged

feat(minimald): add debug log on workspace unpack error#883
twitchyliquid64 merged 3 commits into
mainfrom
tom/session-sop

Conversation

@twitchyliquid64

@twitchyliquid64 twitchyliquid64 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Aside from fixing a test failure, adds a debug log when the unpack_workspace_files handler fails.

Note

Add debug log on workspace unpack error in serve_stream_workspace_files

  • Adds a debug log in rpc.rs that records the unpack error reason before relaying it over the SSH channel's extended data stream.
  • Fixes cmd_activate in lib.rs to skip the non-VCS upload confirmation prompt when --no-prompt is set.
  • Updates CLI tests to create a .git directory in temp projects so they are treated as VCS roots, preventing tests from blocking on stdin.

Macroscope summarized f6213f0.

Summary by CodeRabbit

  • Bug Fixes
    • Adjusted activation upload confirmation so --no-prompt reliably skips interactive confirmation in non-VCS contexts.
    • Added debug logging when workspace file unpacking fails to improve troubleshooting, while keeping user-facing error output unchanged.
  • Tests
    • Hardened CLI integration tests to use a controlled temp .git setup and avoid environment-dependent path detection.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates activation upload prompting, makes related tests deterministic and VCS-rooted, and adds debug logging for workspace unpack failures before errors are sent to the client.

Changes

Activation upload behavior

Layer / File(s) Summary
Upload guard and test setup
crates/minimal/src/lib.rs, crates/minimal/tests/cli.rs
--no-prompt now bypasses non-VCS upload confirmation; activation tests create .git directories, and upload-root test paths are anchored under HOME.

Workspace unpack diagnostics

Layer / File(s) Summary
Unpack failure logging
crates/minimald/src/rpc.rs
serve_stream_workspace_files logs unpack errors at debug level before relaying them through the SSH channel.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: norrietaylor

Poem

I’m a rabbit hopping through the code,
With prompt-free paths where uploads flowed.
HOME keeps tests from paths astray,
And unpack logs now light the way.
Hop, hop—the checks are bright today!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks the required Summary, Testing, and Checklist sections from the template and is mostly an informal summary. Add the template sections with a concise summary, testing evidence, and the checklist items, including docs/BREAKING CHANGE notes if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title correctly covers the new debug log on workspace unpack errors, which is one of the main changes in this PR.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
crates/minimal/tests/cli.rs (1)

207-211: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add coverage for the new --no-prompt upload path.

Both tests now create .git, so is_vcs_root short-circuits the confirmation before args.no_prompt is evaluated. Add a focused test using a non-VCS temporary directory with no_prompt: true to prevent regressions in the behavior this PR changes.

As per coding guidelines, run cargo test -p minimal after adding the regression test.

Also applies to: 246-250

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/minimal/tests/cli.rs` around lines 207 - 211, Add a focused CLI
regression test for the upload path with args.no_prompt set to true, using a
temporary directory that does not contain .git so the no-prompt behavior is
actually exercised rather than the VCS-root short circuit. Keep the existing
VCS-root setup in the current tests, and run cargo test -p minimal after adding
the test.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/minimal/tests/cli.rs`:
- Around line 207-211: Add a focused CLI regression test for the upload path
with args.no_prompt set to true, using a temporary directory that does not
contain .git so the no-prompt behavior is actually exercised rather than the
VCS-root short circuit. Keep the existing VCS-root setup in the current tests,
and run cargo test -p minimal after adding the test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 99f7edfa-ef7d-45fe-ad4f-af81156e92f2

📥 Commits

Reviewing files that changed from the base of the PR and between 9d14e5a and f6213f0.

📒 Files selected for processing (2)
  • crates/minimal/src/lib.rs
  • crates/minimal/tests/cli.rs

@twitchyliquid64
twitchyliquid64 merged commit 5cfe33f into main Jul 22, 2026
29 checks passed
@twitchyliquid64
twitchyliquid64 deleted the tom/session-sop branch July 22, 2026 05:18
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