Repository navigation
fix(ansible): NPU play installs from docker/npu-worker/requirements.txt, which does not exist #13744
Description
Activity
Delivered and merged: PR #13785, squashed as
efcb3ff.AC 1 — the play installs from
/opt/autobot/src/autobot-npu-worker/requirements.txt.The issue suggested
roles/npu-workeras the reference for which file is canonical. It does not answer that — the role installs an inline package list, not a requirements file:- name: Install OpenVINO and dependencies ansible.builtin.pip: name: [openvino>=2024.0, openvino-dev, numpy, pillow, transformers, optimum[openvino]]
So the choice came down to the two files on their merits.
autobot-npu-worker/requirements.txtis the native source tree — minimal, exactly the NPU surface. The sibling underautobot-infrastructure/.../docker/is the container recipe and carries the whole web stack (fastapi, uvicorn, redis, pytest) that this play installs separately a few tasks later. A play nameddeploy-native-services.ymltakes the native one. Its relative-e ../autobot_sharedand-c ../constraints/shared.txtresolve on the host because the preceding task syncs the full source tree to/opt/autobot/src/.AC 2 —
scripts/check_ansible_file_references.py, run by a newansible-file-referencesworkflow on anyansible/**yml change. It exploits the one thing that makes this statically decidable: the deploy syncs the repo to/opt/autobot/src/, so a path under that prefix is a repo path.AC 3 — deliberate failure, restoring the original bogus path:
Ansible plays reference repo paths that do not exist: autobot-slm-backend/ansible/playbooks/deploy-native-services.yml:380: requirements -> docker/npu-worker/requirements.txt does not exist in the repo exit=1and with the fix:
check_ansible_file_references: 1 deployed-src reference(s) resolve; 216 host pattern(s) resolve against 8 inventories. exit=0scripts/check_ansible_file_references_test.py 22 passedThe first draft of the guard was broken and passed — it reported
0 deployed-src reference(s) resolve: green, and checking nothing._EXCLUDE_DIRSwas matched against the absolute path, and the checkout lives under.worktrees/, so every file in the repo was excluded. Exclusions are now relative, with a test for that case, and the end-to-end test asserts the output does not say0— so a future change that silently stops discovering plays fails rather than passes.Closing.
Part of #13743 · Wave 2, no blockers.
autobot-slm-backend/ansible/playbooks/deploy-native-services.yml:371installs the NPU worker's dependencies from:There is no
docker/npu-worker/directory in the repo:The real files are
autobot-npu-worker/requirements.txt(Linux,openvino>=2026.2.1+torch) andautobot-infrastructure/autobot-npu-worker/docker/requirements-npu.txt.Why it matters
This is not dead code.
docs/developer/SERVICE_MANAGEMENT.md:350documentsansible-playbook playbooks/deploy-native-services.yml --tags npuas the operator entry point, andINFRASTRUCTURE_DEPLOYMENT.mddoes the same. The documented way to deploy the NPU worker natively points at a path that cannot resolve.Fix
Point the play at the canonical requirements file. Decide which of the two is canonical for a native Linux deploy — the role (
roles/npu-worker) is the better-maintained path and should be the reference for what "correct" looks like.Acceptance criteria