LATTICE/08 · #1042 # 1 PR open · 7 commits · 2 reviewers · 14 comments · CI: ✓ build · ✓ test · ✓ lint · ⚠ 1 hint --:--:-- UTC v0.18 ● READY
/ tools08 · lattice·review

git diff,
| but humane.

A code-review tool that lives in your editor. Open a PR के साथ lt open, leave a comment के साथ two keystrokes, approve और merge के बिना ever loading github.com. For teams of 2–20 who got tired of the round trip.

Seats
unlimited
Repos
unlimited
Hosting
git over ssh
Price
$179
#1042 OPEN · refactor: pull rate-limiter into middlewarefeat/rl-mwmain
Author
k. mendoza3 commits · 2d ago
Reviewers
v.iyer · r.tan1 approved · 1 changes
Files
+4 −2 · 6 changed+128 / −47 lines
CI
✓ greenbuild · test · lint · 1 hint
src/middleware/rate_limiter.ts · +62 −14view raw
@@ -8,12 +8,18 @@ export class RateLimiter
88 private bucket: TokenBucket;
9 constructor(rps: number) {
9 constructor(opts: RLOptions) {
10 this.bucket = new TokenBucket(rps);
10 this.bucket = new TokenBucket(opts.rps, opts.burst ?? opts.rps);
11 this.key = opts.keyFn ?? (req => req.ip);
1112 }
1213
14 // returns 429 with a Retry-After header on overflow
15 handle = async (req, res, next) => {
16 const k = this.key(req);
17 if (!this.bucket.take(k)) return res.status(429).set('Retry-After', '1').end();
18 next();
19 };
1320}
VIv. iyer commented · 4h ago

Nice — way cleaner. One thought: should burst default to rps * 2 की जगह rps? Otherwise the very पहले burst on a cold bucket is going to feel rate-limited even for well-behaved clients.

KMk. mendoza replied · 2h ago

Good call. Pushed 3b9c के साथ opts.burst ?? opts.rps * 2. Will also add a unit test for the cold-bucket case.

2 of 6 files reviewed · 14 comments (4 unresolved)✓ READY TO MERGE WHEN GREEN
EXHIBIT AThe queuePG. 02 / 06

One screenfor the whole team's review backlog.

Lattice keeps a single queue of हर PR, sorted by what's blocking the team. lt q in any terminal opens it. "Whose turn is it?" is answered by the row, नहीं by Slack.

#— TITLESTATUSAUTHOR± LINESOPENED
1042refactor: pull rate-limiter into middlewarefeat/rl-mw → main · 6 filesREADY · MERGEk.mendoza+128 −472d
1041fix: tz bug in invoice export (DST)fix/tz-invoice → main · 2 filesCHANGES · 2r.tan+18 −121d
1040feat: parse multi-currency line itemsfeat/multi-cur → main · 11 filesREVIEW · YOUv.iyer+412 −983h
1039chore: bump postgres to 16.2chore/pg-16 → main · 1 fileREADY · MERGEk.mendoza+1 −15h
1038spike: replace stripe webhook pollingspike/sw → main · 8 filesDRAFTr.tan+260 −1803d
1037doc: rewrite onboarding READMEdoc/onb → main · 3 filesREVIEW · YOUv.iyer+184 −924d

One seventy-nine.
The whole team.

Self-hosted. Sits अगला to your git server (Forgejo, Gitea, your own gitolite, doesn't matter — any SSH-reachable repo). No per-seat tax. One license per team. Forever.

खरीदें Lattice · $179 एक बार →
$179ONCE · UNLIMITED SEATS · SELF-HOSTED