Skip to content

fix(deploy): establish what reads the autobot-infrastructure copy beside the install, repoint it, then propose its removal #20578

Open

Description

@mrveiss

Problem

Maintainer decision on #20520: the stale autobot-infrastructure directory beside the install is proposed for removal through the review queue (#17038). Checking first found it may still be read, so removal is held.

Possible readers by grep of main. Which resolve to this directory on a deployed host is not established:

Reader How
autobot-slm-backend/services/manifest_loader.py Role manifests. Moved to code_source first in the PR for #20567
autobot-backend/utils/error_catalog.py:482 _candidate_paths, install root
autobot-backend/event_manager.py:43,61, autobot-backend/config/service_config.py:366 PATH.CONFIG_DIR
autobot_shared/redis_management/types.py:67 Relative to the module
autobot-backend/tasks/man_page_indexing.py:32 PATH.PROJECT_ROOT
autobot-slm-backend/services/role_manifest_shape.py, drift_checker.py To check

Acceptance criteria

  • Each reader is established, on a deployed host, with what it resolves to.
  • Each one that reads this copy is repointed to code_source or the deployed file it needs (test).
  • A removal action in the review queue refuses while the host has not run the new code, and removes only after approval, with a durable audit entry first. The design was reviewed on the PR for feat(admin): cleanup proposals in the admin page: .env copies, the stale directory, and the unused column #20567 (its earlier commits hold it).
  • Host: the directory is proposed and removed in the UI, and the app still works.

Refs #20520, #20567, #17038

Activity

  1. github-actions commented on Nov 6, 2026

    @github-actions
    Contributor

    Landed via the merge train (#20916, merge 7b3358f315) via #20595

  2. mrveiss commented on Nov 6, 2026

    @mrveiss
    OwnerAuthor

    Closure check against origin/main after T84b #20916 (7b3358f), which carries PR #20595. Issue stays OPEN, no AC ticked.

    AC (verbatim) Evidence on origin/main Ticked
    Each reader is established, on a deployed host, with what it resolves to. Partial. PR #20595 body establishes 6 readers (PATH.CONFIG_DIR, error_catalog, redis_management/types, man_page_indexing, rag_benchmarks, generate_inventory). role_manifest_shape.py and drift_checker.py ("To check" in the issue) are not established; the PR lists the ansible roles, ansible/*.sh and bootstrap/dev scripts as "left unverified". Deployed-host resolution needs host evidence; T84b is not deployed yet. no
    Each one that reads this copy is repointed to code_source or the deployed file it needs (test). Partial. autobot_shared/paths.py:162 infrastructure_dir; callers: utils/error_catalog.py:482 (fallback_root=install_root), tasks/man_page_indexing.py:33, knowledge/rag_benchmarks.py:36, redis_management/types.py:68; tests infrastructure_dir_20578_test.py, error_catalog_infrastructure_20578_test.py. NOT repointed: autobot-slm-backend/services/manifest_loader.py:45-50 still reads $AUTOBOT_BASE_DIR/autobot-infrastructure (#20576); the unverified readers above remain. no
    A removal action in the review queue refuses while the host has not run the new code, and removes only after approval, with a durable audit entry first. Not delivered by #20595 (no removal action in its 11 files). no
    Host: the directory is proposed and removed in the UI, and the app still works. needs host evidence; T84b is not deployed yet. no

    0 of 4 ticked. Left: finish AC1 (role_manifest_shape, drift_checker, the unverified scripts/roles), repoint manifest_loader (#20576), build the removal action, then host verification.

  3. mrveiss commented on Nov 6, 2026

    @mrveiss
    OwnerAuthor

    Host check after the T85 deploy (02c53be, read-only): AC4 is NOT MET.

    • autobot-slm-backend/services/manifest_loader.py:48-50 on the deployed host matches code_source, and it still defaults to <base_dir>/autobot-infrastructure.
    • SLM_INFRA_BASE_DIR is not set in the slm-backend service unit.
    • The install-root autobot-infrastructure is a real directory dated Jun 18. It differs from code_source/autobot-infrastructure, which is at 02c53be: the README, the ai-stack manifest.yml and templates all differ.
    • So the manifest loader reads a stale copy.
      Next: re-check after train T86 lands, because feat(slm): a stored SSH password deletion is proposed through the review queue (#20046) #20587 rewrites the loader's root lookup. If it still reads the install-root copy after that, this is a live defect in this issue's scope. AC4 stays unticked.
  4. mrveiss commented on Nov 6, 2026

    @mrveiss
    OwnerAuthor

    Closure re-check against origin/main at 923d6b2 (T86, #20937, carrying #20587). Issue stays OPEN, no AC ticked.

    AC (verbatim) Evidence on origin/main Ticked
    Each reader is established, on a deployed host, with what it resolves to. Unchanged from the previous check: role_manifest_shape.py and drift_checker.py carry only comment/doc references to autobot-infrastructure/ (no root lookup found), but no deployed-host resolution is recorded. no
    Each one that reads this copy is repointed to code_source or the deployed file it needs (test). manifest_loader.py is repointed: resolve_infra_base (line 51-65) builds candidates = (code_source / INFRA_DIR_NAME, base_dir / INFRA_DIR_NAME), so code_source wins when it exists; candidate_infra_roots (78-93) does the same; test autobot-slm-backend/tests/services/manifest_loader_reads_code_source_20567_test.py. The AC covers every reader and the earlier unestablished ones are still unestablished, so not ticked. no
    A removal action in the review queue refuses while the host has not run the new code, and removes only after approval, with a durable audit entry first. Not delivered. The only cleanup action in autobot-backend/services/install_cleanup_actions.py is ENV_COPIES_ACTION = "env_backup_copies_cleanup" (line 40); its header (line 8) still calls the infrastructure directory "a separate follow-up, #20578". No action, route or card exists for the directory. no
    Host: the directory is proposed and removed in the UI, and the app still works. Needs a host check after the T86 deploy. no

    0 of 4 ticked. Left: the removal action (with its refuse-until-new-code gate), the remaining reader checks, then host evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbugSomething isn't workingphase:M1.4Wizard and SLM: choose a mode, apply it, default models workpriority: medium

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions