api: merge/preview ignores strategy, squash and allow_unrelated_histories

未关闭
#805 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@ThomasK33 已经在做这个了。

开始于 2026年11月12日。

  • #810 来自 @ThomasK33 —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
go
领域
api

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
Go
星标
0
派生
0
平均合并
6 小时 16 分钟
30 天内合并 PR
243

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

coder/openstorage 的其他 Issue

查看 coder/openstorage 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。