Add versioning contract: semver policy, breaking change sections, schema_version guard

- CHANGELOG: add ### Breaking Changes section to all versions (None for 1.1–1.3)
- README: add Versioning section with semver table and floating tag explanation
- schema/config-schema.json: add schema_version field (const: 1, optional)
- lib/config.sh: fail fast if schema_version is present and unsupported

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-01 00:56:33 +03:00
parent 65cc8eaf8a
commit 479b592076
4 changed files with 34 additions and 0 deletions

View File

@@ -16,6 +16,11 @@ parse_config() {
local config_json
config_json=$(yq -o json "$config_file") || die "Failed to parse ${config_file}"
# Schema version check (optional field — absent means v1)
local schema_version
schema_version=$(echo "$config_json" | jq -r '.schema_version // 1')
[ "$schema_version" = "1" ] || die "Unsupported schema_version ${schema_version} in ${config_file} (this version of josh-sync supports schema_version 1 — see CHANGELOG.md for migration instructions)"
# Export global values
export JOSH_PROXY_URL
JOSH_PROXY_URL=$(echo "$config_json" | jq -r '.josh.proxy_url')