Repository navigation
feat: reject codeint.json when $schema targets a newer codeint version - #166
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reject
codeint.jsonwith exit code2when its official$schemaURL targets a newer codeint release (major.minor.patch) than the running binary, before running shape validation so users get a clear upgrade instruction instead of an unknown-key error.Tier
Tier 2 from the tier check: updates
crates/config/src/codeint_json.rs,crates/cli/src/remedy.rs,crates/cli/tests/check.rs, and documentation.Task
Owner request in session: fail with a clear error when
codeint.jsonassumes a newer version than the running binary.$schemaversion tags (vX.Y.Z) and reject when greater thanCARGO_PKG_VERSION.$schema, and custom/local$schemaURLs.crates/cli/src/remedy.rs, unit tests incrates/config, and end-to-end CLI test incrates/cli/tests/check.rs.docs/reference.mdanddocs/guide/configuration.md.Fail-first test
crates/cli/tests/check.rs::a_codeint_json_with_a_newer_schema_version_exits_2unknown key future_keyinstead of rejecting the newer$schemaversionv99.0.0.2and the version mismatch error + upgrade remedy.Checks
cargo clippy --workspace --all-targets -- -D warningscargo test --package codeint-config --lockedcargo test --package codeint-cli --test check a_codeint_json_with_a_newer_schema_version_exits_2 --lockedcargo test --package codeint-cli --test reference --lockedcargo run --package xtask -- merged-resultcargo run --package codeint-cli -- diff origin/mainSafety proof
https://raw.githubusercontent.com/avidianity/codeint/v.../schema/codeint.schema.jsonURLs, never blockscodeint update, and compiles with#![forbid(unsafe_code)].crates/configverify newer major/minor/patch rejection and equal/older/missing/custom acceptance;crates/cli/tests/check.rs::a_codeint_json_with_a_newer_schema_version_exits_2verifies exit code 2 end-to-end.interrogate: none required below Tier 3.Runtime evidence
crates/cli/tests/check.rs::a_codeint_json_with_a_newer_schema_version_exits_2andcrates/cli/tests/reference.Gaps