Skip to content

fix(dag): SessionMoved wake wedge — mixed directory stamps leave workflows with no directory owner #269

Closed

Description

@LeXwDeX

Tracked from the v1.0.13 release notes (PR #268) and the DAG-LOC-01 arbitration (probe C4 in packages/opencode/test/dag/dag-location-guards.test.ts).

Symptom

After a session moves (SessionMoved / session.next.moved), a session's workflows can end up with mixed directory stamps across their rows: the workflow row keeps the stamp of the directory that created it while the session now durably lives elsewhere. The fail-closed ownership policy (a stamp must match exactly one instance directory) then leaves the workflow with NO owner: wakes for it are deliberately wedged rather than risked being mis-delivered.

Current behavior is pinned by probe C4 (SessionMoved wedge pin) — the probe asserts the wedge itself, i.e. NO directory acts on the mixed-stamp workflow.

Why it was pinned, not fixed (v1.0.13 decision)

A real fix needs an atomic-DB-adoption redesign: the directory stamp must move WITH the session in one transaction (or adoption must consult a session-sourced location that is updated atomically with the move), so there is never a window where stamps disagree. SpawnReady eviction is the current mitigation.

Acceptance (for whoever picks this up)

  • Mixed-stamp scenarios after SessionMoved resolve to exactly one live owner (the session's new durable directory) within bounded time, without cross-directory double-adoption.
  • Probe C4 flips from pinning the wedge to pinning the resolution.
  • Mutation-falsifiable evidence for the new ownership transition (red-first), in the style of the H1 latch probe (ab4cddb).
  • All existing DAG-LOC-01 guards stay green (21 probes in dag-location-guards.test.ts).

Activity

  1. added a commit that references this issue on Aug 15, 2026
  2. LeXwDeX commented on Aug 15, 2026

    @LeXwDeX
    OwnerAuthor

    Fixed by PR #272 (merged to dev 2026-08-15T02:12Z, promoted to main via #274, released in graphagent-v1.0.14). Probe C4 flipped from pinning the wedge to pinning the resolution: SessionProjector re-stamps the execution-location stamp inside the same durable publish transaction on SessionMoved; the new owner re-forks drain so a wedged wake delivers immediately. Red-first evidence M1/M2/M3 in the PR body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions