Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 03 Nov 12:48
· 50 commits to main since this release
0a47dc9

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

  • R011 redacts 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–R014 before 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 the answer_redactions field of the
    explanation log 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 the redact and validate fuzz 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, and kausa_explanation_queue_length (at most 16), rendered with --endpoint or
    --dry-run. A gauge never set is not rendered.
  • An explanations waiting log line (reason, queued, next_call_in_seconds), once when
    incidents start waiting for the budget, and a waiting_for_budget field on explanation dropped (0021).
  • D008 also explains a Job failed by its podFailurePolicy (PodFailurePolicy) and an indexed
    Job with failed indexes (MaxFailedIndexesExceeded, FailedIndexes): every reason the Job
    controller gives a failed Job.
  • D011 also explains a CronJob whose Jobs the API server refuses (a quota, an admission webhook),
    from its FailedCreate event; the CronJob is the incident's object.
  • D002 also explains ErrImageNeverPull: imagePullPolicy: Never and an image the node cannot
    use, absent or not usable with the Pod's credentials.
  • D004 also explains a container whose process the runtime cannot start (RunContainerError,
    and CrashLoopBackOff after a StartError), such as an entrypoint missing from the image.
  • R003 redacts the container and the Pod named in the Job controller's podFailurePolicy notes.
  • 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 one endpoint check line that names the step that failed, its cause
    and a hint; exit 0 passed, 1 failed, 2 usage error
    (0020).
  • --model-timeout on kausa run and kausa check-endpoint: a call's total timeout, 10 to 600
    seconds, 120 by default; the started line shows it as model_timeout_seconds.
  • The chart's helm test: a Pod <fullname>-endpoint-check that runs kausa check-endpoint with
    no ServiceAccount token, created only by helm test, and, with networkPolicy.enabled, its own
    NetworkPolicy with egress to DNS and the endpoint only. The values model.timeoutSeconds (120)
    and endpointCheck.enabled (true).
  • Two gauges: kausa_endpoint_state{state} (closed, half_open, open) and
    kausa_model_last_success_timestamp_seconds; the skip reason endpoint_unavailable; the log
    lines endpoint unavailable and endpoint available; cause and queued on explanation retried, and cause and status on endpoint 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 every 3600/N seconds 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
    ExplanationSkipped Event (reason budget). 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_large came
    before, and delayed retries no longer take the queue past 16.
  • A failed model call gets a cause and a class (Causes):
    a quota 429 (insufficient_quota) and a 402 are no longer retried, nor a redirect, a refused
    key, a missing model or an answer that is not a chat completion; Retry-After is honoured on
    429 and 503, 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 as endpoint_unavailable. A transient first failure that opens
    the breaker sends its incident to the back of the queue.
  • A 413 is skipped as context_too_large, with the note the 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 reason endpoint, 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
    folded field counting the repeats in between; kausa_watch_errors_total still counts every
    one (#7).
  • R014 also redacts the query and fragment of an HTTP request line without a scheme
    (GET /orders?page=2 HTTP/1.1 becomes GET /orders?<redacted:query> HTTP/1.1), with an
    uppercase method; requests send less.
  • The help text of kausa_redactions_total says 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-days ages 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).
  • D004 is named container cannot be created or started and D011 workload cannot create pods or jobs; the names are in requests to the model, in Events and in the detection.name of
    notifications.
  • A container waiting in CrashLoopBackOff whose last termination is StartError is D004, not
    D001, as OOMKilled is D003: one incident with no log read, since the container never ran.
  • D011 about 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=true

Image: 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