Skip to content

feat: add snapshot in py server#24

Merged
InftyAI-Agent merged 11 commits into
InftyAI:mainfrom
kerthcet:feat/support-snapshot-in-server
Jun 30, 2026
Merged

feat: add snapshot in py server#24
InftyAI-Agent merged 11 commits into
InftyAI:mainfrom
kerthcet:feat/support-snapshot-in-server

Conversation

@kerthcet

Copy link
Copy Markdown
Member

What this PR does / why we need it

Which issue(s) this PR fixes

Fixes #

Special notes for your reviewer

Does this PR introduce a user-facing change?


kerthcet added 2 commits June 30, 2026 00:20
Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
Copilot AI review requested due to automatic review settings June 29, 2026 23:31
@InftyAI-Agent InftyAI-Agent added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces snapshot operations (create/restore/list/find/get/delete) to the SandD daemon and exposes them through the Python server API, backed by new protocol message variants and expanded end-to-end tests.

Changes:

  • Added snapshot message types to the WebSocket protocol and implemented snapshot request handling in the daemon.
  • Added Python-facing snapshot APIs and a SnapshotInfo model to represent snapshot metadata.
  • Updated snapshot manager/types naming and expanded E2E coverage for snapshot workflows.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
server/src/lib.rs Adds PyO3-exposed snapshot methods that send snapshot protocol messages and await responses.
sandd/src/snapshot/types.rs Renames snapshot field to workspace (from workspace_path).
sandd/src/snapshot/manager.rs Renames find_by_tag to find_snapshot_by_tag and changes get_snapshot to return SnapshotInfo.
sandd/src/protocol.rs Adds snapshot-related protocol message variants.
sandd/src/main.rs Wires SnapshotManager into the daemon message handler and implements snapshot operations.
python/sandd/server.py Adds Python API methods for snapshot operations and maps raw results into SnapshotInfo.
python/sandd/models.py Introduces SnapshotInfo Python model (including timestamp handling).
python/tests/test_e2e.py Adds extensive E2E tests for snapshot create/list/find/get/restore/delete behaviors.
examples/snapshot_simple.rs Updates example code to the renamed find_snapshot_by_tag API.
docs/proposals/SNAPSHOTS.md Updates the proposal doc with snapshot protocol integration details and renamed APIs.
Comments suppressed due to low confidence (1)

docs/proposals/SNAPSHOTS.md:199

  • The proposal still documents get_snapshot returning a full Snapshot, but the implementation now returns SnapshotInfo (see sandd/src/snapshot/manager.rs). The doc should match the implemented API.
    /// Get snapshot by ID
    pub async fn get_snapshot(&self, id: &str) -> Result<Snapshot>;


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/src/lib.rs
Comment thread server/src/lib.rs Outdated
Comment thread sandd/src/snapshot/types.rs
Comment thread python/sandd/models.py
Comment thread docs/proposals/SNAPSHOTS.md
Comment thread docs/proposals/SNAPSHOTS.md
Comment thread server/src/lib.rs Outdated
kerthcet added 5 commits June 30, 2026 09:05
Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
@kerthcet

Copy link
Copy Markdown
Member Author

/kind feature

@InftyAI-Agent InftyAI-Agent added feature Categorizes issue or PR as related to a new feature. and removed do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Jun 30, 2026
kerthcet added 4 commits June 30, 2026 18:14
Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
@kerthcet

Copy link
Copy Markdown
Member Author

/lgtm

@InftyAI-Agent InftyAI-Agent added the lgtm Looks good to me, indicates that a PR is ready to be merged. label Jun 30, 2026

@InftyAI-Agent InftyAI-Agent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: PR has both lgtm and approved labels

@InftyAI-Agent InftyAI-Agent merged commit b3d8c9a into InftyAI:main Jun 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. feature Categorizes issue or PR as related to a new feature. lgtm Looks good to me, indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants