feat(reusable): runtime-variable swarm config (cache-immune, no more re-pinning to retune) (#14)
Build & push image / build-and-push (push) Successful in 5s
Build & push image / build-and-push (push) Successful in 5s
This commit was merged in pull request #14.
This commit is contained in:
@@ -39,8 +39,8 @@ it. Drop one file in your repo and set a couple of secrets/vars:
|
||||
1. Copy a stub from [`examples/`](examples/) to `.gitea/workflows/adversarial-review.yml` in
|
||||
your repo. Two flavors: the slim [`reusable.yml`](examples/reusable.yml) — a tiny caller of
|
||||
Gadfly's **reusable workflow** (`uses: steve/gadfly/.gitea/workflows/review-reusable.yml@…`,
|
||||
forwarding only the secrets the reviewer needs), which ships a **default swarm** (3 cloud models +
|
||||
the Claude Code engine + a local 4090 Ti via llama-swap, 5-lens suite) you inherit by omitting `with:` or override per-input — or the full self-contained
|
||||
forwarding only the secrets the reviewer needs), whose **default swarm is set centrally via owner
|
||||
variables** (see [Central config via variables](#central-config-via-variables)) and inherited by omitting `with:` — or the full self-contained
|
||||
[`adversarial-review.yml`](examples/adversarial-review.yml) (Ollama Cloud default, with inline
|
||||
notes for every provider / local Ollama / OpenAI-compatible / endpoint aliases). See the
|
||||
[examples index](examples/README.md).
|
||||
@@ -313,9 +313,28 @@ examples/ the ~15-line stub a consuming repo drops in
|
||||
The image is published to `gitea.stevedudenhoeffer.com/steve/gadfly`. Every push to `main`
|
||||
rebuilds and republishes `:latest` (plus `:sha-<short>`); pushing a `v*` tag publishes that
|
||||
pinned version (plus `:latest`). Pin full-stub consumers to a `:vN` image tag for stability, or track
|
||||
`:latest` to ride main. Reusable-workflow consumers likewise pin the workflow ref —
|
||||
`review-reusable.yml@v1` (a curated tag moved on releases, so central swarm tuning propagates) or
|
||||
a full `@<sha>` for an immutable pin; avoid `@main`.
|
||||
`:latest` to ride main. **Reusable-workflow consumers should pin the workflow ref to an immutable
|
||||
`review-reusable.yml@<sha>`** — long-lived act_runners *cache the workflow file by ref*, so a moved tag
|
||||
(`@v1`) or `@main` is often **not** re-fetched and silently runs a stale copy. A fresh `@<sha>` is the
|
||||
only reliable way to roll out a *structural* change to the reusable.
|
||||
|
||||
### Central config via variables
|
||||
|
||||
So you don't have to re-pin every consumer just to retune the swarm, the reusable resolves its config
|
||||
at **runtime** — `with:` input → owner **user/org-level variable** → image default — and variables are
|
||||
injected per-run (not part of the cached file), so changing one variable propagates to every consumer
|
||||
on its next review **without** a re-pin or a tag move:
|
||||
|
||||
| Variable (user/org scope) | Sets |
|
||||
|---|---|
|
||||
| `GADFLY_DEFAULT_MODELS` | `GADFLY_MODELS` (csv) |
|
||||
| `GADFLY_DEFAULT_SPECIALISTS` | the lens suite |
|
||||
| `GADFLY_DEFAULT_PROVIDER_CONCURRENCY` | models-at-once per provider |
|
||||
| `GADFLY_DEFAULT_PROVIDER_LENS_CONCURRENCY` | lenses-at-once per provider |
|
||||
| `GADFLY_ENDPOINT_RAGNAROS` | a named endpoint, e.g. `llamaswap\|https://host` |
|
||||
|
||||
Adding a *new* named endpoint still needs a one-line reusable edit (Gitea can't auto-expose arbitrary
|
||||
`vars.GADFLY_ENDPOINT_*`); the values of already-wired ones are pure variables.
|
||||
|
||||
## Configuration (advanced)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user