Repository navigation
Add single-read typed config validation hooks - #466
Draft
ChristianPavilonis wants to merge 2 commits into
Draft
ChristianPavilonis wants to merge 2 commits into
ChristianPavilonis wants to merge 2 commits into
Conversation
This branch has not been deployed
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
Add optional source and command validation hooks for typed config validate, diff, and push. Existing entry points delegate to no-op hooks and retain their argument types and manifest/adapter validation scopes.
--no-env, and existing strict-validation metadata without adding fields to public argument types.This is the narrow dependency prerequisite for IABTechLab/trusted-server#1194. It is based on v0.0.11, which already contains environment-scoped store selection.
Compatibility
No new provider operations, deployment behavior, storage format, secret-resolution behavior, or runtime dependencies. Source bytes and secret references have no derived Debug implementation and must not be logged by callbacks. Existing typed APIs use the same implementation with no-op hooks.
The tests replace the source after its first read and prove validate/diff/push continue using the original bytes and effective value. Additional cases cover explicit source paths, environment overlay, source rejection before invalid overlay, and command rejection before publication. Existing environment-sensitive push fixtures now share the existing manifest guard; parallel testing exposed previously unguarded reads of transient selector overrides.
Verification
cargo test --locked -p edgezero-cli --lib: 229 passed.cargo test --locked --workspace --all-targets: passed before the final test-only additions; final CLI tests were rerun afterward.cargo clippy --locked --workspace --all-targets --all-features -- -D warnings: passed; final core/CLI all-target/all-feature lint rerun passed.cargo check --locked --workspace --all-targets --features "fastly cloudflare spin": passed.cargo check --locked -p edgezero-adapter-spin --target wasm32-wasip2 --features spin: passed.git diff --check: passed.Closes #470