Skip to content

Return an explicit outcome from snapshot conflict recovery / 会话冲突恢复显式返回结果类型#6124

Merged
SivanCola merged 3 commits into
esengine:main-v2from
SivanCola:refactor/conflict-outcome-enum
Jul 6, 2026
Merged

Return an explicit outcome from snapshot conflict recovery / 会话冲突恢复显式返回结果类型#6124
SivanCola merged 3 commits into
esengine:main-v2from
SivanCola:refactor/conflict-outcome-enum

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

  • recoverSnapshotConflict now returns a declared conflictOutcome (adopted / force-saved / forked / dropped) instead of (path, recovered bool, err), so snapshot() acts on what recovery says it did rather than re-deriving it from path and session-pointer comparisons — the inference that hid the depth-cap baseline misclassification fixed in Fix session conflict diagnostics and depth-cap baseline / 修复会话冲突诊断与深度上限基线 #6120.
  • replaceSessionAfterCancel stops discarding the recovery result and logs when its post-cancel cleanup was dropped.
  • Pure refactor: no behavior change; existing conflict-recovery tests pin all four outcomes.

Stacked on #6120 (contains its commits until it merges; review the top commit only). Part of the #6027 convergence work.

Tests

  • go test ./internal/agent ./internal/control ./internal/cli ./internal/serve ./internal/acp ./internal/doctor
  • golangci-lint run (clean, CI-matching v2.12.2)

merge-order-check added 3 commits July 7, 2026 01:17
The caller inferred what recovery did from path and session-pointer
comparisons; the depth-cap baseline bug hid in exactly that inference.
Declare the outcome (adopted / force-saved / forked / dropped) at the
site that performs it, and let replaceSessionAfterCancel log when its
cancel cleanup was dropped instead of silently discarding the result.
@SivanCola SivanCola requested a review from esengine as a code owner July 6, 2026 18:35
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) tui Terminal UI / CLI (internal/cli, internal/control) agent Core agent loop (internal/agent, internal/control) labels Jul 6, 2026
@SivanCola SivanCola merged commit 7f445ea into esengine:main-v2 Jul 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) desktop Wails desktop app (desktop/**) tui Terminal UI / CLI (internal/cli, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant