Skip to content

Feat/apostle selfhealing#22

Merged
growlf merged 4 commits into
mainfrom
feat/apostle-selfhealing
May 12, 2026
Merged

Feat/apostle selfhealing#22
growlf merged 4 commits into
mainfrom
feat/apostle-selfhealing

Conversation

@growlf
Copy link
Copy Markdown
Owner

@growlf growlf commented May 12, 2026

Summary

Type of change

  • Bug fix
  • New feature / enhancement
  • Documentation update
  • Refactor / cleanup
  • CI / tooling change

Related issues

Testing

  • docker compose config passes with no errors
  • Shell scripts pass shellcheck
  • Manually tested on Intel Arc hardware (if relevant)

Checklist

  • My changes follow the project's code style
  • I have updated documentation where necessary
  • I have not committed secrets or real credentials
  • .env.example is up to date (if env vars were added/removed)

Luma (Enclave AI) and others added 4 commits May 12, 2026 19:01
Adds background model reconciliation with guardrails:

- `_run_sync_cycle()`: reconcile + acquire loop with disk check,
  maintenance mode, cluster dedup (waits if a peer is already pulling),
  and off-hours deferral for large registry pulls
- `ollama_pull_via_api()`: pulls via Ollama HTTP API (works inside Docker)
- `_start_sync_daemon()`: background thread — startup sync after 10s,
  then periodic at APOSTLE_SYNC_INTERVAL (default 30 min)
- `GET /apostle/v1/sync`: sync state (running, in_progress, last_run, etc.)
- `POST /apostle/v1/sync`: manual trigger
- Dashboard: sync status indicator in header (polls every 30s)

Env vars (all optional):
  APOSTLE_SYNC_INTERVAL   seconds between background syncs (default 1800)
  APOSTLE_MAX_DISK_PCT    skip pulls above this disk usage % (default 85)
  MAX_AUTO_PULL_GB        defer large registry pulls to off-hours (default 10)
  APOSTLE_MAINTENANCE     set to 1/true to pause auto-sync
  APOSTLE_OFFHOURS_START  hour to begin off-hours window (default 22)
  APOSTLE_OFFHOURS_END    hour to end off-hours window (default 6)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oadmap

Replaces one-paragraph stub with full project documentation:
- Self-organizing cluster concept and gestalt architecture (Mermaid diagram)
- Live dashboard URLs for Apostle (:40116/ui) and Router (:40115/gestalt/ui)
- ASCII architecture diagram showing full service stack
- Smart routing table (query type → model)
- Apostle section: hardware profiles, self-healing phases, guardrails
- Observable → self-healing → load balancing roadmap
- Multi-machine quick start
- Services table, documentation index

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Size gate: use disk_gb (model download size) not min_ram_gb (RAM
  requirement) when deciding whether to defer large pulls to off-hours
- Daemon startup: call _start_sync_daemon() in cmd_serve() so the
  background sync loop actually runs when the server starts
- Cluster snapshot: include _sync_state in _cluster_snapshot() return
  value so /apostle/v1/cluster and the SSE stream expose sync status
- Dashboard UI: add Sync stat element (id="sy") to header, plus
  30-second polling of /apostle/v1/sync to show last sync time or
  "..." while a sync is active

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Peer acquisition: "fastest peer" removed — code picks first available
  peer in reconcile() loop; speed-aware selection is Phase 4
- Guardrails: "current system load" was unimplemented — replace with
  accurate description: disk %, off-hours scheduling for large pulls,
  deduplication, maintenance mode; include env var names
- Add Phase 3 daemon env-var reference table (APOSTLE_SYNC_INTERVAL,
  APOSTLE_MAX_DISK_PCT, MAX_AUTO_PULL_GB, off-hours config)
- Fix duplicate docs/getting-started.md link for Hardware entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@growlf growlf self-assigned this May 12, 2026
@growlf growlf merged commit 5a2fbed into main May 12, 2026
1 check passed
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