Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

The safety policy hands off a Shopify order note as "moving money" while refunds pass

Aberta
#890 2 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

@sx4im já está trabalhando nisso.

Desde 30/10/2026.

  • #904 de @sx4im — aberto

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript

Direção de pesquisa

Start with the payments rule in server/src/approvals/policy.ts and trace how the safety policy evaluates Shopify action names, descriptions, and arguments. Check how SHOPIFY_UPDATE_ORDER and SHOPIFY_CREATE_REFUND are represented and covered by existing tests. Done means notes on an order no longer trigger a money hand-off while refunds do; the proposed administrator allow rule is an additional design question.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug

What happens

Writing a note on a Shopify order (SHOPIFY_UPDATE_ORDER with only id and note) is handed off to the person as a money action:

approval.evaluated  composio-shopify/SHOPIFY_UPDATE_ORDER
  outcome: { behaviour: "hand_off", source: "safety",
             reason: "Paying, purchasing or moving money is always done by the person." }

Meanwhile SHOPIFY_CREATE_REFUND, which does move money, passes without a hand-off.

The payments rule in server/src/approvals/policy.ts is a keyword regex (payment|pay|checkout|purchase|place order|... |billing). The order-update action's schema or description very likely matched on a word such as billing (it has a billing_address field), while "refund" is not in the list at all.

Suggested fix

  • Classify on what the action does, not on words found anywhere in its schema. At least match against the action's name and the arguments actually sent, not field names that were left empty.
  • Add refunds to the money rule (refund, create_refund), since they move money.
  • Consider letting an administrator mark a specific action as not money-moving (an allow rule that the safety layer respects), with the decision recorded in the audit log.
Linguagem predominante
TypeScript
Estrelas
7.1k
Forks
962
Merge médio
1d 7h
PRs com merge (30d)
143

Preparar o ambiente

  • Inclui um Dockerfile ou arquivo Docker Compose
  • Tem um modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de CopilotKit/OpenBot

Todas as issues de CopilotKit/OpenBot

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.