Cache channel listings for search
Rolling Release / build (push) Successful in 1m46s
Rolling Release / publish (push) Successful in 9s

Search keeps each channel's list for an hour, so a repeat needs no
network, and uses the old copy with a warning if the registry fails.
`--refresh` skips the cache; publish, index, login and logout drop it.

A test command no longer writes to stdout, where it could corrupt the
test runner's results.

Planning: bnbr1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-12-01 05:04:06 -08:00
1 parent 8f202290b9
commit 47a80fad04
9 files changed
+330 -55

No files matched your search

+2
View File
@@ -66,6 +66,7 @@ The manifest has `artifactType` `application/vnd.latha.orbit.index.v1` and one J
- `orbit publish` adds the package to the index, and creates the index from the catalog if there is none. `--no-index` skips this.
- `orbit index [--channel <name>]` rebuilds it from the catalog. Use it after deleting a package, or if two publishes ran at once and one entry was lost. On a registry without a catalog, name the packages: `orbit index mytool othertool`.
- Installs and version lookups never read the index, so a stale one can't change what is installed.
- Search keeps a copy of each channel's list in `~/.orbit/cache/indexes/` and uses it for an hour without touching the network. After that it fetches the list again, or uses the old copy with a warning if the registry can't be reached. `orbit search --refresh` fetches now. Your own `publish`, `index`, `login` and `logout` drop the copies they affect. A channel without an index is cached too, if it has at most 100 repositories.
- The index is built with the publisher's login. On a registry where packages in one namespace can be private while others are public, a public index reveals the private names, descriptions and versions. Gitea sets visibility per owner, so this doesn't apply there.
## Usage
@@ -248,6 +249,7 @@ src/main/
model.mbt orbit.json / state.json / config.json (+ tests)
registry.mbt OCI registry ops: tags, resolve, cached manifests, fetch, publish, login
index.mbt channel index: build, publish, read (+ tests)
index_cache.mbt local copies of channel listings for search (+ tests)
solver.mbt lazy Resolvo-style CDCL SAT solver & UNSAT explainer (+ tests)
ops.mbt SAT-backed global install/upgrade, remove/rollback/gc/search
project.mbt orbit.toml, orbit.lock, .orbit/ environments, project CLI (+ tests)