You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(deploy): a role's source path depends on the playbook's folder, so a deploy can restore months-old code #20509
A role deploy can silently put months-old code on a host. On the local install at 64943e3, the Full-Tree Drift Check showed autobot-ai-stack/ai_api_server.py differing from source by 31 lines, dated that day.
roles/ai-stack/tasks/main.yml:297-298 copied from {{ playbook_dir }}/../../../autobot-infrastructure/.... playbook_dir changes with where the playbook lives:
Playbook in
Those three .. reach
ansible/playbooks/
the repo root, correct
ansible/
one level above the repo root
The log for that run shows the source as <code_source>/autobot-slm-backend/ansible/../../../autobot-infrastructure/..., so it read a sibling autobot-infrastructure directory beside code_source. That directory is stale: 926 files, with none changed since before July. The file there is 363 lines against 382 on main, and lacks the #16428 validation handler. The service restarted on it.
Same pattern, also under roles/: monitoring/tasks/grafana.yml, slm_manager/tasks/grafana.yml, slm_manager/tasks/main.yml (autobot_shared), and _shared/tasks/clear_venv_husks.yml and stage_shared_manifests.yml.
Not known: who started the playbook that ran, and whether the other sites have also copied stale files on a host.
Acceptance criteria
No role resolves repo files through playbook_dir; the path is the same from either playbook depth (test, and a real run from both).
A guard fails on the pattern under roles/.
Host: after a builtin update, the drift check shows autobot-ai-stack matching source, with output pasted here.
Verified against origin/main after the merge train (PR #20598) landed (#20515 is a member).
AC
Evidence
No role resolves repo files through playbook_dir; same path from either depth (test, real run from both)
NOT MET. The ten role sites now use {{ role_path }}/../../../../, but roles/_shared/tasks/clear_venv_husks.yml:39, stage_shared_manifests.yml:43,56 still fall back to playbook_dir, and install_agent_autobot_shared.yml:26 derives from `playbook_dir
Closure pass against origin/main at 5b3508e8db (#21435) plus read-only checks on the local node.
Criterion
Verdict
Evidence
No role resolves repo files through playbook_dir
unchecked
git grep -n playbook_dir origin/main -- autobot-slm-backend/ansible/roles still shows a read in roles/_shared/tasks/install_agent_autobot_shared.yml:37 (shared_parent: ... default(playbook_dir | dirname | dirname | dirname, true)). It is a fallback when code_source_dir is unset, and the file argues its derivation is proven, but the criterion says no role resolves through playbook_dir. The other _shared tasks (clear_venv_husks.yml, stage_shared_manifests.yml) now only mention it in a task name. A real run from both playbook depths is not evidenced here.
A guard fails on the pattern under roles/
ticked earlier
repo_tests/role_source_paths_depth_proof_20509_test.py (test_no_role_reaches_the_repo_through_playbook_dir, with contrast test test_contrast_the_old_form_is_caught).
Host: after a builtin update, the drift check shows autobot-ai-stack matching source, output pasted
unchecked
The drift check is GET /code-sync/drift/full (api/full_tree_drift.py), which needs an authenticated user; no recorded result exists in the service logs. Supporting read-only evidence only: the installed autobot-ai-stack/ai_api_server.py has sha256 3bed8e13e255a4558ba06c0ea60f0ef5938b3dd45fc849d127dfbb3213332cfe, identical to origin/main:autobot-infrastructure/shared/docker/ai-stack/ai_api_server.py. That is not the drift-check output the criterion asks for. Satisfied by: an authenticated call to that endpoint after the update, pasting the autobot-ai-stack component row.
Stale directory proposed through the review queue (#17038)
Activity
fix(deploy): the remaining role paths, and a guard that reads the pat…
github-actions commentedon Nov 2, 2026
Landed via the merge train (#20598, merge
87eae8acf8) via #20515mrveiss commentedon Nov 2, 2026
Verified against
origin/mainafter the merge train (PR #20598) landed (#20515 is a member).playbook_dir; same path from either depth (test, real run from both){{ role_path }}/../../../../, butroles/_shared/tasks/clear_venv_husks.yml:39,stage_shared_manifests.yml:43,56still fall back toplaybook_dir, andinstall_agent_autobot_shared.yml:26derives from `playbook_dirroles/repo_tests/role_source_paths_depth_proof_20509_test.py:test_no_role_reaches_the_repo_through_playbook_dir,test_contrast_the_old_form_is_caught,test_the_ai_stack_copies_from_its_own_tree.autobot-ai-stackmatching source after a builtin updateStays open for AC 1 (partly), 3 and 4.
fix(deploy): shared role tasks never fall back to playbook_dir for th…
fix(deploy): the autobot_shared source anchor compares the derived tr…
test(deploy): the enrollment source anchor test follows the derived-t…
fix(ansible): the enrollment source anchor proves the tree by content…
fix(ansible): the enrollment source anchor stats the file under the d…
fix(ansible): the source-anchor failure names what was checked and ev…
Merge pull request #21435 from mrveiss/issue-21400-updater-batch
github-actions commentedon Nov 14, 2026
Landed in #21435, merge
5b3508e8dbmrveiss commentedon Nov 14, 2026
Closure pass against
origin/mainat5b3508e8db(#21435) plus read-only checks on the local node.playbook_dirgit grep -n playbook_dir origin/main -- autobot-slm-backend/ansible/rolesstill shows a read inroles/_shared/tasks/install_agent_autobot_shared.yml:37(shared_parent: ... default(playbook_dir | dirname | dirname | dirname, true)). It is a fallback whencode_source_diris unset, and the file argues its derivation is proven, but the criterion says no role resolves throughplaybook_dir. The other_sharedtasks (clear_venv_husks.yml,stage_shared_manifests.yml) now only mention it in a task name. A real run from both playbook depths is not evidenced here.roles/repo_tests/role_source_paths_depth_proof_20509_test.py(test_no_role_reaches_the_repo_through_playbook_dir, with contrast testtest_contrast_the_old_form_is_caught).autobot-ai-stackmatching source, output pastedGET /code-sync/drift/full(api/full_tree_drift.py), which needs an authenticated user; no recorded result exists in the service logs. Supporting read-only evidence only: the installedautobot-ai-stack/ai_api_server.pyhas sha2563bed8e13e255a4558ba06c0ea60f0ef5938b3dd45fc849d127dfbb3213332cfe, identical toorigin/main:autobot-infrastructure/shared/docker/ai-stack/ai_api_server.py. That is not the drift-check output the criterion asks for. Satisfied by: an authenticated call to that endpoint after the update, pasting theautobot-ai-stackcomponent row.Stays open.