Files
DongHyeonkaandClaude Opus 5.5 17d617ab7a fix(contracts): classify unknown schema changes as breaking and gate the runtime config schema against a baseline (07-02, 13-10)
The classifier called type, enum and nullable changes "none" and treated new
keys under strict readers as additive; FE-GATE-014 only checked hand-written
fixtures. It now fails closed and compares the committed baseline with the
schema the build emits. The doc lists per-boundary reader rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 00:04:25 +09:00

68 lines
2.0 KiB
JSON

{
"schemaVersion": 2,
"cases": [
{
"id": "tolerant-reader-optional-field",
"expected": "additive",
"before": { "required": ["id"], "properties": { "id": {} } },
"after": {
"required": ["id"],
"properties": { "id": {}, "displayName": {} }
}
},
{
"id": "strict-reader-optional-field",
"expected": "breaking",
"before": {
"required": ["APP_ENV"],
"properties": { "APP_ENV": {} },
"additionalProperties": false
},
"after": {
"required": ["APP_ENV"],
"properties": { "APP_ENV": {}, "OPTIONAL_FLAG": {} },
"additionalProperties": false
}
},
{
"id": "required-field-added",
"expected": "breaking",
"before": { "required": ["buildId"], "properties": { "buildId": {} } },
"after": {
"required": ["buildId", "assetManifestHash"],
"properties": { "buildId": {}, "assetManifestHash": {} }
}
},
{
"id": "field-removed",
"expected": "breaking",
"before": { "properties": { "theme": {} } },
"after": { "properties": {} }
},
{
"id": "type-changed",
"expected": "breaking",
"before": { "properties": { "id": { "type": "string" } } },
"after": { "properties": { "id": { "type": "number" } } }
},
{
"id": "enum-narrowed",
"expected": "breaking",
"before": { "properties": { "state": { "enum": ["A", "B"] } } },
"after": { "properties": { "state": { "enum": ["A"] } } }
},
{
"id": "nullable-added",
"expected": "breaking",
"before": { "properties": { "note": { "type": "string" } } },
"after": { "properties": { "note": { "type": ["string", "null"] } } }
},
{
"id": "unchanged",
"expected": "none",
"before": { "required": ["id"], "properties": { "id": { "type": "string" } } },
"after": { "properties": { "id": { "type": "string" } }, "required": ["id"] }
}
]
}