Skip to content

fix(telecom): use deterministic bill ID for state replay consistency#148

Open
CormickKneey wants to merge 1 commit intosierra-research:mainfrom
CormickKneey:fix_validation
Open

fix(telecom): use deterministic bill ID for state replay consistency#148
CormickKneey wants to merge 1 commit intosierra-research:mainfrom
CormickKneey:fix_validation

Conversation

@CormickKneey
Copy link

Summary

Fix non-deterministic bill ID generation in telecom domain that causes state replay inconsistency during RL training.

Changes Made

  • Replace random UUID-based bill ID generation (uuid.uuid4().hex[:8]) with deterministic ID based on customer_id and billing period ({customer_id}_{YYYYMM})
  • Add test case to verify deterministic bill ID generation for state replay consistency

Testing

  • Added test_apply_one_time_charge_creates_deterministic_bill_id test that verifies:
    • Two identical database states produce identical bill IDs when the same operation is applied
    • Bill IDs follow the new deterministic format
  • All existing tests pass

Context

During RL training, the environment state needs to be replayed consistently. The original random UUID-based bill ID generation caused non-deterministic behavior - replaying the same actions on the same initial state produced different results due to random bill IDs. This made it impossible to properly validate trajectories during training.

Checklist

  • Tests pass (make test)
  • Code follows style guidelines (make check-all)
  • Documentation updated
  • Breaking changes noted

Replace random UUID-based bill ID generation with deterministic ID
based on customer_id and billing period.
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