@deeeed/metamask-harness 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/commands/shared.ts +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.4 - 2026-07-04
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- **IMP-24: published tarball stripped exec bits from shell leaves** — the harness execs `adapters/**/*.sh` leaves directly, but six shipped leaves (`adapters/mobile/lib/metro-listener.sh`, `adapters/shared/activate-repo-node.sh`, `cli-ux.sh`, `harness-path.sh`, `hash-helpers.sh`, `resolve-farmslot-ports.sh`) were committed without the git exec bit (mode `100644`), so npm packed them `644`. A fresh `npm i -g` then hit `EACCES` on the first leaf. All shipped `*.sh` are now stored `100755` in git, so the published tarball packs them executable. Added contract test `tests/contract/packaging-exec-bits.test.sh` — it runs `npm pack` to produce the actual `.tgz`, then asserts via `tar tzvf` that every shipped `*.sh` entry has owner-execute set; fails with the offending path(s) if any is `644`, so this cannot silently regress.
|
|
7
|
+
- **IMP-24: spawn failures are surfaced, not swallowed** — `spawnScript` returned on `result.error` (a leaf that is missing/`ENOENT` or not executable/`EACCES`) before its human-mode stderr forward, so a leaf that could not start produced a silent exit-1 (surfaced upstream as `MOBILE_PREPARE_FAILED`). The `result.error` branch now always writes a teaching diagnostic (`leaf could not start: <leaf> (<errno>)` + a `Next: reinstall mm-harness` hint) to stderr before returning. Covered by `tests/contract/spawn-error-surfaced.test.sh`.
|
|
8
|
+
|
|
3
9
|
## 0.3.3 - 2026-07-04
|
|
4
10
|
|
|
5
11
|
### Fixed
|
package/package.json
CHANGED
package/src/commands/shared.ts
CHANGED
|
@@ -120,7 +120,17 @@ export function spawnScript(
|
|
|
120
120
|
maxBuffer: 64 * 1024 * 1024,
|
|
121
121
|
});
|
|
122
122
|
if (result.error) {
|
|
123
|
-
|
|
123
|
+
// A spawn failure (EACCES on a non-executable leaf, ENOENT on a missing one)
|
|
124
|
+
// is otherwise silent because the human-mode stderr forward below is skipped
|
|
125
|
+
// on early return. Always emit the diagnostic so a leaf that can't start is
|
|
126
|
+
// never a mystery exit-1. For node invocations the leaf is args[0], not node.
|
|
127
|
+
const leaf = isNodeScript ? path.basename(args[0]) : path.basename(script);
|
|
128
|
+
const code = (result.error as NodeJS.ErrnoException).code ?? 'ESPAWN';
|
|
129
|
+
const message =
|
|
130
|
+
`leaf could not start: ${leaf} (${code})\n` +
|
|
131
|
+
` Next: reinstall mm-harness (npm i -g @deeeed/metamask-harness) — the shell leaf is missing or not executable`;
|
|
132
|
+
process.stderr.write(`${message}\n`);
|
|
133
|
+
return { status: 1, output: message };
|
|
124
134
|
}
|
|
125
135
|
const output = `${result.stdout ?? ''}${result.stderr ?? ''}`;
|
|
126
136
|
if (!json && output) process.stderr.write(output);
|