Skip to content

feat(checkpoint): workspace checkpointing + rewind (issue #194) - #235

Merged
Delqhi merged 1 commit into
mainfrom
feat/issue-194-checkpoints
Jun 16, 2026
Merged

feat(checkpoint): workspace checkpointing + rewind (issue #194)#235
Delqhi merged 1 commit into
mainfrom
feat/issue-194-checkpoints

Conversation

@Delqhi

@Delqhi Delqhi commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Implements workspace checkpointing + rewind. Content-addressed snapshot store backed by modernc.org/sqlite, plus a Loop.BeforeMutate hook for auto-snapshotting sin_write/sin_edit.

Closes #194

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/aragonheld-7756s-projects?upgradeToPro=build-rate-limit

@Delqhi
Delqhi merged commit 0bc4e76 into main Jun 16, 2026
8 of 10 checks passed
@Delqhi
Delqhi deleted the feat/issue-194-checkpoints branch June 16, 2026 21:16
@github-actions

Copy link
Copy Markdown

🏆 CEO Audit — A+ (100.0/100)

Metric Value
Grade A+
Score 100.0/100
Critical findings 0
High findings 0
Profile QUICK
Min grade gate B

📥 Download full report (Markdown)
📊 Download SARIF (for Code Scanning)

Run ~/.config/opencode/skills/ceo-audit/scripts/audit.sh . --profile=QUICK locally to reproduce.

@github-actions

Copy link
Copy Markdown

🏆 CEO Audit — A+ (100.0/100)

Metric Value
Grade A+
Score 100.0/100
Critical findings 0
High findings 0
Medium findings 0
Profile QUICK
Min grade gate B

📥 Download full report (Markdown)

Run ID: 27648720056 · Commit: ${github.sha}

Run ~/.config/opencode/skills/ceo-audit/scripts/audit.sh . --profile=QUICK locally to reproduce.


func Open(workspace string) (*Store, error) {
root := filepath.Join(workspace, ".sin-code", "checkpoints")
if err := os.MkdirAll(filepath.Join(root, "blobs"), 0o755); err != nil {
sum := sha256.Sum256(content)
h := hex.EncodeToString(sum[:])
dst := filepath.Join(s.root, "blobs", h)
if _, err := os.Stat(dst); err == nil {
if _, err := os.Stat(dst); err == nil {
return h, nil
}
return h, os.WriteFile(dst, content, 0o644)
if _, err := os.Stat(dst); err == nil {
return h, nil
}
return h, os.WriteFile(dst, content, 0o644)
for _, rel := range paths {
abs := filepath.Join(workspace, rel)
var hash string
if b, rerr := os.ReadFile(abs); rerr == nil {
if err != nil {
return fmt.Errorf("read blob for %s: %w", f.Path, err)
}
if err := os.MkdirAll(filepath.Dir(abs), 0o755); err != nil {
if err := os.MkdirAll(filepath.Dir(abs), 0o755); err != nil {
return err
}
if err := os.WriteFile(abs, b, 0o644); err != nil {
if err := os.MkdirAll(filepath.Dir(abs), 0o755); err != nil {
return err
}
if err := os.WriteFile(abs, b, 0o644); err != nil {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workspace checkpointing + rewind (sin checkpoint / sin rewind)

2 participants