Skip to content

feat(admin): cleanup proposals in the admin page: .env copies, the stale directory, and the unused column #20567

Open
1 of 3 issues completed

Description

@mrveiss

Problem

Owner rule: people work in the UI, not API calls. Three cleanups are decided but have no way to be proposed from the UI:

Acceptance criteria

  • The admin page shows each cleanup's status (what is there, with counts) and a button proposing it. It never shows a file's contents.
  • A proposal goes to the review queue, is never auto-approved, and leaves a durable record. Without approval nothing changes (test).
  • After approval, .env.*~ keeps only the newest copy, and the stale directory is removed. The paths come from the server at execution, never from the request (test).
  • An action that finds nothing to do, or a path outside the install root or that is a symlink, removes nothing (test).
  • Host: on the local install, each is proposed and approved in the UI with the result pasted here.

Refs #17038, #20517, #20520, #19997

Activity

  1. mrveiss commented on Nov 6, 2026

    @mrveiss
    OwnerAuthor

    Closure check against origin/main at 923d6b2 (T86, #20937, carrying #20587). Issue stays OPEN, no AC ticked: the issue lists three cleanups and main delivers two.

    AC (verbatim) Evidence on origin/main Ticked
    The admin page shows each cleanup's status (what is there, with counts) and a button proposing it. It never shows a file's contents. AdminCleanupProposalsView.vue has cards for the .env.*~ copies (CleanupStatus count) and the organization tier column (OrgTierColumnStatus); its header comment says "the two decided cleanups". No card or route for the stale autobot-infrastructure directory (tracked in #20578). Spec: views/__tests__/AdminCleanupProposalsView.spec.ts (count per cleanup, disabled when nothing to do). no
    A proposal goes to the review queue, is never auto-approved, and leaves a durable record. Without approval nothing changes (test). Holds for the two existing cleanups: admin_cleanup_proposals_20567_test.py test_status_counts_and_proposal_does_not_remove (l.29), install_cleanup_actions_20567_test.py test_without_a_verified_decider_nothing_changes (l.109), test_four_eyes_applies (l.116). Not for the third cleanup, which does not exist. no
    After approval, .env.*~ keeps only the newest copy, and the stale directory is removed. The paths come from the server at execution, never from the request (test). .env.*~: test_env_copies_keep_only_the_newest (l.65), test_a_context_path_is_ignored (l.97). The stale directory removal is not delivered (#20578). no
    An action that finds nothing to do, or a path outside the install root or that is a symlink, removes nothing (test). For the env-copies action: test_nothing_to_do_removes_nothing (l.75), test_a_symlinked_copy_refuses_and_removes_nothing (l.83), test_a_directory_swapped_for_a_symlink_after_planning_removes_nothing (l.180). The directory action does not exist, so the AC is not whole. no
    Host: on the local install, each is proposed and approved in the UI with the result pasted here. Needs a host check after the T86 deploy. no

    0 of 5 ticked. Left: the directory cleanup (#20578), then host evidence. Separately, an in-flight PR (#20576) carries three hunks still missing from main: the real-auth-stack test for these routes, the audit result "attempted" for the intent row, and the stale "three cleanups" header comment.

  2. mrveiss commented on Nov 9, 2026

    @mrveiss
    OwnerAuthor

    PR #20576 landed on main in merge train T101b (#21263), merge commit 4b5a129 (frozen head c325bf7 is an ancestor of main). This is a partial delivery: the .env.*~ cleanup only. No checkbox is ticked, because each criterion covers all the cleanups or needs host evidence.

    • "The admin page shows each cleanup's status (what is there, with counts) and a button proposing it. It never shows a file's contents." Open. Delivered for .env.*~ copies: autobot-backend/api/admin_cleanup_proposals.py GET /env-copies-cleanup returns counts, and autobot-frontend/src/views/AdminCleanupProposalsView.vue has the Propose button. Not delivered for the stale autobot-infrastructure directory or the subscription_tier drop.
    • "A proposal goes to the review queue, is never auto-approved, and leaves a durable record. Without approval nothing changes (test)." Open for the other cleanups. For .env.*~: POST /env-copies-cleanup/requests creates a PENDING DESTRUCTIVE_ACTION approval; admin_cleanup_proposals_20567_test.py::test_status_counts_and_proposal_does_not_remove and install_cleanup_actions_20567_test.py::test_without_a_verified_decider_nothing_changes cover it.
    • "After approval, .env.*~ keeps only the newest copy, and the stale directory is removed. The paths come from the server at execution, never from the request (test)." Open. .env.*~ is covered (test_env_copies_keep_only_the_newest, test_a_context_path_is_ignored). The stale-directory removal is not implemented; services/install_cleanup_actions.py line 8 defers it to fix(deploy): establish what reads the autobot-infrastructure copy beside the install, repoint it, then propose its removal #20578 (open).
    • "An action that finds nothing to do, or a path outside the install root or that is a symlink, removes nothing (test)." Open for the other cleanups. For .env.*~: test_nothing_to_do_removes_nothing, test_a_symlinked_copy_refuses_and_removes_nothing.
    • "Host: on the local install, each is proposed and approved in the UI with the result pasted here." Open. Host evidence is needed; a merge is not evidence.

    Remaining: the stale-directory cleanup (#20578), the organizations.subscription_tier drop proposal (#19997, no code on main), and the host run.

  3. mrveiss commented on Nov 9, 2026

    @mrveiss
    OwnerAuthor

    Host evidence check (read-only) on the local install, deployed at commit 85d5d2e (the deployed-commit markers of the backend docs and SLM backend both read this SHA).

    Checked (admin login, GET only; nothing proposed, approved or executed):

    Not checked, and not ticked: "Host: on the local install, each is proposed and approved in the UI with the result pasted here." This needs the owner to propose and approve in the UI (an approval deletes files, and no agent approves). Missing: the proposal and approval click-through for .env.*~ and the result after approval (newest copy kept), plus the stale directory and column once those exist. No acceptance criterion is ticked.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions