Repository navigation
feat: run commands in place and delete the sandbox, task workspaces, reviewer and grants - #487
Conversation
…orkspaces and task Git from qq-core
…m host, server, config and binary
…ting and approval grants from protocol and core
…config, host, clients and CLI
…native-owner CI jobs
…ures in host, server, client and TUI
…s; prune lint baseline
… grant docs; add upgrading notes
… grant features; adapt the rest
… code These files lose code that the durable worker, task workspaces, task Git and the Linux/macOS command owners added; plan section B deletes them. CI drops two macOS tests of the deleted owner's group check. QQ-Allow-Revert: crates/qq-core/src/cancellation.rs QQ-Allow-Revert: crates/qq-core/src/catalog.rs QQ-Allow-Revert: crates/qq-core/src/sessions/claim.rs QQ-Allow-Revert: crates/qq-core/src/sessions/tests/runs.rs QQ-Allow-Revert: crates/qq-core/src/tools/shell/child_exit.rs QQ-Allow-Revert: crates/qq-server/Cargo.toml
…verified reads keep a base environment; doc and dead-table cleanups
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75a8fa4a81
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…nts as stopped, and hold Windows goal checks to their deadline - A command that completed but whose result overflows the run's context budget is committed with its real outcome; the run then stops for context exhaustion instead of rolling the result back to an interrupted placeholder. - Linux shell teardown reuses the goal check's pidfd group confirmation, so a killed background child left as a zombie by a non-reaping PID 1 no longer fences the runtime. - Windows goal checks stop at the check's absolute deadline instead of a relative timeout rounded down to whole seconds. - Smoke: Windows scenarios get their own QQ_HOME (Windows ignores XDG_*, so concurrent scenarios shared one session store) and portable commands.
…arted it dies Without the command worker, a SIGKILLed or crashed server left Unix commands running in the checkout while restart reported their run as interrupted and admitted new work. Each Unix command's process group now holds a /bin/sh watcher blocked reading a pipe only the QQ process keeps open; when QQ exits, the read ends and the watcher kills its group. It ignores the catchable signals a script may send its own group, is killed with the group on timeout, cancel and normal exit, and is reaped before termination is confirmed (Darwin reports a zombie-only group as EPERM). Windows commands already die with their kill-on-close job. The goal-driver soak test asserted the old orphaning; it now asserts a check killed with QQ never completes afterwards.
`LaunchNotStarted` was only raised by the deleted macOS owner, so `confirmed_launch_failure` could never be true. QQ-Allow-Revert: crates/qq-core/src/tools/native_exit.rs
…un-limit kills as timeouts; quote cmd text raw Audit of guarantees the deleted worker provided: - A cancelled run, or one stopped by its time limit, drops the event stream that would have carried a finished command's result, so the call settled as "interrupted before a durable result was recorded". Finished results are now kept on the run's tool tasks and persisted before settlement, as the worker's results were. - The run's time limit expires the cancellation token instead of cancelling it, so a command it kills reports exit=timeout. - Windows runs `cmd /D /S /C "<text>"` with the text passed raw: the C runtime's `\"` escaping no longer mangles quoted paths, and registry AutoRun no longer runs first. - Live output holds back an incomplete trailing UTF-8 sequence until the next read instead of showing two replacement characters.
…teps for v0.1.9 workers and task copies
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f359c333f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…aped group's id; undo ignores autocrlf - An incomplete trailing UTF-8 sequence now waits outside the flush buffer. Left in it, the buffer never emptied, so an expired flush timer won the biased select forever and the command never read EOF. - Linux group confirmation waits for the members it found and pins, and no longer sends SIGKILL to the numeric group id after the leader may have been reaped and the id reused. The caller already killed the group while the leader pinned it. - Undo runs Git with core.autocrlf=false. Git for Windows sets it true system-wide, so restores turned LF into CRLF. - Windows-only dead code that failed clippy there: an unused test helper and a test-only `try_wait`.
Change
Closes section B of the v0.1.10 plan: QQ runs commands in place, as the user, and the sandbox is gone.
shellandexecrun in the session's working directory (the real checkout), as you, with QQ's inherited environment, the host network and your real HOME. Each command still gets its own process group (a job on Windows), timeout and cancellation kill the group, and output is captured and spilled as before. A command no longer survives a daemon restart; unfinished runs are reported as interrupted.landlock,seccompiler,goblin,rappct,winsafe,firehazard,libproc,sysctl,nixandcommand-fdsdependencies;task_git*helpers, the helper image, the hosting brokers and thetask_commit/task_push/task_prtools;approval_delegateand supervision routing;policy.allow_tools/allow_shell_prefixes/allow_hosts/shell_env/task_hosting,--allow-tool/--allow-shell/--allow-host, and the TUIa/wkeys;xtask action-biasand its runbook.y/n). Auto runs everything except the fixed stops and managed denies. Full also runs the fixed stops. Read-only denies non-reads.retired. Removed resolutions decode asapproved_once/denied.CHANGELOG.mdhas an### Upgradingblock that lists every removed key, env var, flag, tool and wire item, each with its replacement.docs/plans/README.mdare updated. B.3 (worktrees for parallel goals) moves to "out of scope for v0.1.10", as the plan said it waits for the fleet plan.Lines deleted against the plan's Evidence table:
The whole diff is 326 files, about +4.3k / −56.7k.
Verification
cargo xtask check: passed (fmt, lint, clippy-D warnings, the workspace nextest run, doctests, minimal profile).cargo xtask smoke: all 13 scenarios pass. The newrun-in-placescenario shows that:git statusreports the workspace's own repository;target/survives between runs;exec curl;git pushto a local bare remote succeeds in Auto.run-in-place,run-then-undo,run-command-deadlines,permission-dispatch) on macOS and Windows in thenative-run-in-placejob, which runs on the merge queue, onmainor with theci:fulllabel. Linux runs them in the main job.a_schema_64_store_with_reviewer_delegate_and_grant_state_opens_and_replays: a v64 store with grants, a delegated hold, reviewer resolutions and removed events opens and replays.ab1_verified_image_is_bound_and_unverified_effects_count_as_worknow also checks that a verified read runs with only the base environment while unverified work inherits everything. It fails if the env rule is reverted (checked).src/cli.rsassert the exact advice text.Known impact
native-run-in-placeCI job.deny_toolsno longer filters grants, because no grants are left. It still filters side questions and refuses goal checks when it listsshell. To hide a tool, usepolicy.exposed_tools.AGENT_PROMPT_VERSION25 → 26 bump changes recorded prompt hashes.