Skip to content

Conversation

@jkebinger
Copy link
Contributor

Summary

Adds an Optional<Long> envId field to the Match class that reports the environment ID of the ConfigRow that matched during config evaluation.

Changes

  • Added envId field to Match class with getter method
  • Updated ConfigRuleEvaluator to extract and pass the project_env_id from matched ConfigRow
  • Updated ConfigResolver to preserve envId when reifying matches
  • Updated all test files to include envId parameter in Match constructor calls

Details

The envId field is Optional<Long> because the project_env_id field in ConfigRow is optional - it's only populated for environment-specific rows, not for default environment rows.

All 428 tests pass successfully.

🤖 Generated with Claude Code

Adds an Optional<Long> envId field to the Match class that reports
the environment ID of the ConfigRow that matched. The field is empty
for default environment rows that don't have a project_env_id set.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jkebinger jkebinger requested a review from a team as a code owner October 8, 2025 16:04
Copy link
Contributor

@jdwyah jdwyah left a comment

Choose a reason for hiding this comment

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

thanks

@jkebinger jkebinger merged commit 63f371d into main Oct 8, 2025
4 checks passed
@jkebinger jkebinger deleted the add-envid-to-match branch October 8, 2025 16:15
jkebinger added a commit to ReforgeHQ/sdk-java that referenced this pull request Oct 8, 2025
Adds an Optional<Long> envId field to the Match class that reports
the environment ID of the ConfigRow that matched during config evaluation.
This allows consumers to know which environment's configuration was used.

Changes:
- Add envId field to Match class with getter
- Update ConfigRuleEvaluator to extract project_env_id from ConfigRow
- Update ConfigResolver to preserve envId when reifying matches
- Update test files to include envId parameter in Match constructors

Ported from prefab-cloud/prefab-cloud-java#154

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
jkebinger added a commit to ReforgeHQ/sdk-java that referenced this pull request Oct 8, 2025
Adds an Optional<Long> envId field to the Match class that reports
the environment ID of the ConfigRow that matched during config evaluation.
This allows consumers to know which environment's configuration was used.

Changes:
- Add envId field to Match class with getter
- Update ConfigRuleEvaluator to extract project_env_id from ConfigRow
- Update ConfigResolver to preserve envId when reifying matches
- Update test files to include envId parameter in Match constructors

Ported from prefab-cloud/prefab-cloud-java#154

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.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.

3 participants