Skip to content

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

Merged
grypez merged 2 commits intomainfrom
grypez/evm-e2e-logging
Apr 13, 2026
Merged

test(evm-wallet-experiment): Improve docker e2e test logging#930
grypez merged 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
volumes:
- ocap-run:/run/ocap
- ocap-logs:/logs
- ../logs:/logs
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.

Where is ../logs? Is it the same /logs inside the container?

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.

../logs is relative to this docker-compose file

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.

so packages/evm-wallet-experiment/logs

@grypez grypez added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit d829dbc Apr 13, 2026
47 checks passed
@grypez grypez deleted the grypez/evm-e2e-logging branch April 13, 2026 18:45
github-merge-queue bot pushed a commit that referenced this pull request Apr 14, 2026
Follow-up for #930 notes recent changes to how logs are exported from
the docker-compose setup.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: documentation-only updates describing log bind-mount
behavior and where to find generated log/test artifacts.
> 
> **Overview**
> Updates the Docker Compose docs to reflect the newer logging setup:
`/logs` is now a host bind-mount to
`packages/evm-wallet-experiment/logs/` (while `ocap-run` remains a named
volume), and containers tee stdout/stderr into per-service log files.
> 
> Adds debugging notes showing how to read those host-side log files and
where `test:e2e:docker` writes structured results
(`logs/test-results.json`).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
36d233b. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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