Why: establish the authorized task workspace and its initial baseline.
Evidence: preserved precheck receipt in .task/feature-svc-agent-backup.md; R0=475654363de3ec72df68d246ffab8217b1cfeab6.
Impact: task metadata only; the feature workspace starts at 475654363d.
Refs: .task/feature-svc-agent-backup.md
Why: the 2026-10-11 runtime/ deletion lost all agent SQLite data with no
backup; the svc-autorecover closing report left "agent SQLite backup" as
a follow-up and the user asked to land it (recovery plan U2 residue).
Evidence: tests/test_svc_backup.py 11/11 green locally (live WAL writer,
manifest sha, retention, guards); make test-governance full suite green
(159 tests, rerun twice after one unreproduced flake).
Impact: new service-level actions backup/backups; snapshots live in
runtime-backups/<name>/ outside runtime/; rm --purge removes them; pg
backup and other flows unchanged.
Refs: modules/documents/docs/proposals/2026-10-12-service-restart-data-recovery.md r2 (sec 6, U2 residue); task card .task/feature-svc-agent-backup.md.
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=3fa0d3ade8beb6b534c7ffa7505426001c58e284.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=37e3229538d64867a6a074020a072da925244fcc.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=af9c2de663be5ff102dcab7698464a645832f569.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=b6307db015da4a3718baadb242c52cb66b024f74.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=3e4a79e4133202b537c888a8beeb7c10d82595f4.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=5942ba7a949f3032cacf75856529726a7c24fa8e.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=b4649d79c2bdd66c3bcb9e60752abdb99b5667df.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=ac4058a72f2496a7d5a0225c4fb4e3a7ac8ac012.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=e27810246f507c1e1c2ff6e9fb6282f6da90e0ec.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
任务卡:
.task/feature-svc-agent-backup.md(同一份文档;证据收据见卡内)Why:2026-10-11
runtime/整删事故中 agent SQLite 数据全失且无任何备份;svc-autorecover 收尾报告遗留建议第 1 条(用户 2026-10-12 指示「把遗留项按建议修复」)。对应恢复方案(documents r2)U2 残留「agent SQLite 自动备份缺位」的实用切片。What
svc.sh <name> backup [--out DIR] [--keep N]:svc.env + history.jsonl + data/ 快照;每个*.db经sqlite3 .backup一致性导出(活跃 WAL 写入者下安全)+integrity_check自检;-wal/-shm不入快照;无 sqlite3 拒绝备份(不回退裸拷贝)runtime-backups/<name>/<UTC时间戳>/(runtime/ 之外——runtime 整删不波及);MANIFEST 记逐文件 sha256;非 SQLite 的*.db原样保留并告警svc.sh <name> backups [--prune] [--keep N]列表/保留清理(默认 7 份,只清时间戳目录,不动--out自定义目录);rm --purge连带删除;postgres/static 守卫引导Evidence:
tests/test_svc_backup.py11/11(活跃 WAL 写入者、manifest sha 校验、保留策略、purge、守卫、PATH 无 sqlite3 拒绝);make test-governance159/159 绿(SELF,同步后 HEAD22e7d75重跑);CI(GATE)以本 PR 运行为准。首跑治理套件曾出现 1 例未复现失败(两遍重跑均绿,已如实记录在卡)。Impact:新增服务级动作 backup/backups 与新顶层目录 runtime-backups/(gitignore);不动既有 pg backup、deploy、recover 流程。
Non-goals:restore/灾难恢复合同(方案 U6)、自动定时备份(频率待按批准 RPO 固定)。
Refs:modules/documents/docs/proposals/2026-10-12-service-restart-data-recovery.md r2 §6/U2;前序 svc-autorecover PR #396/#400/#401。