Skip to content

fix(windows): preserve restorable extended attributes and diagnose ASAR member paths (#874, #836) - #1006

Closed
Nicholas023 wants to merge 3 commits into
mainfrom
fix/windows-metadata-asar
Closed

Nicholas023 wants to merge 3 commits into
mainfrom
fix/windows-metadata-asar

Conversation

@Nicholas023

Copy link
Copy Markdown
Collaborator

Closes #874
Refs #836

What was wrong

The change

  • native/windows-metadata: bounded EA capture, restore and byte verification for every user-restorable extended attribute. $KERNEL.* names are reported individually in metadataWarnings because user mode cannot recreate them; every other capture/restore/verification failure still aborts publication.
  • native/crates/ops-files: an .asar member component is diagnosed as ARCHIVE_MEMBER_UNSUPPORTED — Electron presents the archive as a directory only inside its patched in-process filesystem, so the standalone worker cannot read archive members. This is an actionable diagnostic, not a virtual-filesystem fallback.
  • Docs: Windows metadata contract and ASAR limitation; bilingual changelog entries.

Local validation: file-asar-path 2/2, file-operations green, cargo test --workspace --locked green, check:size 824 files all ≤1000 lines.

Validation

$ npm run build
build: compiled src/ to lib/ and copied 60 assets

$ node scripts/verify-gate.mjs --skip-install --keep-going
268 suites passed; skipped: linux-attributes, linux-shell, tui-host, tui-native (allowed: file-metadata, linux-attributes, linux-shell, tui-host, tui-native)
manifest: 92/59 checks
win32-x64: gate green

The gate lines above were produced on the local integration head b21274dd (all slices merged) with the pinned local fixtures:
DSH_OPS_TEST_BASH = a verified pinned MSYS bash (sha256 6cc575e9…), DSH_OPS_NIUBASH_ARCHIVE = the shipped frozen archive. Each PR branch was also built and its own suites were run before push; the counts below are from those runs.

CI required run: the pull_request event for this PR triggers ci.yml; paste the aggregate CI required run URL here once it finishes.

Environment

  • OS: Windows x64 25H2; Node.js v24.21.0; DSH 0.2.2-rc.1
  • Based on upstream main commit 58f6e281 (origin/main at submission)
  • Install channel: local source build (npm ci --ignore-scripts --offline, npm run build, npm run stage:niubash -- --offline --archive <frozen archive>)

@Thatgfsj

Copy link
Copy Markdown
Collaborator

Superseded by #1033:按仓库约定把 #1023 与 #1002–#1008 合并为一个统一 PR(冲突已在 #1033 内解决,CI 在 #1033 上跑)。

@Thatgfsj Thatgfsj closed this Nov 20, 2026
Thatgfsj added a commit that referenced this pull request Nov 20, 2026
- cargo fmt: the three merged native branches had unformatted code (rust-lint red
  on #1005, #1006 and #1023); run rustfmt over the workspace.
- file_path_tests: pin the canonical temp path before walking, so macOS's
  /var -> /private/var symlink no longer turns the asar-member expectation into
  PATH_RESTRICTED (darwin legs were red on #1006).
- drop the dead imports/comments left by the superseded P7 step-tail provider
  (prompt-injection, resident-switch, ptc.ts).

Refs #1032, #1033.
@Thatgfsj
Thatgfsj deleted the fix/windows-metadata-asar branch November 20, 2026 15:46
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.

Support request: safe Windows writes for Kernel EAs

2 participants