Skip to content

fix(standard): give drivers only the nullius package on PYTHONPATH - #34

Merged
aitianshi merged 2 commits into
mainfrom
driver-pythonpath
Nov 10, 2026
Merged

aitianshi merged 2 commits into
mainfrom
driver-pythonpath

Conversation

@aitianshi

@aitianshi aitianshi commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #11

What

A driver ran with PYTHONPATH set to the folder that holds the nullius package (run.APP). From a checkout that is app/; from the PyPI install it is the tool's whole site-packages, so every package there came before the driver venv's own, and LongMemEval's Python 3.9 driver imported the tool's Python 3.12 click and stopped at units with a SyntaxError. run.driver_path() now gives drivers a folder in the user cache whose one entry links to the nullius package, the same from a checkout and from a wheel; run.py and prove.py both use it. APP keeps its other uses (the docker backend's mount checks and the relay container).

Touches

the standard

Verified

  • New app/tests/test_driver_path.py: the driver path holds only nullius, linked to the real package; a fresh interpreter with it imports nullius.standard.jsonl but not web (from the checkout) nor a package beside nullius in a stand-in site-packages (from a wheel).
  • The kit and benchmark driver tests go through the new path.
  • New test: while the link is made, the folder on a driver's PYTHONPATH holds nothing else (the link is written beside it and renamed in). It failed before that change, when the .part link was written inside the folder.
  • From the installed wheel, both acceptance boxes. A wheel built from this branch and one from main, each uv tool install --python 3.12 into a temporary tool directory and profile; the tool's site-packages holds click 8.5.1. Then nullius standard run longmemeval keyword-memory --dataset longmemeval_oracle --limit 1 --provider custom --model test-model --judge-model test-model --from-run, with the endpoint pointed at a closed local port so no model is called:
    • main: units: the program ended without replying (SyntaxError: invalid syntax), the issue's failure.
    • this branch: stage=units state=start n=1 of=500, then the unit runs and ends error NetworkConnectionError at the closed endpoint; no driver log holds a SyntaxError.
  • Backend suite python3 app/tests/parallel.py: 1596 tests, OK.

Risk

A driver that relied on importing something else from app/ or the tool's environment would now fail at import; the bundled drivers import only nullius and their own environment. The link lives in the cache, so clearing the cache only means it is made again. The docker relay still mounts APP and puts it on its own PYTHONPATH inside its container; that is not a driver and is unchanged here. Undone by a revert.

From the PyPI install the folder holding the package is the tool's whole
site-packages, which came before the driver's own environment.
@github-actions

This comment has been minimized.

The link was written as nullius.<pid>.<thread>.part inside the folder on a
driver's PYTHONPATH, then renamed. A driver or a test listing that folder
in the meantime saw the .part entry too. Write it beside the folder and
rename it in, so the folder only ever holds nullius.
@github-actions

This comment has been minimized.

@aitianshi

Copy link
Copy Markdown
Collaborator Author

/judge

@github-actions

Copy link
Copy Markdown

🟡 PR judge · 6 of 7 yes · #34 ↔ #11

Merge risk 🔴 MAJOR the judge's reading of the diff; app/nullius/standard/prove.py is in the path of every run
Priority 🔴 EXTREME the deepest path is app/nullius/standard/prove.py
Question Verdict
Changes do what the issue asks · 2 of 2 criteria ✅ yes
Issue and pull request describe the same change ✅ yes
Description matches the diff, no more, no less ✅ yes
Diff stays in scope ✅ yes
Tests cover the change, or Verified says how ✅ yes
Docs follow the change –
Risk named in the description ✅ yes
Before and after shown –
Acceptance criteria, 2 of 2 met
# Criterion Verdict
1 From uv tool install nullius-eval, nullius standard run longmemeval keyword-memory --limit 1 gets past units. ✅ met
2 A driver's PYTHONPATH gives it the nullius package and no other package of the tool's environment, both from the wh… ✅ met
Checks the script runs itself, 4 of 4 pass
No machine attribution trailer in the commits or the description ✓
New code under app/, docs/, .github/ or .claude/ ✓
No Flask import under the backend package ✓
No key-shaped string in the diff ✓

@aitianshi aitianshi self-assigned this Nov 10, 2026
aitianshi added a commit that referenced this pull request Nov 10, 2026
## What

Pull request titles become conventional commit subjects, `type(scope):
summary`. The repository squash-merges with the PR title as the commit
subject, so the title is what `main`'s history shows. AGENTS.md states
the rule with its types (`feat`, `fix`, `perf`, `refactor`, `docs`,
`test`, `ci`, `build`, `chore`, `revert`) and scopes (the parts of
Nullius), and the `/file-issue` skill, which assistants use to open PRs,
applies it. No check enforces it.

## Touches

docs and site · CI and skills

## Verified

- Backend suite `python3 app/tests/parallel.py`, OK.
- The open PRs #29, #30, #32 and #34 already use the form.

## Risk

Documentation only; earlier commit subjects on `main` are not rewritten.
Undone by a revert.
@aitianshi
aitianshi merged commit 6a830a0 into main Nov 10, 2026
2 checks passed
@aitianshi
aitianshi deleted the driver-pythonpath branch November 10, 2026 13:33
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.

The PyPI install puts the tool's site-packages on a driver's PYTHONPATH, which breaks LongMemEval

1 participant