Skip to content

Cloud sync/bisync commands hardcode force_full=True instead of using incremental sync #706

Description

@phernandez

Problem

The bm cloud sync and bm cloud bisync CLI commands hardcode force_full=True when triggering the database sync after file sync. This causes every sync operation to bypass incremental change detection and do a full re-index, which is wasteful and slow.

This was a development-time convenience that was never reverted.

Logfire trace showing the issue:
https://logfire-us.pydantic.dev/basic-memory/basic-memory-cloud?q=trace_id%3D%27019d49615caaa705493e2a4f7cb762d6%27+and+span_id%3D%279f6b06b8360d8679%27&spanId=9f6b06b8360d8679&traceId=019d49615caaa705493e2a4f7cb762d6

The trace shows POST /proxy/my-vault/project/sync ? force_full='true' — the caller is sending force_full=true as a query parameter on every sync.

Location

src/basic_memory/cli/commands/cloud/project_sync.py

Two occurrences:

  1. sync_project_command (line ~134):
return await ProjectClient(client).sync(
    project_data.external_id, force_full=True  # should be False
)
  1. bisync_project_command (line ~209):
return await ProjectClient(client).sync(
    project_data.external_id, force_full=True  # should be False
)

Fix

Change both calls to force_full=False (or just remove the parameter since the default is already False).

The force_full=True behavior should only be used by explicit admin operations like reindex_all_tenants and bm doctor, not normal sync flows.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingvalidatedTested and verified working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions