Engine: check stages, harness-agnostic delivery, read-only enforcement, complete captures
- New `type=check` stage: the server runs a `commands` block (sh -c, per command_timeout, workspace env) and routes on pass/fail; per-command status, exit code, duration and bounded output are recorded and the failing output is the handoff. With delivery=true it is the landing gate (commit leftovers, merge moved main, checks in a fresh candidate worktree, fast-forward main). Parser/registry, lint (silent guards), format docs, CLI inspect, app graph and run detail rendering. - delivery=true is accepted on every harness (and on check stages). - permissions.shell on claude stages maps to Bash(cmd) / Bash(prefix:*) rules instead of a bare Bash allow; stages without edit that change the workspace fail the visit with the changed files listed (allow_workspace_changes=true opts out; artifacts, public and harness state dirs are ignored). - File-change capture: symlinks compared by target, untouched protected files no longer make captures partial, untracked caches/dependency/build output left out, lockfiles listed without patch, huge files compared by metadata, raised patch/line limits. Outcome repair follow-ups are logged and counted on the step (control.outcome_repairs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -84,7 +84,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", "auto_skip":
|
||||
case "provider", "model", "reasoning_effort", "retries", "timeout", "budget_usd", "budget_tokens", "harness", "delivery", "auto_skip", "allow_workspace_changes":
|
||||
default:
|
||||
return ModelSpec{}, fmt.Errorf("unknown config %q", key)
|
||||
}
|
||||
@@ -111,8 +111,10 @@ func (ModelStage) Spec(def Definition) (ModelSpec, error) {
|
||||
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")
|
||||
// allow_workspace_changes=true lets a stage without edit leave file changes
|
||||
// in the run directory; by default the runner fails such a visit.
|
||||
if value := def.Configs["allow_workspace_changes"]; value != "" && value != "true" && value != "false" {
|
||||
return ModelSpec{}, fmt.Errorf("allow_workspace_changes must be true or false")
|
||||
}
|
||||
if err := ValidateChecksBlock(def); err != nil {
|
||||
return ModelSpec{}, err
|
||||
@@ -143,8 +145,8 @@ func (ModelStage) Spec(def Definition) (ModelSpec, error) {
|
||||
if _, err := claudeTools(tools); err != nil {
|
||||
return ModelSpec{}, err
|
||||
}
|
||||
if _, present := def.Blocks["permissions"]; present {
|
||||
return ModelSpec{}, fmt.Errorf("the claude harness cannot enforce a permissions block; use the opencode harness for this stage")
|
||||
if err := claudePermissionsSupported(def); err != nil {
|
||||
return ModelSpec{}, err
|
||||
}
|
||||
if effort == "none" || effort == "minimal" {
|
||||
return ModelSpec{}, fmt.Errorf("the claude harness supports reasoning_effort low, medium, high, xhigh or max")
|
||||
|
||||
Reference in New Issue
Block a user