When updating configuration schemas (and related env/test fixtures), treat the schema as a contract with runtime unmarshalling and deployment timing.

Apply these rules: 1) Mirror secret-aware runtime types in the schema

Example pattern (JSON Schema):

{
  "anyOf": [
    { "type": "string" },
    {
      "type": "object",
      "properties": {
        "value": { "type": "string" },
        "env_var": { "type": "string" },
        "from_env": { "type": "boolean" }
      },
      "required": ["value"],
      "additionalProperties": false
    }
  ]
}

2) Verify the config effect end-to-end (release coupling)

3) Avoid out-of-scope “partial tightening”

4) Keep test/env files suite-scoped

Outcome: schema validation should align with real runtime parsing, and “valid configs” should produce the intended behavior in the correct release.