Admin Auth
- Login form loads for an unauthenticated visitor
- Dashboard redirects to login when not authenticated
- Valid login redirects to dashboard
- Wrong password is rejected
- Fifth consecutive failure locks the account for fifteen minutes
- Authenticated session persists across subsequent calls
- Disabled admin cannot log in
Admin Role Filter
- Support cannot reach provider configuration
- Super admin can reach provider configuration
- Accounts can reach the ledger but not sender id approval
- Disabled admin account loses access on the very next request
Authentication
- Valid bearer auth succeeds
- Missing auth returns 401 auth required
- Malformed bearer scheme returns 401
- Wrong bearer secret returns 401 invalid credentials
- Unknown api key returns 401 invalid credentials
- Revoked credential returns 401 credential revoked
- Suspended tenant returns 403 tenant suspended
- Valid hmac auth succeeds
- Wrong hmac signature returns 401 sig invalid
- Replayed nonce returns 401 nonce replay
- Skewed timestamp returns 401 timestamp skew
- Non whitelisted ip returns 403
- Missing scope returns 403 scope forbidden
Balance Auditor
- Find drifted returns only the mismatched tenant
Bulk
- Personalized messages each get their own encoding and cost
- Allow partial queues as many as fit and rejects the rest
- Fully affordable bulk queues everything
- Invalid message item returns 400 validation error
Bulk Sms Bd Provider
- Send posts personalized messages to smsapimany
- Known error code maps to human message
- Unknown error code still surfaces the raw code
- Connection failure throws provider unavailable
- Check balance parses numeric field
- Base url is overridable
Credit Service
- Reserve debits balance and writes ledger row
- Reserve throws insufficient balance and writes nothing
- Reserve respects credit limit
- Reserve throws tenant not found
- Reserve is idempotent per idempotency key
- Charge finalizes reserve with zero net balance change
- Charge is idempotent per reference
- Refund reverses reserve
- Refund is idempotent per reference
- Topup credits balance without sufficiency check
- Adjust negative respects sufficiency
- Adjust positive does not check sufficiency
- Ledger rows cannot be updated or deleted
- Concurrent reserves only one succeeds when balance covers only one
Cross Tenant Isolation
- Tenant only sees its own sender ids
- Other tenant sees only its own rows too
Csv Recipient Parser
- Parses rows and skips a recognized header row
- Works without a header row too
- Skips rows missing to or message instead of erroring
- Missing file returns empty rather than throwing
Daily Stats Recorder
- Record created inserts a bucket row
- Record created twice accumulates in the same bucket
- Record transition moves count and cost out of the old bucket into the new
- Record transition is a no op when status is unchanged
- Bucket date crosses midnight into the next dhaka day
Dispatcher
- Dispatch accepts queued message via null provider
- Dispatch with no route is retryable and does not refund yet
- No route failure refunds once retries are exhausted
- Business rejection is never retried and refunds immediately
- Dispatch is a no op when nothing is queued
Dlr Processor
- Delivered dlr enqueues a message delivered webhook for a subscribed endpoint
- Failed dlr enqueues a message failed webhook
- Unrecognized dlr status never enqueues a webhook
- Matched dlr updates message status and delivered at
- Unmatched dlr is logged not lost
- Unknown provider slug is logged not lost
- Failed dlr does not refund by default
- Failed dlr refunds when platform setting overrides to true
- Unknown dlr status leaves message status untouched
Dlr Webhook
- Valid dlr updates message status
- Malformed json body does not crash and still logs
- Empty body does not crash
- Unknown provider slug still returns 200 and logs
Encoding Detector
- Empty body is zero chars zero parts
- Pure english is gsm 7
- Pure bangla is ucs 2
- Banglish mixed is ucs 2
- Single bangla character forces whole message to ucs 2
- Emoji is ucs 2 and counts as two units
- Euro sign is gsm 7 extension character counting as two
- All nine gsm 7 extension characters count as two
- Exactly 160 gsm chars is single part
- Exactly 161 gsm chars is two parts
- Exactly 70 ucs 2 chars is single part
- Exactly 71 ucs 2 chars is two parts
- Exactly 153 gsm chars after overflow is still two parts
- Exactly 307 gsm chars is three parts
- Gsm 7 basic set allows cr and lf
- Gsm 7 basic set allows accented latin characters
Estimate
- Estimates english message as gsm 7
- Estimates bangla message as ucs 2 with correct total
- Accepts single string recipient not just array
- Invalid phone number returns 400 invalid number
- Missing message returns 400 validation error
- Too many recipients returns 400
- Unapproved sender id returns 403
- Approved masking sender id is used
- Insufficient balance is reported not rejected
Example Database
- Model find all
- Soft delete leaves row
Example Session
Export
- Full export lifecycle
- Show of pending job has no download url
- Download of pending job returns 404
- Another tenants token is not found never a leak
- Missing date range is rejected
Generic Http Provider
- Sends get request with mapped fields and detects success
- Detects business rejection from response body without throwing
- Connection failure throws provider unavailable
- Http 5xx throws provider unavailable
- No success rule configured treats any non 5xx as accepted
Health
- Is defined app path
- Base url has been set
Log Pruner
- Prunes only logs older than the cutoff
- Processes more than one chunk
Message Archiver
- Archives old terminal messages and removes them from the live table
- Processes more than one chunk
Message Status
- Get own message by uuid succeeds
- Get another tenants message returns 404 not a leak
- Get nonexistent message returns 404
- Status by message uuids
- Status by client references
- Status lookup never returns another tenants messages
- Status requires either uuids or references
- Status rejects more than 500 ids
Number Normalizer
- Accepts every accepted format with data set "local with leading zero"
- Accepts every accepted format with data set "local without leading zero"
- Accepts every accepted format with data set "with plus and country code"
- Accepts every accepted format with data set "country code without plus"
- Accepts every accepted format with data set "with spaces"
- Accepts every accepted format with data set "with dashes"
- Accepts every accepted format with data set "with brackets"
- Accepts every accepted format with data set "plus with spaces and dashes"
- Detects every operator prefix with data set "013 -> grameenphone"
- Detects every operator prefix with data set "017 -> grameenphone"
- Detects every operator prefix with data set "014 -> banglalink"
- Detects every operator prefix with data set "019 -> banglalink"
- Detects every operator prefix with data set "015 -> teletalk"
- Detects every operator prefix with data set "016 -> airtel"
- Detects every operator prefix with data set "018 -> robi"
- Rejects invalid numbers with data set "empty string"
- Rejects invalid numbers with data set "not a number at all"
- Rejects invalid numbers with data set "too short"
- Rejects invalid numbers with data set "too long"
- Rejects invalid numbers with data set "unassigned prefix digit 0 (010)"
- Rejects invalid numbers with data set "unassigned prefix digit 1 (011)"
- Rejects invalid numbers with data set "unassigned prefix digit 2 (012)"
- Rejects invalid numbers with data set "Dhaka landline (02...)"
- Rejects invalid numbers with data set "wrong country code"
- Rejects invalid numbers with data set "880 prefix but wrong total length"
- Rejects invalid numbers with data set "local without leading zero, wrong length"
- Invalid number exception carries raw input and error code
Outbound Webhook Dispatcher
- Enqueue creates a pending delivery only for subscribed active endpoints
- Successful delivery signs correctly and recovers a degraded endpoint
- Failed attempt with retries remaining stays pending with backoff
- Exhausting every retry abandons the delivery and degrades the endpoint
- Endpoint disabled after enqueue is skipped without an http call or penalty
- Claim due leases a row so a second concurrent claim skips it
Portal Auth
- Login form loads for an unauthenticated visitor
- Dashboard redirects to login when not authenticated
- Valid login redirects to dashboard and session persists
- Wrong password is rejected
- Fifth consecutive failure locks the account for fifteen minutes
- Suspended tenant cannot use an already open session
- Locale switch affects subsequent rendered text
Portal Bulk Send And Sender Id
- Bulk csv endpoint rejects a missing file rather than crashing
- Sender id request form creates a pending row for admin to approve
Portal Credential
- Created credential authenticates against the real api
- Revoked credential can no longer authenticate
Portal Role Filter
- Viewer cannot reach send or credentials but can read the dashboard
- Operator can send but not manage credentials
- Owner can reach everything
Portal Send And Reports
- A non technical user can send an sms and read a report in bangla
Provider Manager
- Fails over to next priority provider on failure
- All candidates failing throws no route available
- Provider is marked degraded after reaching failure threshold
- Degraded provider past cooldown recovers on next success
Rate Limit
- Breaching rate limit returns 429 with retry after
- Different credentials have independent windows
Rate Resolver
- Falls through to default plan when no override or tenant plan
- Tenant plan takes precedence over default plan
- Tenant override takes precedence over tenant plan and default plan
- Exact encoding match is preferred over any at the same level
- Falls back to any when no exact encoding match at that level
- Tenant override at one level does not block fallback to any at that same level
- Throws when no rate is configured anywhere
Reports
- Messages list returns only this tenants rows with pagination meta
- Messages list filters by status
- Messages list filters by sender id and search
- Messages list rejects invalid status
- Summary grouped by status
- Summary grouped by sender id respects date range
- Summary rejects invalid group by
- Ledger returns only this tenants entries paginated
Retry Service
- Requeues retryable message past its backoff window
- Does not requeue before backoff window passes
- Never requeues a business rejection
- Requeues a message with no next retry at set at all
Send
- Send queues messages and reserves credit
- Invalid number rejects whole request and persists nothing
- Blacklisted recipient is excluded but others still send
- Insufficient balance rejects whole batch and persists nothing
- Unapproved sender id returns 403 and persists nothing
- Idempotency key replay returns identical response without double charging
- Idempotency key reused with different body returns 409
Sender Id Approval
- Queue shows the pending request
- Approving sets status approved at and approved by
- Rejecting sets status rejected and stores the reason
Stats Aggregator
- Rebuild aggregates messages into matching buckets
- Rebuild buckets late utc message into the next dhaka day like the live recorder does
- Rebuild is a full replace not an accumulation
Tenant Top Up
- Top up writes a topup ledger entry and updates the cached balance
- Top up rejects a non positive amount