Commit graph

59 commits

Author SHA1 Message Date
Bryan Helmkamp
87435aef11 Preserve ts, run_id, event field order in progress.jsonl
Enable serde_json's preserve_order feature so Map uses insertion-order
IndexMap instead of sorted BTreeMap. Extract build_event_envelope()
from the on_event closure to deduplicate the envelope construction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 13:01:17 -04:00
Bryan Helmkamp
55917f4005 Add arc graph subcommand to render workflow DOT graphs as SVG/PNG
Mirrors `arc validate` workflow resolution. Shells out to `dot` (graphviz)
with friendly error if not installed. Supports --format svg|png and -o output path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 10:34:23 -04:00
Bryan Helmkamp
7dfbd53797 Print resolved graph path in arc run and arc validate
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 10:03:34 -04:00
Bryan Helmkamp
53b27ab188 Group arc doctor checks into Required / Optional / Server sections
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 09:59:54 -04:00
Bryan Helmkamp
ee58694cf0 Add tool call progress display to retro step
Wire ProgressUI and EventEmitter into the retro agent so it shows
stage spinners with nested tool calls, matching the look of agent
nodes in the main workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 09:53:40 -04:00
Bryan Helmkamp
cd70962bd9 Add AbortReason to AgentError::Aborted for diagnosable abort messages
Previously, AgentError::Aborted was a bare variant that displayed as
just "Aborted", making it impossible to tell whether a session was
killed by wall clock timeout, user cancellation, or something else.
Now it carries an AbortReason (WallClockTimeout or Cancelled) so
terminal output like the retro agent failure message includes the cause.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 09:34:52 -04:00
Bryan Helmkamp
cfd7ea8c97 Update changelog and docs for installer, devcontainers, arc pr, and preflight improvements
Regenerate 2026-03-10 changelog with full commit set (installer, devcontainer
support, arc pr subcommands, --no-dotenv removal). Add 2026-03-11 changelog
for shadow branch run records and arc diff improvements. Update docs: CLI
reference (arc pr list/view/merge/close, --shortstat), devcontainers page
(replace placeholder with full content), run-configuration (devcontainer
field), checkpoints (per-node files on metadata branch), models catalog
(gemini-3.1-pro-preview-customtools). Improve preflight to show per-model
LLM checks instead of a single merged provider line.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 08:33:04 -04:00
Bryan Helmkamp
fe8493e6f9 Skip local worktree creation for remote sandbox runs
Remote sandboxes (Daytona, Exe) clone into their own environment, so
creating a local git worktree is unnecessary. The worktree decision
previously only checked worktree_mode and git_clean, ignoring the
sandbox provider entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 07:52:39 -04:00
Bryan Helmkamp
d3df81c062 Add last_file_touched as third status extraction fallback
When workflow prompts tell agents to write results to a file with
embedded JSON status fields, the engine now falls back to reading the
last file the agent wrote if neither the response text nor status.json
contain extractable status fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 00:54:24 -04:00
Bryan Helmkamp
0bdb8e93b1 Add per-node files and run-level metadata to shadow branch
Store execution trace data (prompts, responses, status, diffs, etc.) on
the shadow branch alongside checkpoint/manifest data. This makes the
shadow branch a complete, self-contained record of each run.

- scan_node_files() scans nodes/ for allowlisted files (<512KB)
- Checkpoint commits now include per-node files
- init_run includes sandbox.json
- Finalize commit after workflow writes retro.json + final node files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 00:37:52 -04:00
Bryan Helmkamp
a2288b7598 Simplify shorten_path and format call in progress UI
Use std::path::Path::strip_prefix instead of manual string manipulation,
and simplify redundant format! wrapper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 00:28:33 -04:00
Bryan Helmkamp
72b96b1864 Add --shortstat flag to arc diff for compact summary output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 00:28:01 -04:00
Bryan Helmkamp
eff2c472ec Render parallel fan-out branches like subagent info lines
Change parallel branch entries from tool-call style (6-space indent,
spinner) to subagent info style (8-space indent, ▸ prefix, dim/static
while running). Keeps ✓/✗ glyphs on completion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 00:20:12 -04:00
Bryan Helmkamp
5301642b63 Include uncommitted changes in arc diff for in-progress runs
Drop `HEAD` from the live diff command so `git diff {base_sha}` compares
against the working tree instead of only committed changes. Extracts
`build_live_diff_cmd` for testability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 00:16:30 -04:00
Bryan Helmkamp
d11d2c3c3b Show tool call paths relative to sandbox working directory
Tool output previously showed absolute sandbox paths (e.g.
write_file(/home/daytona/workspace/output/js/physics.js)) because
shorten_path() only checked the host CWD. Now ProgressUI stores the
sandbox working directory and strips it from displayed paths, producing
cleaner output like write_file(output/js/physics.js).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-11 00:13:58 -04:00
Bryan Helmkamp
2dadd49605 Revert "Fix verbose mode breaking terminal rendering after many tool calls"
This reverts commit f27a5e187a.
2026-03-10 23:19:27 -04:00
Bryan Helmkamp
9245a9987b Fix Daytona sandbox clone failing on unpushed worktree branch
When `arc run` uses a Daytona sandbox, `initialize()` re-detects the
branch from cwd — but by that point the worktree has switched HEAD to
`arc/run/{run_id}`, which was never pushed, causing the clone to fail
with HTTP 400. Pass the already-known base branch (e.g. `main`) from
the caller instead of re-detecting it inside the sandbox.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 23:11:42 -04:00
Bryan Helmkamp
ecb585d2a4 Clean up devcontainer bridge: inline trivial wrappers, fix initializeCommand bugs
- Remove `devcontainer_env()` and `resolve_devcontainer()` trivial wrappers,
  inline at call sites
- Fix initializeCommand Args quoting: use shlex::try_quote instead of naive join
- Fix initializeCommand silently dropping Parallel commands: now executes them
- Convert three repetitive lifecycle calls to a data-driven loop
- Use crate::millis_u64() in setup command loop for consistency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 23:06:33 -04:00
Bryan Helmkamp
e8067740f7 Wire arc-devcontainer into sandbox creation flow
When `devcontainer = true` in TOML sandbox config, Arc now resolves
devcontainer.json from the repo, uses its Dockerfile for the Daytona
snapshot, runs lifecycle hooks (on_create, post_create, post_start)
in the sandbox, and merges devcontainer env vars under TOML env.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 22:54:59 -04:00
Bryan Helmkamp
bf807686f6 Fix "Git clean: false" for remote sandboxes by checking clean + pushed
Remote sandboxes clone from origin, so "clean" should mean no uncommitted
changes AND the local branch is pushed. Replaces the hardcoded `false` with
a new `ensure_clean_and_pushed` that reuses `ensure_clean` + `branch_needs_push`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 22:35:08 -04:00
Bryan Helmkamp
8909eafbf3 Simplify PR commands: rename fields, use constant, parallelize list
- Rename PullRequestDetail fields from user_wrapper/head_wrapper/
  base_wrapper to user/head/base (serde renames no longer needed)
- Make GITHUB_API_BASE_URL public, replace hardcoded strings in pr.rs
- Replace opaque 5-tuple with PrRow struct in pr_list_from
- Parallelize GitHub API calls in pr_list using futures::join_all

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 19:54:38 -04:00
Bryan Helmkamp
9d966d3a08 Add arc pr list/view/merge/close subcommands
Add PR lifecycle commands that operate on workflow runs via their
pull_request.json records. Each loads the PR record from a run directory
and calls the GitHub API: list scans all runs and fetches live state,
view shows details, merge supports squash/merge/rebase, close sets
state to closed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 19:38:11 -04:00
Bryan Helmkamp
71b4329669 Eliminate GitCheckpointMode enum, unify local and remote git operations
All git checkpoint, diff, push, worktree, and merge operations now go
through sandbox.exec_command() instead of maintaining parallel Host
(spawn_blocking) and Remote code paths. The enum is replaced by
git_checkpoint_enabled + host_repo_path on RunConfig, and
sandbox.is_remote() is used where behavior still differs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 18:46:46 -04:00
Bryan Helmkamp
6725cf38b3 Improve arc run --preflight output with Repository section, merged LLM check, and truncation
Split preflight into Repository (setup commands, git clean) and Workflow
(nodes, edges, goal, model, provider) sections. Merge LLM providers and
Provider checks into a single LLM check. Add terminal-width-aware
truncation for long detail lines. Render "Git clean: false" in red.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 18:17:16 -04:00
Bryan Helmkamp
17e384de24 Unify workflow resolution for validate and parse commands
Extract resolve_workflow() in project_config to handle bare name, .toml,
and .dot resolution in one place. Previously validate and parse treated
bare words as literal file paths while run resolved them via arc.toml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 17:05:47 -04:00
Bryan Helmkamp
89655140f8 Show Arc Details in PR body even without retro
Extend conclusion.json with per-stage operational data (cost, duration,
retries) so the Arc Details section of PR descriptions no longer depends
on retro.json. The retro section remains optional and only appears when
the retro agent runs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 13:49:17 -04:00
Bryan Helmkamp
4558774a34 Add [pull_request] support to project config (arc.toml)
Project-level arc.toml can now set [pull_request] with enabled/draft
fields, slotting between cli.toml defaults and workflow.toml overrides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 13:34:26 -04:00
Bryan Helmkamp
5f9c211031 Add arc diff command to view workflow run diffs
Surfaces existing final.patch and per-node diff.patch files via CLI.
Supports live diffs from in-progress runs by reconnecting to the sandbox.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 12:50:51 -04:00
Bryan Helmkamp
4fe05e8a71 Add arc ssh command for SSH access to Daytona sandboxes
Standalone subcommand that creates SSH credentials for a run's Daytona
sandbox and connects directly (or prints the command with --print).
Also parameterizes create_ssh_access TTL instead of hardcoding 60 min.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 12:28:17 -04:00
Bryan Helmkamp
f27a5e187a Fix verbose mode breaking terminal rendering after many tool calls
In verbose mode, completed tool call bars accumulated in indicatif's
MultiProgress without limit. After ~80+ bars exceeded the terminal
height, indicatif's cursor repositioning broke and all rendering stopped.

Now in verbose mode, completed tool calls are printed as permanent output
via multi.println() and their bars are removed from MultiProgress. Only
running tool calls remain as live bars with spinner + elapsed time. This
keeps MultiProgress small regardless of how many tool calls execute.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 11:58:07 -04:00
Bryan Helmkamp
ec7fc8d5a2 Add arc preview command for Daytona sandbox preview URLs
Provides CLI access to preview URLs for ports exposed by Daytona sandboxes.
Supports standard (URL + token + curl), signed (self-contained URL), and
--open (browser launch) modes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 11:55:47 -04:00
Bryan Helmkamp
1dcad0529a Split ~/.arc/logs/ into logs/ and runs/
Per-run data now lives in ~/.arc/runs/ while daily CLI log files
stay in ~/.arc/logs/. Renames: logs_root → run_dir (RunConfig field,
Handler trait param, all handlers), logs_dir → run_dir (CLI arg,
local variables), default_logs_base → default_runs_base (path fn).
Adds DB migration 002 to rename workflow_runs.logs_dir → run_dir.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 09:40:03 -04:00
Bryan Helmkamp
54ecae9586 Write per-run tracing logs to cli.log inside each run directory
Adds a switchable tracing layer that writes to ~/.arc/logs/{run-dir}/cli.log,
so all diagnostic info for a run is co-located with its other artifacts instead
of buried in the shared daily log file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 09:30:00 -04:00
Bryan Helmkamp
53e218926f Print full ~/... paths for assets instead of sandbox-relative paths
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 09:14:24 -04:00
Bryan Helmkamp
5883b71efd Print captured asset paths after workflow run output
Display collected assets in an "=== Assets ===" section after the run
result, so users can see which files were captured without digging
through the logs directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 09:01:52 -04:00
Bryan Helmkamp
3a7f5cdb6c Fix unused_assignments warning in run_from_branch
Return worktree_path from the match expression instead of mutating
a pre-initialized variable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 08:20:24 -04:00
Bryan Helmkamp
08461fe603 Add MCP server support to workflow engine and Playwright demo workflow
Wire MCP server configs from workflow TOML into agent sessions so
MCP tools are available to agent stages during workflow runs.

Changes:
- run_config.rs: add mcp_servers HashMap to WorkflowRunConfig
- backend.rs: AgentApiBackend.with_mcp_servers() passes configs to SessionConfig
- run.rs: extract mcp_servers from RunConfig and pass to backend
- demo/mod.rs: add default mcp_servers field to struct literals

New workflow: arc/workflows/playwright-demo/
- Runs on Daytona with daytona-medium snapshot
- Configures Playwright MCP as a sandbox transport (port 3100)
- Agent browses Hacker News, takes screenshots at each step
- asset_globs captures screenshots/** into logs directory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 08:05:12 -04:00
Bryan Helmkamp
a0a43611b7 Gate arc-exe behind exedev feature flag
The Exe sandbox variant, its config field, and all arc_exe usage in
arc-workflows are now behind #[cfg(feature = "exedev")]. Default CLI
builds skip arc-exe and openssh entirely. arc-api enables exedev since
its demo module constructs full SandboxConfig structs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 00:08:09 -04:00
Bryan Helmkamp
1d0cfb8250 Fix 4 safety bugs in arc system prune found in PR #14 code review
- Reject negative durations in parse_duration (i64 -> u64) to prevent
  future cutoff that would delete everything
- Remove orphans flag from has_explicit_filters since --orphans is
  additive, not restrictive, and shouldn't disable the 24h staleness guard
- Use parsed label_filters instead of raw args.filter.label so malformed
  labels that get silently dropped don't incorrectly disable staleness
- Replace derived Serialize with custom impl delegating to Display for
  RunStatus, fixing JSON serialization (was producing null/tagged objects
  instead of flat strings)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 22:41:14 -04:00
Bryan Helmkamp
832c48ce5b Improve fatal error display with colored output and workflow suggestions
Show colored "error:" prefix with cause chain for all CLI errors. When a
workflow name isn't found in a project with arc.toml, list available
workflows and suggest the closest match using Levenshtein distance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 19:29:01 -04:00
Bryan Helmkamp
9db3af8fc6 Move pushed branch and PR URL output to end-of-run summary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 19:29:01 -04:00
Bryan Helmkamp
d61d06356e Add retro setting to project config to disable retros project-wide
Users can now set `[arc] retro = false` in arc.toml instead of passing
`--no-retro` on every `arc run` invocation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 19:29:01 -04:00
Bryan Helmkamp
9f86d55c74 Add workflow name resolution for arc run via project config
`arc run my-workflow` now resolves to `{arc_root}/workflows/my-workflow/workflow.toml`
when an arc.toml project config exists. Args with file extensions are passed through
unchanged, and missing workflows fall back to the literal arg.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 19:29:00 -04:00
arc-1e68f1[bot]
234a0b340b Improve auto-PR body (#15)
* arc(01KKA1C8TC89GDRHJ6ZP4SNQDA): toolchain (success)

Arc-Run: 01KKA1C8TC89GDRHJ6ZP4SNQDA
Arc-Completed: 2
Arc-Checkpoint: 498faecda2dc4e1af5ca3928309c3259b07b391f

* arc(01KKA1C8TC89GDRHJ6ZP4SNQDA): preflight_compile (success)

Arc-Run: 01KKA1C8TC89GDRHJ6ZP4SNQDA
Arc-Completed: 3
Arc-Checkpoint: 7a4a66e785c31d1daa85916579bb4da6e41c3ccd

* arc(01KKA1C8TC89GDRHJ6ZP4SNQDA): preflight_lint (fail)

Arc-Run: 01KKA1C8TC89GDRHJ6ZP4SNQDA
Arc-Completed: 4
Arc-Checkpoint: 2125ff48cf4bc9e134f2c8daaae10d5f21408f6b

* arc(01KKA1C8TC89GDRHJ6ZP4SNQDA): fix_lints (success)

Arc-Run: 01KKA1C8TC89GDRHJ6ZP4SNQDA
Arc-Completed: 5
Arc-Checkpoint: ad003c4332d4143730eee21a5176bd374ca28860

* arc(01KKA1C8TC89GDRHJ6ZP4SNQDA): preflight_lint (success)

Arc-Run: 01KKA1C8TC89GDRHJ6ZP4SNQDA
Arc-Completed: 6
Arc-Checkpoint: 16c2539fc7fe5c2323464ebd50d84e809492dbdc

* arc(01KKA1C8TC89GDRHJ6ZP4SNQDA): implement (success)

Arc-Run: 01KKA1C8TC89GDRHJ6ZP4SNQDA
Arc-Completed: 7
Arc-Checkpoint: 07d0b619eee31bddd70565815c27b96cd0a1c7ca

* arc(01KKA1C8TC89GDRHJ6ZP4SNQDA): simplify (success)

Arc-Run: 01KKA1C8TC89GDRHJ6ZP4SNQDA
Arc-Completed: 8
Arc-Checkpoint: 8a60dfa4af1fb6cb339dc4ef46d911b5b23a7e17

* arc(01KKA1C8TC89GDRHJ6ZP4SNQDA): verify (success)

Arc-Run: 01KKA1C8TC89GDRHJ6ZP4SNQDA
Arc-Completed: 9
Arc-Checkpoint: 85cb349c21739879c2517215b3201567a4d92ea4

---------

Co-authored-by: arc <arc@local>
2026-03-09 16:38:44 -04:00
arc-1e68f1[bot]
d432d370c0 Improve arc system prune (#14)
* arc(01KKA1A9ZHFMWM3T9VC6HBWJ19): toolchain (success)

Arc-Run: 01KKA1A9ZHFMWM3T9VC6HBWJ19
Arc-Completed: 2
Arc-Checkpoint: a38cd3755e5a5ad6a406e3557665c3ea6ba06cc7

* arc(01KKA1A9ZHFMWM3T9VC6HBWJ19): preflight_compile (success)

Arc-Run: 01KKA1A9ZHFMWM3T9VC6HBWJ19
Arc-Completed: 3
Arc-Checkpoint: 62150d0142e04fad46092b85e5942ac1979da51b

* arc(01KKA1A9ZHFMWM3T9VC6HBWJ19): preflight_lint (fail)

Arc-Run: 01KKA1A9ZHFMWM3T9VC6HBWJ19
Arc-Completed: 4
Arc-Checkpoint: 2a213ceb22392e2dd1e00c4e66912ed57f0972af

* arc(01KKA1A9ZHFMWM3T9VC6HBWJ19): fix_lints (success)

Arc-Run: 01KKA1A9ZHFMWM3T9VC6HBWJ19
Arc-Completed: 5
Arc-Checkpoint: e9d720a9e2288664ebea475c4a1445532fde3ed9

* arc(01KKA1A9ZHFMWM3T9VC6HBWJ19): preflight_lint (success)

Arc-Run: 01KKA1A9ZHFMWM3T9VC6HBWJ19
Arc-Completed: 6
Arc-Checkpoint: 8ef9490d981389c374970e0374ef48198fb19829

* arc(01KKA1A9ZHFMWM3T9VC6HBWJ19): implement (success)

Arc-Run: 01KKA1A9ZHFMWM3T9VC6HBWJ19
Arc-Completed: 7
Arc-Checkpoint: 063ba4fe9554c6e0d16aaad40c4ffc7badbd0511

* arc(01KKA1A9ZHFMWM3T9VC6HBWJ19): simplify (success)

Arc-Run: 01KKA1A9ZHFMWM3T9VC6HBWJ19
Arc-Completed: 8
Arc-Checkpoint: 4c1319c2a2d7c818faa460413e7993c93d30750f

* arc(01KKA1A9ZHFMWM3T9VC6HBWJ19): verify (success)

Arc-Run: 01KKA1A9ZHFMWM3T9VC6HBWJ19
Arc-Completed: 9
Arc-Checkpoint: a01dd1e93b231415be85a1925f90b6fedf1844fc

---------

Co-authored-by: arc <arc@local>
2026-03-09 16:38:35 -04:00
Bryan Helmkamp
5fb3fd485e Add project config (arc.toml) with discovery and root resolution
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 16:28:56 -04:00
Bryan Helmkamp
7cddb14fb1 Skip push when local branch is already in sync with origin
Before worktree creation, compare local and remote ref SHAs to avoid
unnecessary pushes. When already in sync, log at INFO and print nothing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:59:59 -04:00
Bryan Helmkamp
bcbd69246b Fix clippy warning: use is_none_or instead of map_or for pull_request_draft
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:37:01 -04:00
Bryan Helmkamp
8d38f57e73 Extract blocking_push_with_timeout to deduplicate triple-nested timeout+spawn_blocking pattern
The same timeout(spawn_blocking(git_push)) pattern with a 4-arm match on
Ok(Ok(Ok(()))) appeared in 3 places. Extract a helper that flattens the
triple Result into a single BlockingPushError enum, and extract shared
push error-handling into run_git_push.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:36:15 -04:00
Bryan Helmkamp
c8e8be0bad Push current branch to origin before worktree creation
When `arc run` creates a worktree, unpushed local commits would appear
in the PR diff even though they didn't originate from the workflow run.
This pushes the user's current branch before worktree setup so the
remote base matches the local HEAD.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:30:06 -04:00