feat: let the operator set the daily comment limit per account
The allowance was derived from the adaptive trust level with no way to change it, which made the dashboard's "1 / 2 today" unexplainable and left no way to slow an account down or push one along. `dailyLimit` is null by default, keeping today's adaptive behaviour. A whole number between 1 and 50 overrides it and is enforced verbatim in either direction — it can raise an account above what it has earned or hold it below. The trust level keeps being tracked underneath and is reported as `adaptiveAllowance`, so the earned figure stays visible next to the override, and clearing the field hands pacing back to the ladder. Raising the limit above the earned allowance does remove the adaptive backoff after a bad comment, so the dashboard says exactly that where the limit is set. It does not touch the pause on two consecutive removals, a comment the public cannot see, or a captcha challenge: those are safety stops rather than rate controls and no limit setting can disable them. Also correct two things the page was saying badly. The allowance is now labelled "used in last 24h" with the trust level shown as what it earns, because it is a rolling window and not a midnight reset. And a per-community cap above the account allowance now states how much of it is actually reachable — "1 of 10 today" beside an account limit of 2 read as far more headroom than existed, since caps distribute the allowance rather than adding to it. Verified against a local instance: override above and below the earned allowance, unrelated saves preserving it, clearing it through the UI, rejection of 0/51/2.5/non-numeric, and a limit failing to clear a pause. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f88db1ae7d
commit
5deac87cf1
15 files changed
+351
-26
No files matched your search
@@ -97,7 +97,11 @@ Controls enabled state, port, optional tokens after environment injection, and d
|
||||
|
||||
Growth is configured per account through `/api/growth`, not through `config.yaml` or `app_config`, because the community list, allowance, and pause state belong to one Reddit identity. The stores are `account_growth_settings` and `account_growth_subreddits`; see `docs/database.md`.
|
||||
|
||||
Operator-settable per account: enabled, minimum spacing, jitter, quiet hours, NSFW opt-in, the community list with per-community weight and daily cap, and pause/resume. The daily allowance itself is **not** operator-settable — it is derived from an adaptive trust level that the verification sweep maintains. `browser.dryRun` also suppresses growth posting.
|
||||
Operator-settable per account: enabled, the daily comment limit, minimum spacing, jitter, quiet hours, NSFW opt-in, the community list with per-community weight and daily cap, and pause/resume. `browser.dryRun` also suppresses growth posting.
|
||||
|
||||
`dailyLimit` is null by default, which leaves the allowance to the adaptive trust level the verification sweep maintains (2/3/5/8/12 per day at levels 0-4). Setting a whole number between 1 and 50 overrides that in either direction and is enforced verbatim; the trust level continues to be tracked and reported as `adaptiveAllowance` so the earned figure stays visible. Raising the limit above the earned allowance removes the adaptive backoff after a bad comment, so the dashboard says so. It does not affect the removal/shadowban/captcha pause, which is a safety stop rather than a rate control and cannot be disabled by any limit.
|
||||
|
||||
A per-community `dailyCap` only distributes the account allowance; caps are not additive and cannot raise the account total.
|
||||
|
||||
## Runtime-editable subset
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ The application uses one `better-sqlite3` database, normally `data/reddit-bot.db
|
||||
- `reddit_media`: account-scoped private-media metadata and relative file path.
|
||||
- `media_library_assets`: process-global operator-owned image metadata, overlapping anatomy tags, SFW/NSFW classification, consent time, enablement, dimensions, hash, and private relative path.
|
||||
- `media_library_sends`: account/conversation/inbound-event reservation and confirmed/failed Matrix delivery audit for a shared library asset.
|
||||
- `account_growth_settings`: per-account commenting switch, adaptive trust level, spacing/jitter, quiet hours, NSFW opt-in, and the operator-clearable pause reason.
|
||||
- `account_growth_settings`: per-account commenting switch, adaptive trust level, optional operator daily-limit override (`daily_limit`, null means adaptive), spacing/jitter, quiet hours, NSFW opt-in, and the operator-clearable pause reason.
|
||||
- `account_growth_subreddits`: per-account community list with weight, daily cap, and any Reddit-imposed disable reason or cooldown.
|
||||
- `account_growth_comments`: durable growth comment records from discovery through posting and verification, including the exact text posted, score history, removal and public-visibility verdicts.
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ This is inauthentic account activity under Reddit's content policy, and many sub
|
||||
- Disabled by default, per account, and never inferred from any other setting.
|
||||
- Comments post without operator review, so both screening stages fail closed. The deterministic gate rejects links, contact solicitation, user tags, low-effort filler, and any text that reveals the generator or narrates the task. The second-stage classifier must actively approve with sufficient confidence; an outage stalls growth rather than publishing unreviewed text.
|
||||
- Thread text is attacker-controlled and is passed to the model only as fenced untrusted data. Reddit posts do contain text aimed at automated readers.
|
||||
- The daily allowance is adaptive, not configured: it starts at two comments per day and only rises while comments demonstrably survive and earn upvotes. A removal or a heavily downvoted comment lowers it immediately.
|
||||
- The daily allowance is adaptive by default: it starts at two comments per day and only rises while comments demonstrably survive and earn upvotes, and a removal or a heavily downvoted comment lowers it immediately. An operator may override the figure per account; doing so replaces the adaptive backoff but not the pause below, and the dashboard states that trade-off where the limit is set.
|
||||
- Two consecutive removals, a comment invisible to signed-out visitors, or a captcha challenge pauses the account until an operator clears it. A failed visibility probe proves nothing and never pauses anything.
|
||||
- One comment per thread across every owned account, a per-community daily cap, quiet hours, and jittered spacing.
|
||||
- Reddit's own refusals are authoritative: a community ban disables that community for that account, a throttle backs off at the scope Reddit named, and a signed-out response invalidates the session rather than being retried.
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ Comment-based growth exists so a new account accumulates the age/karma history R
|
||||
| Module | Owns | Important constraints |
|
||||
| --- | --- | --- |
|
||||
| `services/account-growth.ts` | Per-account discovery, generation, posting, verification, and trust updates | Auto-posts without operator review, so both screening stages fail closed; an interrupted post is never retried. |
|
||||
| `services/growth-pacer.ts` | Adaptive allowance ladder, promote/demote/pause decisions, quiet hours, spacing | Pure and clock-injected. Pause beats demote beats promote; jitter is derived from the previous post so the gate cannot flap. |
|
||||
| `services/growth-pacer.ts` | Adaptive allowance ladder, the operator limit override, promote/demote/pause decisions, quiet hours, spacing | Pure and clock-injected. Pause beats demote beats promote; an operator limit replaces the earned allowance but never the pause; jitter is derived from the previous post so the gate cannot flap. |
|
||||
| `services/growth-thread-screening.ts` | Pure thread eligibility (age window, comment count, locked/stickied/NSFW) | A comment on a dead or saturated thread wastes a scarce daily allowance. |
|
||||
| `services/growth-comment-safety.ts` | Deterministic pre-publication gate on generated comment text | Rejects links, contact solicitation, user tags, filler, and any text revealing the generator. Independent of prompt wording. |
|
||||
| `reddit/comment-client.ts` | Comment submission and comment-state lookups for one account | Classifies Reddit's error codes into retry/abandon/disable/re-auth/stop; runs inside the account's own browser session and shares the request coordinator. |
|
||||
|
||||
Reference in new issue
Block a user