ops(backtests): re-argue MAX_ACTIVE_DASHBOARD_BACKTESTS on spend, not RAM
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Read the implementation of MAX_ACTIVE_DASHBOARD_BACKTESTS and DEFAULT_MAX_CONCURRENT_BACKTESTS, then inspect credit_ledger_entries for settled tokens by run and call. Estimate the cost of a representative dashboard backtest and agree on an acceptable concurrent spend rate before choosing the cap. Done means the cap and its comment reflect that decision while preserving the stated quota, zero-value, and invalid-value behavior.
Written by the indexing model from the issue text.
Description
MAX_ACTIVE_DASHBOARD_BACKTESTS (default 5) was sized as a RAM bound against a 512MB free instance. Prod moved to Standard 1c-2g on 2026-09-11 (#308, PR #472), which raised the ceiling without establishing where it now sits — nothing has ever measured one child's resident set, and the ~1.1GB of headroom above the observed 882MB peak belongs to the instance, shared across however many slots this value opens. So RAM is not ruled out here; it has only stopped being the obviously binding constraint. That measurement is #475.
The bound that can be argued without a measurement is operator LLM spend, and nobody has ever argued that number either. Before the slot ledger existed the runner was single-flight and the ceiling was exactly 1; the value multiplies concurrent billable API cost by the same factor.
What this issue wants
A number chosen on cost, not inherited from a dead memory constraint:
- Measure the per-run LLM cost of a representative dashboard backtest (
credit_ledger_entriesalready records settled tokens per(run_id, call_index, attempt_index)— the data is there). - Decide the acceptable concurrent burn rate, then set the cap from it.
- Update the comment so the stated reason matches the real one.
Constraints to keep
- It is deliberately equal to
DEFAULT_MAX_CONCURRENT_BACKTESTS(5) so one default-entitlement account can reach its own quota. Raising one without the other makes the entitlement unreachable or the global cap unreachable. 0disables all dashboard backtests.- Junk/negative falls back to 5 with a log line — an unparseable value used to kill app boot.
- It is env-overridable, so a change needs no deploy.
Related
-
#308 — the OOM that produced the original 512MB sizing (closed; prod is 2GB).
-
#363 — the cap is per-process, not server-wide.
-
#364 — the per-owner cap above it is session-keyed, so it is an incentive fix.
-
PR #472 — corrected the stale rationale in the comments without moving any value.
-
#475 — the per-child peak-RSS measurement. Deliberately not bundled with this issue: that one is gated on a measured resident set, this one on money. Raising this value wants both.
- Dominant language
- Python
- Stars
- 767
- Forks
- 156
- Avg merge
- 21h 57m
- Merged PRs (30d)
- 92
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Open-Finance-Lab/AgenticTrading
-
fix(llm): a non-ASCII execution handoff raises UnicodeEncodeError instead of ExecutionHandoffErrorPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Open-Finance-Lab/AgenticTrading#659 ·
Maintainers usually reply within 1 day
-
fix(backtests): an LLM action with trailing whitespace ("buy ") is silently droppedPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Open-Finance-Lab/AgenticTrading#658 ·
Maintainers usually reply within 1 day
-
fix(llm): Gemini adapter drops thinking tokens from the output countPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Open-Finance-Lab/AgenticTrading#657 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Open-Finance-Lab/AgenticTrading#591 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Open-Finance-Lab/AgenticTrading#586 ·
Maintainers usually reply within 1 day
All issues in Open-Finance-Lab/AgenticTrading
Similar issues
-
style: article/section 📝 system: cloud.rc ☁️ system: security 🔐
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
uabrc/uabrc.github.io#1262 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NCAR/miles-credit#526 ·
-
documentation
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
conda/conda-lock#957 ·
Maintainers usually reply within 1 day
-
Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aws-samples/sample-per-model-bedrock#464 ·
Maintainers usually reply within 1 day