Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/docs/recipes/core/charly-doctor.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Each check shows the binary path and version when available, or an install hint
## Cross-References

- [`/charly-automation:udev`](/recipes/automation/udev/) — install udev rules for GPU device access
- [`/charly-core:charly-config`](/recipes/core/charly-config/) — `engine.build`, `engine.run`, `secret_backend` settings, `--no-auto-detect` flag, DRINODE injection via `appendAutoDetectedEnv()`
- [`/charly-core:charly-config`](/recipes/core/charly-config/) — `engine.run`, `secret_backend` settings, `--no-auto-detect` flag, DRINODE injection via `appendAutoDetectedEnv()`
- [`/charly-automation:enc`](/recipes/automation/enc/) — credential lookup path behind the Secret Service collection + keyring-index checks; iteration-capable ssClient; broken-collection troubleshooting
- [`/charly-build:secrets`](/recipes/build/secrets/) — `charly secrets set/list/prune` commands referenced by the keyring-index remediation hint
- [`/charly-build:settings`](/recipes/build/settings/) — `keyring_collection_label`, `secret_backend`, and other runtime config keys surfaced by the Secret Storage checks
Expand Down
8 changes: 4 additions & 4 deletions src/content/docs/recipes/core/charly-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ former `status-substrate` HostBuild seam is DELETED, K-wave 2).
- `candy/plugin-status/nested_tree.go` — the declared-nested-tree pre-resolution
(K5, relocated from charly/status_nested.go's buildStatusRootsTree): resolves
the merged project + per-machine deploy tree directly (`HostBuild("resolved-
project")` + `deploykit.LoadFleetConfig`) into the wire-safe
project")` + `deploykit.LoadDeployConfig`) into the wire-safe
`[]spec.StatusNestedNode` shape the overlay folds, including the `--nested`
live-probe leg (`ResolveDeployChain` + `NestedExecutor`, the SAME primitive
`charly fleet add` / `charly check live parent.child` use).
`charly deploy add` / `charly check live parent.child` use).
- `candy/plugin-status/command.go` (`hostStatusSubstrate`) — the generic
`status-substrate` F10 forward is DELETED with `charly/status_substrate_host.go`
(K-wave 2): `command:status` now `InvokeProvider(verb:status-fanout)` DIRECTLY over
Expand Down Expand Up @@ -200,7 +200,7 @@ match keeps the synthesized declared row (`Source="nested"`).
subprocesses.
- **`charly status --nested`**: each child's LIVE venue is probed through the real
multi-hop chain (`ResolveDeployChain` → `NestedExecutor`, the SAME primitive
`charly fleet add` and `charly check live parent.child` use — no bespoke nested dial)
`charly deploy add` and `charly check live parent.child` use — no bespoke nested dial)
under a STRICT 4-second per-child context deadline. A timed-out / failing
child renders `unreachable`; the table is NEVER blocked. The deadline is a
context cancellation, never a sleep/retry loop. `--nested` also turns on live
Expand Down Expand Up @@ -318,7 +318,7 @@ Authoritative direct queries (when you need the raw mount data):

```bash
charly status <image> --json # volumes[] carries the live mounts
charly fleet show <image>
charly deploy show <image>
```

## Usage
Expand Down
30 changes: 23 additions & 7 deletions src/content/docs/recipes/core/clean.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "clean"
description: "Prune reusable build artifacts to defaults: retention (images, check runs) and sweep one-time makepkg leftovers — `charly clean`, keep_images/keep_check_runs, image-tag pruning, .check run cleanup."
description: "Prune reusable build artifacts to defaults: retention (images, check runs) and sweep one-time build-candy leftovers — `charly clean`, keep_images/keep_check_runs, image-tag pruning, .check run cleanup."
---

<!-- DO-NOT-EDIT — generated by `charly docs generate`; the opencharly/docs repo's deploy workflow regenerates this tree against its pinned charly checkout. -->
Expand Down Expand Up @@ -39,7 +39,7 @@ opts in; third-party configs get no surprise pruning until they set a value.
## Commands

```bash
charly clean # apply retention now: prune images + check runs + makepkg leftovers
charly clean # apply retention now: prune images + check runs + build-candy leftovers
charly clean --dry-run # print everything that WOULD be removed; touch nothing
charly clean --images # only image-tag retention
charly clean --check # only check-run retention
Expand All @@ -50,12 +50,28 @@ charly clean --deep --dry-run # the safe default probe: report the would-remov
charly clean --keep N # override the retention count for this run (0 = use defaults:)
charly clean --invalidate '<glob>' # remove charly-labeled image tags matching the glob
# (full ref or last segment; in-use skipped; runs ONLY this)
charly clean --cache # reclaim unreferenced blobs from every named charly cache (the
# content-addressed ArtifactStore's own GC); reports each store's live
# entries + the blobs/bytes it would reclaim; runs ONLY this category
charly clean --scopes # reap HUNG transient build scopes — the systemd user scopes
# buildah/podman put a build container into (runc-buildah-*.scope).
# A scope is stopped only when it has hung; a live one is left alone
```

With neither `--images` nor `--check` nor `--deep`, the three DEFAULT categories run (images +
check + makepkg) — unchanged, `--deep` NEVER fires implicitly. `--keep N` overrides both the
image and check-run retention counts for the invocation (it does not affect `--deep`, which has
no keep-N — it purges every untagged image).
With **none** of `--images` / `--check` / `--deep` / `--cache` / `--scopes`, the **four** DEFAULT categories
run (image-tag + check-run + build-candy + scopes) — unchanged, and `--deep` and `--cache` NEVER fire
implicitly. `--scopes` IS in that list because it is itself a category flag: the test the code applies is
`anyCategory := images || check || deep || cacheGC || scopes`, so naming ANY one of the five suppresses the
default set and runs only what was named (plus, for `--deep`, the scope reap below).
**`--scopes` is a default and `--deep` implies it:** `cleanCategories` computes
`doScopes = scopes || deep || !anyCategory`, so a bare `charly clean` reaps hung build scopes
and `--deep` does too, while `--deep` on its own runs only the image half plus that scope reap — and
`--cache` on its own runs only the cache sweep, with `doScopes` false.
`--keep N` overrides both the image and check-run retention counts for the invocation (it does
not affect `--deep`, which has no keep-N — it purges every untagged image).
**Category names, from the engine's own header** (`retention.go`): *image-tag / build-candy / check-run
pruning*, plus the `--deep` store-wide purge and the `--cache` blob sweep. The middle one prunes
`.build/_candy/<candy>.<version>/` per candy (`pruneBuildCandyDirs`).

**`--deep` — the store-wide untagged/dangling-image purge.** The default image-tag sweep above
only ever touches images carrying the `ai.opencharly.box` label. A multi-stage build's
Expand Down Expand Up @@ -195,7 +211,7 @@ importing only `sdk/kit` + `spec/spec`). `--deep` shares its engine with the def
charly-labeled dangling sweep via `pruneDanglingImages`/`selectDanglingImages`
(`candy/plugin-clean/retention.go`) parameterized by an `onlyCharly` bool: `pruneDanglingCharlyImages`
(onlyCharly=true, the default sweep) and `pruneDeepDanglingImages` (onlyCharly=false, `--deep`)
are both thin wrappers over the ONE shared selection + removal engine (R3 — no duplicated
are both thin wrappers over the ONE shared selection + removal engine (R2 — no duplicated
listing/removal logic between the two categories). The engine is reached two ways: `charly
clean`'s own CLI calls `runRetention` in-package (no wire hop); the three OTHER callers reach
`verb:retention` — the build command's post-build prune (`candy/plugin-box/box.go`'s
Expand Down
Loading
Loading