Phase 3: Config revisions with rollback for ADF

未關閉
#640 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
30/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
rust
領域
backend, cli

研究方向

Start with the terraphim_orchestrator config handling and the ADF CLI bin crate, using orchestrator.toml and the requested config_history directory as the entry points. Review the referenced Paperclip files for revision patterns. Done means snapshots, listing, rollback, diff, pruning, and the running-agent safety rule all satisfy the acceptance criteria.

由索引模型根據 Issue 內容生成。

描述

enhancement

Parent Epic

#637

Summary

Version the orchestrator TOML config before each change, with CLI rollback capability.

Changes Required

terraphim_orchestrator
  • New config_history/ directory alongside orchestrator.toml
  • Before applying any config change, snapshot current TOML to config-history/YYYY-MM-DDTHH:MM:SS.toml
  • Keep last N snapshots (configurable, default 10)
  • Prune older snapshots on each save
ADF CLI (bin crate)
  • adf config history -- list available snapshots with timestamps
  • adf config rollback <timestamp> -- restore config from snapshot
  • adf config diff <timestamp> -- show diff between current and snapshot
  • Safety: refuse rollback if agents are actively running (or add --force flag)
Config
[config_history]
max_snapshots = 10
history_dir = "/opt/ai-dark-factory/config-history"

Reference

  • Paperclip config revisions: packages/db/src/schema/agent_config_revisions.ts
  • Paperclip agent service: server/src/services/agents.ts (buildConfigSnapshot, config revision tracking)

Acceptance Criteria

  • Config snapshots saved before each change
  • adf config history lists available snapshots
  • adf config rollback restores from snapshot
  • Old snapshots pruned automatically
  • Rollback blocked when agents running (unless --force)
主要語言
Rust
星號
62
分支
5
平均合併
2 小時 27 分鐘
30 天內合併 PR
1

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

terraphim/terraphim-ai 的其他 Issue

查看 terraphim/terraphim-ai 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。