Repository navigation
Define and implement optional non-monetary credits and free-tier limits #83
Description
Problem
TEST marks intents paid and records local earnings, but it is not a user credit balance or free-tier policy. There is no supported allowance, hosting-credit or per-account spending contract.
Proposed change
Offer an optional non-monetary allowance model for authenticated users with explicit issuance, reservation, consumption and refund rules, without requiring a wallet or implying a transferable monetary balance.
Acceptance criteria
- Decide whether allowances are fixed, periodically replenished or earned by hosting, and document abuse/Sybil assumptions and operator authority.
- Store auditable credit grants/reservations/consumption with bounded values and idempotent run/order linkage; expose remaining allowance through a versioned API and SDK/CLI.
- Test concurrent submissions, exhausted allowance, cancellations, unknown run outcomes, grant renewal and restart without double-spending or automatic refunds of uncertain work.
- Keep anonymous local TEST mode separately explicit and retain monetary activation as an independent optional feature.
Current evidence
unimplemented product feature; source inspection only, no new runtime reproduction. Backlog classification is based on source inspection; this issue does not claim a new runtime reproduction.
- internal/dispatcher/payments/payments.go: TEST creates an immediately paid transaction rather than checking a user balance.
- internal/dispatcher/transport/api/routes.go: The balance route is commented out.
- internal/dispatcher/database/queries/transactions.sql: Existing earnings belong to executors, not user allowance accounts.
Dependencies
- #88 — Replace UUID-cookie login with authenticated user sessions
- #89 — Enforce ownership and role authorization on every HTTP operation
- #35 — Make repeated submission return the same admitted run identities
Related work
These are integration points, not prerequisites for starting this issue.
- #77 — Define exact pricing units and reject overflow before persistence
- #66 — Enforce aggregate user and target-group egress budgets
- #99 — Enforce per-account request and concurrent-work admission quotas
Priority context
Optional adoption/economic-policy feature after core local usability; not a correctness prerequisite for TEST.
Activation
Optional work, deferred while the local team alpha is the priority. Development and fault injection use owned local fixtures. Production monetary operation, deployment and publication require the applicable release and operator approvals.
Validation must use owned local fixtures on supported Linux environments. Record the implementing merge request and relevant test results before closing this issue.
Imported from GitLab issue 82. Originally opened 2026-09-10. Historical GitLab links may require access to the original project.
Activity
Merge the corrected quotes branch into the allowances branch
Refuse an allowance whose history cannot be represented
Merge the quotes branch into the allowances branch
Merge current quote and payout updates into allowances
ctfbruce commentedon Oct 7, 2026
Implemented by #380 and #407, verified on main
7ad50b0b717108459f5c11af74698d4785e3c6ed.Allowancemethod anddbl allowanceexpose exact amounts, including JSON output. Disabled or unauthorized reads do not invent a balance.All four acceptance criteria are covered. Main CI passed all 16 jobs: run 37621446527.