Centralize output contract validation

This commit is contained in:
2026-08-11 21:21:33 +00:00
parent 8cfc71c351
commit 1cb07c7d91
11 changed files with 432 additions and 49 deletions

View File

@@ -541,8 +541,8 @@ type ExecutionTargetPresence struct {
// does not merge fields. The public Engine validates generated output once and
// does not install an output repairer.
type OutputContract struct {
// Format selects generated artifact metadata. An empty effective value
// defaults to FormatText.
// Format selects generated artifact metadata. An empty value in a non-nil
// request replacement defaults to FormatText.
Format OutputFormat `json:"format"`
// ValidationMode selects the content check. Use one of the declared
// ValidationMode constants.
@@ -550,8 +550,8 @@ type OutputContract struct {
// SchemaPath is required when ValidationMode is ValidationJSONSchema and is
// ignored by other modes.
SchemaPath string `json:"schema_path"`
// RepairAttempts is a requested repair limit. A non-positive value requests
// no repairs. The public Engine performs no repairs even when this value is
// RepairAttempts is a non-negative requested repair limit. Zero requests no
// repairs. The public Engine performs no repairs even when this value is
// positive, so its runs report zero attempts used.
RepairAttempts int `json:"repair_attempts"`
}