Skip to content

Complete owned Docker probe cleanup - #209

Merged
hamzamerzic merged 4 commits into
mobius-os:mainfrom
hamzamerzic:fix/docker-probe-owned-cleanup-followup
Jul 24, 2026
Merged

Complete owned Docker probe cleanup#209
hamzamerzic merged 4 commits into
mobius-os:mainfrom
hamzamerzic:fix/docker-probe-owned-cleanup-followup

Conversation

@hamzamerzic

Copy link
Copy Markdown
Collaborator

Summary

  • remove only the immutable container ID proven to carry this probe invocation's private ownership token
  • distinguish an absent or unrelated name from an unavailable Docker daemon and fail closed on uncertainty
  • verify exact-name fallback safely for valid dotted container names
  • retain the watchdog's private CID/tombstone after a hard kill until removal is actually verified

Why

This follows up #155. That PR established per-invocation ownership, but a failed CID-file write and an uncertain daemon response could still make cleanup report success without proving absence. The watchdog could then discard the only recovery evidence after a hard kill. This change keeps the same lifecycle helper, makes absence/ownership/uncertainty explicit, and never falls back to deleting a reusable caller-supplied name.

Validation

  • python3 -m pytest -q backend/tests/test_docker_probe.py (7 passed)
  • bash -n scripts/docker-probe.sh
  • git diff --check

hamzamerzic and others added 3 commits July 23, 2026 18:35
Never fall back to a reusable container name during cleanup. Resolve an immutable ID only when the invocation's private label proves ownership, verify absence without treating daemon uncertainty as success, and let the watchdog remove its private state after a hard kill.

Co-authored-by: Möbius Agent <mobius-agent@users.noreply.github.com>
Co-authored-by: Möbius Agent <mobius-agent@users.noreply.github.com>
…d-cleanup-followup

Co-authored-by: Möbius Agent <mobius-agent@users.noreply.github.com>
@hamzamerzic hamzamerzic added area: infrastructure Build, CI, deployment, and recovery bug Something isn't working labels Jul 24, 2026
@hamzamerzic
hamzamerzic merged commit 7642057 into mobius-os:main Jul 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: infrastructure Build, CI, deployment, and recovery bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant