Draft
Conversation
Contributor
There was a problem hiding this comment.
The PR introduces a mechanism for programmatic ORD document extensions via a cds event system. A few substantive issues were found and flagged: the typeof "array" dead-code guard in the type check, the duplicate id argument passed to the logger, and most importantly the extension application order (file-based content always overrides caller-supplied extensions, which is likely backwards). Additionally, repeated init() calls will accumulate duplicate event listeners.
PR Bot Information
Version: 1.19.9 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback
- Event Trigger:
pull_request.opened - Correlation ID:
007ed570-2c3f-11f1-8dc5-5fc7111fc1fb - Agent Instructions:
- File Content Strategy: Full file content
- LLM:
anthropic--claude-4.6-sonnet
Contributor
Author
|
Counter proposal for: #399 |
81b6b07 to
f839869
Compare
swennemers
approved these changes
Mar 30, 2026
605cb00 to
b864c04
Compare
b864c04 to
2e56b7c
Compare
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.
Allow Custom ORD Document Extensions via Event-Based Registration
New Feature
✨ Introduces support for dynamically registering custom ORD document extensions at runtime via a CDS event mechanism (
ord.extension.publish), in addition to the existing file-based custom ORD content approach.Changes
lib/extend-ord-with-custom.js: ExportedgetCustomORDContentandcompareAndHandleCustomORDContentWithExistingContentindividually from the module. Added a// TODO - To be deletedcomment markingextendCustomORDContentIfExistsfor future removal.lib/ord.js: Updated the main ORD document builder to accept an optionalextensionsarray as a second parameter. Replaced the singleextendCustomORDContentIfExistscall with an iteration over all provided extensions (plus the file-based custom ORD content), applyingcompareAndHandleCustomORDContentWithExistingContentfor each.lib/services/ord-service.js: Added a constructor toOpenResourceDiscoveryServicethat initializes anextensionsmap and registers a listener for theord.extension.publishCDS event. Incoming extensions are stored by ID, and when serving the ORD document, all registered extensions are passed to theord()builder as an array.📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!
PR Bot Information
Version:
1.19.9| 📖 Documentation | 🚨 Create Incident | 💬 Feedbackanthropic--claude-4.6-sonnetpull_request.edited8251b270-2c3f-11f1-9367-315d92ec01eb