[build-tools][worker][eas-cli] Collect device run session activity events#3999
Draft
szdziedzic wants to merge 1 commit into
Draft
[build-tools][worker][eas-cli] Collect device run session activity events#3999szdziedzic wants to merge 1 commit into
szdziedzic wants to merge 1 commit into
Conversation
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3999 +/- ##
==========================================
+ Coverage 59.67% 60.43% +0.76%
==========================================
Files 941 948 +7
Lines 41319 43112 +1793
Branches 8675 9228 +553
==========================================
+ Hits 24654 26049 +1395
- Misses 16571 16962 +391
- Partials 94 101 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Why
Device run session tools can produce structured usage and lifecycle events, but those events currently disappear with the VM or are only visible inside unstructured worker logs. Users need a durable, near-real-time account of what an agent or simulator runtime did, both on expo.dev and from EAS CLI.
This implements the producer, persistence, and CLI half of that activity stream while matching the worker's existing log architecture: structured records are embedded in the same NDJSON stream that is periodically overwritten in GCS. A separate event-ingestion service can replace that transport later without changing the producer-neutral envelope.
Companion PRs:
How
stream.completed; agent-device and serve-sim emitstream.snapshotbecause their current transports cannot prove that no later event will be admitted.deviceRunSessions.byIdpath with bounded retry, cancellation, and exact job binding supplied by the companion www PR.eas simulator:eventscommand with history limits, repeatable producer filters,--follow, human output, JSON snapshots, and parseable NDJSON streaming. Partial downloads, truncation, and missing producer/stream finalization markers produce explicit warnings and non-zero machine-readable exits.Example usage:
Rollout must happen in this order: Universe www API, EAS worker/build-tools, Universe website, then the EAS CLI command.
Test Plan
packages/build-tools: focused logger, collector, artifact, and remote-session suites (42 tests); conflict-sensitive remote-session suites rerun after rebasing (37 tests)packages/worker: focused logger durability and service terminalization suites (24 tests)packages/eas-cli: focused command, parser/downloader, GraphQL client, and query suites (38 tests)corepack yarn typecheckinpackages/build-tools,packages/worker, andpackages/eas-clicorepack yarn lintcorepack yarn fmt:checkgit diff --checkThe command and persistence path are covered by automated tests. This remains a draft until the companion API is available in a test environment for end-to-end verification with a real remote session.