fix(config): enforce SUPPORTED_SCHEMA_VERSIONS in config_validate (#335) #350
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!350
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/335-schema-version-enforcement"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #335.
Wave 3 should-fix per Bosun 7f3e autonomous v1.0.0 sprint. Cold-read finding:
version: 999silently passed validation because config_validate only checked "is integer" not "is supported."Fix
config_validateinscripts/lib/config.shnow maintainsSUPPORTED_SCHEMA_VERSIONS=(1)+ rejects unsupported versions with clear error naming what's supported. Forward-compat upgrade path: append 2 when schema v2 arrives.Test coverage
+4 new bats cases (58 → 62 total, passing):
Coordinate
Small scope (config.sh + config.bats). File-disjoint from all other Wave 1-3 PRs — no rebase interaction.
Related
🤖 Generated with Claude Code
Review — #350 config schema-version enforcement (#335), head
4bedd16APPROVED (one non-blocking nit). On current main (
base==merge_base==831353f2), ff-clear. Ranconfig.bats→ 62/62, real exit 0.The enforcement is correct + well-tested
SUPPORTED_SCHEMA_VERSIONS=(1)as the authoritative set, loop-membership check, fail-loud on miss with a message naming both the offending value and the supported set. Clean extension path documented (add2when schema v2 lands; both then validate). The new #335 tests cover exactly the cold-read failure mode:version: 1→ passesversion: 2(future) → rejectsversion: 999(the ChatGPT arbitrarily-high case) → rejects with clear messageversion: 0→ rejectsPlus the pre-existing missing/non-integer guards still green. This closes the "version: 999 silently misinterpreted" hole properly.
Nit (non-blocking) — comment mis-cites the issue
The new comment at
config.shreads…in the supported set (release-toolkit#329).— but #329 is the SemVer-parser blocker; this work is #335. The changelog + tests cite #335 correctly; only the code comment points a future reader at the wrong issue. One-char fix (#329→#335) whenever the file is next touched — not worth a re-spin on its own.Correct, comprehensive, cold-read case covered. Approve.
4bedd16a0129c2277f4bRe-stamp APPROVED — #350 head
29c2277(rebase carry)Approval carries across the rebase. Verified the contribution is byte-identical to what I approved: diffed
main(831353f)..29c2277forconfig.sh+config.bats— sameSUPPORTED_SCHEMA_VERSIONS=(1)+ loop + fail-loud, same +4 tests.config.bats→ 62/62, real exit 0 at this head. Clean rebase-carry (no contribution change; the#329→#335comment nit is still open — non-blocking, as noted). Ship it.