Repository navigation
feat(doctor): un diagnostic qui guide jusqu'au bout, et un --fix qui montre son plan (0.9.5) - #384
Merged
Merged
Conversation
…montre son plan Parcours mesurés le 2026-11-16 sur deux machines vides (Ubuntu 24.04, AlmaLinux 10) : il fallait relancer doctor après chaque geste pour voir le suivant, trois remèdes n'étaient que des liens, et provision échouait encore après un doctor vert (clé SSH, firmware EFI, Include ssh jamais contrôlés). Maquettes et sept décisions validées par Stéphane le même jour. - Étapes numérotées dans l'ordre des dépendances, une commande par ligne, regroupées par remède ; « À savoir », déjà prêt, commande unique. - Aucun contrôle caché : pool, groupes, EFI attendent libvirt ; collections attendent Ansible ; provider non choisi = diagnostic avec le recommandé. - Nouveaux contrôles : groupes kvm/libvirt, firmware EFI, clé SSH du catalogue, ligne Include de ~/.ssh/config. - Table unique des remèdes par famille (/etc/os-release) : git, Terraform, Docker depuis les dépôts officiels ; enable --now libvirtd ; pas d'incus sur RHEL. La doc learner est tenue contre cette table par un test. - --fix : plan affiché, [y/N] ou --yes, étapes root par un playbook généré et un seul ansible-playbook --ask-become-pass, repli à coller sans terminal, revérification après chaque étape, arrêt au premier échec, Docker/Incus seulement avec --clients. - RAM de tout le catalogue : « À savoir », non bloquante ; start reste bloquant pour son lab. - JSON : champs commands, after, warning ajoutés, rien retiré. Le test qui joue la commande Include telle qu'affichée a trouvé qu'elle échouait sur un ~/.ssh/config absent (cat en échec, && coupé) : corrigé. 28 mutations, 28 font tomber un test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nexion compte Réévaluation du 2026-11-16 sur une Ubuntu 24.04 neuve : juste après le usermod du playbook, /dev/kvm reste fermé dans la session, et hw_virt proposait encore usermod ; --fix jugeait donc sa propre étape en échec et s arrêtait, alors que pool et Terraform étaient faits. hw_virt distingue désormais « inscrit, reconnectez-vous » comme le contrôle des groupes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Ansible avant le playbook Réévaluation du 2026-11-16 sur une AlmaLinux 10 neuve, sans git ni catalogue : KVM, facultatif hors catalogue, aurait été installé par --clients ; et la seule étape (git, root) tombait dans le repli « à coller », faute d Ansible au plan. Décisions 1 et 3 du même jour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, et Ansible se tait Réévaluation du 2026-11-16 sur AlmaLinux 10 : le firmware EFI, qui n attend que libvirt, était rangé en « à faire vous-même » et jamais redit ; il est désormais revérifié après le playbook. Le playbook pose ansible_python_interpreter=auto_silent : l avertissement de découverte de python3 était la seule ligne jaune de --fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 16, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two empty machines measured on 2026-11-16 (Ubuntu 24.04, AlmaLinux 10) needed
doctorto be run again after every gesture to discover the next one; three remedies were only links (git, Terraform, Docker);provisionstill failed after a greendoctor(catalogue SSH key,~/.ssh/configInclude, EFI firmware never checked). Mock-ups and seven decisions were validated by the maintainer the same day.dsoxlab doctor --fix.-vshows every check and warnings on green lines.after), collections wait for Ansible; with no provider chosen, the diagnosis follows the recommended one without recording it./etc/os-release): official HashiCorp and Docker repositories,systemctl enable --now libvirtd, nodnf install incuson RHEL.docs/learner.mdis held word for word against it by a test.--fix: full plan,[y/N]or--yes(nothing runs without a terminal and without--yes), sudo steps through one generatedansible-playbook --ask-become-pass -c localrun (Ansible installed first if missing), paste block as fallback, each step re-checked, stop at the first failure, Docker/Incus only with--clients.start <lab>still blocks for its own lab.commands,after,warningadded per check, nothing removed. Exit codes unchanged.Re-evaluated on two fresh VMs (Ubuntu 24.04.5, AlmaLinux 10.2 SELinux enforcing): one
doctorpass shows every step, onedoctor --fixdoes them all, thenprovision --host alma-rhcsa-1.labsucceeds andssh alma-rhcsa-1.labworks by name. The re-evaluation found four defects, fixed in the follow-up commits (Include command failing on a missing~/.ssh/config;--fixjudging its ownusermodfailed;--clientsinstalling KVM outside a catalogue and no Ansible for the playbook; EFI listed as manual). Not measured on a VM: the sudo-password path (the VM account has passwordless sudo), Fedora/Debian 13/Ubuntu 26.04, Docker/Incus via--clients(tests only).Type of change
Checklist
Always
uv run ruff check src/dsoxlab tests tests_e2e fuzz scriptspassesuv run mypy src/dsoxlabpasses (strict)uv run pytestpasses (2468 tests)uv run pytest tests_e2epasses (18)kubernetes-dsoxlab-training(vm, ready machine) andterraform-dsoxlab-training(noinfra:), pluslinux-dsoxlab-trainingon the two fresh VMsAlso: 28 mutations of the new safeguards, each fails at least one test; complexity ratchet stable.
When behavior changes — otherwise N/A
CHANGELOG.mdandCHANGELOG.fr.mdupdated (under 0.9.5)pyproject.toml(unreleased; this PR joins it)When a command or option is added, removed or changed — otherwise N/A
en.pyandfr.pyhelp=_("…")andfullhelp_commandsupdated in EN and FR (--yes,--clients,-v, new--fix)DSOXLAB_LANG=en(VMs) andfr(local)logger.*messageWhen
.github/workflows/is touched — otherwise N/AN/A: no workflow touched.
When the declarative contract (
meta.yml/lab.yaml) changes — otherwise N/AN/A: the contract does not change.
Related issues
Refs #381 (EFI firmware now checked by doctor).
🤖 Generated with Claude Code