Remove legacy reconciliation path
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package semanticreconcile
|
||||
|
||||
import "sort"
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
)
|
||||
|
||||
// ProposalResponse is the complete private structured response contract.
|
||||
type ProposalResponse struct {
|
||||
@@ -35,6 +38,16 @@ type Issue struct {
|
||||
Category IssueCategory
|
||||
}
|
||||
|
||||
// IssueDetails renders stable, domain-neutral proposal diagnostics for an
|
||||
// adapter's retry message.
|
||||
func IssueDetails(issues []Issue) []string {
|
||||
details := make([]string, len(issues))
|
||||
for index, issue := range issues {
|
||||
details[index] = fmt.Sprintf("group %d: %s", issue.GroupIndex, issue.Category)
|
||||
}
|
||||
return details
|
||||
}
|
||||
|
||||
// PlanGroup identifies one validated group using original candidate positions.
|
||||
type PlanGroup struct {
|
||||
memberPositions []int
|
||||
|
||||
@@ -39,6 +39,17 @@ func TestAssessProducesAStableOriginalPositionPlan(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIssueDetailsPreservesIssueOrder(t *testing.T) {
|
||||
issues := []Issue{
|
||||
{GroupIndex: 3, Category: IssueCanonicalUnknown},
|
||||
{GroupIndex: 1, Category: IssueMemberUnknown},
|
||||
}
|
||||
want := []string{"group 3: canonical_unknown", "group 1: member_unknown"}
|
||||
if got := IssueDetails(issues); !reflect.DeepEqual(got, want) {
|
||||
t.Fatalf("IssueDetails() = %#v, want %#v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAssessRejectsEveryUnsafeLocalGroupShape(t *testing.T) {
|
||||
preparation := proposalPreparation(t)
|
||||
tests := []struct {
|
||||
|
||||
Reference in New Issue
Block a user