Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a6cd319
docs: design spec for WALM-116 relayer write-stream redesign
DalenMax Jun 15, 2026
dfc87c6
docs: implementation plan for WALM-116 relayer write-stream redesign
DalenMax Jun 15, 2026
eb0fff0
feat(write-stream): add WriteStreamLimiter with unit tests
DalenMax Jun 15, 2026
be47a75
fix(write-stream): reject acquire_many requests exceeding capacity
DalenMax Jun 15, 2026
f996151
refactor(write-stream): quality cleanups from review
DalenMax Jun 15, 2026
da7b26e
feat(write-stream): wire WriteStreamLimiter into AppState and Config
DalenMax Jun 15, 2026
d79f649
feat(write-stream): add Prometheus metrics for limiter state
DalenMax Jun 15, 2026
e1f89d0
feat(write-stream): add saturated helper using RateLimited
DalenMax Jun 15, 2026
bd0edf4
refactor(write-stream): remove unused AcquireError import
DalenMax Jun 15, 2026
a4d933f
feat(write-stream): gate remember and remember/bulk with limiter
DalenMax Jun 15, 2026
4209e42
fix(write-stream): acquire permits before row insert; distinguish Acq…
DalenMax Jun 15, 2026
b0b2ae2
feat(write-stream): gate remember/manual and analyze with limiter
DalenMax Jun 15, 2026
1ca4f16
feat(write-stream): gate wallet worker upload with limiter
DalenMax Jun 15, 2026
6600f30
feat(write-stream): emit limiter state and acquisition metrics
DalenMax Jun 15, 2026
91ebd61
fix(write-stream): guard waiter count and clean lint warnings
DalenMax Jun 15, 2026
e15ad6a
fix(write-stream): address Task 8 review feedback
DalenMax Jun 15, 2026
98d517b
refactor(write-stream): move metric helper to observability and harde…
DalenMax Jun 15, 2026
4e1e279
feat(sidecar): raise WALRUS_UPLOAD_MAX_CONCURRENCY safety-net floor t…
DalenMax Jun 15, 2026
1f740c0
test(write-stream): add saturation unit test
DalenMax Jun 15, 2026
f2c9da6
docs(relayer): document write-stream limiter config and metrics
DalenMax Jun 15, 2026
0285c8d
fix(write-stream): align permit acquisition with spec and split batch…
DalenMax Jun 15, 2026
1212fbf
fix(write-stream): map capacity errors to 429 and correct permit life…
DalenMax Jun 15, 2026
13a29c0
fix(write-stream): count permits per-item and document spec deviations
DalenMax Jun 15, 2026
cbfc151
fix(write-stream): hold single remember permit through prep and silen…
DalenMax Jun 15, 2026
08190dc
feat(write-stream): gate legacy execute_remember upload path
DalenMax Jun 15, 2026
862c5cd
chore(write-stream): minor cleanups from final review
DalenMax Jun 15, 2026
248733f
fix(write-stream): fast-fail oversized bulk requests and run cargo fmt
DalenMax Jun 15, 2026
b140186
fix(write-stream): move per-item permits into async blocks and add gu…
DalenMax Jun 15, 2026
5ba351a
docs(style): fix Sui style-guide violations in WALM-116 docs
DalenMax Jun 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ railway-*.md
# Personal/internal planning notes — never include in repo
plans/
.local-plans/
# But allow Superpowers plans/specs that are part of the design record.
!docs/superpowers/plans/
!docs/superpowers/specs/

# Benchmark archives + working analysis notes
# Kept locally under
Expand All @@ -137,3 +140,6 @@ claudedocs/

# Temp File
temp/

# Superpowers brainstorming session files
.superpowers/
5 changes: 5 additions & 0 deletions docs/relayer/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ Core relayer metrics:
| `memwal_sidecar_failures_total` | `operation`, `reason` | Sidecar transport and HTTP failures |
| `memwal_db_query_duration_seconds` | `operation`, `status` | PostgreSQL and pgvector query latency |
| `memwal_db_pool_connections` | `state` | PostgreSQL pool `open` and `idle` gauges |
| `memwal_write_stream_permits_total` | none | Configured permit ceiling |
| `memwal_write_stream_permits_available` | none | Permits currently free |
| `memwal_write_stream_waiters_total` | none | Tasks waiting for a permit |
| `memwal_write_stream_acquired_total` | `result` | Permit acquisition outcomes |
| `memwal_write_stream_rejected_total` | `route` | Requests rejected with `429` |

Example Prometheus scrape config:

Expand Down
9 changes: 9 additions & 0 deletions docs/relayer/self-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ By default, the relayer enforces rate limits and storage quotas via Redis to pre
- `RATE_LIMIT_STORAGE_BYTES` — max storage per user in bytes (default: 1 GB, `1073741824`)
- `REDIS_URL` — required to track sliding windows for rate limits (default: `redis://localhost:6379`)

### Write-stream concurrency

| Variable | Default | Description |
|---|---|---|
| `WRITE_STREAM_MAX_CONCURRENCY` | `8` | Maximum concurrent active write operations (prep + upload) |
| `WRITE_STREAM_ACQUIRE_TIMEOUT_MS` | `5000` | Handler wait for a write slot before returning `429` |

Tune `WRITE_STREAM_MAX_CONCURRENCY` down to reduce sidecar pressure, or up to increase throughput when the sidecar has headroom. Keep it below `WALRUS_UPLOAD_MAX_CONCURRENCY` so the sidecar safety net remains meaningful.

### Defaults

- `PORT` defaults to `8000`
Expand Down
Loading
Loading