Skip to content

Commit 006249c

Browse files
authored
feat: implement container pooling and fix transport error handling (#551)
* feat: implement container pooling system for device emulation * fix: address CodeRabbit review comments - Fix YAML linting issues in GitHub workflow files - Remove trailing spaces in ci-ts.yaml - Add missing newlines at end of YAML files - Fix typo: settingsNavnavLeftButton → settingsNavLeftButton - Organize imports in containerPool.ts (external packages first) - Remove unused model variable in cleanup() method - Apply automated code formatting improvements * fix: address additional CodeRabbit review comments - Fix missing parentheses in tests/minapp/index.ts toString() call - Add error handling to gRPC exchange promise chain - Remove async modifier from globalsetup.ts (no await needed) - Add race condition protection for pool initialization - Document DEV_CERT_PRIVATE_KEY as development-only test key * fix: resolve remaining CI issues and CodeRabbit comments - Fix trailing spaces in .github/dependabot.yml - Add missing await to async operations in tests/pullImageKillOld.ts - Wrap async calls in IIFE to prevent CI hanging on cleanup This should resolve the hanging CI build and address the remaining CodeRabbit linting issues. * fix: handle transport errors to fail fast instead of timing out - Add error tracking in transport layer via proxy interceptor - Create errors.ts with APDU status codes and error handling utilities - Propagate critical transport errors in waitUntilScreenIs, waitUntilScreenIsNot, and waitForText - Update getEvents to check for critical transport errors before making requests - Add comprehensive tests to verify fast-fail behavior Previously, when errors like 0x6984 (INVALID_DATA) or 0x6E00 (CLA_NOT_SUPPORTED) occurred, Zemu would continue waiting for timeouts instead of failing immediately. Now these errors are detected and cause immediate failure with clear error messages. Fixes issue where transport errors were absorbed causing unnecessary timeout delays. * fix: update error handling test to expect correct error code The test was expecting 0x6984 (INVALID_DATA) but invalid CLA (0xFF) actually triggers 0x6E00 (CLA_NOT_SUPPORTED) which is the correct behavior. * fix: resolve linter issues - Remove unused imports in test files - Fix import organization in Zemu.ts - Fix formatting (newlines at end of files) - Apply Biome linter rules All tests passing after linter fixes.
1 parent 98e687d commit 006249c

18 files changed

Lines changed: 1151 additions & 79 deletions

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ updates:
1515
# Ignore major version updates for stability
1616
- dependency-name: "*"
1717
update-types: ["version-update:semver-major"]
18-
18+
1919
- package-ecosystem: "github-actions"
2020
directory: "/"
2121
schedule:
2222
interval: "daily"
2323
commit-message:
2424
prefix: "ci"
25-
target-branch: "main"
25+
target-branch: "main"

.github/workflows/ci-ts.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,21 @@ jobs:
2727
test-with-docker:
2828
runs-on: ubuntu-latest
2929
needs: ts-checks
30-
3130
steps:
3231
- name: Checkout code
3332
uses: actions/checkout@v4
34-
3533
- name: Setup pnpm
3634
uses: pnpm/action-setup@v4
3735
with:
3836
version: 8
39-
4037
- name: Setup Node.js
4138
uses: actions/setup-node@v4
4239
with:
4340
node-version: '22'
4441
cache: 'pnpm'
45-
4642
- name: Install dependencies
4743
run: pnpm install
48-
4944
- name: Run tests with Docker
5045
run: pnpm test
5146
env:
52-
DISPLAY: :99
47+
DISPLAY: :99

.vscode/settings.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,25 @@
1111
"[javascript]": {
1212
"editor.defaultFormatter": "biomejs.biome"
1313
},
14-
"cSpell.words": ["zemu"]
14+
"cSpell.words": ["zemu"],
15+
"workbench.colorCustomizations": {
16+
"activityBar.activeBackground": "#93e6fc",
17+
"activityBar.background": "#93e6fc",
18+
"activityBar.foreground": "#15202b",
19+
"activityBar.inactiveForeground": "#15202b99",
20+
"activityBarBadge.background": "#fa45d4",
21+
"activityBarBadge.foreground": "#15202b",
22+
"commandCenter.border": "#15202b99",
23+
"sash.hoverBorder": "#93e6fc",
24+
"statusBar.background": "#61dafb",
25+
"statusBar.foreground": "#15202b",
26+
"statusBarItem.hoverBackground": "#2fcefa",
27+
"statusBarItem.remoteBackground": "#61dafb",
28+
"statusBarItem.remoteForeground": "#15202b",
29+
"titleBar.activeBackground": "#61dafb",
30+
"titleBar.activeForeground": "#15202b",
31+
"titleBar.inactiveBackground": "#61dafb99",
32+
"titleBar.inactiveForeground": "#15202b99"
33+
},
34+
"peacock.color": "#61dafb"
1535
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@
6969
"files": [
7070
"dist/**/*"
7171
]
72-
}
72+
}

0 commit comments

Comments
 (0)