fix(client): doctor --fix self-heal + factory-model wiki page #296
No reviewers
Labels
No labels
doctor-fix
first-proof blocker
hardening
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
clawdie/colibri!296
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-doctor-self-heal"
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?
Two changes that share the doctor surface, combined per request.
Code:
doctor --fixself-heal (fixes #294 bugs, refs #295)1. Nested-runtime panic (crash)
fix_fixablespawned a freshtokio::runtime::Runtimeandblock_ondcmd_upgradefrom inside the#[tokio::main]runtime → panic "Cannot start a runtime from within a runtime" the moment a fixable check was found. Nowasyncand awaitscmd_upgradedirectly.2.
behind == 0short-circuit (logic)cmd_upgradereturned "already at latest" when atorigin/main, butbinary_vs_git_versionfires when the binary is stale vs the source — orthogonal to being behind. Newforceflag:doctor --fixrebuilds + reinstalls regardless; plaincolibri upgradekeeps the early return.Supporting (needed for 2 to actually work)
build.rsnow watches.git/refs/tags— a tag created after the last build (osa's case) lands in.git/refs/tagsnotpacked-refs, so without this the force rebuild re-bakes the same staleCOLIBRI_GIT_DESCRIBE.origin/main(was@{u}) to match the pull target.Docs: factory-model wiki page
New
docs/wiki/factory-model.mdmapping Colibri to the Kaggle "New SDLC" whitepaper (harness, spectrum, conductor/orchestrator, economics), plus index entry. Review corrections folded in:mother-build,geodesic-dome) and the unverifiablecolibri-factory-modelskill reference — neither exists in the repo, the exact drift this wiki prevents;doctor.md'sdoctor.rsreferences withcrates/(pre-existing wiki-lint FAIL that blocked--strict).Gates
cargo fmt --all --checkclean;cargo clippy -p colibri-client --all-targets -- -D warningscleanwiki-lint195 PASS / 0 FAIL; prettier cleanOut of scope (stays in #295): no-rollback-on-failed-start, redundant triple fetch, stale-agent prune dispatch target.
Refs #295.
🤖 Generated with Claude Code
fix(client): doctor --fix self-heal — drop nested runtime, force stale-binary rebuildto fix(client): doctor --fix self-heal + factory-model wiki pageLive verification request — osa (FreeBSD)
This PR is merged but unproven on the host it was built for. Please run the check below and report the doctor output before/after.
Phase 1 — deploy the fix (safe; does not touch the buggy --fix path)
Phase 2 — prove
doctor --fixself-heals (the two bugs)The decisive case is a stale binary at HEAD (behind == 0) — exactly osa''s original state. To reproduce deterministically after Phase 1:
Expected with the fix:
behind == 0, it printssource at latest; rebuilding to refresh installed binary, rebuilds, swaps, restarts (bug 2 force path).binary_vs_git_version→ PASS.If you can''t easily stage a stale binary, the minimum useful signal is: run
colibri doctor --fixon any state and confirm it completes without panicking — the old binary aborts the moment it finds a fixable check.Please paste:
colibri doctorbefore, the--fixrun output, andcolibri doctorafter. Refs #295.Supersedes the stale-binary test above — clean end-to-end upgrade
The earlier note tried to stage a stale binary, which is awkward. Instead, main is now
0.13.0-dev(tagv0.13.0-dev, #299), giving a real version delta to upgrade across. On osa:This exercises the full pipeline (git-behind detection → build → binary swap → service restart → post-restart doctor verify) with a legible 0.12.0 → 0.13.0-dev before/after.
The
doctor --fixpanic (bug 1) is already confirmed dead from your earlier run (two doctor passes, no "runtime from within a runtime"). This run covers the upgrade path itself. Please pasteupgrade --check, the--yesoutput, anddoctorafter.