-
-
Notifications
You must be signed in to change notification settings - Fork 692
maintain proper context in metadata.root and parent getters #1917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maintain proper context in metadata.root and parent getters #1917
Conversation
🦋 Changeset detectedLatest commit: b1009ea The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Caution Review failedThe pull request is closed. """ WalkthroughThe pull request refactors the implementations of the getter methods in both the StandardMetadataManager and NoopRunMetadataManager classes. Local variables are now used to capture the context previously accessed via Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Manager as MetadataManager
participant Updater as RunMetadataUpdater
Client->>Manager: Invoke getter (root/parent)
Manager-->>Client: Return updater (using local self & updater variable)
Client->>Updater: Call set/update method
Updater->>Manager: Append operation using local context
Updater-->>Client: Return updater for chaining
Client->>Updater: Invoke stream
Updater->>Manager: Execute stream via self.doStream
Manager-->>Updater: Return stream result
Assessment against linked issues
Possibly related PRs
Poem
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
maintain proper context in metadata.root and parent getters
Closes #1904
✅ Checklist
Testing
Created several test cases to validate the fix:
Changelog
Fixed an issue where metadata.root.set() and similar methods would fail when used inside JavaScript classes. The fix properly maintains context when chaining method calls by storing local references to return objects instead of using this.root and this.parent.
Screenshots
N/A - This is an internal API fix with no visual changes.
Summary by CodeRabbit