Repository navigation
feat(erasure): inventory c-batch-2 + group-b backup variants + SQLite sidecars (#1468) - #2490
Conversation
… sidecars (#1468) Prerequisite for the owner-approved prune-expired cleanup: the 2026-10-23 read-only fleet scan found the same harness-written files on most nodes, and each one was an unknown-artifact blocker. - New classes: nunchi.gotgan_store (verbatim transcript store, body-bearing index like mempalace.palace), nunchi.jev_review_ledger (cursors/advisory verdicts, no bodies), nunchi.feed_receipts (sha256 path keys + inode fingerprints), nunchi.feed_status, state.skill_listing_policy, bot.jev_skill_advice_config, skill.review_zai_env (live credential config, retain on every request). - Extended classes: nunchi cron logs/locks/dedup state/runtime markers, state locks, rotated *.log.N[.gz], autosave cron history (installer record), distill scope/toggles, self-update pending activation, autosave prescreen/curator/seen ledgers, repo manifests. - Group b widened, anchored: .env.bak[.-]*, +0900 stamps, crontab.bak.*, crontab-backup-<digit>*.txt, ~/.nunchi crontab backups; new state.memory_facts_backups (last-copy guarded) and state.cert_backups (explicit retain; pem is a key token). - Suffix-less sessions.json.bak / tasks.json.bak are the bridge's previous-good recovery copies (read back on primary corruption): classified with their live classes, never group b. - Planner: sqlite_sidecars flag — -wal/-shm/-journal follow their DB; sidecars of any live-claimed file are claimed live; in a retention class a sidecar shares its DB's verdict. Operator one-offs and producer-less files stay blockers pending an owner policy decision. Nothing is deleted by this change. Tests: retention 22→32, planner.test.sh 43→50; apply/handoff/security-audit unchanged and green. Refs #1468 #873 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…guard (#1468) Owner decision 2026-10-23 (option 1): operator one-off files directly under the harness state dir (CCC_STATE_DIR -> ~/.claude/state) that match no other inventory class become the operator-scratch retention class (state.operator_scratch): kept 90 days, then eligible at the existing prune-expired -> ccc-erasure-apply.py (ERASURE_APPLY=1) boundary. - Planner: inventory-driven fallback_scope (fallback, not a regex): the unknown-artifact sweep hands would-be blockers in the scope roots to the class; other classes always win; one directory level only; orphan SQLite sidecars stay blockers. - scheduler_guard: files named by the crontab (CCC_CRONTAB_CMD seam), the agent-cron task store or systemd unit files are retained at any age; any unreadable source keeps every scratch file and is reported in a body-free scheduler_guard block. - Live claims, key-file rule, symlinks, max(mtime,ctime) age and the lengthen-only env knob still apply first. Decommission gates scratch like group b; audience/user/cache requests never target it. - ~/.nunchi and the bot data dir get no fallback (private memory and credentials): unknown files there still block. - New class state.timed_test_notify_state for the timed-test scan's notify dedup state (a real producer that would otherwise age out as scratch). - Tests, docs (Operator scratch subsection) and changelog fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Added:
|
seoseo-ai
left a comment
There was a problem hiding this comment.
Approved after exact-head validation and fresh operator authorization using the relay-held seoseo-ai credential.
Why
The owner approved node-by-node
prune-expiredcleanup on #1468 (2026-10-23), butccc-erasure-apply.pyrefuses every node: a read-only fleet scan (12 nodes, origin/main planner fed over stdin, no remote writes) found 7–110 unclassified files per node, 408 normalized patterns. 88 of them are harness artifacts that appeared after #2066; 21 are sensitive backup variants the group-b patterns miss (so they would be kept forever).What
schemas/memory-artifact-inventory.v1.json, 50 → 59 incl. splits):nunchi.gotgan_store(body-bearing, handled likemempalace.palace),nunchi.jev_review_ledger,nunchi.feed_receipts,nunchi.feed_status,state.skill_listing_policy,bot.jev_skill_advice_config,skill.review_zai_env(live credential config → always retain)..env.bak.*/.env.bak-*/.env.pre-*,sessions.json.bak-*,crontab.bak[.-]*(bot dir,~/.claude/state,~/.nunchi),crontab-backup-<digit>*.txt; newstate.memory_facts_backups; newstate.cert_backups(kept by the key-file rule + explicit retain).sessions.json.bak/tasks.json.bak— they are the bridge's previous-good recovery copies (bridge/session/store.py,bridge/core/task_ledger.py), now registered as live.sqlite_sidecarsflag —-wal/-shm/-journalfollow their DB (live DB ⇒ sidecars live; in a retention class a sidecar shares the DB's verdict). Prevents a WAL under a live DB from aging out on its own.Verification (re-run independently)
ccc_erasure_retention_test.py32/32 (was 22) ·ccc-erasure-planner.test.sh50/50 (was 43) ·ccc-erasure-apply.test.shOK ·ccc-erasure-handoff.test.sh16/16 ·ccc-security-audit.test.sh18/18 · ruff/shellcheck clean · canon-node-name-scan baseline. Two new tests verified to fail when the sessions pattern is made greedy or the sidecar live-claim is removed.Local plan on one node: unclassified 84 → 48; the only
deletetargets are group-b backups (.env 3, sessions 4, crontab 3). Nothing deleted.Still blocking (owner policy pending on #1468)
Operator one-off files (ad-hoc scripts, handover notes, one-time logs), producer-less files, and backups the inventory already marks as owner decisions (
wiki-candidates.md.bak*,working-state.md.bak*). Each node's actual run still needs its own approval.Refs #1468
🤖 Generated with Claude Code