Skip to content

feat: rebuild a stale development client automatically (Worklets loadUnpackersWithCode undefined on the Pixel) - #520

Merged
abretonc7s merged 6 commits into
mainfrom
feat/manual-000172-rebuild-stale-dev-client-finge
Nov 4, 2026
Merged

abretonc7s merged 6 commits into
mainfrom
feat/manual-000172-rebuild-stale-dev-client-finge

Conversation

@abretonc7s

@abretonc7s abretonc7s commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Rebuild development clients when native fingerprints change

An installed development client can contain older native modules than Metro's JS. Preflight now compares the checkout's platform-specific Expo native fingerprint with a persistent stamp per app variant, platform and device. A missing or changed stamp enters the existing build/install path. Successful installs record the build hash atomically after dependency/prebuild hooks have prepared its inputs.

The fingerprint includes audio-studio's shared C++ and config-plugin source. Only *.test.ts files under packages/audio-studio/plugin/src are excluded from that plugin source. Generated Moonshine iOS slice copies and the Android isolated AAR are excluded; the pinned AAR checksum and canonical xcframework libraries remain hashed. Workspace docs, ordinary JS, generated lib and wasm trees remain excluded, while Native*.ts codegen specs remain included.

Installed-client launches compute a fingerprint even with SKIP_BUILD=1. Real Android/iOS probes took 11–43 seconds per hash across machine loads. SKIP_BUILD retains its existing decisions and warns on stale or unreadable fingerprints. Without SKIP_BUILD, fingerprint failures exit 1 and report their cause. If Android must install a missing app and hashing fails under SKIP_BUILD, it builds without replacing the previous stamp. The native build stage retains its 420-second deadline.

Validation at commit 1da16ae: all 10 preflight tests and 76 repository recipe tests passed, plus shell/JS syntax and diff checks. The real-Expo probe confirms root and nested plugin test edits preserve both platform hashes, while plugin source, canonical native libraries and the pinned AAR checksum invalidate them. Removing the plugin test exclusion in a scratch copy fails the new stability assertion.

Pixel 6a 29071JEGR20638 proof at this clean commit:

[preflight] dev client native fingerprint changed (c26e69d292e128fc86d4de5c1cf829c86ad6024f → 9a0cbed74054aea3af5aa98fe5caa2d48f72f689)
BUILD SUCCESSFUL in 31s
[preflight] PASS Android app built and installed on 29071JEGR20638
[preflight] PASS Recorded dev client native fingerprint (9a0cbed74054aea3af5aa98fe5caa2d48f72f689)
[preflight] PASS Dev client native fingerprint unchanged (9a0cbed74054aea3af5aa98fe5caa2d48f72f689)

The native build ran on macpro at niceness 15 with four Gradle workers, parallel execution disabled and ninja -j4. Its build stage took 31.5 seconds. The second preflight reused the stamp without compilation. The receipts assertion reads final-proof-support/preflight.log, preflight-reuse.log and build-processes.log, requires the exact 9a0cbed fingerprint, and checks the retained Gradle and ninja controls. Its negative control rejects the older 49f1762 receipts. The Gradle snapshot records niceness 15. The ninja log spans build attempts without timestamps; CMAKE_BUILD_PARALLEL_LEVEL=4 is recorded in the retained limits declaration, while the executable wrapper enforces ninja -j4.

observe-native-worklets: {"loadUnpackersWithCode":"function"}
wait-model-button: {"visible":true}
wait-run-button: {"visible":true}
check-worklets-errors: PASS, Playground Metro 7364 log, both forbidden Worklets messages absent
Native Android logs for PID 28329 contain no Worklets load failure or fatal exception

The configured target retains a Sherpa Voice provenance label. Explicit Android/Pixel and Metro 7364 selection exercised the rebuilt Playground client. Passive HUD observation is unsupported; the HUD is visible in the retained media. Logs, video, captures and recorder wiring are retained in the task bundle; key log lines are inlined because .task files are ignored by git. iOS decisions are covered by fixtures and real hash probes; no iOS device build is claimed.

Screenshots/Recordings

AC-2: Pixel 6a waveform Worklets screen at 1da16ae
Pixel 6a waveform Worklets screen at 1da16ae86

Full evidence gallery and publication receipt
Pixel 6a waveform Worklets screen at 1da16ae
Pixel 6a waveform Worklets screen at 1da16ae86
Shows /minimal, blue waveform bars, red marker, static-mode toggle, reset control and recipe HUD at video 8.478499 seconds. Capture sourceCommit is 1da16ae; sourceDirty is false. The trace confirms loadUnpackersWithCode is a function.
Pixel 6a ASR mode and model controls at 1da16ae
Pixel 6a ASR mode and model controls at 1da16ae86
Shows /asr-benchmark, Bundled Sample and Simulated Live controls, selected Moonshine Small Streaming model and recipe HUD at video 13.924253 seconds. Capture sourceCommit is 1da16ae; sourceDirty is false. The trace confirms the sample action is mounted below the viewport; transcription is not exercised.

Publication approval

Arthur · person · arthur · 2026-11-03T09:11:30.603Z
Package: c6eee7e30c874bce312adc5d35e43f74de02cabdcfa78567ce5c52da9d5854a1. Visual receipts: pipeline-sha256:22c235dbb583fd7a6ed5f0b9917af841ee2b2197f99e22c3ae7f77deb06c1ca3.

Accepted review findings

Accepted by Arthur (arthur) at 2026-11-03T09:11:30.603Z.
Head: 1da16ae86fed794ebb6f9672771f0a3c38bddf6c. Findings digest: sha256:d3dc40f9fbb943d5a6dd33a65b05dc38c1873c2bef870c85c5abcdc7198f06be.

Reason:

Review found no code defect at 1da16ae. Accepted: opening this PR satisfies AC-3, and the commit subject on a54204299 stays as is. Evidence at this head: recipe 23/23 with video on a physical Android device.

Accepted findings:

  • .task/feat/manual-000172-1102-145756/artifacts/pr-description.md: AC-3 unmet: no PR is open. gh pr list --head feat/manual-000172-rebuild-stale-dev-client-finge --state all returns [] and git ls-remote finds no remote branch. The head has no code defect and TASK.md forbids the worker from pushing, so the operator must publish and recheck AC-3, or record an override with a reason. (review review-4c0038bd-e38a-4236-ac1f-42fbafa4bea3-c6addf99-1ca8-44bc-9f39-e912ed7aeeef)
  • .task/feat/manual-000172-1102-145756/artifacts/pr-description.md: DESCRIPTION_CLAIM_NOT_IN_DIFF: commit a542042, 'fix: address self-review feedback (MANUAL-000172)', does not say what changed. Reword or squash at merge. (review review-4c0038bd-e38a-4236-ac1f-42fbafa4bea3-c6addf99-1ca8-44bc-9f39-e912ed7aeeef)

Evidence policy attestation

Approved by Arthur (arthur) at 2026-11-03T09:11:30.602Z.
Package: c6eee7e30c874bce312adc5d35e43f74de02cabdcfa78567ce5c52da9d5854a1. Decision: 8957e8bf-2637-40c3-9043-a0063d6a038f.

Reason:

Review found no code defect at 1da16ae. Accepted: opening this PR satisfies AC-3, and the commit subject on a54204299 stays as is. Evidence at this head: recipe 23/23 with video on a physical Android device.

Waived claim-policy findings:

  • Recorded claim verdicts do not satisfy publication policy.

Original evidence and verdicts are retained. Integrity, source, CI and review checks remain required.

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring

Architecture Decision

Test-Driven Development Checklist

Note: TDD is recommended but not required. The testing framework is newly available, and test coverage is being improved incrementally.

Pre-Implementation (for new features - recommended)

  • Architecture document created/updated
  • API design reviewed
  • Test plan created with test cases
  • Tests written before implementation (when feasible)

Implementation

  • TypeScript interfaces/types defined
  • iOS implementation complete
  • Android implementation complete
  • Web implementation complete (if applicable)

Testing

  • Unit tests included (recommended)
  • iOS platform tests pass
  • Android platform tests pass
  • Integration tests included (when applicable)
  • Cross-platform consistency verified
  • Test coverage adequate for the change
  • Edge cases and error scenarios considered
  • Performance impact measured (if applicable)

Test Evidence

# Test output (if applicable)
./scripts/run_tests.sh all
...

Documentation

  • API documentation updated
  • Usage examples added (if new feature)
  • CHANGELOG.md updated
  • README updated (if needed)

Breaking Changes

Related Issues

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Tests are included (recommended for new features and bug fixes)
  • Existing tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Visual judgments

Execution: 18e94bd6-1005-48fd-bc10-b56f195fd534

Criterion Verdict Reviewed by
AC-2: On the Pixel, the first run detects the stale dev client, rebuilds and reinstalls it (under nice -n 15, 4 workers), and the Android smoke no longer shows `loadUnpackersWithCode` undefined; the second run skips the rebuild. proven Verified by agent · Independent review

@abretonc7s abretonc7s changed the title chore: prepare farmslot publication pkg-4c0038bd-mw0e8j5z feat: rebuild a stale development client automatically (Worklets loadUnpackersWithCode undefined on the Pixel) Nov 3, 2026
@abretonc7s
abretonc7s marked this pull request as ready for review November 3, 2026 09:13
@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@abretonc7s
abretonc7s merged commit 87e9008 into main Nov 4, 2026
5 checks passed
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.

1 participant