A-286: a member whose fetch merged is previewed and judged whatever its later steps ended with

A check step that errors after its fetch merged ends failed with its answer (the fetch and the levels so far)
beside its error (steprun askrun.go), and the checker previews the merge from it (judge.go), so a failed level
no longer hides the manifest validator and the composition (try 2: catalog, contracts and delivery were
unpreviewed by a seatgen bootstrap failure, not a conflict). Only a head that does not merge or a fetch that
did not answer stays unpreviewed, and the check says which.

Builds: design 47 G A-286 (hq 41dd30fe)
Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-12 15:19:14 +01:00
parent 01fb2e13ca
commit 5fbc366f1b
4 changed files with 60 additions and 12 deletions
+3 -1
View File
@@ -321,7 +321,9 @@ func (s AskSteps) check(ctx context.Context, job sdkstep.CheckJob) (any, error)
_, err := s.level(ctx, job, level, f, runner, &la)
answer.Levels = append(answer.Levels, la)
if err != nil {
return nil, err
// The fetch merged: its answer is kept on the failed step's end, so the checker previews the merge and judges its
// manifests whatever the level ended with (design 47 G A-286).
return answer, err
}
}
return answer, nil
@@ -176,6 +176,20 @@ test {"level":"integration","packages":["x/pkg/a"],"workspace":"/w"}`
t.Fatalf("the unit level %+v", u)
}
// Design 47 G A-286: a level that errors after the fetch merged ends the step failed with its answer all the same, the
// fetch and the levels so far beside the error, so the checker previews the merge from it.
r.calls = nil
steps := r.steps()
steps.Test = func(context.Context, map[string]any) (any, error) {
return nil, errors.New("the seat definitions in . do not generate")
}
out, err = RunAsk(context.Background(), steps, ask(sdkstep.CheckJob{Levels: []string{sdkstep.LevelUnit, sdkstep.LevelIntegration},
Fetch: sdkstep.Fetch{Repository: "novox/x", Commit: runCommit}}))
if failed, _ := out.(sdkstep.CheckAnswer); err == nil || !strings.Contains(err.Error(), "the unit level") || failed.Fetch.Workspace != "/w" ||
len(failed.Levels) != 1 || failed.Levels[0].Level != sdkstep.LevelUnit {
t.Fatalf("a level that errors: answer %+v, err %v; want the fetch and the unit level beside the error", out, err)
}
// ADR 0567 §12: a check's node names reach the digest and test tools, for the names check (a kept verdict misses when
// they change).
r.calls = nil