Skip to content

feat: Add support for per-context summary events. #126

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

Merged
merged 8 commits into from
May 22, 2025

Conversation

kinyoklion
Copy link
Member

No description provided.

const summary = summarizer.getSummary();
summarizer.clearSummary();
if (summary) {
summary.kind = 'summary';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This moved inside the summarizer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same canonicalization tests as implemented in js-core with test data based on canonicalization spec.

@kinyoklion kinyoklion marked this pull request as ready for review May 20, 2025 22:56
@kinyoklion kinyoklion requested a review from a team as a code owner May 20, 2025 22:56
* @param {any[]?} visited The list of objects that have already been visited to avoid cycles.
* @returns {string} The canonicalized JSON string.
*/
function canonicalize(object, visited = []) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there limitations to how this can be used to avoid a breaking issue? Like persisting the result or sending the result to the cloud? If so, do you think a notice/warning could be useful?

I think it would be when we formalize context canonicalization across the system and it is different than this rfc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently there isn't any breaking issue possible as it is just used internally. If we did use JSON canonicalization for storage or inside events, then this is the RFC we would be using. It is the same spec we use for canonicalization during event ingest for JSON flag values. It would also be good for usage for a secure mode that uses attributes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, not any avoidance I am aware of for this specific implementation. That said if we design a feature where we do use it externally we will want specific validations added as part of that feature. (unless we just use the existing test vectors from the RFC).

@tanderson-ld tanderson-ld self-requested a review May 21, 2025 19:04
@kinyoklion kinyoklion merged commit 05f7d4e into main May 22, 2025
3 checks passed
@kinyoklion kinyoklion deleted the rlamb/EMSR-326/per-context-summary-events branch May 22, 2025 15:50
kinyoklion pushed a commit that referenced this pull request May 22, 2025
🤖 I have created a release *beep* *boop*
---


##
[5.7.0](5.6.0...5.7.0)
(2025-05-22)


### Features

* Add support for per-context summary events.
([#126](#126))
([05f7d4e](05f7d4e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants