api: merge/preview ignores strategy, squash and allow_unrelated_histories

Đang mở
#805 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ThomasK33 đang làm issue này rồi.

Từ ngày 12/11/2026.

  • #810 của @ThomasK33 — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Go
Star
0
Fork
0
Merge trung bình
6 giờ 16 phút
Pull request đã merge (30 ngày)
243

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coder/openstorage

Tất cả issue của coder/openstorage

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.