Skip to content

Create directory children through opaque directory grants #409

Description

@wieslawsoltes

Scope

Implement FileSystemDirectoryHandle.getDirectoryHandle(name, {create:true}) over a typed opaque get-or-create directory-child authority.

Required browser behavior:

  • create and return an empty directory when the named child is absent;
  • return an existing directory without removing or changing its contents;
  • reject a file collision with TypeMismatchError;
  • preserve existing WebIDL option conversion and invalid single-component TypeError behavior;
  • map cancellation, denial, stale generation, capacity, and I/O outcomes to browser errors;
  • bind each derived handle to the requesting realm/origin/profile/partition and release the native grant exactly once.

Product dependency

Unchanged VS Code calls this operation from htmlFileSystemProvider.mkdir() and from recursive browser folder export in fileImportExport.ts. This is the smallest remaining directory mutation that unlocks a direct Code OSS path.

Acceptance

  • pinned WPT and Chrome oracle for create, existing-content preservation, collision, Unicode and invalid names;
  • native ABI/export/C11 and AppScene adapter parity;
  • origin/profile/partition security, cancellation, stale-generation and navigation retirement;
  • 10,000 bounded broker operations and 100 lifecycle cycles with heap/RSS/FD bounds;
  • unchanged Code OSS call-site evidence for mkdir and recursive folder export.

Blocked by the missing native opaque directory-child creation authority tracked in SceneTech/AppScene#168. This issue excludes remove/delete, recursive deletion, move/rename, CSS, Window.find, packaging, and AppScene implementation.

Parent: #248.

Activity

  1. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    Audit complete on WebScene ad33c45305f4cabbb87d378686539d39efb606c5 against AppScene cac13616eb4f291f7cef44c5b8480b4a7a37ce3. Chrome 153 WPT-derived oracle passes 3/3 (missing empty directory, existing-content preservation/same-entry, file collision and invalid names), result SHA-256 837bedb8a5065b5b3bf10a6a287f6c4b19203f33965a5f2cb1d47975c4900c70. Unchanged Code OSS call sites are htmlFileSystemProvider.mkdir() and recursive browser folder export. AppScene currently has no directory-child creation operation, so implementation is blocked on SceneTech/AppScene#168; WebScene will not infer mutation authority from CREATE bits or expose a path.

  2. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    Implementation is ready in PR #413 at d3ae039a on exact base d355d3fd. Local evidence: Chrome 153 3/3; broker+C11 gates green; 10k/100-cycle/RSS/FD bounds green; runtime create/enumerate/status/navigation-retire cases execute cleanly; lifetime 100-cycle gate green; exports/interoperability green. The full file-system-access aggregate reaches the existing unrelated writer assertion write after close did not reject TypeError, reproduced by the unchanged base binary.

  3. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    Correction: the focused implementation PR is #415 (not #413). Head/base and validation evidence in the preceding comment are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions