Make Interpreter commands structurally exact

This commit is contained in:
Meta Vens 2026-08-28 20:58:07 +02:00
commit e14156228c
3 changed files with 202 additions and 175 deletions

File diff suppressed because one or more lines are too long

View file

@ -1551,7 +1551,9 @@ mod tests {
.as_ref()
.and_then(|schema| {
schema
.pointer("/properties/decisions/anyOf/0/properties")
.pointer(
"/properties/command/oneOf/0/properties/decisions/properties",
)
.and_then(serde_json::Value::as_object)
})
.map(|properties| properties.keys().cloned().collect::<Vec<_>>())
@ -1570,8 +1572,10 @@ mod tests {
})
.collect::<serde_json::Map<_, _>>();
Ok(serde_json::json!({
"kind":"submit",
"decisions":decisions
"command":{
"kind":"submit",
"decisions":decisions
}
})
.to_string())
}

View file

@ -198,9 +198,10 @@ The Interpreter is a bounded model agent over a private workbench. Its efficient
first action may submit the complete exact decision map only while the draft is
empty. A rejected draft stays in the tool; later actions may upsert or remove
only the exact decisions named as missing or rejected, or inspect the draft.
Its action wire is one strict root object with a typed `kind` discriminant and
nullable payload slots. The workbench owns the legal tool/payload combinations;
an invalid combination becomes a typed agent finding and cannot touch the draft.
Its action wire is one strict root object containing one exact typed command.
The nested command union binds each `kind` to only its own payload, so a model
cannot emit a submit mixed with incremental-edit fields. The workbench remains
the only owner allowed to apply that structurally legal command to the draft.
The tool structurally rejects whole-draft replacement and edits to unrelated
accepted decisions. Local validation returns a typed `local_validation`
finding and the semantic verifier returns exact subject-scoped mismatch