potassco / potassco/constraint-handler
External contexts are not threadsafe
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3
- Forks
- 0
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 20
Description
evaluator.shared_environment["foo"] = bar
allos to add functions or other objects to the context of the constraints.
As pytest modules or fastapi endpoints work asynchronously, this global variable interfers with different grounding calls that work in parallel.
(different calls can overwrite functions of each other)
A proper constraint-handler object would be preferable for this to be usable.
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 at the evaluator.shared_environment entry point described in the issue and trace how external functions or objects are added to constraint contexts. Reproduce parallel grounding calls with pytest modules or FastAPI endpoints, then define a constraint-handler object that prevents one call from overwriting another's context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100