Skip to content

fix(health-check): read vault.remote_url from config, not SUTANDO_MEMORY_REPO (#1450)#1862

Open
bassilkhilo-ag2 wants to merge 2 commits into
sonichi:mainfrom
bassilkhilo-ag2:fix/health-check-vault-remote-url-lookup
Open

fix(health-check): read vault.remote_url from config, not SUTANDO_MEMORY_REPO (#1450)#1862
bassilkhilo-ag2 wants to merge 2 commits into
sonichi:mainfrom
bassilkhilo-ag2:fix/health-check-vault-remote-url-lookup

Conversation

@bassilkhilo-ag2

Copy link
Copy Markdown
Contributor

Problem

check_memory_sync() in src/health-check.py read SUTANDO_MEMORY_REPO from .env — the env var retired in #1446. Users who correctly configured vault.remote_url in sutando.config.local.json (M2+ / sync-workspace.sh) saw a false-positive:

[WARN] memory-sync: SUTANDO_MEMORY_REPO not set — cross-machine sync disabled

…on every health-check run, even with sync working correctly via sync-workspace.sh.

Additionally, the "never synced" fallback message said sync-memory.sh (deprecated), not sync-workspace.sh.

Fix

Tests

4 new cases in tests/health-check-memory-sync-vault.test.py:

  1. vault.remote_url set in config → no "not configured" warning
  2. vault.remote_url empty + SUTANDO_MEMORY_REPO in .env → .env fallback works
  3. Neither configured → warn message names vault.remote_url, not SUTANDO_MEMORY_REPO
  4. "Never synced" message contains sync-workspace.sh, not sync-memory.sh

All 4 pass. Existing health-check tests unaffected.

Closes

🤖 Generated with Claude Code

https://claude.ai/code/session_01KXQJogmVSdYrKtYX1LwzwT

bassilkhilo-ag2 and others added 2 commits June 30, 2026 15:22
…ORY_REPO (sonichi#1450 closes health-check portion)

check_memory_sync() was reading SUTANDO_MEMORY_REPO from .env — the legacy
env var retired in sonichi#1446. Users who correctly configured vault.remote_url in
sutando.config.local.json (M2+ / sync-workspace.sh) saw a false-positive
"SUTANDO_MEMORY_REPO not set — cross-machine sync disabled" warning on every
health-check run.

Fix: try resolve_vault(repo_root=REPO_DIR) first (canonical M2+ path); fall
back to SUTANDO_MEMORY_REPO from .env during the sonichi#1446 deprecation window.
Update the "not configured" warning message to name vault.remote_url (the
actual config key to set) and point at sync-workspace.sh --init.

Also update the "never synced" legacy-clone warning from sync-memory.sh →
sync-workspace.sh (supersedes the string-only change from PR sonichi#1847 so
sonichi#1847's base issue no longer matters — both files change here).

Tests: 4 new cases in health-check-memory-sync-vault.test.py cover
vault-url path, .env fallback, unconfigured warning text, and the
never-synced message pointing at sync-workspace.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KXQJogmVSdYrKtYX1LwzwT
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@cla-assistant check

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