Skip to content

Fix detached Docker OOM status reconciliation - #149

Merged
konard merged 4 commits into
mainfrom
issue-148-799a293d3d5b
Jul 5, 2026
Merged

Fix detached Docker OOM status reconciliation#149
konard merged 4 commits into
mainfrom
issue-148-799a293d3d5b

Conversation

@konard

@konard konard commented Jul 5, 2026

Copy link
Copy Markdown
Member

Fixes #148.

Summary

  • Treat detached Docker sessions with State.OOMKilled=true as terminal in JS and Rust --status / --list enrichment, even if Docker still reports the container as running.
  • Preserve the oomKilled field in structured and links/text output, set endTime during reconciliation, and resolve the exit code from the log footer, Docker's terminal/nonzero state, or a 137 fallback.
  • Add JS and Rust regression coverage for running=true oomKilled=true, including the fallback case where Docker still reports exit code 0.
  • Add JS changeset and Rust changelog fragments for patch releases.

Reproduction / Verification

Before the fix, the new Issue #148 regression tests reproduced the bug: fake Docker inspect output true 137 true and true 0 true both left status as executing.

After the fix, those cases return terminal status: executed, retain oomKilled: true, set endTime, and use exit code 137 when no terminal Docker exit code is available.

Tests

  • cd js && bun test ./test/session-name-status.js
  • cargo test --manifest-path rust/Cargo.toml docker_oom_killed -- --nocapture
  • git diff --check
  • cd js && bun run check
  • bash scripts/check-mjs-syntax.sh
  • node scripts/check-test-parity.mjs
  • node scripts/validate-changeset.mjs
  • cd js && bun run test
  • cargo fmt --manifest-path rust/Cargo.toml --all -- --check
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets --all-features
  • cargo test --manifest-path rust/Cargo.toml --all-features --verbose
  • cargo test --manifest-path rust/Cargo.toml --doc --verbose

Screenshots are not applicable; this is CLI/runtime status behavior.

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #148
@konard konard self-assigned this Jul 5, 2026
@konard konard changed the title [WIP] $ --status can remain executing while oomKilled=true for detached docker sessions Fix detached Docker OOM status reconciliation Jul 5, 2026
@konard
konard marked this pull request as ready for review July 5, 2026 17:59
@konard

konard commented Jul 5, 2026

Copy link
Copy Markdown
Member Author

Working session summary

Implemented and pushed the fix for issue #148.

PR: #149

What changed:

  • Detached Docker oomKilled=true now forces terminal status: executed in both JS and Rust status/list reconciliation.
  • Exit code resolves from the log footer, Docker state, or falls back to 137.
  • Added JS and Rust regression tests for running=true oomKilled=true, including Docker reporting exit code 0.
  • Added JS changeset and Rust changelog fragment.

Verification:


This summary was automatically extracted from the AI working session output.

@konard

konard commented Jul 5, 2026

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $11.800939

📊 Context and tokens usage:

  • 383.1K / 200K (192%) input tokens, 37.8K / 128K (30%) output tokens

Total: (383.1K + 6.3M cached) input tokens, 37.8K output tokens, $11.800939 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Thinking level: max (~31999 tokens)
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Gist (3493KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
konard merged commit 2e34ea1 into main Jul 5, 2026
25 checks passed
@konard

konard commented Jul 5, 2026

Copy link
Copy Markdown
Member Author

🎉 Auto-merged

This pull request has been automatically merged by hive-mind.

  • All CI checks have passed

Auto-merged by hive-mind with --auto-merge flag

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.

$ --status can remain executing while oomKilled=true for detached docker sessions

1 participant