mirror of
https://github.com/mudler/LocalAI.git
synced 2026-07-30 09:57:57 -04:00
* fix(http): make /readyz reflect startup readiness instead of always 200 /readyz was registered as a static handler returning 200 unconditionally, so it carried no information: it was green whenever it could be reached at all. Readiness could not distinguish "serving" from "still starting", and any future change that started the HTTP listener earlier would silently turn the probe into a lie. Track startup completion on the Application (atomic flag, flipped at the very end of New() on the success path only) and have the readiness handler consult it per request, returning 503 with a small JSON body while startup is in progress. A nil readiness source fails open so embedders keep the historical behaviour. /healthz is deliberately left readiness-independent. Liveness and readiness answer different questions, and failing liveness during a long preload makes an orchestrator restart the pod mid-download so the preload never finishes. This matters because since #10949 the startup preload materializes HuggingFace artifacts for managed backends: tens of GB for a large model (31 GB observed on a live cluster). Both probes stay in quietPaths and stay exempt from auth. Note the listener is still started only after New() returns, so today the not-ready state is not observable over HTTP. Moving the listener earlier is a separate, deliberate decision and is not made here. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-opus-4-8 [Claude Code] * chore(gitignore): anchor the mock-backend pattern so its source dir is traversable The bare `mock-backend` pattern matched the *directory* tests/e2e/mock-backend/, not just the binary built into it. Git will not descend into an ignored directory even for tracked files, so `git add tests/e2e/mock-backend/main.go` required -f. This was hit while working on #10970. Anchor it to the artifact's full path. The built binary stays ignored (it is also covered by tests/e2e/mock-backend/.gitignore) while the source directory becomes traversable again. Verified with `git check-ignore -v`: a new source file under tests/e2e/mock-backend/ is no longer ignored, and the binary produced by `make build-mock-backend` still is. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-opus-4-8 [Claude Code] * chore(coverage): raise the coverage ratchet from 48.5% to 54.2% The committed baseline had drifted well below reality: it still read 48.5% while a full instrumented run measures 54.2%. A stale-low baseline makes the gate meaningless — coverage could regress by more than 5 percentage points and still pass. Raising a ratchet is a deliberate act, not something to fold into an unrelated fix, so it gets its own commit. The headroom was earned by tests landed in #10946, #10947, #10948, #10949, #10956, #10967, #10968, #10970 and #10975. Measured with `make test-coverage` on this branch (the same instrumented run `make test-coverage-baseline` uses: ginkgo over ./pkg and ./core plus the in-process tests/e2e suite, --covermode=atomic, --coverpkg over core/... and pkg/..., generated protobuf excluded). The run completed with exit 0 and zero spec failures; the total was then written with the exact command the test-coverage-baseline target uses: go tool cover -func=coverage/coverage.out \ | awk '/^total:/{gsub(/%/,"",$NF); print $NF}' > coverage-baseline.txt Verified afterwards with scripts/coverage-check.sh, which reports OK. Note the measured figure includes the readiness specs added earlier on this branch, so it is a demonstrated floor rather than an estimate. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-opus-4-8 [Claude Code] --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
114 lines
2.5 KiB
Plaintext
114 lines
2.5 KiB
Plaintext
# go-llama build artifacts
|
|
/sources/
|
|
__pycache__/
|
|
*.a
|
|
*.o
|
|
get-sources
|
|
prepare-sources
|
|
/backend/cpp/llama-cpp/grpc-server
|
|
/backend/cpp/llama-cpp/llama.cpp
|
|
/backend/cpp/llama-*
|
|
!backend/cpp/llama-cpp
|
|
/backends
|
|
/backend-images
|
|
/result.yaml
|
|
protoc
|
|
|
|
*.log
|
|
|
|
go-ggml-transformers
|
|
go-gpt2
|
|
whisper.cpp
|
|
/bloomz
|
|
go-bert
|
|
|
|
# LocalAI build binary
|
|
LocalAI
|
|
/local-ai
|
|
/local-ai-launcher
|
|
# Root-level build artifacts when running `go build ./...` against
|
|
# Go backend packages whose main lives under backend/go/.
|
|
/cloud-proxy
|
|
/local-store
|
|
# prevent above rules from omitting the helm chart
|
|
!charts/*
|
|
# prevent above rules from omitting the api/localai folder
|
|
!api/localai
|
|
!core/**/localai
|
|
|
|
# Ignore models
|
|
models/*
|
|
test-models/
|
|
test-dir/
|
|
tests/e2e-aio/backends
|
|
# The mock backend binary built by `make build-mock-backend`. Anchored to its
|
|
# full path: a bare `mock-backend` also matched the *directory* holding the
|
|
# source, so git would not descend into it and adding a file there needed -f.
|
|
# tests/e2e/mock-backend/.gitignore covers the same binary; kept here too so
|
|
# the artifact stays ignored if that scoped file is ever removed.
|
|
/tests/e2e/mock-backend/mock-backend
|
|
|
|
release/
|
|
|
|
# just in case
|
|
.DS_Store
|
|
.idea
|
|
|
|
# Generated during build
|
|
backend-assets/*
|
|
!backend-assets/.keep
|
|
prepare
|
|
/ggml-metal.metal
|
|
docs/static/gallery.html
|
|
|
|
# Protobuf generated files
|
|
*.pb.go
|
|
*pb2.py
|
|
*pb2_grpc.py
|
|
|
|
# SonarQube
|
|
.scannerwork
|
|
|
|
# backend virtual environments
|
|
**/venv
|
|
|
|
# per-developer customization files for the development container
|
|
.devcontainer/customization/*
|
|
|
|
# Coverage profiles (the committed baseline is coverage-baseline.txt)
|
|
/coverage/
|
|
|
|
# React UI build artifacts (keep placeholder dist/index.html)
|
|
core/http/react-ui/node_modules/
|
|
core/http/react-ui/dist
|
|
|
|
# React UI coverage (vite-plugin-istanbul + nyc, via `make test-ui-coverage`)
|
|
core/http/react-ui/.nyc_output/
|
|
core/http/react-ui/coverage/
|
|
|
|
# Extracted backend binaries for container-based testing
|
|
local-backends/
|
|
|
|
# UI E2E test artifacts
|
|
tests/e2e-ui/ui-test-server
|
|
core/http/react-ui/playwright-report/
|
|
core/http/react-ui/test-results/
|
|
|
|
# Local worktrees
|
|
.worktrees/
|
|
|
|
# SDD / brainstorm scratch (agent-driven development)
|
|
.superpowers/
|
|
|
|
# Local Apple signing material (never commit)
|
|
.certs/
|
|
|
|
# Pinned dev tools (e.g. FizzBee for the realtime-conformance gate)
|
|
.tools/
|
|
|
|
# FizzBee model-check artifacts: the parser emits <spec>.json next to each
|
|
# .fizz and the checker writes run dirs under out/. Both are regenerated by
|
|
# the realtime-conformance gate; only the .fizz sources are authoritative.
|
|
formal-verification/*.json
|
|
formal-verification/out/
|