Skip to content

tech-debt: after-snapshot persistence for FileChange diffs #83

@igorilic

Description

@igorilic

What's missing

Step 14.5 persists before-snapshots to `<data_dir>/snapshots/<before_hash>` so `vscode.diff` can show the agent's change against the live workspace file.

What's missing: persisting the after-snapshot too. Today the right side of `vscode.diff` is the live workspace file. If the user edits that file after the run, the diff no longer shows "what the agent produced" — it shows "agent's input vs current state".

Why deferred

The vast-majority case is users review and accept the agent's diff before editing further. That case is well-served by the current "left = before snapshot, right = live file" shape — the right side IS what the agent produced because the user hasn't touched it yet.

The case where after-snapshot matters (review an old run after manual edits) is a minority and has lower urgency.

Trigger

User feedback indicating the lossy behaviour when reviewing old runs is a problem in practice. Or: when Phase 17 release-prep adds "replay/audit a historical run" as an explicit feature, after-snapshots become a hard requirement.

Pointer

  • crates/agentic-core/src/backends/file_snapshots.rs::FileSnapshotter (extend to capture after-states)
  • apps/vscode-extension/src/diff.ts (extend openDiffForFileChange to use `agentic://after/` for the right side when available)

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtKnown technical debt; not blocking, but tracked for intentional resolution

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions