Stabilize guarded model delivery
Add validated OpenCode-only delivery capabilities, canonical linked-worktree access checks, isolated candidate verification, and guarded main settlement. Wire the bounded reconnect-foreground controlled HTTP fixture through ordinary server construction so target verification obtains server-controlled provenance and rejects unknown or incompatible fixture evidence. Checked packaged templates and packaged authoring skill references; no updates are needed because this draft-only infrastructure activates no definition. Recorded the stale reference and activation guidance in docs/notes/delivery-stabilization.md for the docs fold.
This commit is contained in:
+14
-2
@@ -59,7 +59,7 @@ func (ModelStage) Spec(def Definition) (ModelSpec, error) {
|
||||
}
|
||||
for block := range def.Blocks {
|
||||
switch block {
|
||||
case "output", "prompt", "edges", "configs", "tools", "permissions":
|
||||
case "output", "prompt", "edges", "configs", "tools", "permissions", "checks", "verification":
|
||||
default:
|
||||
return ModelSpec{}, fmt.Errorf("unexpected block %q for model stage", block)
|
||||
}
|
||||
@@ -70,6 +70,9 @@ func (ModelStage) Spec(def Definition) (ModelSpec, error) {
|
||||
if _, err := StagePermissions(def); err != nil {
|
||||
return ModelSpec{}, err
|
||||
}
|
||||
if _, err := VerificationTargetFor(def); err != nil {
|
||||
return ModelSpec{}, err
|
||||
}
|
||||
for _, key := range []string{"provider", "model"} {
|
||||
if def.Configs[key] == "" {
|
||||
return ModelSpec{}, fmt.Errorf("missing config %s", key)
|
||||
@@ -77,7 +80,7 @@ func (ModelStage) Spec(def Definition) (ModelSpec, error) {
|
||||
}
|
||||
for key := range def.Configs {
|
||||
switch key {
|
||||
case "provider", "model", "retries", "timeout", "budget_usd", "budget_tokens", "harness":
|
||||
case "provider", "model", "retries", "timeout", "budget_usd", "budget_tokens", "harness", "delivery":
|
||||
default:
|
||||
return ModelSpec{}, fmt.Errorf("unknown config %q", key)
|
||||
}
|
||||
@@ -92,6 +95,15 @@ func (ModelStage) Spec(def Definition) (ModelSpec, error) {
|
||||
if backend != "opencode" && backend != "pi" {
|
||||
return ModelSpec{}, fmt.Errorf("harness must be opencode or pi")
|
||||
}
|
||||
if delivery := def.Configs["delivery"]; delivery != "" && delivery != "true" {
|
||||
return ModelSpec{}, fmt.Errorf("delivery must be true when set")
|
||||
}
|
||||
if def.Configs["delivery"] == "true" && backend != "opencode" {
|
||||
return ModelSpec{}, fmt.Errorf("delivery is supported only by the opencode harness")
|
||||
}
|
||||
if _, present := def.Blocks["checks"]; present && def.Configs["delivery"] != "true" {
|
||||
return ModelSpec{}, fmt.Errorf("checks block is supported only by delivery stages")
|
||||
}
|
||||
if backend == "pi" {
|
||||
tools, _, _ := ToolNames(def)
|
||||
if _, err := piTools(tools); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user