feat(node): add context-level default namespace inheritance for nodes#138
Merged
YuanYuYuan merged 7 commits intoZettaScaleLabs:mainfrom May 8, 2026
Merged
feat(node): add context-level default namespace inheritance for nodes#138YuanYuYuan merged 7 commits intoZettaScaleLabs:mainfrom
YuanYuYuan merged 7 commits intoZettaScaleLabs:mainfrom
Conversation
70e05ef to
0ddedae
Compare
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
a6ee505 to
0d2b3e2
Compare
create_lifecycle_node was always setting namespace: None, silently ignoring any context-level default set via ZContextBuilder::with_namespace. Mirrors the same propagation logic used by create_node.
…mespace Used Into<String> without normalization, unlike ZNodeBuilder and ZContextBuilder which both use AsRef<str> + normalize_node_namespace. Ensures consistent namespace formatting across all builder types.
Inserting a field in the middle of a #[repr(C)] struct shifts the memory layout of all subsequent fields, breaking C/Go callers that zero-initialize and assign by field name. New fields must be appended at the end.
Verify that lifecycle nodes inherit the context namespace by default, that a node-level override takes precedence, and that no namespace defaults to the root.
0d2b3e2 to
2108005
Compare
Collaborator
Review fixesThe following issues were addressed and pushed to this branch: Bug fix (High)
ABI fix (Medium)
Consistency fix (Low)
Tests (Medium)
Revised. Thanks @schmidma! |
- Replace is_empty() || == "/" dual check with assert_eq!("") since
normalize_node_namespace always converts "/" to "" and context
default is already empty
- Add three parallel tests for create_node context namespace inheritance
(inherit, override precedence, no-namespace default) matching the
existing lifecycle node coverage
YuanYuYuan
approved these changes
May 8, 2026
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.
Description
This adds namespace inheritance at the context level so a
ZContextBuildercan define a default namespace that is forwarded to nodes created from that context.Nodes still keep their existing
with_namespace(...)override behavior, so explicit node namespaces continue to take precedence.Review Notes
This PR is intended to be reviewed independently against
main.The local integration branch
nextcarries the combined stack used for downstream preview work.Checklist
./scripts/check-local.shsuccessfully