Skip to content

[Code Quality] MemoryManager.storeFinding() is synchronous but called with await; type-signature mismatch #9

@coderabbitai

Description

@coderabbitai

Summary

src/beads/memory.ts declares storeFinding() as a synchronous method returning string, but src/agents/base.ts calls it with await. While JavaScript tolerates await on non-Promises, this is misleading and will break if the implementation is ever made async (e.g., switching to async SQLite).

Locations

  • src/beads/memory.ts: storeFinding(finding: Finding): string
  • src/agents/base.ts: await this.memory.storeFinding(memoryFinding)

Recommended Fix

Make storeFinding explicitly async to match the call-site expectation and future-proof for async DB drivers:

async storeFinding(finding: Finding): Promise<string> { ... }

Backlink: #1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions