Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4795 +/- ##
==========================================
+ Coverage 76.38% 76.50% +0.13%
==========================================
Files 1093 1097 +4
Lines 54720 55035 +315
Branches 12026 12126 +100
==========================================
+ Hits 41794 42101 +307
- Misses 11939 11946 +7
- Partials 987 988 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/review correctness security |
|
✅ Thank you for adding a changeset! |
|
/review correctness security |
🤖 AI code reviewDecision: Ready for human review (with comments) Overall PR risk: Medium. The change modifies existing behavior: Android emulator and device-session build steps that always captured both emulator-output and logcat now gate capture and upload behind a sources list, and raw logs get deleted from the worker after upload instead of staying in place. The one reported warning shows a default mismatch between the device-session start step (defaults to both sources) and the collect step (defaults to emulator-output only), which could record device-wide logcat by default against the PR's stated opt-in design and leave orphaned, uncleaned logcat files on disk. The blast radius covers all Android build and simulator-session jobs that touch logcat capture; the change is additive at the API surface (new optional CLI flag, new optional step inputs) and is reversible by adjusting the default, but any in-flight jobs relying on prior always-present logcat behavior would need identification first. 🔎 Reviewer summaries (3)
|
|
Review response for
The worker's legacy default preserves existing workflows that omit the new input. That is separate from the new API-created session default, which is always supplied explicitly. I am retaining the compatibility default and recording this warning as disputed on that evidence. Human review remains pending. |
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
Why
Android session diagnostics disappear with the worker. This PoC makes selected emulator and device logs downloadable after the session, while bounding each retained raw snapshot and reducing artifact storage with gzip.
How
Summary
The Linux-only
eas/collect_android_emulator_logsstep acceptssources; an empty list disables both. The CLI exposes repeatable--android-log-sourceflags. Selection replaces the default and reaches both Android startup paths; legacy build workflows retain their existing capture defaults.Artifacts retain unique launch names and kind
simulator-log. Metadata reportscompression: gzip, original, retained, compressed, and omitted byte counts. Truncation is visible in the artifact name. The 100 MiB limit applies before compression; compressed bytes are never truncated. A fixed snapshot makes Content-Length and retries identical even while the source grows. Each file has a 30-second budget and two attempts; failures remain nonfatal. Successful uploads stay deduplicated even if file cleanup fails, and failed uploads retain their raw source for another attempt.The previous 20 MiB raw-tail policy was introduced in this branch, not imposed by storage. Three ordinary startup samples compressed by about 88–89%; extrapolated rates put ten minutes at about 100–111 MiB raw / 11–14 MiB gzip. The human selected a 100 MiB cap, corresponding to roughly 9–10 minutes at those rates, not a guaranteed duration. Synthetic smoke-test logs compress much more and are excluded from those estimates.
Deploy the worker supporting
sourcesandandroid_log_sourcesbefore Universe #32975, then the API before distributing the CLI flag. The API artifact contract does not need a compression change.Test Plan
Evidence
Codex ran on 2026-11-02:
androidEmulatorLogs,androidEmulatorLogsUpload,collectAndroidEmulatorLogs, anduploadWithSignedUrl: passed.git diff --check: passed.Earlier capture-selection revision: Codex ran 123 worker tests, 31 host-orchestration tests, and four live staging cases for default, both, logcat-only, and disabled sources. Those passed, but predate compression and do not validate the final gzip downloads. Earlier CLI tests passed (139); this follow-up does not change CLI code.
Current gzip staging validation
Codex validated worker
83e4abb9fwith APIdf70d516cbon 2026-11-02. The Linux worker build passed; all 516 packaged build-tools source files matched the worker commit, and the compiled collector contained gzip, the 100 MiB raw cap, and post-upload raw cleanup.Both sessions reached FINISHED/STOPPED. Every gzip downloaded and decompressed successfully; size metadata matched, and the logcat fixture's final marker was present. The default session produced no logcat artifact. These files were below the raw cap; truncation at 100 MiB and raw-file deletion were verified locally, not through worker filesystem inspection. The fixture emits repetitive synthetic data, so its compression ratio is not a production estimate.
The prior capture-capable staging worker was restored with a generation precondition and verified checksum. The existing manual preview remains active; the temporary gzip worker deployment has been rolled back. No gzip-validation sessions remain running. The original manual setup's guarded rollback journal was updated to the restored generation.
Current-head review
Automated correctness/security review completed for
83e4abb9f: ready for human review with one warning about default-source propagation. Codex traced the companion API's explicit emulator-only normalization and test coverage and documented why the worker fallback is not used for API-created sessions. No compression/upload defect was reported. Node 22/24 CI passed. Human inspection and approval remain pending.Merge Danger
Door: two-way for future collection. Disabling collection stops new artifacts; rollback does not recall prior downloads or delete existing artifacts.
Blast Radius: Android diagnostics.
Authorship and LLM use
The human initially scoped post-session diagnostics, then required source selection to prevent recording unselected logs. Codex authored and tested those changes; earlier agent review found cleanup, truncation-label, retry, and descriptor-ownership issues that were addressed. Those reviews predate this diff. The human then approved a gzip PoC with existing retention and opt-in semantics, asked about ten-minute coverage, and requested keeping only compressed artifacts. The human selected a 100 MiB raw cap after discussing the measured rates; Codex implemented compression, metadata, and raw-file cleanup. Codex ran the checks and live staging validation listed above and responded to the automated default-source warning with cross-repository evidence. Human inspection and approval of the final diff remain pending.