gestalt-mobile 0.66.0 → 0.66.2

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/README.md CHANGED
@@ -684,17 +684,19 @@ and select **run_slow_tests**, or run:
684
684
  gh workflow run ci.yml --ref YOUR_BRANCH -f run_slow_tests=true
685
685
  ```
686
686
 
687
- To run browser tests locally with an existing Chrome installation:
687
+ Browser tests always use an existing system Chrome installation:
688
688
 
689
689
  ```sh
690
690
  npm ci
691
691
  npm run build:client
692
- PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/absolute/path/to/chrome npm run test:e2e
692
+ npm run test:e2e
693
693
  ```
694
694
 
695
695
  Use the lane commands below for functional, visual-evidence or real-auth tests.
696
- The optional GitHub browser jobs explicitly install a disposable test browser;
697
- ordinary application/session startup never does. Run the relevant browser suite
696
+ Set `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/absolute/path/to/chrome` for a custom
697
+ installed executable. All browser lanes use the Chrome channel by default and
698
+ fail if Chrome is missing; they never fall back to Playwright's bundled Chromium.
699
+ GitHub browser jobs verify the runner's installed Chrome. Run the relevant browser suite
698
700
  manually when changing browser behavior. The actual CLI/Mobile managed-browser
699
701
  integration has separate installed-runtime prerequisites and remains opt-in;
700
702
  see [Managed browser access](docs/managed-playwright.md#manual-integration-tests).
@@ -18,6 +18,19 @@ function reject(reason) {
18
18
  /** Only the managed namespace is traversed. There are no prefix/age/PID legacy recognizers. */
19
19
  export class FilesystemScratchCleanup {
20
20
  async cleanSession(session, authorized, protectedSessions) {
21
+ // A retained session can outlive its workspace (including Self DEBUG).
22
+ // Only an absent workspace is already clean; existing links and invalid
23
+ // paths must still pass the normal canonical-path checks below.
24
+ if (isAbsolute(session.workspacePath)) {
25
+ try {
26
+ await lstat(session.workspacePath);
27
+ }
28
+ catch (error) {
29
+ if (error.code === 'ENOENT')
30
+ return;
31
+ throw error;
32
+ }
33
+ }
21
34
  const counts = await this.cleanWorkspace(session.workspacePath, protectedSessions, mobileScratchOwnerId(session.id), authorized);
22
35
  if (counts.skipped || counts.failed)
23
36
  throw new Error('SESSION_CLEANUP_FAILED');
@@ -82,7 +95,7 @@ export class FilesystemScratchCleanup {
82
95
  const marker = await readManagedScratchOwner(directory, workspacePath, ownerId);
83
96
  await this.releasedLeases(directory, marker);
84
97
  await this.assertProtection(directory, join(container, ownerId), marker, protectedSessions, authorized);
85
- await this.noLinks(directory);
98
+ await this.validatePayload(directory);
86
99
  await privateDirectory(directory, false);
87
100
  await containment.revalidate();
88
101
  if (name === ownerId) {
@@ -215,7 +228,7 @@ export class FilesystemScratchCleanup {
215
228
  }
216
229
  }
217
230
  }
218
- async noLinks(directory, root = directory, depth = 0, budget = { entries: 0 }) {
231
+ async validatePayload(directory, root = directory, depth = 0, budget = { entries: 0 }) {
219
232
  if (depth > 128)
220
233
  reject('unrecognized');
221
234
  // Even an empty nested namespace is not authority to retire a workspace's
@@ -233,13 +246,15 @@ export class FilesystemScratchCleanup {
233
246
  reject('unrecognized');
234
247
  const path = join(directory, child);
235
248
  const info = await lstat(path);
236
- if (info.isSymbolicLink() ||
237
- (process.getuid && info.uid !== process.getuid()) ||
238
- (!info.isDirectory() && !info.isFile()) ||
249
+ if ((process.getuid && info.uid !== process.getuid()) ||
250
+ (!info.isDirectory() && !info.isFile() && !info.isSymbolicLink()) ||
239
251
  (info.isFile() && info.nlink !== 1))
240
252
  reject('unsafe');
253
+ // Payload symlinks (for example npm's .bin entries) are disposable links.
254
+ // lstat never follows them, and rm unlinks them without deleting their targets.
255
+ // Owner paths and authority metadata retain their separate no-link checks.
241
256
  if (info.isDirectory())
242
- await this.noLinks(path, root, depth + 1, budget);
257
+ await this.validatePayload(path, root, depth + 1, budget);
243
258
  }
244
259
  }
245
260
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gestalt-mobile",
3
- "version": "0.66.0",
3
+ "version": "0.66.2",
4
4
  "description": "Mobile-first web relay for durable Codex development sessions",
5
5
  "keywords": [
6
6
  "codex",