Appearance
Hardcoded Limits & Configurable Policies
This page documents all known hardcoded thresholds and configurable policy limits across the g3nretailstack platform.
Configurable via Environment Variables
| Setting | Default | Env Var | Services | Notes |
|---|---|---|---|---|
| Rate limit (RPM) | 600 | RATE_LIMIT_RPM | All 18 + VG | Per-org, per-minute. Kill-switch: RATE_LIMIT_ENABLED=false |
| Rate limit window | 60s | (hardcoded) | All | Fixed-window counter via DDB atomic ADD |
| Request validation | enabled | REQUEST_VALIDATION | 17/20 | AJV 8 schema validation. =false disables |
| Maintenance cache TTL | 20s | (hardcoded) | 14 services | DDB singleton cache for ACTIVE_MAINTENANCE |
| Session cache TTL | 30s | (hardcoded) | auth-direct | In-Lambda session cache, max 1000 entries |
| Bulk import timeout | 13.5 min | (hardcoded) | 10 services | Self-re-invoke threshold for bulk import Lambdas |
Hardcoded Thresholds
| Limit | Value | Service | File | Notes |
|---|---|---|---|---|
| Transfer line max | 20 | ICS | transfer.ts | Max lines per transfer request |
| Comment list default | 8-10 | SCM, ICS, PVM, etc. | comment handlers | Default limit for comment listing |
| Audit query max | 256 | SCM | posAuditQuery.ts | Max items per POS audit query |
| Pagination default limit | 8 | All | entry handlers | Default limit, clamped 1-256 |
| TransactWrite max items | 10 | All | packages/http | DDB limit; assertTransactLimit() enforces |
| MRS tag max | 20 | MRS | handlers.ts | Max tags per record |
| MRS max inline payload | 256 KB | MRS | handlers.ts | Inline JSON payload limit |
| MRS max presign payload | 128 MB | MRS | handlers.ts | Presigned upload limit |
| Vacuum pending window | 5 min | OPS | vacuumAll.ts | Cancel-safe window before execution |
| Vacuum mutex TTL | 24h | OPS | vacuumAll.ts | Safety release for stuck mutex |
| Kit nesting depth | 3 | SCM | promise.ts | Max recursive kit explosion depth |
| Coupon max_per_customer | configurable | PPM | couponCode.ts | Per-coupon, stored in DDB entity |
| Layaway deposit min | 20% | SCM | policy.ts | Channel policy configurable |
| Special order deposit | 50% | SCM | policy.ts | Channel policy configurable |
Channel Policies (per-org, per-channel configurable)
These are stored in DDB and configurable at runtime via /scm/channel-policy/* endpoints:
- Layaway:
max_days,service_fee,payment_interval,forfeiture_grace_days,min_deposit_pct - Special Order:
deposit_pct,price_lock,cancel_policy,pickup_window_days - Returns:
return_window_days,condition_codes,disposition_rules - Substitution:
substitution_mode,sla_targets