fix(measure): cef-embedder.sh runs the fork's embedder tests on a writable copy of the CEF dist

Merged
LA
4d ago
+82-4

Summary

The fleet's CEF embedder step (scripts/measure/cef-embedder.sh) ran no case against a seeded CEF build. On 2026-11-02 steps 6d191ccbefe7ed7c11e80bad and 100ec79aad999f8be34bba21 (aws-m4pro-8, cef-154.0.34-cmux.42 arm64) printed cmux-embedder: 0/14 passed with no ==> case line, then the worker's cleanup failed with permission denied on the copied framework's locale.pak.

Cause: the worker seeds $CMUX_CI_CEF_DIR read-only. The fork's test-cmux-embedder.sh copies the framework into its test app and re-signs that copy, with stderr sent to /dev/null. So codesign failed on the read-only copy and the runner stopped under set -e before any case.

This blocks the CEF crash release cef-154.0.34-cmux.42. Its embedder case parent-dealloc-hidden is the test for the CmuxParentViewTracker abort (STATUS item 6061).

Change:

  • The runner runs on a writable copy of the dist (cp -R, then chmod -R u+w).
  • On macOS the wrapper signs the copy first, as the runner does, with stderr shown. A failure then names its cause.
  • A runner that stops before its first case is named in the summary.
  • The work dir is made writable on exit, so the worker's step cleanup can remove it.
  • Test seam: CMUX_EMBEDDER_INPUT_DIR takes the test-source archive from a local dir.

Testing

bash scripts/measure/tests/cef-embedder.test.sh uses a read-only dist and a fake runner that needs a writable framework copy, as the real one does.

  • Red at ed2acc9c9e4 (test only): cmux-embedder: 0/2 passed, then FAIL: a run on a read-only dist ran no case.
  • Green at 4d0b46e18b2: cef-embedder: ok, 5 of 5 runs.

Observed / Not run

  • Observed: the red and the 5 greens above, on cmux-orchestrator-1 (Linux). The prepush gate found no new violations.
  • Not run: the macOS codesign branch is not covered by the test (no codesign on Linux). There is no fleet run of the fixed script yet: the controller runs this measurement script only at a commit on feat-cmux-next, so the real embedder runs (red on cmux.41, green on cmux.42) come after this lands.

Changelog

none


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the CEF embedder measurement script so it runs the fork's embedder tests against the seeded dist instead of stopping silently before any case.

  • Runs the runner on a writable copy of the dist (cp -R, chmod -R u+w), since the seeded $CMUX_CI_CEF_DIR is read-only and the runner re-signs its framework copy with stderr hidden, failing under set -e before any case ran.
  • On macOS, signs the framework copy first with stderr shown so a codesign failure names its cause.
  • Names a runner that stops before its first case in the summary instead of only printing 0/N passed.
  • Makes the work dir writable on exit so the worker's step cleanup can remove it (it previously failed with permission denied on locale.pak).
  • Adds CMUX_EMBEDDER_INPUT_DIR as a test seam to source the test archive from a local directory.

Adds scripts/measure/tests/cef-embedder.test.sh, which reproduces the read-only dist with a fake runner and covers both a full run and an early stop. The macOS codesign branch is not covered by the test (no codesign on Linux).