v0.8.0-alpha¶
This alpha release packages the changes landed after v0.7.9-alpha.
Use it if you need database migrations, the Agent REST control facade, the operator console, campaign programs, or the failed-candidate repair pool.
Highlights¶
- Native data-preserving database migrations now upgrade existing schema
version 5 (
v0.7.9-alpha) databases to schema version 12. Operators can runuv run loreley db current,uv run loreley db migrate, anduv run loreley db validate; API, scheduler, and worker startup can also auto-migrate whenDB_AUTO_MIGRATE=true. - The Agent REST control facade is available under
/api/v1/agent. It exposes capabilities, agent-oriented status, next actions, audited dry-run and execute actions with idempotency, requiredLORELEY_AGENT_API_TOKENbearer auth, and job/commit feedback endpoints. - The Streamlit operator console now includes Campaign and Repair Pool pages, background baseline ensure tasks, repair-pool listing/actions, repair schedule-one, single job retry, and failed-stale bulk retry.
- Failed candidates are now stored in a separate repair ledger with structured
evaluation attempts and sanitized DiagnosticCapsule evidence. They do not
create
CommitCardrows, enter the MAP-Elites archive, or appear in normal sampler inputs. - Campaign programs can be declared in
loreley.program.mdand propagated through planning, evaluator payloads, baseline comparability, provenance, and worker scope checks. - Evaluator-declared evaluation artifacts now have bounded diagnostics, visibility controls, worker-managed payload storage, database rows, UI API listing/download routes, and agent-visible feedback projections.
Upgrade Notes¶
Database migration required¶
This release bumps INSTANCE_SCHEMA_VERSION from 5 to 12. Take a Postgres
backup before upgrading a non-disposable database, then run:
uv run loreley db migrate
uv run loreley db validate
When DB_AUTO_MIGRATE=true, API, scheduler, and worker startup run the same
migration path automatically. When DB_AUTO_MIGRATE=false, run
uv run loreley db migrate before starting those processes. Use
uv run loreley reset-db --yes only for disposable local databases.
New authentication requirements¶
Set these tokens before enabling write-capable API or agent workflows:
LORELEY_API_WRITE_TOKENfor UI API POST routes and Streamlit operator actions.LORELEY_AGENT_API_TOKENfor/api/v1/agentroutes.
If LORELEY_AGENT_API_TOKEN is unset, agent routes return
agent_auth_not_configured. API preflight reports missing write and agent
tokens as warnings without blocking read-only API startup.
New configuration knobs¶
Review these settings before enabling the new flows:
DB_AUTO_MIGRATELORELEY_API_WRITE_TOKENLORELEY_AGENT_API_TOKENFAILED_CANDIDATE_REPAIR_ENABLEDFAILED_CANDIDATE_REPAIR_NORMAL_JOBS_PER_TOKENFAILED_CANDIDATE_REPAIR_MAX_TOKENSFAILED_CANDIDATE_REPAIR_MAX_ACTIVE_JOBSBASELINE_BOOTSTRAP_POLICYCAMPAIGN_PROGRAM_CHANGE_POLICY
See Configuration for details.
Operator workflow changes¶
- Streamlit operator write buttons require an explicit per-action confirmation checkbox before enabling Campaign baseline ensure, Jobs retry, Repair Pool schedule-one, and Repair Pool candidate state actions.
- Manual repair scheduling from the UI API and scheduler repair dispatch now serialize cap and repair-token budget checks with the scheduling mutation.
- Automatic scheduler repair dispatch uses the persisted token budget, so a scheduler restart keeps already earned repair capacity.
- Repair scheduling is one-generation for this release. Only original failed
candidates with
failed_depth=0and norepair_source_candidate_idare eligible. CAMPAIGN_PROGRAM_CHANGE_POLICY=approveis rejected until an approval workflow exists. Uselockedorauto.
Fixes¶
- Failure persistence now disambiguates evaluator artifact keys that collide
with the worker's synthetic
evaluation_failurerecord, so the collision cannot roll back structured failed-candidate state. GET /api/v1/jobsandGET /api/v1/jobs/pagenow applycandidate_fateandevidence=has_evidence|agent_visible|nonefilters in SQL, avoiding unbounded application-layer scans for sparse projection filters.- Baseline ensure from the Operator console reruns failed or degraded same-key baseline rows while still reusing valid rows.
- UI API startup marks only stale pending/running baseline ensure tasks failed, leaving recent active tasks alone for multi-process API deployments.
Validation¶
- CI continues to run
uv run pytest. - Local validation for this release candidate:
682 passed, 4 skipped in 14.21s.
Recommended Release Summary¶
- Add native database migrations from schema version 5 to 12, with explicit
loreley dbcommands and optional startup auto-migration. - Add the Agent REST control facade, token-protected write APIs, and a broader Streamlit operator console.
- Add campaign programs, failed-candidate repair ledgers, and evaluator artifact feedback paths for safer operator and agent workflows.