Repository navigation
docs(audit): correct the Python floor drift and record the 3.14 consistency audit - #13750
Conversation
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
…stency audit Audit of every Python-version declaration in the repo — CI, .python-version, tool configs, Dockerfiles, Ansible roles and playbooks, runtime version checks. Result: the repo is already on 3.14 nearly everywhere. Written up in docs/audit/python_314_consistency.md with wheel availability re-measured against PyPI rather than assumed. Fixes the three pure-drift items here; the riskier ones are filed separately. startup_validator: the only runtime-enforced statement of the floor said 3.12 while CI, .python-version, mypy, both Dockerfiles and every backend Ansible role say 3.14. Raised to 3.14. (It also has no callers at all — #13738.) pyproject: the comment justifying black's py312 target claimed the NPU worker "pins 3.12+". It pins 3.11, and #10877 says 3.11 throughout — the comment understated the very constraint it exists to explain. Corrected, and annotated with the measurement below so the next reader does not re-derive it. format.sh: told the user the project targets py3.12 and to install black on 3.12, one line after telling them to install it on 3.14. Now names 3.14 as what CI runs, distinguishes running-under from target-version, and treats 3.12/3.13 as a note rather than lumping them in with 3.10. Also measured, and the reason the remaining items are worth doing: #10877's premise has expired. openvino 2026.3.0, torch 2.13.0 and numpy 2.5.1 all ship cp314 wheels, so "OpenVINO has no 3.14 wheels" no longer holds for the Linux NPU worker. onnxruntime-openvino (Windows worker only) still has no cp314. The audit also turned up three live defects in deploy-native-services.yml, which docs document as the operator entry point: it builds the NPU venv into the shared /opt/autobot/venv with 3.11 while two other producers build the same path with 3.14; it installs from docker/npu-worker/requirements.txt, which does not exist; and it targets host groups npu/aiml that the inventory does not define. Filed, not fixed here — different blast radius.
Follow-on to the 3.14 consistency audit: every .md under docs/ and README.md
grepped for a Python version claim, each hit classified as stale-and-wrong,
correct-as-history, or already-right.
The user-facing install and deploy path was already correct — docs/user-guide/,
runbooks/SINGLE_HOST_DEPLOYMENT.md and docs/deployment/ all say 3.14, matching
install.sh:397. Seven claims elsewhere were not:
- GETTING_STARTED_COMPLETE said install.sh installs 3.12; it installs 3.14, and
this is the first-contact document.
- architecture/README called the backend "Python 3.11+"; CODE_VECTORIZATION and
VLLM_SETUP_GUIDE both said "3.9+".
- CODE_QUALITY_IMPLEMENTATION described the CI job as setting up 3.11; CI is 3.14.
- BACKEND_DEBUGGING wrote its aioredis shim into a hardcoded
.../lib/python3.13/site-packages/ path. On a 3.14 backend that lands where
nothing imports it, so the documented fix silently does nothing. Now resolved
from the venv via sysconfig rather than pinned to a minor version.
- ROADMAP's actual-state column still recorded 3.10 for dev.
Left alone on purpose: dated audit baselines that state the interpreter they
were measured on, archived plan documents, and BACKEND_DEBUGGING's red-herrings
table row. Those are historical records — rewriting them would falsify the
measurement they exist to preserve.
Also recorded, not fixed: autobot_shared/time_utils.py and the datetime-parsing
audit both carry a migration plan whose step 6 waits on a "Python 3.11+ upgrade"
to drop the .replace("Z", "+00:00") shim. That precondition passed four minor
versions ago; three shim sites remain in shipped code and the docstring's count
of nine no longer matches. Removing a parsing shim has its own blast radius, so
it is filed rather than bundled here.
…_validator Caught in review of this PR. #13737 landed three comments and a skip-reason string that read "the platform floor is 3.12 (startup_validator. _validate_system_requirements)" — citing the exact check this PR raises to 3.14. Merging without this leaves the codebase asserting two different floors and citing the same source for both, which is the drift the audit set out to remove. The skip reason is user-visible: it prints on every skipped test on a sub-floor interpreter, so a stale number there is read as fact. No behaviour change; comments, a docstring, and one message string. Re-verified on 3.14: 23 passed, black and flake8 clean.
Review — pre-merge passReviewed against Runtime effect today: noneThe only executable change is one constant in Claims I verified rather than asserted
Caught during this review
The skip reason is the one that mattered: it prints on every skipped test on a sub-floor interpreter, where a stale number reads as fact. The audit doc's "F2 — The declared runtime floor is 3.12" heading is deliberately not changed — it describes the pre-fix finding. Scope disciplineThree things were found and deliberately not fixed here, because each has a blast radius this PR does not:
Verification
VerdictNo blocking findings. |
Thinking Path
Asked to "use 3.14 everywhere where possible". Before changing anything I enumerated every Python-version declaration in the repo — CI workflows,
.python-version, tool configs, Dockerfiles, Ansible roles and playbooks, runtimesys.version_infochecks — and re-measured wheel availability against PyPI rather than trusting the reason recorded in the tracking issue.The finding that matters: the repo is already on 3.14 nearly everywhere. CI (15 workflows),
.python-version, mypy, both Dockerfiles and every Ansible role except the NPU worker are 3.14. So the useful work was not a sweeping bump — it was finding the four places that disagree and the two exceptions whose justification has expired.This PR carries the audit and the three items with no runtime risk. Everything with blast radius is filed under epic #13743 in dependency order.
The expired premise
#10877 (CLOSED) pinned black's
target-versiontopy312and the NPU worker to 3.11 because OpenVINO shipped no 3.14 wheels. Measured 2026-08-08:openvinotorchnumpyopenvino-devpy3-none-anyonnxruntime-openvinoThe Linux NPU worker needs openvino + torch + numpy and not onnxruntime-openvino. It can move.
onnxruntime-openvinois used only by the Windows worker, which stays blocked. Nothing in this PR acts on that — it is recorded so #13747/#13748 start from a measurement instead of a stale assumption.What Changed
docs/audit/python_314_consistency.md(new) — the full audit: every surface, its declared version, and a verdict. Seven findings, F1–F7, with the recommended order.autobot-backend/startup_validator.py— the floor read3.12while CI,.python-version, mypy, both Dockerfiles and every backend Ansible role read 3.14. This is the only floor a running process enforces, so it is the one a reader trusts. Raised to 3.14. (It also has zero callers — filed separately as #13738; correcting the number and wiring the check are different fixes and both are needed.)pyproject.toml— the comment justifyingtarget-version = ["py312"]claimed the NPU worker "pins 3.12+". It pins 3.11, and #10877 says 3.11 throughout. The comment understated the very constraint it exists to explain. Corrected, plus the measurement above so the next reader does not re-derive it.scripts/format.sh— said "project targets py3.12+" and told the user to install black on 3.12, one line after telling them to install it on 3.14. Now names 3.14 as what CI runs, separates running under from target-version (different things — the pin is about emitted syntax), and demotes 3.12/3.13 to a note instead of lumping them with 3.10.No behaviour change to any shipped code path: one unreached validation constant, one comment, one developer script's messaging.
Verification
format.sh's new branch exercised live — on this box it selectspython3.12and emits the new note rather than the old contradictory advice:Wheel availability was measured against the PyPI JSON API, not inferred from release notes.
Follow-up, filed not fixed
Checking venv consistency across docker and native surfaced three live defects in
deploy-native-services.yml— whichSERVICE_MANAGEMENT.mdandINFRASTRUCTURE_DEPLOYMENT.mddocument as the operator entry point, so none are theoretical:docker/npu-worker/requirements.txt, which does not exist in the reponpu/aiml; the inventory definesnpu_workers/ai_stack. A play matching nothing is skipped silently and reads as success/opt/autobot/venvwith 3.11 while two other producers build the same path with 3.14, and theaimlplay has nocreates:guardThen the actual moves, in order: #13747 (Linux NPU worker → 3.14), then #13748 (black → py314). Reversing those two writes PEP 758 syntax into shared code a still-3.11 worker cannot parse.
All tracked under epic #13743.
Model Used
Claude Opus 5 (1M context)
Part of #13743