feat(docker): add Container Triage world and orphaned lab cleanup - #32
Merged
Merged
Conversation
…o the terminal through a token
http.Server.Shutdown only closes connections that have not sent a request yet once they have sat for about 5 seconds. Browsers routinely preconnect spare sockets, so closing the companion ran into the CLI's 2s shutdown timeout. Quitting `opsquest play --web` could then report "close web companion: context deadline exceeded", and TestServerRequiresOneTimePairingAndSetsSecurityHeaders failed intermittently in CI. Track connections through http.Server.ConnState and close the ones that have not sent a request when Close begins. Connections accepted after that are closed straight away. If Shutdown still runs out of time, force the server closed so no connections stay open, and keep returning the error to the caller. Add a regression test that opens a TCP connection, never sends a request, and checks that Close succeeds within its deadline and that the connection is closed.
Add Docker World 2, "Container Triage" (Missions 30–34), built on the rm, logs --tail, ps --filter, health-probe, and crash-loop support from the previous commit: - Janitor Duty: remove finished job containers, keep services running - Tail End: show only the final lines of a long job log - Running Isn't Healthy: swap an unhealthy replica for its standby - Crash Loop: stop a restart-policy loop and surface its fault - Postmortem Triage: combine health, exit codes, stop, and rm while keeping the evidence the postmortem needs Add `opsquest doctor --cleanup` to remove lab containers left behind by OpsQuest processes that exited without cleanup. A plain `opsquest doctor` now reports them without removing anything. Also: - start every fixture before waiting on health probes, so setup waits one probe interval instead of one per fixture - keep the original 8-column STATUS layout in `docker ps` - add real-engine integration tests for the triage fixtures and the orphan sweep (run with OPSQUEST_DOCKER_TEST=1) - update smoke assertions, mission counts (34 total, 11 Docker), the mission map, safety model, authoring guide, roadmap, and diagram Schema changes are additive and persisted profiles need no migration.
Aleksandergreg
enabled auto-merge (squash)
September 30, 2026 16:23
Aleksandergreg
pushed a commit
that referenced
this pull request
Sep 30, 2026
🤖 I have created a release *beep* *boop* --- ## [0.8.0](v0.7.1...v0.8.0) (2026-09-30) ### Features * **docker:** add Container Triage world and orphaned lab cleanup ([56dbfe2](56dbfe2)) * **docker:** add Container Triage world and orphaned lab cleanup ([#32](#32)) ([56dbfe2](56dbfe2)) * **docker:** add Network Plumbing world with internal attempt-owned networks ([#34](#34)) ([b4b1ba9](b4b1ba9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
feat(docker): add Container Triage world and orphaned lab cleanup
Add Docker World 2, "Container Triage" (Missions 30–34), built on the
rm, logs --tail, ps --filter, health-probe, and crash-loop support from
the previous commit:
keeping the evidence the postmortem needs
Add
opsquest doctor --cleanupto remove lab containers left behind byOpsQuest processes that exited without cleanup. A plain
opsquest doctornow reports them without removing anything.Also:
one probe interval instead of one per fixture
docker psorphan sweep (run with OPSQUEST_DOCKER_TEST=1)
mission map, safety model, authoring guide, roadmap, and diagram
Schema changes are additive and persisted profiles need no migration.