Skip to content

Fix object_field_type_validation_test.rs after the collection field rename - #2462

Merged
mstomar125 merged 1 commit into
mainfrom
hotfix-object-field-test-collection-rename
Sep 8, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
hotfix-object-field-test-collection-rename

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

Summary

origin/main currently fails to compile with --all-targets: packages/core/tests/object_field_type_validation_test.rs still used the pre-rename field names/shapes for CreateNodeInput/UpdateNodeInput.

PR #2450 renamed:

  • CreateNodeInput.collection: Option<String> → collections: Vec<String> + collection_ids: Vec<String>
  • UpdateNodeInput.add_to_collection/remove_from_collection → add_to_collections: Vec<String> + add_to_collection_ids: Vec<String> + remove_from_collection_ids: Vec<String>

PR #2458 (which added object_field_type_validation_test.rs) landed on top of #2450 without picking up that rename, so the test file uses the old field names — cargo test --workspace --tests (part of the standard pre-push gate) fails to compile for anyone touching packages/core, whether or not their change has anything to do with collections.

Found this mid-rebase on an unrelated branch; not something I introduced. Fixing it standalone since it's currently blocking every push that runs the full test suite.

Changes

Purely mechanical: update the 5 struct-literal sites in the test file to the current field names/shapes (None → vec![] where the field type also changed from Option<...> to a plain Vec<...>). No behavior change to the test file's actual assertions.

Test plan

  • cargo test -p nodespace-core --test object_field_type_validation_test — all 13 tests pass
  • cargo check -p nodespace-core --all-targets — compiles clean

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

…ename

CreateNodeInput.collection and UpdateNodeInput.add_to_collection/
remove_from_collection were renamed to collections/collection_ids and
add_to_collections/add_to_collection_ids/remove_from_collection_ids
(the --collection flag work), but this test file still used the old
field names and shapes -- main did not compile with --all-targets.

Co-Authored-By: Claude <[email protected]>
@mstomar125

Copy link
Copy Markdown
Contributor Author

Quick review: mechanical field-rename fix, verified the new field names (collections, collection_ids, add_to_collections, add_to_collection_ids, remove_from_collection_ids) exactly match CreateNodeInput/UpdateNodeInput on current main. No logic changes, single test file, zero risk. Merging now — this is actively blocking several other in-flight agents' pre-push gates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant