Skip to content

chore(sync): merge upstream main through acd873d41c - #256

Merged
dreampiler merged 25 commits into
mainfrom
kd/upstream-sync-20261013
Oct 12, 2026
Merged

dreampiler merged 25 commits into
mainfrom
kd/upstream-sync-20261013

Conversation

@dreampiler

@dreampiler dreampiler commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Synchronize the fork through upstream acd873d41c (13 commits after 179fc69cc6) before the 20261012d release swap. Integrate with a merge commit, never squash or rebase, so upstream/main becomes an ancestor of fork main.

70f5913c2d records the squash-merged release history (c5bd1d52ea, #236) with -s ours so the upstream merge base is 179fc69cc6 rather than the older pre-release base. It changes no files.

Upstream commits brought in

kdlbs#4433 delivery backlog drain and compaction-free backups, kdlbs#4432 interrupted shutdown delivery, kdlbs#4420 archive identity without checkout metadata, desktop window size basis, kdlbs#4435 prepared prompt admission, kdlbs#4434 macOS process identity, kdlbs#4436 resumed first-generation delivery, kdlbs#4408 Resume cleanup failures, kdlbs#4414 prompt lifecycle lock order, kdlbs#3898 automation retry policy and run history, kdlbs#4438 quiet late MCP attachment writes, kdlbs#4437 removed terminal environments, acd873d41c focus-driven idle resume admission.

kdlbs#4406, kdlbs#4414, kdlbs#4420 and the desktop window fix are the upstream versions of fork originals; the merged tree keeps upstream's code for them, with no duplicate fork copy left (the touched files match upstream except for fork-only additions such as pending-permission deadlines and stop markers).

Conflict decisions (both intents kept)

Compile-only follow-ups inside the merge: upstream's new snapshot_copy_test.go passes the fork's added logger argument (nil), upstream focus tests pass the fork's replay gate (nil), settleFailedRunTask passes the run's task to upstream's widened runTaskHasReferences, the clarification completion records its turn outcome.

Follow-up commits

  • 93ec2ba7d9 test: upstream's focus lease-loss test compares the fork's replay result by its outcome.
  • d5acfcd53d lint: names gocognit/cyclop on upstream's existing nolint line (the fork lint compares against the older merge base).
  • 2eb7036aa1 fix(automation): restart reconciliation settles a non-live retry-group run through the retry group (recorded success → retry success; otherwise the retry failure boundary, which records unresolved acceptance without terminal evidence). Standalone runs keep fix(automation): classify restart run settlement from the exact-turn outcome #254's exact-turn classification. This makes upstream's TestReconcileOpenRetryRunsChecksExactTurnLiveness and TestReconcileStaleLegacyRetryRunCannotScheduleWithoutTerminalEvidence pass with fix(automation): classify restart run settlement from the exact-turn outcome #254's tests.

Validation (Windows, local only)

  • go build ./... and go vet ./... pass for the backend; scoped golangci-lint passes in the commit hooks.
  • Package tests on this branch against detached fork main 3576ea6cb8 (same machine):
    • pass: agent/runtime, persistence/requiredstores, task/deliveryretention.
    • orchestrator: only the two passthrough attachment tests fail (Windows path separators, known baseline). Upstream's focus admission tests pass with the fork's replay gate.
    • agent/runtime/lifecycle (Cursor MCP retry tests skipped; they hang on Windows on fork main too): the same 79 failures on both trees, no new failure. Upstream's lock order test passes.
    • automation: everything passes except upstream's new TestListRunPageReturnsOlderStandaloneRunsByStableCursor, which fails 3 of 5 runs on Windows because CreateRun overwrites CreatedAt with time.Now() and Windows timestamps tie.
    • persistence: 4 baseline failures plus upstream's 2 new snapshot_copy_test.go cases (POSIX permission bits, ? in a Windows file name).
    • task/repository/sqlite: TestPatchRepositorySetPresence (UpdatedAt.After tie on Windows); everything else passes.
    • worktree: 28 failures, 27 reproduced on fork main; the other is upstream's new TestCaptureCleanupHeadOIDs_RelativeCheckoutPath (temp dir and checkout on different Windows drives). The package exceeds the 25-minute timeout on this machine.
  • No CI, runtime launch or model call.

🤖 Generated with Claude Code

jcfs and others added 25 commits October 11, 2026 22:49
…dlbs#4411)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Kandev Agent <agent@kandev.dev>
…cies (kdlbs#4425)

Co-authored-by: Kandev Agent <agent@kandev.dev>
Merges kdlbs/kandev main e8c1761..179fc69:
- kdlbs#4418 1bba2c1 reclaim historical delivery payloads behind protected gaps
- kdlbs#4411 00b5d59 treat an archived Codex session as missing native state
- kdlbs#4425 179fc69 recover interrupted sessions across durable delivery inconsistencies

Conflicts:
- lifecycle/session.go: the fork's own archived-session matcher
  (prefix match for any agent) is replaced by upstream kdlbs#4411's
  Codex-only exact matcher; the only caller (session_restore_policy.go)
  already passes agentType after the merge.
- lifecycle/streams.go: the fork keeps openUpdatesStream (attach mutex,
  stream generation ownership, deferred client release, caller-side ready
  close). Upstream kdlbs#4425's recordDeliveryStreamFailure(startupGeneration, err)
  after StreamUpdatesFrom is carried into it; releaseClient/ready handling
  stays with the fork's defer and connectUpdatesStream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…prune

Upstream kdlbs#4418 lets non-terminal canonical output (message_chunk, reasoning,
tool_call, tool_update, plan, agent_plan) compact its payload without the
settled-submission proof. The fork's open session_recovery_blocks guard
(session + incarnation + state = 'open') lived only inside that proof, so
the new branch bypassed it on both the discovery query and the locked
reload that shares the same template.

The guard is now a separate fragment that the settled proof reuses and the
independent-output branch requires as well. A one-off check (not committed)
showed: without the guard an open block still allowed 2 payload prunes; with
it 0, while the no-block case still prunes 2 as upstream intends.
idx_agent_delivery_effects_pending is untouched by the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A session continued from history after a backend restart (explicit
resume falling back to continue_from_history, or the automatic
continuation for an interrupted turn) launches its new native
conversation with harness generation N+1, while SQL still names
generation N until the orchestrator commits N+1 after the launch
returns. The authenticated stale check added with bounded delivery
retention (kdlbs#4407) compared the first setup event (agent_capabilities,
sequence 1) against generation N and failed it with
ErrDurableAdoptionIdentityMismatch.

That error stopped the stream event processor, which only cancelled its
own context. The transport reader stayed attached, so every later event
of the continuation was dropped as "durable agent event processor is
unavailable", the disconnect path never ran, and the session stayed
RUNNING with no agent messages although the agent answered.

- Let an explicit context-continuation successor wait for its
  generation commit, as the interrupted-conversation successor already
  does. Foreign, skipped or non-continuation generations still fail
  closed.
- When the processor stops on its own error, detach the updates stream
  it serves so the disconnect path reports the error and recovers the
  execution instead of silently dropping events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge fix/resume-event-processor-1012 (3482490, fork PR 235) onto
kd/upstream-sync-20261012b (d4f9d10, upstream through 179fc69).
streams.go merged without conflict: the sync's recordDeliveryStreamFailure
calls and the processor stopTransport hook are both kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Kandev Agent <agent@kandev.dev>
…lbs#4420)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Kandev Agent <agent@kandev.dev>
Restore saved outer window dimensions by removing the measured frame before
requesting client dimensions. Preserve saved outer bounds, position and
maximized state.

Co-authored-by: dreampiler <dreampiler@gmail.com>
Co-authored-by: Kandev Agent <agent@kandev.dev>
…tore lock (kdlbs#4414)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Kandev Agent <agent@kandev.dev>
Passive focus of ACP-idle-suspended conversations uses automatic admission.
Deferred completed resumes preserve both permission and idle provenance,
revalidate exact claim/route ownership, resume once after capacity frees, and
keep lease failures retryable. Explicit Resume and messages retain manual
admission.

Closes kdlbs#4321

Co-authored-by: dreampiler <dreampiler@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The content of release 20261012 (c5bd1d5), including upstream main
through 179fc69, reached main through the squash merge of #236.
Recording it as merged lets the next upstream merge start from
179fc69 instead of replaying those upstream commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the 13 upstream commits after 179fc69, including kdlbs#4433
(delivery backlog drain), kdlbs#4432 (interrupted shutdown delivery), kdlbs#4436
(first-generation delivery), kdlbs#4435 (prompt admission), kdlbs#4414 (prompt
lifecycle lock order), kdlbs#3898 (automation retry policy) and acd873d
(focus-driven idle resume).

Conflicts keep both sides:
- deliveryretention/worker.go, persistence, docs/public/operations.md:
  upstream's immediate continuation of a pass that is still committing
  cleanup, with the fork's five-second catch-up for passes that leave
  backlog and its boot staging sweep.
- lifecycle/streams.go, agent/runtime/errors.go: the fork's update-stream
  reattach fencing with upstream's per-connection processor failure;
  both error types are kept.
- automation/service.go, event_handlers_automation.go: upstream's retry
  groups and unbound-run recovery together with the fork's exact-turn
  outcome settlement (#254) and failed-run task archival (#248). A retry
  run with a recorded outcome settles through the retry group; an unknown
  outcome still leaves the run open.
- ceiling_*.go, idle_session_focus*.go, task_operations.go: upstream's
  focus resume admission and retry launch options with the fork's dispatch
  claim, replay gate and Office credential re-mint.
- task/repository/sqlite/session.go: the fork's session writes with
  upstream's manual-creation authorization. worktree/manager_cleanup.go:
  upstream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge leaves upstream's markAutomationRunTerminalForTurn unchanged,
but the fork lint compares against an older merge base and reports its
existing complexity as new. Name the linters on the existing nolint line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sync merge applied the fork's exact-turn outcome classification to
every bound run, so a stale retry-group run with no recorded outcome was
left open silently instead of reaching the retry group's failure boundary,
which keeps it open while recording unresolved acceptance.

Retry-group runs that are no longer live now settle through the retry
group: a recorded success marks the retry succeeded, anything else goes
through the retry failure finalization, which still refuses to schedule
another attempt without terminal evidence. Standalone runs keep the
exact-turn outcome classification.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream's lease-loss focus test compares the replay's return with a bare
outcome. The fork's replay returns a result that also carries the error and
detail, so the assertion compares the result's outcome. The expectation is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dreampiler
dreampiler merged commit 79b3967 into main Oct 12, 2026
dreampiler added a commit that referenced this pull request Oct 12, 2026
Fork main now carries the upstream sync through acd873d (#256), so
upstream/main is an ancestor of this release. The only new content is the
sync's focus lease test assertion fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dreampiler
dreampiler deleted the kd/upstream-sync-20261013 branch October 12, 2026 20:00
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.

4 participants