Skip to content

test(windows): respect symlink privilege diagnostics - #243

Merged
ZhiXiao-Lin merged 2 commits into
A3S-Lab:mainfrom
Joeygod7171:fix/windows-symlink-capability-tests
Sep 6, 2026
Merged

ZhiXiao-Lin merged 2 commits into
A3S-Lab:mainfrom
Joeygod7171:fix/windows-symlink-capability-tests

Conversation

@Joeygod7171

Copy link
Copy Markdown

Problem

Windows symlink fixtures currently skip only ERROR_PRIVILEGE_NOT_HELD (1314). On a host without Developer Mode, the same capability denial may be surfaced as ERROR_ACCESS_DENIED (5). Treating every error 5 as skippable is unsafe because error 5 can also mean an ACL or endpoint-security denial.

Change

  • Reuse the production WindowsSymlinkPrivilegeGuard in every Windows symlink fixture.
  • Add one shared capability classifier that skips error 1314, and skips error 5 only when the process token has no assigned symbolic-link privilege.
  • Preserve error 5 as a test failure when the privilege is assigned, so ACL and endpoint-security regressions remain visible.
  • Add unit coverage for both branches.

Runtime extraction behavior is unchanged: OCI symlinks are still preserved and never flattened.

Validation

  • cargo fmt --manifest-path src/Cargo.toml --all -- --check
  • cargo clippy --manifest-path src/Cargo.toml -p a3s-box-core --all-targets -- -D warnings
  • cargo test --manifest-path src/Cargo.toml -p a3s-box-core -p a3s-box-runtime --lib --no-run
  • git diff --check

Supersedes the overly broad test-only change in #242.

@ZhiXiao-Lin

Copy link
Copy Markdown

The previous failed check is unrelated to the Windows symlink diagnostics: the Clippy job reports too_many_arguments (9/7) at runtime/src/pool/warm_pool.rs:724 in boot_batch.

With maintainer edits enabled for this PR, I applied the standalone base repair as commit 5e37f787: a typed BootBatch input plus test-module ordering fixes. This preserves the Windows change and does not include the separate Dify/runtime hardening from #244.

Local verification on the updated PR checkout:

  • cargo fmt --all -- --check: passed.
  • Stub-backed cargo clippy --workspace --all-targets --all-features -- -D warnings: passed.
  • Focused runtime warm-pool unit tests: 30 passed, 0 failed.

These local checks ran on macOS; they do not execute the Windows-only symlink branches. Keep the PR open for the required Windows/WHPX checks on the new head. The earlier skipped Windows jobs are not evidence of a Windows pass.

@ZhiXiao-Lin
ZhiXiao-Lin merged commit e8f2627 into A3S-Lab:main Sep 6, 2026
14 checks passed
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