Skip to content

Continue retained tasks with sandboxed base merges (#333) - #678

Merged
n0rpan merged 1 commit into
mainfrom
agent/333-work-continue-main
Nov 16, 2026
Merged

n0rpan merged 1 commit into
mainfrom
agent/333-work-continue-main

Conversation

@n0rpan

@n0rpan n0rpan commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Existing task branches and receipts were refused, so a retained conflict or committed task could not be continued. This adds ordinary sandboxed merges of the captured base, reuses matching linked worktrees/receipts, and hands unresolved merges to the real worker without discarding edits.

Tier T3. Main-based re-cut of #358 after #336, for #333. This branch contains only continuation; it supersedes the old stacked draft without rewriting its history.

  • Captured bases and acceptance commands still come from batch planning before any worker. Retained branches fast-forward or merge normally; a branch checked out elsewhere, dirty retained work, another repository, a source-checkout alias or an incompatible receipt is refused.
  • Git checkout/merge callbacks run inside the existing sandbox. Host merge-index probes use cached data with helpers disabled. No reset, stash, forced checkout or fetch is added.
  • A retained merge handoff names both MERGE_HEAD and the current captured base, with an explicit follow-up merge and bounded diagnostics/path summary. Unfinished/aborted merges and branch switches cannot report success.
  • Worker, merge and acceptance failures are kept together, including Continue work branches by merging their base before the agent runs #358’s P3 finding. A matching receipt is replaced atomically under its kernel lock; new receipts retain create-only publication.

Validation at 72bf8d1: 287 touched-crate tests, including 62 runner cases, pass with real mandatory bwrap, an isolated HOME and loopback fake engine. Strict all-target Clippy, CI’s pinned Rust 1.99.1 formatter, Markdown links and all four unchanged scans pass. Five regressions failed with the previous behavior: hidden worker failure, host merge hook, host clean filter, source alias and unbounded conflict handoff. No checks, sandbox protections or dependencies changed. Own draft gate 43845421819 passed; the PR is ready and full component CI/review is running.

Runtime footprint, paired at the same build path against main 5421e91, x86_64 stripped ci profile (opt-level 1), Rust 1.100.0, three private mock samples per mode:

Measurement Main This change
Binary bytes 16,975,816 17,040,168 (+64,352)
Direct worker median RSS / threads 8,712 KiB / 2 8,692 KiB / 2
Direct completion median 1,270.7 ms 1,287.5 ms

Active runner median: 5,872 KiB and 3 threads (including the two child-pipe readers); accepted batch completion 1,717.1 ms. Samples include a 1,200 ms synthetic stream stall; these are completion times, not TTFB. The runner exits after the batch, adding no persistent idle process, memory or threads.

Local done still means accepted local work, which may be uncommitted. Clean accepted head/tree binding and base-object integrity remain blocking requirements before #397; a worker deadline precedes unattended use. Durable save/revision/event emission is the next #387 re-cut.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T10:07:49.412120Z 72bf8d1 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@n0rpan
n0rpan added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 685a9cb Nov 16, 2026
47 checks passed
@n0rpan
n0rpan deleted the agent/333-work-continue-main branch November 16, 2026 10:27
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.

1 participant