Skip fallback needs complete, empty evidence; capture lists over-budget changes

The server skip fallback for stages with a skipped edge now applies only
when every earlier visit recorded a complete file-change capture with no
changed files and no image artifact. Any change (no repo-specific UI path
or extension list), any partial/unavailable/missing capture, a human
decision or a checkpoint-retry prefix runs the model. auto_skip=false opts
a stage out. The fallback verdict names the server fallback.

Capture compares over-budget text by hash and, in Git, lists paths it
could not compare when their git status changes, marked no_patch, so a
large workspace no longer records files: [] for a real edit. Run detail
gains a warnings list for partial/unavailable captures, also printed by
inspect on stderr.
This commit is contained in:
2026-11-04 12:56:40 +00:00
parent fa6c0864db
commit f16d61cdfa
14 changed files with 660 additions and 188 deletions
+12
View File
@@ -0,0 +1,12 @@
package stage
import "testing"
func TestAutoSkipConfig(t *testing.T) {
for value, ok := range map[string]bool{"": true, "true": true, "false": true, "no": false, "FALSE": false, "0": false} {
def := Definition{Type: ModelType, Blocks: map[string]string{"prompt": "task", "configs": "config"}, Configs: map[string]string{"provider": "fixture", "model": "model", "auto_skip": value}}
if _, err := (ModelStage{}).Spec(def); (err == nil) != ok {
t.Errorf("auto_skip=%q: err=%v, want ok=%v", value, err, ok)
}
}
}
+6 -1
View File
@@ -79,7 +79,7 @@ func (ModelStage) Spec(def Definition) (ModelSpec, error) {
}
for key := range def.Configs {
switch key {
case "provider", "model", "reasoning_effort", "retries", "timeout", "budget_usd", "budget_tokens", "harness", "delivery":
case "provider", "model", "reasoning_effort", "retries", "timeout", "budget_usd", "budget_tokens", "harness", "delivery", "auto_skip":
default:
return ModelSpec{}, fmt.Errorf("unknown config %q", key)
}
@@ -101,6 +101,11 @@ func (ModelStage) Spec(def Definition) (ModelSpec, error) {
if delivery := def.Configs["delivery"]; delivery != "" && delivery != "true" {
return ModelSpec{}, fmt.Errorf("delivery must be true when set")
}
// auto_skip=false opts a stage with a `skipped` edge out of the server skip
// fallback (the runner reads it); true is the default and may be explicit.
if value := def.Configs["auto_skip"]; value != "" && value != "true" && value != "false" {
return ModelSpec{}, fmt.Errorf("auto_skip must be true or false")
}
if def.Configs["delivery"] == "true" && backend != "opencode" {
return ModelSpec{}, fmt.Errorf("delivery is supported only by the opencode harness")
}