Repository navigation
v0.5.0
The model's answer passes the pattern redaction rules before it is written anywhere (0022), the
hourly call budget refills at a steady rate, so that a restart no longer refills it (0021),
kausa check-endpoint and the chart's helm test check the endpoint, and a breaker holds calls
while it fails (0020), and D002, D004, D008 and D011 explain more failures. Upgrade the
image and the chart together, since the new chart passes --model-timeout, which older images
refuse; after the upgrade an Explanation may start a new entry once.
Added
R011redacts npm (npm_), PyPI (pypi-) and Docker (dckr_pat_,dckr_oat_) tokens and
GitLab's other token prefixes (gldt-,glrt-,glcbt-and the rest), each format taken from
its issuer's documentation (#5).- The model's answer passes the pattern redaction rules
R003–R014before it is logged, put in
an Event, stored in an Explanation or posted to the webhook: an address, a token, an email
address, a URL's query or a host outside the allowlist that the model writes, from injected
cluster text or invented, is written redacted, and kausa keeps no unredacted copy. The rules,
their order and the details that differ from the request are in Detection and redaction
rules
(0022). - The counter
kausa_answer_redactions_total{rule}and theanswer_redactionsfield of the
explanationlog line count the values replaced in the model's answers, by rule. - A prompt injection corpus (
tests/bench/injection-corpus.yaml) with its measurement script, and
seed corpora for theredactandvalidatefuzz targets. - Two gauges:
kausa_budget_calls_remaining{window}(hour: the calls the refill bucket allows
now within the 60-minute cap;day: what is left of the 24-hour cap), rendered with
--endpoint, andkausa_explanation_queue_length(at most 16), rendered with--endpointor
--dry-run. A gauge never set is not rendered. - An
explanations waitinglog line (reason,queued,next_call_in_seconds), once when
incidents start waiting for the budget, and awaiting_for_budgetfield onexplanation dropped(0021). D008also explains a Job failed by itspodFailurePolicy(PodFailurePolicy) and an indexed
Job with failed indexes (MaxFailedIndexesExceeded,FailedIndexes): every reason the Job
controller gives a failed Job.D011also explains a CronJob whose Jobs the API server refuses (a quota, an admission webhook),
from itsFailedCreateevent; the CronJob is the incident's object.D002also explainsErrImageNeverPull:imagePullPolicy: Neverand an image the node cannot
use, absent or not usable with the Pod's credentials.D004also explains a container whose process the runtime cannot start (RunContainerError,
andCrashLoopBackOffafter aStartError), such as an entrypoint missing from the image.R003redacts the container and the Pod named in the Job controller'spodFailurePolicynotes.- A known-cause corpus in
tests/bench/: a seeded failure for every detection
(seeded-failures.yaml), its cause written down before any model ran (known-causes.json), and
score.py, which replays dry-run requests against an endpoint and grades the answers with a
fixed rubric; first results in
Explanation quality of local models against known causes. kausa check-endpoint: one synthetic request to the model endpoint, on demand, with no cluster
and outside the budget, and oneendpoint checkline that names the step that failed, its cause
and a hint; exit0passed,1failed,2usage error
(0020).--model-timeoutonkausa runandkausa check-endpoint: a call's total timeout, 10 to 600
seconds, 120 by default; thestartedline shows it asmodel_timeout_seconds.- The chart's
helm test: a Pod<fullname>-endpoint-checkthat runskausa check-endpointwith
no ServiceAccount token, created only byhelm test, and, withnetworkPolicy.enabled, its own
NetworkPolicy with egress to DNS and the endpoint only. The valuesmodel.timeoutSeconds(120)
andendpointCheck.enabled(true). - Two gauges:
kausa_endpoint_state{state}(closed,half_open,open) and
kausa_model_last_success_timestamp_seconds; the skip reasonendpoint_unavailable; the log
linesendpoint unavailableandendpoint available;causeandqueuedonexplanation retried, andcauseandstatusonendpoint error.
Changed
- The hourly call budget refills at a steady rate instead of starting full: each start (and, with
--leader-lease, each takeover) allows 3 calls at once, then one every3600/Nseconds up to
N(--max-calls-per-hour), and the 60-minute and daily caps still hold. A restart no longer
brings a full hour's budget.--max-calls-per-day's help says it counts per process
(0021). - While the budget waits, incidents wait in the queue instead of being skipped, and a repeat with a
cached explanation passes them. When 16 are waiting, the oldest is skipped with an
ExplanationSkippedEvent (reasonbudget). A spent daily cap and a cap of 0 still skip at once. - A budget skip no longer reads the container log, so it may come where
context_too_largecame
before, and delayed retries no longer take the queue past 16. - A failed model call gets a cause and a class (Causes):
a quota429(insufficient_quota) and a402are no longer retried, nor a redirect, a refused
key, a missing model or an answer that is not a chat completion;Retry-Afteris honoured on
429and503, in seconds, clamped to 30-600 (0020). - After 3 transient failures in a row or 1 configuration error, kausa stops calling the endpoint
and incidents wait, one probing per hold (60 seconds, doubling up to 30 minutes); with 16
waiting, the oldest is skipped asendpoint_unavailable. A transient first failure that opens
the breaker sends its incident to the back of the queue. - A
413is skipped ascontext_too_large, with the notethe endpoint refused the request as too large for the model: lower --max-input-tokens. - A chat completion with no content (a refusal, a filter, out of output tokens) is still skipped
at once with reasonendpoint, now with a fixed note that names the kind. - A watch error that repeats with the same text is logged at most once every 5 minutes, with a
foldedfield counting the repeats in between;kausa_watch_errors_totalstill counts every
one (#7). R014also redacts the query and fragment of an HTTP request line without a scheme
(GET /orders?page=2 HTTP/1.1becomesGET /orders?<redacted:query> HTTP/1.1), with an
uppercase method; requests send less.- The help text of
kausa_redactions_totalsays that it counts the requests' redactions; its
series do not change. - After the upgrade, an Explanation may start a new entry once: a repeated incident whose
explanation now redacts differently goes in front instead of counting on the old entry, which
may push the oldest of the five out. Entries written before keep their text until
--history-daysages them out. - The Pod, Event and Deployment watches list in pages of 50 objects instead of 500, which bounds
the memory a page of large objects takes while it is decoded, for about ten times the list
requests (List pages). D004is namedcontainer cannot be created or startedandD011workload cannot create pods or jobs; the names are in requests to the model, in Events and in thedetection.nameof
notifications.- A container waiting in
CrashLoopBackOffwhose last termination isStartErrorisD004, not
D001, asOOMKilledisD003: one incident with no log read, since the container never ran. D011about a CronJob itself is an incident at once instead of waiting for the settle window,
which the CronJob controller's events would never pass. A Job of a CronJob whose Pods are
refused still waits for the window.
Fixed
- An incident whose Pods keep being replaced while it is pending no longer keeps a list of Pod
names that grows without limit: kausa keeps the first 100 names in sorted order, plus the Pods
failing when it settles (#6).
Install
helm install kausa https://github.com/fedeam/kausa/releases/download/v0.5.0/kausa-0.5.0.tgz \
-n kausa --create-namespace --set rbac.scope=cluster --set dryRun=trueImage: ghcr.io/fedeam/kausa:0.5.0 (ghcr.io/fedeam/kausa@sha256:23886cc958782c1b3f602db5afe9adedb4a432786a9b703e26f0de312b9e91d8), linux/amd64 and linux/arm64.
Verify
With cosign v3 or later and the GitHub CLI:
cosign verify ghcr.io/fedeam/kausa@sha256:23886cc958782c1b3f602db5afe9adedb4a432786a9b703e26f0de312b9e91d8 \
--certificate-identity https://github.com/fedeam/kausa/.github/workflows/release.yml@refs/tags/v0.5.0 \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
gh attestation verify oci://ghcr.io/fedeam/kausa@sha256:23886cc958782c1b3f602db5afe9adedb4a432786a9b703e26f0de312b9e91d8 --repo fedeam/kausa
gh attestation verify kausa-0.5.0.tgz --repo fedeam/kausa \
--bundle kausa-0.5.0.intoto.jsonl
cosign verify-blob SHA256SUMS --bundle SHA256SUMS.sigstore.json \
--certificate-identity https://github.com/fedeam/kausa/.github/workflows/release.yml@refs/tags/v0.5.0 \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
sha256sum -c SHA256SUMS