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
feat(admin): cleanup proposals in the admin page: .env copies, the stale directory, and the unused column #20567
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.
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.pytest_status_counts_and_proposal_does_not_remove (l.29), install_cleanup_actions_20567_test.pytest_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.
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.pyGET /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.
"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.
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):
GET the admin env-copies cleanup status as an admin: HTTP 200, {"count":181,"detail":"181 older .env.*~ copies; the newest is kept","refused":null}. Counts only, no file contents. Without a token the same route returns 401.
The installed backend carries the admin cleanup route module, the executor service and the admin cleanup-proposals view and route.
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.
Activity
fix(admin): the stale-directory cleanup moves to #20578; manifests fa…
fix(admin): the .env cleanup finds the backend when the base dir alre…
fix(merge): resolve the core_routers.py clash with #20445 into one im…
fix(merge): take #20445's owner-read containment, one session.py (#20567
Merge main into issue-20567-cleanup-proposals (#20567)
fix(cleanup): admin gate tested through the real auth stack, pending …
mrveiss commentedon Nov 6, 2026
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.
AdminCleanupProposalsView.vuehas cards for the.env.*~copies (CleanupStatuscount) and the organization tier column (OrgTierColumnStatus); its header comment says "the two decided cleanups". No card or route for the staleautobot-infrastructuredirectory (tracked in #20578). Spec:views/__tests__/AdminCleanupProposalsView.spec.ts(count per cleanup, disabled when nothing to do).admin_cleanup_proposals_20567_test.pytest_status_counts_and_proposal_does_not_remove(l.29),install_cleanup_actions_20567_test.pytest_without_a_verified_decider_nothing_changes(l.109),test_four_eyes_applies(l.116). Not for the third cleanup, which does not exist..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).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.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.
feat(admin): cleanup proposals for .env copies, the stale directory a…
fix(admin): cleanup removals are audited first, and role manifests co…
chore(tests): repin the reach floors on the merged tree (mrveiss#20567)
fix(admin): the cleanup page uses the shared card, header and alert (m…
fix(cleanup): admin gate tested through the real auth stack, intent a…
test(cleanup): use FakeAsyncSession as the DB session in the cleanup-…
refactor(cleanup): reuse audit_logger.AuditResult instead of an inlin…
fix(admin): real-service pending test, index definition, vanished-fil…
refactor(admin): split execute_env_copies_cleanup under 30 lines (#20567
mrveiss commentedon Nov 9, 2026
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..env.*~copies:autobot-backend/api/admin_cleanup_proposals.pyGET /env-copies-cleanupreturns counts, andautobot-frontend/src/views/AdminCleanupProposalsView.vuehas the Propose button. Not delivered for the staleautobot-infrastructuredirectory or thesubscription_tierdrop..env.*~:POST /env-copies-cleanup/requestscreates a PENDINGDESTRUCTIVE_ACTIONapproval;admin_cleanup_proposals_20567_test.py::test_status_counts_and_proposal_does_not_removeandinstall_cleanup_actions_20567_test.py::test_without_a_verified_decider_nothing_changescover it..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.pyline 8 defers it to fix(deploy): establish what reads the autobot-infrastructure copy beside the install, repoint it, then propose its removal #20578 (open)..env.*~:test_nothing_to_do_removes_nothing,test_a_symlinked_copy_refuses_and_removes_nothing.Remaining: the stale-directory cleanup (#20578), the
organizations.subscription_tierdrop proposal (#19997, no code on main), and the host run.mrveiss commentedon Nov 9, 2026
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):
GETthe admin env-copies cleanup status as an admin: HTTP 200,{"count":181,"detail":"181 older .env.*~ copies; the newest is kept","refused":null}. Counts only, no file contents. Without a token the same route returns 401..env.*~cleanup exists in this build (the stale-directory cleanup is a separate follow-up, fix(deploy): establish what reads the autobot-infrastructure copy beside the install, repoint it, then propose its removal #20578; the column drop is not in this install's route).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.