{% extends "base.html" %} {% import "_links.html" as links with context %} {% block title %}Settings — Cairn Dashboard{% endblock %} {#- The env-pin marker (D-008): an env var shadowing the file value must be visible, or a save that "does nothing" is unexplainable. The API key's marker never echoes the effective value — the key is write-only. -#} {% macro env_pin(field, show_effective=true) -%} {%- if field.pinned -%} overridden by environment{% if show_effective and field.effective %} — effective {{ field.effective }}{% endif %} {%- endif -%} {%- endmacro %} {% block content %}

Settings

Embedding configuration, persisted to ~/.cairn/config.json. Environment variables still take precedence over saved values — a pinned field is marked below. Changes reach running cairn processes without a restart.

{% if saved %}

Settings saved.

{% endif %} {% if error %}

{{ error }}

{% endif %} {#- The POST actions carry the store in the action URL's query string (POST forms keep it; GET forms drop it — hence store_field elsewhere): the response then renders at a URL that already has ?store=, so the head stickiness script never redirects the POST landing to a GET of this POST-only route (405). The hidden input stays as the fallback transport resolve_selection also accepts. -#}
{{ links.store_field() }} {{ env_pin(cfg['CAIRN_EMBED_BACKEND']) }} {{ env_pin(cfg['CAIRN_EMBED_SERVER_MODEL']) }} API key: {% if cfg['CAIRN_EMBED_API_KEY'].effective %}set{% else %}not set{% endif %} {{ env_pin(cfg['CAIRN_EMBED_API_KEY'], show_effective=false) }} leave empty to keep the current value {{ env_pin(cfg['CAIRN_EMBED_TIMEOUT']) }} leave empty to keep the current value {{ env_pin(cfg['CAIRN_EMBED_SERVER_BATCH']) }} {{ env_pin(cfg['CAIRN_EMBED_MODEL_STAMP']) }} {{ env_pin(cfg['CAIRN_EMBED_BASE_URL']) }}

Parity check

Re-embeds a sample of stored chunks through the configured backend and compares against what is stored (gate 0.98).

{{ links.store_field() }}
{% if parity %}

Verdict: {{ 'pass' if parity.passed else 'fail' }} mean cosine {{ parity.mean }}, sampled {{ parity.sampled }} chunks — {{ parity.reason }}

{% endif %}
{% endblock %}