Screening budget and restart fixes #21

Merged
Taskuler-bot merged 3 commits from fix/screening-budget-restart into main 2026-11-30 02:22:14 +00:00
Member

Follow-up to #14–#20. Merge this after #14–#20, in order.

This branch is #20 (c879dc9) plus a merge of #19 (f3140c5), because these changes touch code from both. Until #17–#19 merge, the diff against #20 also shows #17–#19's commits. Only the last commit is new.

Changes

  • Restart on a fresh install: the first start writes an empty counters file before the marker, so a restart before the first lookup no longer pauses screening. Has a test.
  • Location lookup limits: daily caps on new location lookups per IPv6 /48 (IPAPI_DAILY_CAP_PER_48, default 20) and per IPv4 /24 (IPAPI_DAILY_CAP_PER_24, default 50). Every counter is checked before any is taken, so a refused request records nothing. A log line is written at 50% and 80% of each daily budget. Provider quotas are unchanged.
  • Rate limiter: when the request-limit map is full, only expired entries are removed (at most once a second), and new keys get 429. Live entries keep counting.
  • Writes: the connected account is re-checked right before each transaction, not only the first. The sender of each receipt must match the checked wallet.
  • .env.example: documents the two new settings.

No user-facing copy changes. A mismatched account or receipt reuses the existing wallet-changed message.

Tests: this branch passes 192/192 tests, both tsc checks and the testnet build. A local merge of #14→#20 and then this PR passes 200/200, tsc and the build. The only conflict is the known PostJob.tsx import conflict between #14 and #15. Tests make no network calls.

Follow-up to #14–#20. Merge this **after #14–#20**, in order. This branch is #20 (`c879dc9`) plus a merge of #19 (`f3140c5`), because these changes touch code from both. Until #17–#19 merge, the diff against #20 also shows #17–#19's commits. Only the last commit is new. **Changes** - **Restart on a fresh install:** the first start writes an empty counters file before the marker, so a restart before the first lookup no longer pauses screening. Has a test. - **Location lookup limits:** daily caps on new location lookups per IPv6 /48 (`IPAPI_DAILY_CAP_PER_48`, default 20) and per IPv4 /24 (`IPAPI_DAILY_CAP_PER_24`, default 50). Every counter is checked before any is taken, so a refused request records nothing. A log line is written at 50% and 80% of each daily budget. Provider quotas are unchanged. - **Rate limiter:** when the request-limit map is full, only expired entries are removed (at most once a second), and new keys get 429. Live entries keep counting. - **Writes:** the connected account is re-checked right before each transaction, not only the first. The sender of each receipt must match the checked wallet. - **`.env.example`:** documents the two new settings. **No user-facing copy changes.** A mismatched account or receipt reuses the existing wallet-changed message. **Tests:** this branch passes 192/192 tests, both `tsc` checks and the testnet build. A local merge of #14→#20 and then this PR passes 200/200, `tsc` and the build. The only conflict is the known `PostJob.tsx` import conflict between #14 and #15. Tests make no network calls.
Taskuler Legal review of df205df (2026-11-27), section 4, applied verbatim:
R1 page title and description; R2 footer tagline; R3 test TSKR bonus text (without the testnet-to-mainnet sentence, pending George's Q21);
R4 bonus minimum read live with no 1,000 USDC fallback; R5 screening messages; R7 testnet tax-notice lead-in;
R8 Q&A is browser-only; R9 footer data line with '© 2026 Taskuler LLC'; R10 refund wording.
R6 (provider output and caching) is in the screening service PR. The SY geo-block is unchanged.
Per Taskuler Legal (Nov 27, 2026): label 'Website screening', the scope line wherever screening is
described, and the R5 messages under that label. Shown on the screening result box and on the
post/bid/withdraw 'screening unavailable' messages.
useEscrowGate now screens when the button is pressed (a mutation) and runs the action only after
a pass. Errors, blocks and a still-loading live config stop it (fail closed). No copy changes.
Post, bid and withdraw act for the address that was screened, and every write checks the wallet's
account matches the address it was started for. One screening run at a time per button.
Payout-hold message uses Legal's approved wording.
First start writes an empty counters file before the marker, so an early restart doesn't pause
screening. Daily caps on new location lookups per IPv6 /48 and IPv4 /24, and a log line at 50%
and 80% of each daily budget. The rate-limit map keeps live entries when full. Writes re-check
the connected account before each transaction and the sender of each receipt.
george approved these changes 2026-11-30 01:56:42 +00:00
Dismissed
Taskuler-bot changed target branch from fix/harden-lookup-counters to main 2026-11-30 02:02:42 +00:00
george approved these changes 2026-11-30 02:21:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
taskuler/web!21
No description provided.