Skip to content

[BUG] apc status shows '● synced' for OpenClaw after complete sync failure #34

@FZ2000

Description

@FZ2000

Tool Affected

openclaw (status system affects all tools)

What Happened

After apc sync --all --yes printed:

✗ Failed to apply to openclaw: [Errno 17] File exists: '/Users/frank/.openclaw/skills/test-skill'

Running apc status immediately after still shows:

│ openclaw       │ ● synced │

Why This Is Wrong

The sync explicitly failed with a crash. No skills were written to openclaw. The manifest was not updated. Yet the status shows "synced".

Root Cause

_tool_sync_status() in src/status.py only checks whether manifest-recorded files exist on disk. Since the manifest wasn't updated during the failed sync, it still reflects the previous successful state — and those files still exist, so the status is "synced".

The status check has no awareness of:

  • Whether the last sync succeeded or failed
  • Whether the current cache has been fully applied

What Was Expected

  • After a sync failure, status should show ⚠ out of sync or ✗ error
  • Alternatively: record a last_sync_result in the manifest ("success" / "failed") and include it in the status check

Suggested Fix

Add last_sync_result to the manifest schema:

{"last_sync_result": "error", "last_sync_error": "[Errno 17] File exists: ..." }

Then _tool_sync_status() can return "error" when last_sync_result == "error", and show an appropriate badge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions