Loading
docs(specs): add the monolith/S11 trash spec
Summary
- Problem: from GA every repository and hosted-artifact delete lands in a Trash (ADR-010) for the 30 days Product fixed for GA, but the monolith has no spec for the Trash page.
monolith/S11was only a planned row in the index. - Impact: namespace-wide Artifact Admins and Managers. They get a page that lists what's waiting to be deleted forever: a Repositories tab for Admins, and an Artifacts tab for both. Nothing changes for users until the page's own feature flag is on.
- Change: adds
monolith/S11. Phase 1 is the read page: the View Trash entry point, both tabs with counts capped at "1,000+", filtered search, the Name, Date deleted and Expires sorts, the keyset pager, Deleted by with its user, and the Deleting state. Phase 2 (Restore, Delete forever, Empty trash) is deferred until AR's restore and purge contract is specced, with the settled behavior recorded. The spec pins the list and counts surface from the monolith proposal, so S17 Phase 5 and S20 can design against it. - Downsides: the AR trash reads aren't in the OpenAPI yet, so their paths, wire names, verdict names and refusal shape are open questions. They touch only the client methods and resolvers. The page itself can build against the GraphQL surface behind its flag.
Changes to other specs
monolith/S01: the Mounted areas table gains a Trash row:artifact_registry/:slug/trash, beside the repositories area, owned by S11.monolith/S15: an action a permission set gains after the minimum AR release (v2.18.0) is now denied on its own when AR doesn't send it, and isn't reported as drift. Before, any missing action turned the whole block false. S11 adds its trash verdicts to the namespace set, so an older AR would have hidden the create controls along with the Trash. Each such action names its first AR release, and the exemption ends once the minimum reaches it. Its Compatibility section now treats version skew as current.
Checklist
- Gaps: no restore or delete actions until Phase 2, and rows don't open at GA (product decision). The Repository filter's type-ahead waits on repository-list name search (#877); until then it suggests the first 100 hosted repositories and accepts a typed name. The delete flows' "Move to trash", Undo and create-form changes stay with
monolith/S05,S06,S07andS14. - Least sure: the verdict read. The page picks its tabs from the namespace verdicts, which costs the namespace details read, as on the create route. The counts read already leaves out a tab the caller can't open, so the page could pick tabs from it and skip that read. I kept the verdicts because Phase 2's Delete forever needs one anyway. I'd switch if S09 or a reviewer prefers the leaner shape.
- Compatibility: nothing existing changes, and every new field is
experiment. GitLab Self-Managed is in closed beta, so GitLab and AR can run different releases. Against an older AR, the missing trash verdicts read as denies, so the page stays hidden and makes no list read. That requires AR to send the verdicts only from the release that serves the reads. Opening the page's URL directly still sends the counts read, which answers404and resolves null. Against a newer AR, the client ignores unknown keys, and an unknown deleted-by cause resolves null. Mock data ships only while the Trash flag iswip, which GitLab never enables. When the page connects, the mock goes and the flag moves tobeta. - Agreement: Product and Design agreed the behavior in #1538. The list matches the backend study (review), and the filter and repository-name answers are folded in. S17 Phase 5, S20 and S09 still have to agree the paths, wire names, verdict names and refusal shape, which are the open questions. Rahul Chanila, who wrote most of
monolith/S15, still has to agree its change. - Simplicity: rejected a separate restore spec (restore is S11's Phase 2), exact counts and a size header (they read the whole trash on every view), and the shared feature flag (it's already on where closed beta runs, so a page merged against a mock would show there).
Related to https://gitlab.com/gitlab-org/ops/artifact-registry/-/work_items/1538
Edited by Fiona McCawley