chore: wire cf-core shared modules (db, config, llm/router, tasks/scheduler, resources) #68
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/peregrine#68
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Peregrine currently uses cf-core only for
tiers. Kiwi is the reference implementation for full cf-core integration. Wire the remaining modules.Modules to wire
circuitforge_core.config.load_env.envloading inapp/core/config.pycircuitforge_core.db.base+.migrationsdb.py/store.pySQLite connection managementcircuitforge_core.llm.router.LLMRouterllm_router.py(already a thin shim — remove and use core directly)circuitforge_core.tasks.schedulercircuitforge_core.resources.CFOrchClientApproach
Follow kiwi as the reference — compare
kiwi/app/imports againstperegrine/app/and migrate matching patterns. Do NOT break existing functionality; migrate module by module with tests at each step.Notes
circuitforge_coreis already installed (editable) in thecfenvtiers.pyis already a shim over cf-core tiers — same pattern applies to db, llm, configcircuitforge-core >= 0.7.0in peregrine'spyproject.toml/environment.ymlRelated
kiwi/app/core/config.py,kiwi/app/db/store.py,kiwi/app/tasks/scheduler.pyStatus update — 2026-04-04
Done (commit
173da49)circuitforge_core.config.load_envwired at both entry points:app/app.py: module-level call (safe in Docker viasetdefault; fills gaps on bare-metal/conda)dev_api.py: called instartupevent handler (avoids test-env pollution from local.env)requirements.txt: noted>= 0.7.0requirement; TODO to pin@v0.7.0tag once cf-core cuts a releasedb.get_connectionshim was already wired (pre-existing)tasks.schedulershim was already wired (pre-existing)resources.CFOrchClientVRAM allocation already wired viaCF_ORCH_URLin task_scheduler.env.examplealready updated withCF_ORCH_URL/CF_LICENSE_KEY(via #67)Deferred
circuitforge_core.db.migrations.run_migrations): current_migrate_db()indb.pyuses manualALTER TABLE— tracked in #43 (Rails-style numbered migrations)requirements.txtto@v0.7.0once cf-core cuts the tagPre-existing (no change needed)
llm_router.pyshim updated in #67