coze-dev / coze-dev/coze-studio

[Feature Request] Cross-Session File Persistence: Reliability guarantees, versioning, and export

Open
#2,695 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
21.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

## Problem

The current file system has persistence and isolation risks:

1. **Weak session isolation**: Other session directories are enumerable and potentially readable
2. **No persistence SLA**: Files may be lost without clear retention guarantees
3. **No version control**: Accidental overwrites are irreversible
4. **No cross-session consistency**: Files referenced in one session may not exist in another
5. **No export mechanism**: Users cannot reliably download all their files

## Proposed Solution

### 1. Strong Session Isolation
- Each session gets an isolated storage volume
- No cross-session access by default
- Explicit opt-in sharing with access control

### 2. Persistence Tiers with SLA
| Tier | Retention | Use Case |
|------|-----------|----------|
| Ephemeral | Session lifetime | Temp files, cache |
| Standard | 30 days | Working documents |
| Persistent | 1 year | Knowledge bases, configs |
| Permanent | Indefinite | Critical records |

Users can explicitly tag files/directories with persistence tier.

### 3. File Versioning
- Automatic versioning for modified files (like git history)
- `file_history` API to browse previous versions
- One-click rollback to any previous version
- Configurable version retention policy

### 4. Backup & Recovery
- Automatic daily backups for persistent+ files
- Point-in-time recovery for critical data
- User-initiated backup before risky operations

### 5. Export & Migration
- Bulk export: download all session files as zip
- Selective export: mark files for long-term archival
- Migration: move files between sessions or platforms

## Impact
- Data reliability increases user trust
- Enterprise customers require persistence guarantees
- Version control prevents accidental data loss
- Export enables offline workflows and vendor independence

## Priority
P2 (Medium) - Essential for enterprise adoption and data safety

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating the current file-system persistence and session-storage implementation, then clarify the design and scope for isolation, retention, versioning, backup, recovery, export, and migration before determining what complete implementation and tests would require.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.