[nu-demo] hero_aibroker --reset reseeds modelsconfig.yml and clobbers operator edits #138
Loading…
Add table
Add a link
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?
Symptom
Operator edits to
~/hero/var/hero_aibroker/modelsconfig.yml(e.g. removing groq backends — see companion issue #137) are lost every timeservice_aibroker --resetruns. The repo-level copy is blindly copied back over.Root cause
service_aibroker.nu::svx_seed_models_configcopiesmodelsconfig.ymlfrom the cloned repo into~/hero/var/hero_aibroker/unconditionally on every--reset. There is no first-run guard and no merge step.Demo workaround (applied 2026-04-23)
Edited BOTH the repo copy (
~/hero/code0/hero_aibroker/.../modelsconfig.yml) AND the var/ copy, so reseed is at least idempotent with our edits. Fragile — anygit pullin the repo would re-introduce the groq backends.Proper fix
Pick one (in order of preference):
(a) Only seed on first run — write a
.seededmarker after the initial copy, skip future reseeds unless--force-resetis passed.(b) Respect a
KEEP_LOCAL_EDITS=1env var that skips the copy-over.(c) Merge repo-level defaults with operator overrides (e.g. keep operator's explicit backend disables while picking up new models added upstream).
Filed 2026-04-23 nu-shell demo bring-up. Signed-off-by: mik-tf
Fixed in hero_skills
tools/modules/services/service_aibroker.nu—svx_seed_models_confignow treats existingmodelsconfig.ymlas authoritative and only re-seeds when--resetis explicitly passed.Verification (
service_aibroker.nu):$resetis false, leaves it alone (operator edits preserved)."if $dest_exists and (not $reset) { print " → modelsconfig.yml already present at ($dest) — leaving operator edits intact" }then early-returns.seededvsre-seededfor first-run vs--reset.This matches option (a) from the issue body: "Only seed on first run". Operators who want to pick up upstream changes pass
--resetexplicitly.Signed-off-by: mik-tf