Skip to content

test(evm-wallet-experiment): Improve docker e2e test logging#930

Open
grypez wants to merge 2 commits intomainfrom
grypez/evm-e2e-logging
Open

test(evm-wallet-experiment): Improve docker e2e test logging#930
grypez wants to merge 2 commits intomainfrom
grypez/evm-e2e-logging

Conversation

@grypez
Copy link
Copy Markdown
Contributor

@grypez grypez commented Apr 10, 2026

Adds logging infrastructure to the evm-wallet-experiment docker e2e suite for better failure analysis.

Kernel service logs on the host — the entrypoint now tees stdout/stderr to /logs/<service-name>.log via a stream.write wrapper before the process starts. The named ocap-logs volume is replaced with a bind-mount to packages/evm-wallet-experiment/logs/, so all service logs are readable on the host immediately after docker:down (or a test failure).

Structured test results — the docker vitest config gains a JSON reporter writing logs/test-results.json. This lets agents and CI inspect pass/fail state and error messages without parsing terminal output.

Test plan

  • Run yarn workspace @ocap/evm-wallet-experiment test:e2e:docker, then inspect packages/evm-wallet-experiment/logs/ — confirm per-service .log files and test-results.json are present on the host

Note

Low Risk
Low risk: changes are limited to Docker E2E test scaffolding (log mounts, entrypoint logging, and Vitest reporting) with no production runtime or protocol logic changes.

Overview
Improves Docker E2E debuggability for evm-wallet-experiment by persisting logs and test outputs on the host.

Compose now bind-mounts packages/evm-wallet-experiment/logs/ to /logs (replacing the ocap-logs volume), the kernel entrypoint tees stdout/stderr into /logs/<service-name>.log, and docker:up / docker:interactive:up ensure the logs/ directory exists.

Docker Vitest runs now emit a JSON report to logs/test-results.json via the json reporter.

Reviewed by Cursor Bugbot for commit 31fa169. Bugbot is set up for automated code reviews on this repo. Configure here.

grypez added 2 commits April 10, 2026 11:33
Tee entrypoint stdout/stderr to /logs/<service-name>.log so per-service
logs persist beyond container lifetime and are accessible on the host.

Replace the named ocap-logs volume with a bind-mount to ../logs so the
host can read log files directly after a test run without docker cp.
Add docker:ensure-logs script (mkdir -p logs) and call it from docker:up
and docker:interactive:up so the bind-mount target always exists before
the stack starts.
…tests

Write structured pass/fail results to logs/test-results.json so failures
can be inspected without parsing terminal output.
@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.59%
🟰 ±0%
8631 / 10981
🔵 Statements 78.4%
🟰 ±0%
8767 / 11181
🔵 Functions 76.13%
🟰 ±0%
2019 / 2652
🔵 Branches 76.29%
🟰 ±0%
3715 / 4869
File CoverageNo changed files found.
Generated in workflow #4266 for commit 31fa169 by the Vitest Coverage Report Action

@grypez grypez marked this pull request as ready for review April 10, 2026 16:24
@grypez grypez requested a review from a team as a code owner April 10, 2026 16:24
@grypez grypez enabled auto-merge April 10, 2026 18:04
@grypez grypez changed the title test(evm-wallet-experiment): Improve docker e2e test iterability test(evm-wallet-experiment): Improve docker e2e test logging Apr 10, 2026

// Tee stdout/stderr to a file so logs are accessible on the host via the
// bind-mounted logs directory even after the container exits.
mkdirSync('/logs', { recursive: true });
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As written, this would create /logs at the system root.

Suggested change
mkdirSync('/logs', { recursive: true });
mkdirSync('./logs', { recursive: true });

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Likewise for the stream below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, but it's the root of the container, not the root of whoever runs yarn docker:up

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