Skip to content

Fix session conflict diagnostics and depth-cap baseline / 修复会话冲突诊断与深度上限基线#6120

Merged
SivanCola merged 2 commits into
esengine:main-v2from
SivanCola:fix/session-conflict-diagnostics
Jul 6, 2026
Merged

Fix session conflict diagnostics and depth-cap baseline / 修复会话冲突诊断与深度上限基线#6120
SivanCola merged 2 commits into
esengine:main-v2from
SivanCola:fix/session-conflict-diagnostics

Conversation

@SivanCola

@SivanCola SivanCola commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix depth-cap recovery force-saves being misclassified as disk-session adoption, so rewrite baselines are re-anchored and repeated recovery-depth warnings stop after the owned force-save.
  • Add a redacted session conflict diagnostic sidecar plus reasonix doctor session <branch-id-or-path> --zip [--out PATH] to bundle transcripts, session sidecars, and the recovery parent chain for support. The command warns that bundled transcripts are not redacted.
  • Include the conflict sidecar in cleanup/trash flows and exclude it from transcript discovery so it cannot appear as a fake session.
  • Cover the reported effort-switch trigger with a desktop regression test.

Refs #6117 — this covers the recurring-warning mitigation and the diagnostics needed to pin down the initial conflict; it does not claim to fix the first-conflict root cause.

Tests

  • go test ./...
  • (cd desktop && go test ./...)
  • golangci-lint run (clean, CI-matching v2.12.2)

@SivanCola SivanCola requested a review from esengine as a code owner July 6, 2026 17:18
@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 36c293c into esengine:main-v2 Jul 6, 2026
15 of 16 checks passed
SivanCola pushed a commit that referenced this pull request Jul 6, 2026
The controller kept savedRewriteVersion as external bookkeeping about
the executor's session object, so every SetSession had to be paired
with a manual baseline reset and snapshot() had to guess whether
recovery had swapped the object — the guess that broke depth-cap
force-saves (#6120).

Store persistedRewriteVersion on the Session itself: save paths advance
it with the rewriteVersion captured in the same lock window as the
message snapshot (a compaction landing mid-save stays unpersisted, and
a slower save cannot roll it backwards), clones carry it, and swapped
sessions take their baseline with them. snapshotRewriteDecision and
both mark helpers plus their seven call-site pairings collapse into
Session.NeedsRewriteSave.

Behavior fix folded in: installing a clone that still holds an
unpersisted rewrite no longer stamps it persisted-by-construction; the
next snapshot correctly runs as an owned rewrite.
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