lab update: three followups from fresh-VM testing — agent diagnostic, skills disk-first, kimi config tolerance #305
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_skills!305
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "lab-agent-skills-kimi-fixes"
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
Three small, independently-useful fixes found during a Tier-1 acceptance pass on a fresh Ubuntu 24 VM (
lab agent,lab skills list,lab skills syncKimi step). Each unblocks a previously broken surface; together they make all five Tier-1 surfaces from our test plan green.Tested end-to-end on the same VM after install + onboarding +
lab service core.N1 —
lab agentempty error messageBefore:
…with nothing after the colon. herolib_ai's
CommandFailed { stderr }wraps captured stderr, but Claude Code prints most errors to stdout, so the wrapper had nothing to show.After:
preflight_claude_binary()runsclaude --versionbefore invoking herolib_ai. Catches the "claude not installed / not on PATH" case withlab install airemediation.ANTHROPIC_API_KEY,claude config list) plus a copy-pasteableclaude -p '<instruction>' --permission-mode bypassPermissionsreproduction command.N2 —
lab skills listreturns 0 after sync wrote 74Root cause: the build-time embedded skills registry (
build.rs+registry::all()) scans<repo>/claude/skills/<dir>/SKILL.md, but the canonical layout was moved to flat sidecar pairs at<repo>/skills/<group>/<name>.{md,toml}long ago. The embedded registry has been permanently empty since the move.Fix: route
cmd_skills_list/get/find/showthrough the same on-disk loader thatlab skills syncuses (loader::load_allreading$PATH_CODE/hero_skills/skills/). Embedded registry stays as a fallback for when the source tree isn't reachable.Verified:
N3 —
lab skills syncKimi config skipped on missingSAMBANOVA_API_KEYSame shape as the hero_aibroker provider-key bug from PR5: one missing optional secret blocked the whole flow.
Before:
The full
~/.kimi/config.tomlwas skipped even whenGROQ_API_KEYwas set.Fix:
resolve_key_optionalreturns empty string for missing keys instead of bailing.ProviderKeys::missing()lists which providers will be inactive.hero_defaults_with_keysomits provider entries (and their dependent models) whose API key is empty, so the generated config passesvalidate()(which requires every provider to have api_key OR oauth).default_modelfalls back throughgroq → sambanova → kimi-codebased on which providers are configured.write_kimi_configprints a one-line WARN naming the missing providers and proceeds.Added 3 new unit tests covering the omit-empty-providers paths. All 6 kimi_config tests pass.
Verified:
Test plan checklist
lab skills syncwrites~/.kimi/config.tomlwith a one-line WARN about missing providers~/.kimi/config.tomlcontains 2 providers (kimi-code + groq), 0 sambanova referencesdefault_modelin the written config references an existing modellab skills listreturns 74 skills from disklab skills get forge_apireturns name + description + relatedlab skills find forgereturns 2 matcheslab agentfailure produces actionable diagnostic + repro commandcargo build -p labfinishes with 0 warningscargo test -p lab --lib agent::kimi_config— 6/6 passRefs
lab: three followups from fresh-VM testing — agent diagnostic, skills disk-first, kimi config toleranceto lab update: three followups from fresh-VM testing — agent diagnostic, skills disk-first, kimi config tolerancePull request closed