Skip to content

feat: deterministic /cx-maintain runner for cron/launchd#81

Merged
fermonterom merged 1 commit into
mainfrom
feat/cx-maintain-runner
Jul 2, 2026
Merged

feat: deterministic /cx-maintain runner for cron/launchd#81
fermonterom merged 1 commit into
mainfrom
feat/cx-maintain-runner

Conversation

@fermonterom

Copy link
Copy Markdown
Owner

Summary

  • bin/cx-maintain.sh: pure bash+python runner mirroring commands/cx-maintain.md step by step — decay, Jaccard dedup, purge, deterministic promotion, storage rotation, proposals↔instincts reconciliation, health check, review digest. Zero LLM, zero tokens, cron/launchd-safe (own stale-safe lock + engine flock, --dry-run, idempotent).
  • Docs: commands/cx-maintain.md now points to the script as the recommended scheduling path; docs/MIGRATION-V4.md scheduling section rewritten with cron + launchd examples (no claude -p, no permission bypass); docs/FEATURES.md row updated.

Test plan

  • tests/test_cx_maintain_runner.sh: 9/9 in mktemp sandbox (exit 0 twice, real decay on pass 1, idempotent pass 2, markers touched, valid digest JSON, fresh instinct untouched, lock released, dry-run writes nothing)
  • Real-data run: exit 0, no-op after today's maintain (live idempotency proof)
  • shellcheck --severity=error clean; security/dream/integrity/context-bridge/distill_v4 suites green

🤖 Generated with Claude Code

…LLM, zero tokens)

Mirrors commands/cx-maintain.md steps as pure bash+python heredoc against
installed hooks (repo fallback). Own stale-safe lock, --dry-run, idempotent.
9/9 sandbox tests; real-data run confirms no-op after today's maintain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@fermonterom
fermonterom merged commit 4251e0a into main Jul 2, 2026
@fermonterom
fermonterom deleted the feat/cx-maintain-runner branch July 2, 2026 14:40
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.

1 participant