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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Please choose versions by [Semantic Versioning](http://semver.org/).
* MINOR version when you add functionality in a backwards-compatible manner, and
* PATCH version when you make backwards-compatible bug fixes.

## Unreleased

- feat(chart): **expose the keel policy as `keel.policy` instead of a hardcoded `force` literal (chart 0.23.22).** `keel.sh/policy: force` was written into all four annotation blocks across three templates, and only `keel.enabled` / `keel.pollSchedule` were values, so the policy could not be set from a values file and an edit made on the live object was rewritten by the next apply. The templates now render `{{ .Values.keel.policy }}`, defaulting to `all` — the policy chosen on 2026-11-09, when `all` was preferred over removing the annotation because removal also stops image updates. Behaviour change for anyone relying on the old default: a `keel.enabled: true` render now emits `policy: all` rather than `force`. `keel.sh/match-tag` stays a literal and is not converted here. Change set: `helm/values.yaml`, `helm/templates/executor-deployment.yaml`, `helm/templates/controller-statefulset.yaml`, `helm/templates/recurring-task-creator-statefulset.yaml`, `helm/README.md`, `CHANGELOG.md`.

## v0.146.0

- feat(delivery): **carry the run's four token counts onto the task file.** `ClaudeResult` already parses `input_tokens`, `output_tokens`, `cache_read_input_tokens` and `cache_creation_tokens` and meters them to Prometheus, but `AgentResultInfo` and the deliverer carried only turns and interaction count, so the counts never reached the vault. They now flow `ClaudeResult` → `Result` → `AgentResultInfo` → the published frontmatter as `metrics_input_tokens`, `metrics_output_tokens`, `metrics_cache_read_tokens` and `metrics_cache_creation_tokens`, and each run is also appended to a `metrics_runs` history list — the flat keys are last-write-wins, so a redriven task would otherwise lose earlier runs and a per-window budget would undercount. A run with no usage summary publishes no token key rather than a false zero, matching the existing turn-count absence rule. Change set: `agent_status.go`, `agent_step.go`, `agent_runner.go`, `claude/agent-step.go`, `delivery/result-deliverer.go`, `delivery/result-deliverer_test.go`, `CHANGELOG.md`.
Expand Down
12 changes: 6 additions & 6 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: agent
description: bborbe agent framework — event-driven, Kafka-based, K8s-native task platform (controller, executor, and example agents)
type: application
# Chart version — bumped on chart changes, independent of appVersion.
# 0.23.20 adds `executor.env` / `executors[].env`: the values dict is merged
# verbatim into the executor container env, last so it can override a rendered
# name. Without it a setting the executor binary reads but the chart does not
# model is unreachable — a values key the template ignores is a silent no-op,
# and an operator edit to the live Deployment is dropped by the next apply.
version: 0.23.21
# 0.23.22 exposes `keel.policy` (default `all`): the keel.sh/policy annotation
# was a hardcoded `force` literal in every template, so the policy could not be
# set from values and an operator edit to the live Deployment was dropped by
# the next apply. 0.23.21 rendered `spec.tokenCeiling`; 0.23.20 added
# `executor.env` / `executors[].env`.
version: 0.23.22
# Default image tag for the framework components when values don't override.
appVersion: "0.3.1"
home: https://github.com/bborbe/agent
Expand Down
1 change: 1 addition & 0 deletions helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ agents: []
| `image.pullPolicy` | `IfNotPresent` | Container image pull policy. |
| `image.pullSecrets` | `[]` | Pull secret(s), e.g. `[{name: docker}]`. Empty for public `docker.io`. |
| `keel.enabled` | `false` | Emit keel auto-redeploy annotations (registry poll). Off = versioned deploys. |
| `keel.policy` | `all` | Value of the `keel.sh/policy` annotation: `all`, `major`, `minor`, `patch`, `force`, `glob`. (`poll` is a `keel.sh/trigger` value, not a policy.) Was a hardcoded `force` literal, so it could not be set here. |
| `keel.pollSchedule` | `@every 1m` | keel poll interval when enabled. |
| `affinity` | `{}` | Node affinity object applied to controller/executor/recurring pods. Empty = none. |
| `rolloutNonce` | `""` | Value of a `random` pod annotation to force a rollout. Empty = omit. |
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/controller-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
{{- include "agent.labels" $ | nindent 4 }}
annotations:
{{- if $.Values.keel.enabled }}
keel.sh/policy: force
keel.sh/policy: {{ $.Values.keel.policy }}
keel.sh/trigger: poll
keel.sh/match-tag: "true"
keel.sh/pollSchedule: {{ $.Values.keel.pollSchedule | quote }}
Expand Down
4 changes: 2 additions & 2 deletions helm/templates/executor-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- include "agent.labels" . | nindent 4 }}
annotations:
{{- if .Values.keel.enabled }}
keel.sh/policy: force
keel.sh/policy: {{ .Values.keel.policy }}
keel.sh/trigger: poll
keel.sh/match-tag: "true"
keel.sh/pollSchedule: {{ .Values.keel.pollSchedule | quote }}
Expand Down Expand Up @@ -238,7 +238,7 @@ metadata:
{{- include "agent.labels" $ | nindent 4 }}
annotations:
{{- if $.Values.keel.enabled }}
keel.sh/policy: force
keel.sh/policy: {{ $.Values.keel.policy }}
keel.sh/trigger: poll
keel.sh/match-tag: "true"
keel.sh/pollSchedule: {{ $.Values.keel.pollSchedule | quote }}
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/recurring-task-creator-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ metadata:
{{- include "agent.labels" . | nindent 4 }}
annotations:
{{- if .Values.keel.enabled }}
keel.sh/policy: force
keel.sh/policy: {{ .Values.keel.policy }}
keel.sh/trigger: poll
keel.sh/match-tag: "true"
keel.sh/pollSchedule: {{ .Values.keel.pollSchedule | quote }}
Expand Down
6 changes: 6 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ image:
# versioned deploys don't need it; bump image.tag + re-apply instead.
keel:
enabled: false
# keel.sh/policy — `all` takes any newer tag keel sees; `major`/`minor`/`patch`
# are the semver-gated modes; `force` deploys regardless of tag; `glob` filters
# by tag pattern. (`poll` is a keel.sh/trigger value, not a policy.) Previously
# a hardcoded `force` literal in every template, so the policy could not be
# set from values and a live edit was reverted by the next apply.
policy: all
pollSchedule: "@every 1m"

# Node affinity passthrough (quant pins pods to a node_type=<namespace> node).
Expand Down
Loading