Skip to content

fix(backends): prefer installed development builds - #12782

Merged
mudler merged 5 commits into
masterfrom
fix/installed-development-backend-preference
Oct 19, 2026
Merged

mudler merged 5 commits into
masterfrom
fix/installed-development-backend-preference

Conversation

@mudler-agent

Copy link
Copy Markdown
Collaborator

Summary

  • Prefer runnable, hardware-compatible installed development builds when development preference is enabled for generic backend aliases. Preserve explicit concrete selections and existing flag-off behavior.
  • Pass the preference into distributed-worker resolver state and synchronize saved frontend settings before startup registration. Document worker-local configuration and restart activation.
  • Report preference changes through the Settings API without restarting the watchdog or changing registered resolver paths during runtime.
  • Add alias-selection, configuration, root-shadowing, and actual Settings endpoint regressions.

Verification

  • Recorded failing-before regressions for alias resolution, worker configuration, saved startup preference, and preference-only Settings requests.
  • Relevant package tests passed for system, gallery, worker, CLI, config, application, and schema. The initial implementation run reported 1,646 passing specs; gallery had nine skips.
  • Settings endpoint suite: 10 specs passed. Root independently reran this suite and focused preference tests against the follow-up commit successfully.
  • Matched-toolchain lint: zero issues with Go 1.26.9.
  • One worker crash-cleanup test timed out in an initial root package run; both isolated and full-worker retries passed. The original failure remains recorded.

Verification limits

  • The broader HTTP endpoint suite is not green locally: PostgreSQL-backed suites failed because Docker socket access was unavailable. The HTTP package itself passed.
  • Full coverage is not green: prerequisite setup encountered a missing extraction utility and an existing pinned protobuf plugin install failure. Reusing existing plugins reached a failure in the untouched FFmpeg conversion suite; that coverage run was stopped and is incomplete. No baseline or gate was weakened.
  • No live rollout, model inference acceptance test, or backend removal is included.

Compatibility

Development preference applies within the compatible installed candidates, before hardware token ranking. Stable fallback remains available when no eligible development build exists. Frontend changes require restart for resolver activation; each distributed worker needs its own configuration and restart.

The coverage script ran ginkgo per test root with `|| fail=1`, which
swallowed the exit code. Combined with `make --output-sync=target`,
which buffers all output and flushes at the end, the actual ginkgo
error was invisible in interleaved CI logs. Every test suite passed
but the script still exited 1, and the error message was buried in
22 000 lines of buffered output.

Each ginkgo invocation now captures combined stdout+stderr to a
per-root log file. On failure the last 80 lines are printed to
stderr so the error is visible in the CI log. On success the log is
replayed to stdout so test output remains visible.

The build flags (--tags, --coverpkg) are quoted correctly so values
containing spaces (e.g. --tags="debug auth") are preserved through
eval.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
The previous commit added per-root log files but forgot to create
the output directory before the first ginkgo invocation. On CI the
coverage/ dir did not exist yet, so the shell redirect to
cover-pkg.out.log failed with "No such file or directory" before
ginkgo even ran.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Commit 9ad7838 added GET /api/canvas/preview/:id as a public route
(no auth — the random id is the capability, an iframe cannot send API
key headers) but did not add it to expectedPublicRoutes in the route
auth coverage test. The test flagged the route as an anonymous-access
leak, failing the entire ./core ginkgo suite on every CI run since.

The POST /api/canvas/preview endpoint is auth-gated (returns 401 to
anonymous requests) and is intentionally absent from the allowlist.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Prefer compatible runnable development builds for generic aliases when
the preference is enabled. Keep concrete names and disabled selection
unchanged.

Pass worker-local configuration into resolver state before registration.
Synchronize saved frontend settings at startup and require a restart for
resolver changes instead of switching registered paths during runtime.

Add selection, root-shadowing, configuration, and restart-boundary tests.
Document fallback behavior and worker-local activation.

Assisted-by: Codex:gpt-5
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
A development preference save must not restart the watchdog. Separate
its server restart notification from the legacy reconfiguration signal.
Preserve existing response fields and genuine watchdog updates.

Exercise the real settings endpoint for both preference values, repeated
saves, and mixed watchdog updates. Verify resolver state and registered
paths remain unchanged until startup.

Attribution correction for commit
85c46d2:
its Assisted-by: Codex:gpt-5 trailer is incorrect. The actual agent was
nib using model gpt-6.1-sol. Preserve that commit as task history.

Assisted-by: nib:gpt-6.1-sol
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler
mudler merged commit dce91ba into master Oct 19, 2026
1 of 24 checks passed
@mudler
mudler deleted the fix/installed-development-backend-preference branch October 19, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants