Skip to content

NOJIRA: support an optional seed on percent conditions - #10

Merged
dkaysin merged 1 commit into
mainfrom
feature/nojira-percent-condition-seed
Jul 23, 2026
Merged

dkaysin merged 1 commit into
mainfrom
feature/nojira-percent-condition-seed

Conversation

@dkaysin

@dkaysin dkaysin commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add an optional seed argument to ConditionBuilder.PERCENT().GT() / .LTE() / .BETWEEN(), threaded into PercentCondition so percent conditions can pin the hashing seed. Renders as percent('seed') <op> N, matching Firebase Remote Config's condition-expression syntax; omitting it keeps the default per-project randomization.
  • Validate PercentCondition.seed against Firebase's constraint (0-32 characters from [-_.0-9a-zA-Z]), so a malformed seed is rejected up front instead of by the Remote Config API.
  • Add tests for the builder seed path and seed validation.
  • Bump version to 0.3.0 and add a CHANGELOG.md entry.

Add an optional `seed` argument to ConditionBuilder.PERCENT().GT()/.LTE()/
.BETWEEN(), threaded into PercentCondition so percent conditions can pin the
hashing seed (renders as `percent('seed') <op> N`). Omitting it keeps the
default per-project randomization.

Validate PercentCondition.seed against Firebase's constraint (0-32 characters
from [-_.0-9a-zA-Z]) so a malformed seed is rejected before reaching the API.

Bump version to 0.3.0 and add a changelog entry.
@dkaysin
dkaysin merged commit 171d4bb into main Jul 23, 2026
2 checks passed
@dkaysin
dkaysin deleted the feature/nojira-percent-condition-seed branch July 23, 2026 13:59
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.

1 participant