Repository navigation
fix(tlon): bound pending approval queue - #160679
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 5:46 PM ET / 21:46 UTC (Revision 4). ClawSweeper reviewWhat this changesThe Tlon plugin caps new pending owner approvals at 100, notifies the owner when full, preserves older approvals, and leaves rejected invite snapshots eligible for another attempt. Merge readiness✅ Ready for maintainer review Current main still admits an unlimited number of distinct Tlon approval requests. This PR remains useful, and the current head addresses both findings from the previous review. The documented rejection and notice limits are an explicitly stated tradeoff by the author, whose repository maintain permission was verified. Priority: P2 Review scores
Verification
How this fits togetherThe Tlon monitor receives Urbit messages and invites that may need owner approval. It stores pending requests in Urbit settings; an owner reply can then allow a sender or join a group. flowchart LR
A[Urbit messages and invites] --> B[Tlon monitor]
B --> C{Approval needed?}
C -->|Yes| D{Queue has room?}
D -->|Yes| E[Pending approvals in settings]
D -->|No| F[Owner saturation notice]
E --> G[Owner reply]
G --> H[Allow sender or join group]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +27, Tests +240, Docs +9. Total +276 across 9 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Ship the documented bounded admission policy while retaining existing owner decisions and a clear retry path for rejected requests. Do we have a high-confidence way to reproduce the issue? Yes from source: current main appends each distinct approval without a count check. This read-only review did not execute a live Urbit setup. Is this the best way to solve the issue? Yes. Admission is limited at the shared Tlon queue owner, while existing records and duplicate updates remain available. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dba4c4f0e152. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Merge recordSummary: This PR bounds new Tlon approval admissions at 100 pending entries while preserving legacy queue order and duplicate updates. It keeps rejected invite snapshots retryable, emits bounded owner-visible saturation warnings, and documents and tests full-queue behavior. Decision Reason for Merge: Merged because exact-head CI passed, final compatibility and mergeability checks passed, and ClawSweeper reported no actionable findings and marked the PR ready for maintainer review. Compatibility Checks Done: Exact-head CI passed, including production and test type checks, lint, dependency, boundary, source-contract, and focused Tlon test lanes. Final security compatibility review found no config, schema, default, authorization, or public API break; GitHub reports the PR mergeable and clean. |
Summary
Tlon pending approval records could grow without a bound because every unique request appended durable state and rewrote the full queue. This change caps new admissions at 100 while preserving every pre-upgrade pending decision, notifying the owner with bounded delivery retries when saturated, and keeping rejected invite snapshots retryable; no related implementation PR overlaps this queue boundary.
What Problem This Solves
extensions/tlon/src/monitor/approval-runtime.tsappended every new unique approval and rewrote the complete persisted array for each append.The net effect was unbounded durable state and increasing serialization work under sustained unique approval traffic.
Why this design
@eleqtrizit): accept bounded rejection for new unique requests above 100 pending entries and the three-attempt notice limit while preserving every legacy/existing approval; rejected requesters retry after capacity is available.Evidence
approveThe sink-level assertions observe final allowlist writes, remaining persisted approvals, queue contents, owner notifications, retry attempts, and parsed settings output.
Testing
pnpm test <file> --maxWorkers=1:approval-runtime.test.ts8.65s wall,index.test.ts19.79s,tracking.test.ts9.42s, andsettings.test.ts1.98s. In exact-head CI run 36485214183,index.test.tsused a 76.64s Vitest shard and the other three files shared a 33.47s Vitest shard.pnpm tsgoand all changed-files extension/docs gates, including production/test types, lint, dead-export scans, and import-cycle checks.