Memory update from review of PR #4#5
Open
arcanist[bot] wants to merge 2 commits into
Open
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.
Memory updates from PR #4
Add: When adding a new operator using the @operator decorator, especially if the function has a suffix (e.g.,
_op) that differs from the intended registry name.Type:
gotchaMemory:
When registering operators with the
@operatordecorator, always pass an explicitname=parameter. The decorator falls back tofunc.__name__when no name is given — so a function namedpack_candidates_opregisters as"pack_candidates_op", not"pack_candidates". Any code that looks up operators by their intended semantic name (e.g.,NoN.from_operators(["pack_candidates"])) will fail silently at lookup time rather than at definition time.Rationale:
Why this is a memory (not a convention update): This is a situational pattern that helps the agent in specific contexts, not a permanent rule for all future code.
Referenced files:
nons/operators/deterministic.pyAdd: When designing multi-layer NoN pipelines where one operator returns a list (e.g.,
List[Candidate]) that feeds into a downstream single-node operator expecting the full collection.Type:
gotchaMemory:
In
Layer._prepare_inputs, list inputs are distributed 1-to-1 across nodes only whenlen(self.nodes) > 1. For single-node layers, any list input is always broadcast as-is. This means if an operator returns aList[T]and the next layer has exactly one node, that node receives the full list — not individual elements. Be aware of this when chaining operators that return collections through single-node layers.Rationale:
Why this is a memory (not a convention update): This is a situational pattern that helps the agent in specific contexts, not a permanent rule for all future code.
Referenced files:
nons/core/layer.pySessions:
5ea2a0a0-6590-4a63-bca5-b2ad4ad1bdbbMerge to apply. Close to discard.