Skip to content

chore: Declare the hook-environment-id contract test capability - #1849

Open
kinyoklion wants to merge 3 commits into
mainfrom
devin/1786558059-hook-environment-id-capability
Open

chore: Declare the hook-environment-id contract test capability#1849
kinyoklion wants to merge 3 commits into
mainfrom
devin/1786558059-hook-environment-id-capability

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Aug 12, 2026

Copy link
Copy Markdown
Member

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Depends on launchdarkly/sdk-test-harness#410, which adds the hook-environment-id capability and a test asserting evaluationSeriesContext.environmentId.

Describe the solution you've provided

The node server contract-test service only needed to declare the capability: TestHook forwards the whole EvaluationSeriesContext to the callback, so environmentId is already in the payload, and HookRunner gets it from getInitMetaData().

Verified with a local build of the harness branch: hooks/evaluation/provides the environment ID passes.

Describe alternatives you've considered

None; no code change is required beyond the capability.

Additional context

The capability only takes effect once the harness change is released; until then it is ignored by the harness.

Link to Devin session: https://app.devin.ai/sessions/bfe54128e2804a96bb100e6120e9a3ef
Requested by: @kinyoklion


Note

Overview
Registers the hook-environment-id contract-test capability on the Node server contract-test service so the harness can run the evaluation-hook test that checks evaluationSeriesContext.environmentId.

No SDK logic changes in this PR—the service already forwards the full evaluation series context (including environment ID from init metadata) to hook callbacks; this only advertises support to the test harness once the harness change is available.

Reviewed by Cursor Bugbot for commit fd61913. Bugbot is set up for automated code reviews on this repo. Configure here.

@kinyoklion kinyoklion self-assigned this Aug 12, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32142 bytes
Compressed size limit: 34000
Uncompressed size: 114604 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26360 bytes
Compressed size limit: 29000
Uncompressed size: 129188 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179980 bytes
Compressed size limit: 200000
Uncompressed size: 831788 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 39099 bytes
Compressed size limit: 39300
Uncompressed size: 213748 bytes

@devin-ai-integration

Copy link
Copy Markdown
Contributor

@cursor review

@devin-ai-integration devin-ai-integration Bot added the devin-pr PRs created by Devin AI label Aug 12, 2026
devin-ai-integration Bot and others added 2 commits August 12, 2026 21:54
Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
@kinyoklion
kinyoklion marked this pull request as ready for review August 12, 2026 22:25
@kinyoklion
kinyoklion requested a review from a team as a code owner August 12, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devin-pr PRs created by Devin AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants