openspec: sms-metering-location-link change
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Per-tag SMS credits
|
||||
Each tag SHALL track `sms_allocated`, `sms_used`, and `sms_period_start`. An allocation of 0 SHALL mean unmetered (no credit limit).
|
||||
|
||||
#### Scenario: Allocated plan
|
||||
- **WHEN** an admin sets `sms_allocated = 10` on a tag
|
||||
- **THEN** the tag may send up to 10 SMS in the period
|
||||
|
||||
#### Scenario: Unmetered default
|
||||
- **WHEN** a tag has `sms_allocated = 0`
|
||||
- **THEN** credit checks do not apply (transitional behaviour)
|
||||
|
||||
### Requirement: Credits required to send
|
||||
Before sending an alert or finder-contact SMS on a metered tag, `sms_used < sms_allocated` SHALL hold. Each successful send SHALL increment `sms_used`. When exhausted, scans are recorded but no SMS is sent.
|
||||
|
||||
#### Scenario: Send consumes a credit
|
||||
- **WHEN** an alert SMS is sent on a metered tag
|
||||
- **THEN** `sms_used` increments by one
|
||||
|
||||
#### Scenario: Credits exhausted
|
||||
- **WHEN** `sms_used >= sms_allocated` on a metered tag
|
||||
- **THEN** further scans record but no SMS is sent
|
||||
Reference in New Issue
Block a user