ReviewOS

craft-native/craft

Retain Android native first-fault evidence before emulator teardown

#438
Closed chris opened this 13 hours ago ·
13 hours ago

The canonical v0.0.421 release is blocked by a real Android native failure, and remains unpublished/unadopted. This ticket fixes missing first-fault evidence, not the unresolved provider service-loss cause.

Related: Gold native foundations epic #6, #434 cancellation delivery, and #393 native foundations.

Original evidence:

  • Exact 421 Android job, source 806d3d52ec876dccc441bee70b2d922ebbf1a072.
  • Canonical Releaser correctly failed native acceptance and skipped publication.
  • Original artifact 13120804415 (mobile-e2e-android, 2,910,744 bytes), SHA256 3e711f10fe31b7d4c8c06117d1156ec1fbdb4425a2dfe5e1a5c1409008848ccd; downloaded unchanged with all ZIP CRCs verified.
  • At 06:28:12.299 UTC the first retained exception is SandboxDeadException during pending isolate evaluation, with JavaScriptSandbox.ConnectionSetup.onServiceDisconnected in its cause. 73/108 instrumentation tests had passed. The first navigation assertion fails at 06:28:20; subsequent missing-root errors cascade from the cached dead engine.
  • Both independent Android navigation API34/API35 jobs passed on the same source. This does not identify the combined job's service-loss cause.
  • Artifact diagnostics/logcat.txt is only - waiting for device -: full collection happens after the emulator action stops its device. Earlier protocol logs stop before navigation. The runner prints only CraftNativeAndroid/AndroidRuntime tags on failure, removing provider/system causes, and deletes the generated XML/reports.

Public-runner regression evidence: bun test scripts/test-native-navigation.test.ts in packages/android, using real init/build and isolated fake compiler/Gradle/ADB executables, is red 0/3. It reproduces missing durable provider logs/reports, diagnostic ADB failure replacing the original Gradle failure, and diagnostic reads without a selected device.

Acceptance:

  • Retain unfiltered all-buffer logcat and targeted process/exit diagnostics while the selected device is still connected, before native workspace deletion and emulator action teardown.
  • Copy instrumentation XML, HTML reports, and additional test output into the CI artifact before cleanup.
  • Bound diagnostic commands and record failures without replacing the original Gradle error.
  • Query only the explicitly selected device; never restart shared ADB or touch foreign devices.
  • Exercise actual runner/OS child-process seams with regressions for success, diagnostic failure and missing device identity.
  • Preserve existing failing native/release gates, and leave the provider service-loss root cause explicitly unresolved until new diagnostic evidence and reproduction establish it.

No sandbox reconnection, acceptance relaxation, blind release retry or version bump is part of this change.

9 hours ago

Verified complete for this evidence-retention defect. This does not diagnose or fix the earlier JavaScriptSandbox provider service loss, and does not claim successful package publication.

Source 9551b3899b5257c15ed14f64dacec6f579f17420 is included in exact 0.0.423 commit 08c1dbed2ebeafa5d665cc212bd3ca213662712f. Five maintained public-runner/OS regressions pass (33 assertions), including diagnostic failure preserving the original Gradle failure, missing-device safety, genuine success, cleanup and bounded SIGKILL/reap. Root independent review and focused execution passed; relevant owner suites, strict typing, package checks and lint passed.

Actual 0.0.423 Android emulator job succeeded. Original artifact 13124825668 was independently verified against GitHub's exact source SHA, 16,553,472-byte size and SHA256 588872b3753dc3e15a282961c5ae86a2795f1bbcb34658168010889b21ac40e7, with all ZIP CRCs valid and safe entries.

The artifact retains the new snapshot from inside the live emulator action: 4,215,406 bytes of unfiltered all-buffer logcat, activity process and exit information, all three native report trees, and diagnostics.json. All three read-only commands selected the explicit owned device and exited zero. Retained JUnit reports parse to 108 tests, zero failures, zero errors and zero skips. This proves retention occurred before project deletion and emulator teardown.

The original 0.0.421 failure artifact and unresolved service-disconnect evidence remain retained. No sandbox reconnection, acceptance relaxation, shared ADB restart, blind retry or native-budget change was introduced. Broader native qualification and release/adoption issues remain open.

Sign in to comment on this issue.