Skip to content

sync_accounts store dispatch should preserve push_notification_config #794

Closed

Description

@bokelley

SalesAgent's e2e implementation found that PlatformHandler.sync_accounts currently calls AccountStore.upsert with only params.accounts. That drops request-level sync_accounts fields before a store implementation can see them, including push_notification_config.

Why this matters:

  • push_notification_config is where a buyer registers webhook delivery for later account/catalog changes.
  • The store needs the full SyncAccountsRequest, not only the account refs, to persist that registration.
  • Without this, a real MCP sync_accounts call appears successful but the webhook configuration is never registered.

Observed in SalesAgent while testing sync_accounts -> catalog/account webhook delivery e2e.

Suggested fix:

  • Preserve backward compatibility for existing AccountStore.upsert(accounts, ctx) implementations.
  • Add/recognize an optional full-request hook such as upsert_request(params, ctx), or otherwise pass the full SyncAccountsRequest through a new store interface.
  • Project the result back through the existing sync_accounts response projection.

Local workaround in SalesAgent: monkey-patch PlatformHandler.sync_accounts to call account_store.upsert_request(params, ctx) when present, falling back to SDK behavior otherwise.

Activity

  1. added
    claude-triagingTriage routine is actively working on this issue (1-3 min)
    on May 22, 2026
  2. added a commit that references this issue on May 22, 2026
    d921170
  3. bokelley commented on May 22, 2026

    @bokelley
    ContributorAuthor

    Triage

    Classification: Bug
    Bucket(s): handlers (note: no handlers label exists in this repo — flagged for label gap)
    Status: drafting-pr
    Milestone: omitted (no target version in issue text)

    What the experts said:

    • code-reviewer: no blockers; flagged isinstance(store, AccountStoreUpsert) compat concern (fixed by using a separate Protocol) and stale warning message (fixed)
    • dx-expert: no blockers; recommended naming the new method sync_accounts to match the wire verb and avoid agent mis-generation on upsert_request

    My take: Real bug — sync_accounts dispatch was extracting only params.accounts and discarding push_notification_config before the store ever saw it, so webhook registration silently failed with a success response. Fix adds AccountStoreSyncAccounts Protocol with sync_accounts(params, ctx) as the preferred full-request path; existing upsert impls are unchanged.

    Drafting PR: add AccountStoreSyncAccounts.sync_accounts(params, ctx) — dispatch checks new method first, falls back to upsert(refs, ctx) for backward compat.


    Triaged by Claude Code. Session: https://claude.ai/code/session_01LFsNBjCJ4LztRMAaJvAjA4


    Generated by Claude Code

  4. added
    bugSomething isn't working
    and removed
    claude-triagingTriage routine is actively working on this issue (1-3 min)
    on May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions