whiteducksoftware / whiteducksoftware/flock
[1.0] Enforce context and execution budgets and show available usage
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 120
- Forks
- 14
- Avg merge
- 19h 32m
- Merged PRs (30d)
- 8
Description
Default context can grow with the whole visible blackboard, while engine limits and usage reporting are uneven. Streaming fragment counts cannot be treated as token accounting.
Scope
- Use existing context providers with explicit size/selection limits and observable budget decisions; do not silently change shared-blackboard semantics.
- Make run time and supported tool-call limits effective along the qualified execution path.
- Associate available provider token/cost values with the run and preserve unknown values when providers do not report them.
Acceptance criteria
- An oversized visible history stays within the configured context budget, with omitted/truncated context made explicit and visibility still enforced.
- Controlled timeout/tool-call-limit cases end truthfully and release execution capacity.
- Missing usage appears as unknown, not zero; streaming chunks are not reported as token usage.
Boundaries
Cross-provider billing normalization and sophisticated monetary budgets are deferred.
References
- Implementation dependencies: #440.
- src/flock/core/context_provider.py
- src/flock/engines/dspy_engine.py
- src/flock/orchestrator/context_builder.py
Contributor 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.
Research direction
Start with src/flock/core/context_provider.py and src/flock/orchestrator/context_builder.py to trace context selection and budget decisions, then follow the qualified execution path in src/flock/engines/dspy_engine.py. Check dependency issue #440 before changing behavior. Done means oversized context is explicit and bounded, timeout and tool-call limits release capacity, and missing provider usage remains unknown rather than zero.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100