Repository navigation
Expose event release lifecycle metadata - #688
Open
alisawavezen12 wants to merge 8 commits into
Open
alisawavezen12 wants to merge 8 commits into
alisawavezen12 wants to merge 8 commits into
Conversation
Include unchecked releases without events and ignore empty or placeholder release names.
neSpecc
reviewed
Oct 28, 2026
neSpecc
left a comment
Member
There was a problem hiding this comment.
A few notes on the release metadata. The most important one is the unguarded event.payload access in _composeEventWithRepetition; the rest are about consistency of release names and the cost/semantics of latestRelease.
neSpecc
reviewed
Nov 1, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The newest-release lookup uses an index that cannot satisfy the _id sort, forcing each new request to scan the project's full release history.
1 open issue
What changed in this PR
Exposes event release lifecycle metadata through GraphQL to support New, Resolved, and Regression labels while preserving the original event’s release when viewing repetitions.
Changes:
- Adds nullable lifecycle release fields and an
isNewflag based on the newest registered project release. - Normalizes release identifiers and preserves original metadata across event composition paths.
- Adds utility, factory, and GraphQL tests; bumps the package version to
1.7.0.
| File | Description |
|---|---|
test/utils/releaseName.test.ts |
Tests release identifier normalization. |
test/resolvers/event-release-metadata.test.ts |
Tests GraphQL metadata, isNew, and request caching. |
test/models/releasesFactory-is-new.test.ts |
Tests latest-release comparisons, caching, and Mongo query behavior. |
test/models/eventsFactory-release-metadata.test.ts |
Tests metadata preservation across originals and repetitions. |
src/utils/releaseName.ts |
Adds shared release-name normalization. |
src/typeDefs/event.ts |
Declares lifecycle release fields and isNew. |
src/resolvers/event.js |
Resolves normalized metadata and release-based newness. |
src/models/releasesFactory.ts |
Adds a cached latest-registered-release lookup. |
src/models/eventsFactory.js |
Preserves original lifecycle metadata during composition. |
package.json |
Bumps the version to 1.7.0. |
Review effort: Balanced
neSpecc
reviewed
Nov 1, 2026
neSpecc
reviewed
Nov 1, 2026
Use a cursor to find the newest valid registered release, sharing in-flight lookups through request context rather than factory state. Handle lookup failures safely and update resolver documentation and tests.
…x-team/hawk.api.nodejs into feat/event-release-metadata
neSpecc
approved these changes
Nov 11, 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.

Adding "Resolved", "New", "Regression" label to events. Related codex-team/hawk.workers#590
Summary
firstSeenInRelease,resolvedInRelease, andregressionInReleasefields to GraphQL Event.