Skip to content

fix(watchbound): preserve reserved-directory copies on Node 26 - #1565

Merged
ilysenko merged 1 commit into
ilysenko:mainfrom
VirgilMing:codex/watchbound-node26-copy
Oct 8, 2026
Merged

ilysenko merged 1 commit into
ilysenko:mainfrom
VirgilMing:codex/watchbound-node26-copy

Conversation

@VirgilMing

@VirgilMing VirgilMing commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Enabling directory-only-working-tree-watch on a build host running Node 26.10.0 fails in the production resource commit with ERR_FS_CP_EEXIST. The transaction reserves its package root with mkdir and then calls cpSync on that existing directory with force: false, errorOnExist: true. Node 26.10.0 now enforces the existing-directory refusal (release notes, Node #64124).

Copy each package entry into a missing child of the held reservation FD. Keep the atomic root reservation, descriptor/inode checks, no-overwrite options, commit checks, and quarantine rollback. Refuse pre-existing child entries before copying so older Node versions cannot merge an existing child directory.

Add or strengthen regression coverage for nested/hidden entries and empty subdirectories, empty and populated destination conflicts, existing file/directory/symlink children, reservation replacement before and between copies, and rollback after a production copy commits only part of a package.

This is an independent sibling of the Gentoo foundation PR #1564, based directly on main; neither PR depends on the other. The change stays in the community feature's build-time resource copier and adjacent tests. Gentoo feature support declarations, the official GUI runtime, and the Watchbound native engine are unchanged.

Validation

  • Full feature suite on Node 24.19.0: 126 passed.
  • Full feature suite on Node 26.10.0: 126 passed; unchanged main had 17 failing feature tests.
  • Linux feature and ASAR framework suites: 35 passed.
  • Signed stable 26.1002.52244 / amd64, with only directory-only-working-tree-watch enabled, built successfully on Node 26.10.0. Both Watchbound descriptors applied; the existing required core focus patch also applied.
  • Before using the downloaded deb as build input, verified the pinned-key InRelease signature, the indexed Packages digest, and the complete package size/SHA-256. After building, verified the complete inventories and hashes of all three Watchbound packages (22 files), the unpacked x64 native binding, and absence of the ARM64 package.
  • Node syntax and git diff --check: passed.

The local official-bundle build covers amd64. ARM64 runtime and the full deb/RPM/pacman/AppImage/Nix package matrix were not rerun locally for this copier-only change; upstream PR CI supplies the repository matrix. No system package merge or GUI replacement was performed.

Agent review

The complete origin/main...HEAD diff (61b1663164e3f141ba1a307cc61a1d4e3c8fb276 to b58ed033631de1ed486975b6164404734b296326) was independently reviewed read-only with gpt-6.1-sol at maximum reasoning effort. The result reports no actionable regressions relative to that merge base.

The reviewer also passed syntax checks, eight read-only feature tests on Node 26.10.0, and the diff check. The full filesystem-writing suites and official-bundle build listed above were performed separately in the writable local validation environment.

Checklist

  • This pull request is ready for review and is no longer a draft.
  • The change is focused, edits feature-owned source files rather than generated output, and contains no unrelated changes.
  • Added regression tests and ran the local validation listed above.
  • Reviewed the complete base-to-HEAD diff at maximum reasoning effort and addressed all actionable findings.
  • Required upstream PR CI checks pass (pending after creation).

Copy each package entry through the held directory descriptor so strict
errorOnExist semantics do not reject the transaction's reserved root.
Reject pre-existing child entries on older Node versions while retaining
mkdir reservation, identity checks, no-overwrite options and rollback.

Cover nested and hidden entries, an empty destination, child conflicts,
reservation replacement across copies, and partial-copy rollback.

Validation:
- Node 24.19.0 and 26.10.0 feature suites: 126 tests passed each.
- Linux feature and ASAR framework suites: 35 tests passed.
- Only Watchbound enabled in a ChatGPT 26.1002.52244 amd64 build on Node
  26.10.0; both Watchbound descriptors applied. Verified the full packaged
  inventory and hashes of all three packages and the unpacked native
  binding. The repository's existing required focus patch also applied.
- Pinned-key InRelease signature, Packages digest, and full package size
  and SHA-256 verified before using the downloaded deb as build input:
  9498e417131a278bce35bfff6275d252c0d332f17afc0313e0b782749f4d348a.

@ilysenko ilysenko left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the focused Node 26 reservation-copy fix and regression coverage. CI is green on the current head.

@ilysenko
ilysenko merged commit 50a8df2 into ilysenko:main Oct 8, 2026
15 checks passed
@VirgilMing
VirgilMing deleted the codex/watchbound-node26-copy branch October 8, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants