potassco / potassco/constraint-handler

External contexts are not threadsafe

Open
#72 8 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.