Skip to content

refactor: scale agentic budget by flat per-doc caps - #248

Merged
EricNGOntos merged 1 commit into
mainfrom
feat/wuchengke/2026-08-09
Aug 9, 2026
Merged

EricNGOntos merged 1 commit into
mainfrom
feat/wuchengke/2026-08-09

Conversation

@EricNGOntos

Copy link
Copy Markdown
Contributor

Summary

  • Replace chunk-weighted `per_doc_min_share` with a flat `per_doc_cap` (default 20k) after document selection.
  • Grow planning/context pool capacities and ledger/wallet totals with the selected document set so accounting matches spendable budget.
  • Deduplicate selected doc IDs when allocating caps.

Test plan

  • Agentic retrieve with 1 selected doc: planning/context scale to 1×cap and ledger `total` updates
  • Agentic retrieve with N selected docs: planning ≈ N×cap, wallet snapshot/reclaim reflects grown total
  • Workflow planner path with `per_doc_cap=0` still behaves
  • Confirm classic 3-channel route unchanged when `use_agentic` is not true

Made with Cursor

Replace chunk-weighted per-doc min shares with a flat per-doc cap, and grow planning/context plus wallet totals after document selection so spendable budget tracks the selected set.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EricNGOntos
EricNGOntos merged commit 66fe1b0 into main Aug 9, 2026
6 checks passed
@EricNGOntos
EricNGOntos deleted the feat/wuchengke/2026-08-09 branch August 9, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant