Merge branch 'fix/hub-cleanup-pkgmgr-local' into unify/skills-20261114

This commit is contained in:
Kevin Veen-Birkenbach committed 2026-11-14 21:52:08 +00:00
commit 568747651b
19 files changed
+1534 -189

No files matched your search

+48 -10
View File
@@ -125,6 +125,33 @@ from three views down to any agent, branch or artefact.
worktree holds is skipped and left to `kvb-git-gc`, and no worktree,
Compose stack or volume is touched. Rejected: per Scope, also removing
the worktree and running `compose down` without `-v`.
- **Amended by the operator 2026-11-14**: only a branch whose local tip
the `pkgmgr branch cleanup --local` dry run deletes is offered: the tree
timer writes that dry run (`--json`, per known repository within a
budget, again only when its refs, HEAD, config, reftable or worktree
heads changed, the file rewritten after each repository) as
`local-plan.json` beside the tree file; a repository whose dry run
failed, timed out or was killed keeps its old plan marked stale, and
the hub offers nothing there and says why. The hub and the host decide
with one predicate on its item for that tip (`merged-clean`, no skip
reason, exactly the action `local-branch`); the hub also keeps the
local upstream of another branch, as pkgmgr keeps it for the host's
dry run of that branch alone. A branch that dry run keeps, such as one
merged by pull request (`pr#N`), squash or patch whose local tip is no
ancestor of the default branch, shows its dry run without a Delete
button, with the skip reason of the dry run and branch gc
(`kvb-git-gc`, `pkgmgr gc`) as the way to remove it, and the host
refuses its signed delete. The host runs one dry run and one apply per
repository and job; an item pkgmgr deleted at another merged tip than
the signed one is done with a warning, one the apply keeps is failed
with pkgmgr's skip reason, and only a branch pkgmgr reports deleted is
done: a signed branch whose ref is gone otherwise is `gone` ("deleted
outside this run" when pkgmgr answered without deleting it, "gone
after an interrupted apply" when the apply ended without output),
rewrites the tree and shows apart from deleted and failed. A dry run
or apply that names gone branches unknown runs once more without
them. Rejected: deciding by
`merged_by` alone, and offering a Delete the host then refuses.
22. **Organisation update**: a new skill `kvb-org-update` tells every agent
and client which skills changed and how to use them, as one
`newsletter` per update; phase 1 announces the radio change through it.
@@ -641,23 +668,34 @@ flowchart TD
- [x] The Artifacts Tree marks every branch and worktree with icons for
merged (with what merged it), clean, uncommitted changes (with counts),
unpushed commits, gone upstream, locked, stale and protected.
- [x] A `merged-clean` item without a gc skip reason shows a delete button,
and the Tree header shows "Delete all merged"; both are disabled,
with the reason as tooltip, while `delete_ready` is false.
- [x] A `merged-clean` item without a gc skip reason whose local tip the
`pkgmgr branch cleanup --local` dry run in `local-plan.json` deletes
shows a delete button, also when its remote tip was merged by squash or
patch, and the Tree header shows "Delete all merged"; both are
disabled, with the reason as tooltip, while `delete_ready` is false.
- [x] A `merged-clean` item that dry run keeps, or that it has not planned
at this tip yet, shows no delete button in its Tree row, its popup or
the delete sheet; its dry run says `pkgmgr branch cleanup --local` keeps
it with the skip reason of that dry run and names branch gc
(`kvb-git-gc`, `pkgmgr gc`) as the way to remove it, and the unit
refuses its signed delete by the same predicate.
- [x] A click shows the gc dry-run lines of exactly the chosen items;
"Delete" requires the operator signature through `/api/sign`.
- [x] The orchestrator writes the signed job (repository, branch, worktree
and tip sha per item, no command) into a host-mounted job directory and
holds no git, token or key.
- [ ] A systemd user path unit verifies the signature on the host and runs
`pkgmgr branch cleanup --apply --local` (the `--local` release is
pending in pkgmgr) for exactly the signed items, matched exactly, never
as a pattern; it removes the local branch, never a remote branch, a
worktree, a Compose stack or a volume, and needs no SSH key; a branch a
worktree holds is skipped and left to `kvb-git-gc`.
- [x] A systemd user path unit verifies the signature on the host and runs
`pkgmgr branch cleanup --apply --local` (pkgmgr 2.5.0) for exactly the
signed items, matched exactly, never as a pattern; it removes the local
branch, never a remote branch, a worktree, a Compose stack or a volume,
and needs no SSH key; a branch a worktree holds is skipped and left to
`kvb-git-gc`.
- [x] The unit refuses, and changes nothing for, an item whose tip or state
differs from the signed one, an unknown repository, a non-`merged-clean`
item and a job with a bad or missing signature, and reports why.
item and a job with a bad or missing signature, and reports why; an
item pkgmgr deleted at another merged tip than the signed one is done
with a warning, and one it did not delete there is failed, or `gone`,
never done, when its ref is gone.
- [x] The unit writes each item's result back and rewrites the tree file; the
Tree shows the result.
+11 -5
View File
@@ -52,9 +52,13 @@ changed and what it costs, and a gate means something again.
labelled stale and counted apart. Rejected: count everything, only drop
operator rows.
10. **Clean all merged**: dry run, one passkey, signed job. Local branches
merged by ancestry and without a remote branch need no token; remote
branches and squash-merge candidates need the GitHub token, stored through
an operator row. Rejected: wait for the token, ancestry for remotes.
merged by ancestry and without a remote branch need no token; the local
branch of one with a remote branch needs the GitHub token, stored through
an operator row. A branch the `pkgmgr branch cleanup --local` dry run
keeps, such as a squash or patch merge whose local tip is no ancestor of
the default branch, is never deleted here, token or not: its dry run says
why and names branch gc (`kvb-git-gc`, `pkgmgr gc`) (operator
2026-11-14). Rejected: wait for the token, ancestry for remotes.
11. **Ancestry**: Artifacts and Agents get a family tree (generations top down)
in the slot of today's Tree view. A branch may have several parents;
parents are recorded at creation (post-checkout hook), older branches are
@@ -227,8 +231,10 @@ flowchart TD
- [x] "Clean all merged" shows the gc dry run of every `merged-clean` item; one
passkey runs the signed job.
- [ ] Without a GitHub token, local branches merged by ancestry into the
default branch and without a remote branch can be deleted; the others
show "token needed", and an operator row stores the token.
default branch and without a remote branch can be deleted; the other
branches the `--local` dry run deletes show "token needed", and an
operator row stores the token. A branch that dry run keeps shows no
delete and no "token needed", with or without the token.
- [ ] Artifacts and Agents show Ancestry in the Tree slot: generations top
down, several parents per node; a derived parent edge is dashed.
- [ ] Dragging a branch onto another stages a parent edge, applied with the