Repository navigation
test(tools): table-drive description contract checks - #1406
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.
The coding-loop description contract test repeated per-tool lookup, lowercasing and assertion loops. Replace those loops with named tables of tools, required phrases and forbidden phrases, sharing assertion messages that identify the tool/schema field, phrase and actual description. Keep registered tools and exact-manifest specialists in separate tables backed by their original inventories.
Preserve all 274 phrase checks (257 required, 17 forbidden), including shared Cargo validation expectations. Move the existing Git diff paging budget/cursor checks and persistent-shell result/resource schema checks into two focused tests. Production descriptions and all following tests remain unchanged. Only registry_specs.rs changes, with a net reduction of 66 lines.
Validation:
cargo test --locked -p webcodex-tool-contracts --lib tests::registry_specs -- --quiet— 10 passed.cargo test --locked -p webcodex-tool-contracts --lib --all-features tests::registry_specs -- --quiet— 10 passed.never replay effectsfrom work_on_project and inserting a forbidden phrase into read_files both fail with the exact tool/phrase diagnostic. Probe edits were restored before the final passing runs.git diff --checkpassed.