Skip to content

fix(doctor): --fix demande le mot de passe sudo même juste après un sudo en cache (0.9.6) - #385

Merged
stephrobert merged 1 commit into
mainfrom
fix/doctor-sudo-en-cache
Nov 16, 2026
Merged

stephrobert merged 1 commit into
mainfrom
fix/doctor-sudo-en-cache

Conversation

@stephrobert

Copy link
Copy Markdown
Owner

Summary

Reported on Pop!_OS 24.04 right after 0.9.5: dsoxlab doctor --fix --clients started the workstation playbook without --ask-become-pass, and Ansible's sudo failed with "sudo: il est nécessaire de saisir un mot de passe". The probe was sudo -n true, which also succeeds thanks to the password sudo caches for a few minutes in the terminal; Ansible's sudo does not see that cache. The probe is now sudo -n -k true: -k ignores the cached credentials for that command (without removing them), so only a real passwordless sudo skips the question.

Also: optional steps (--clients) are numbered after the required ones instead of "0.".

Not reproducible on the reference machine (its sudo is a real NOPASSWD: ALL); the fix follows the documented -k semantics and is covered by a test on the probe and on both outcomes. To be confirmed on the Pop!_OS machine after release.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Chore / tooling
  • Security / supply chain

Checklist

Always

  • uv run ruff check src/dsoxlab tests passes
  • uv run mypy src/dsoxlab passes (strict)
  • uv run pytest passes (2471)
  • uv run pytest tests_e2e: N/A locally for this two-line fix; run by CI
  • The engine stays domain-agnostic
  • No hardcoded personal path or host
  • Manually tested against two lab repositories: N/A, the change is in the sudo probe of --fix, independent of the catalogue

When behavior changes — otherwise N/A

  • Both CHANGELOG.md and CHANGELOG.fr.md updated (0.9.6)
  • Version bumped to 0.9.6 in pyproject.toml, uv.lock refreshed

When a command or option is added, removed or changed — otherwise N/A

N/A: no option changes.

When .github/workflows/ is touched — otherwise N/A

N/A.

When the declarative contract (meta.yml / lab.yaml) changes — otherwise N/A

N/A.

Related issues

Follow-up to #384.

🤖 Generated with Claude Code

…udo en cache (0.9.6)

Signalé sur Pop!_OS 24.04 le 2026-11-16 : `sudo -n true` réussissait grâce
au mot de passe que sudo garde quelques minutes, dsoxlab omettait
--ask-become-pass, et le sudo d Ansible échouait (« il est nécessaire de
saisir un mot de passe »). La sonde est désormais `sudo -n -k true`.
Les étapes facultatives se numérotent à la suite (« 0. Installer Docker »).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stephrobert
stephrobert merged commit cc3ee4d into main Nov 16, 2026
20 checks passed
@stephrobert
stephrobert deleted the fix/doctor-sudo-en-cache branch November 16, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant