From 8bc73c54372bed150917af7277c1ba879d54508e Mon Sep 17 00:00:00 2001 From: Wils Dawson Date: Tue, 1 Sep 2026 10:55:21 -0700 Subject: [PATCH] fix(engine/2.0): stop rejecting valid engine postgres config The storage subtree closed every object with `additionalProperties: false`, so the schema had to enumerate each field the engine accepts or reject it. It fell behind: `target_session_attrs` has been read by the engine for a while, and `max_conns` joins it, and both were rejected. Because the two postgres variants sit inside a `oneOf`, an unknown key fails every branch, so the error lands on the whole `storage` node instead of naming the offending field. Enumerating fields here means a second place to update whenever engine config grows, and the failure mode when it is missed is a hard reject of a config the engine runs happily. Open the subtree instead. The variants are discriminated by `required`, not by `additionalProperties`, so this does not weaken them: an embedded config still matches only the data_path variant, an external one only the host variant, and a config carrying both is still ambiguous and rejected. A typo in a required key is still caught by `required`. What is given up is catching a typo in an optional key. Co-Authored-By: Claude Opus 5 (1M context) --- engine/config/2.0/schema.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/config/2.0/schema.json b/engine/config/2.0/schema.json index dcbe481..ca84b60 100644 --- a/engine/config/2.0/schema.json +++ b/engine/config/2.0/schema.json @@ -553,7 +553,7 @@ } }, "required": ["data_path"], - "additionalProperties": false + "additionalProperties": true }, { "type": "object", @@ -602,13 +602,13 @@ } }, "required": ["host", "port", "user", "password", "db", "sslmode"], - "additionalProperties": false + "additionalProperties": true } ] } }, "required": ["postgres"], - "additionalProperties": false + "additionalProperties": true } ] },