api: merge/preview ignores strategy, squash and allow_unrelated_histories

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

Mantenedores costumam responder em até 1 dia

@ThomasK33 já está trabalhando nisso.

Desde 12/11/2026.

  • #810 de @ThomasK33 — aberto

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Estagnada
Stack de tecnologia
go
Domínio
api

Direção de pesquisa

Start by comparing the /repos/merge/preview and v1 handlers with the /merge route’s decision code, then trace how each route reads strategy, squash, and allow_unrelated_histories. Add tests for the listed cases that compare preview results with the merge route’s answer, including the unrelated histories response. Done means the preview matches the merge route for each parameter combination.

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

Descrição

Problem

Spec 5d8e1801 says GET /repos/merge/preview (and v1) gives the result POST /merge would give with the same strategy, squash and allow_unrelated_histories, adds the results squash and rejected, and documents 412 for unrelated histories. SDK 0.1.2 sends all three.

We read none of them. Live at 3af232d9: strategy=merge gave fast_forward (upstream: merge_commit), squash=true gave fast_forward (upstream: squash), ff_only on diverged branches gave merge_commit (upstream: rejected), and unrelated histories gave 200 merge_commit (upstream: 412).

Desk decision

Read the three params and compute the preview with the same decision code POST /merge uses, so the two cannot drift. Test each case against the merge route's own answer.

Severity

Medium: a client that previews before merging gets a wrong prediction.

Upstream audit 2026-11-12, evidence 2026-11-12-1159UTC. Docs spec 5d8e1801 (ETag W/"8GUlAlKU8eko7Rr2", Last-Modified 2026-11-10 22:29:59 GMT). The cluster still serves ee8092bf, so this is documented drift, not a proven deployment (#234 rule: adopt what the docs publish). SDK 0.1.1 (Nov 10) and 0.1.2 (Nov 11) shipped on npm, PyPI and Go; their route list and token minting are unchanged from 0.1.0.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: medium

Linguagem predominante
Go
Estrelas
0
Forks
0
Merge médio
6h 16min
PRs com merge (30d)
243

Preparar o ambiente

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 coder/openstorage

Todas as issues de coder/openstorage

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

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