Skip to content

fix(stack): report the helper container state when its readiness times out - #7319

Open
avallete wants to merge 2 commits into
developfrom
avallete/flaky-docker-helper-readiness
Open

avallete wants to merge 2 commits into
developfrom
avallete/flaky-docker-helper-readiness

Conversation

@avallete

Copy link
Copy Markdown
Member

TL;DR

A database helper whose readiness times out now reports the container's state and log tail, so the next stall shows why it stalled.

  • DockerDatabaseStorage.integration.test.ts › labels its volume with the configured test run: start --attach printed no ready line within 30s, and stderr was empty. The error said only Database helper did not become ready within 30 seconds. That cannot tell apart a helper that never started, one that exited, and one that printed its ready line that the attach never relayed. On a readiness timeout, the helper start now reads the container's status, exit code and engine error (inspect) and its last 20 log lines (logs), each with its own 5s bound. It reads them before killing the attach, because --rm removes the helper once the attach ends. Both go into the error and the state onto the span. The existing helper-timeout test now asserts on this output.

ref

spotted in:


Generated by Claude Code

…s out

A database helper that never prints its ready line now fails with the
container's status, exit code, engine error and log tail, read before the
attach is killed so `--rm` has not removed it yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMySvvbM4B1zdmhw3pp1wA
@avallete
avallete requested a review from a team as a code owner October 24, 2026 07:43

Copy link
Copy Markdown
Member Author

/ai-review


Generated by Claude Code

@avallete avallete added the run-flaky-check Run the flaky-test check on this PR label Oct 24, 2026 — with Claude
@github-actions github-actions Bot removed the run-flaky-check Run the flaky-test check on this PR label Oct 24, 2026

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by a newer AI review

🤖 AI Review

Confirmed both Claude findings as minor diagnostic-quality issues: the logs diagnostic omits stderr, and diagnostic failures lose their reasons. Existing attached-process stderr capture partly mitigates the first issue. Codex's independent review completed with no findings.

Findings

Severity Location Category Sources Claim
🟡 MINOR packages/stack/src/storage/DockerDatabaseStorage.ts:651 error-handling claude The helper logs diagnostic drops container stderr. Docker logs routes container stderr to the CLI's stderr, but engineCommand returns only stdout on success. Consequently, stderr-only logs appear as 'helper logs: (empty)', limiting recovery of startup errors when the attached stream stalls.
🟡 MINOR packages/stack/src/storage/DockerDatabaseStorage.ts:655 error-handling claude Every inspect or logs failure becomes the same 'unavailable' string, making a diagnostic timeout indistinguishable from a removed helper or another engine failure.

Stats

Claude findings: 2 · Codex findings: 0 · Confirmed: 2 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: manual · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread packages/stack/src/storage/DockerDatabaseStorage.ts Outdated
Comment thread packages/stack/src/storage/DockerDatabaseStorage.ts Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

Both independent reviews completed. Verified all three Claude findings: two minor diagnostic omissions and one test-coverage nit. Codex reported no findings. No major or critical issues were identified.

Findings

Severity Location Category Sources Claim
🟡 MINOR packages/stack/src/storage/DockerDatabaseStorage.ts:655 error-handling claude Failed diagnostic commands replace useful engine errors with "unavailable", making a missing helper indistinguishable from an unresponsive daemon.
🟡 MINOR packages/stack/src/storage/DockerDatabaseStorage.ts:651 error-handling claude The new helper logs section omits the container's stderr because engineCommand returns only stdout on successful commands.
⚪ NIT packages/stack/src/storage/DockerDatabaseStorage.integration.test.ts:491 test-coverage claude The updated timeout test does not protect diagnostic collection before attach termination, and it does not exercise the "unavailable" or "(empty)" fallbacks.

Stats

Claude findings: 3 · Codex findings: 0 · Confirmed: 3 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread packages/stack/src/storage/DockerDatabaseStorage.ts Outdated
Comment thread packages/stack/src/storage/DockerDatabaseStorage.ts Outdated
@avallete avallete added the run-flaky-check Run the flaky-test check on this PR label Oct 24, 2026 — with Claude
@github-actions github-actions Bot removed the run-flaky-check Run the flaky-test check on this PR label Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Flaky test check: ✅ no flaky tests

Commit a93e882a3117 · focused ×10 (5 executions each), 8008 tests · integration ×10, 5619 tests · unit ×10, 8333 tests · workflow run

Each execution is a separate Vitest process; Where lists failing runs, as run.iteration for suites executed more than once per run. The full data is in the flaky-check-report artifact.

This branch has not been deployed

No deployments
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.

2 participants