Skip to content

fix(fs): carry the observed DACL in the seal read-back error and fix the test's ACE layout - #425

Merged
zackees merged 1 commit into
mainfrom
fix/write-seal-dacl-diagnostics
Oct 6, 2026
Merged

zackees merged 1 commit into
mainfrom
fix/write-seal-dacl-diagnostics

Conversation

@zackees

@zackees zackees commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Follow-up to #423, found by the exact-SHA full CI the 0.1.29 release gate requires (#424's release run).

What

  • Diagnosis for the Windows read-back divergence: every facade seal on Windows failed its post-write read-back ("the filesystem did not retain the in-place write seal") while SetNamedSecurityInfoW reported success — undiagnosable from the CI log alone. The read-back error now embeds the DACL observed after the write, rendered as SDDL, so the next Windows run shows exactly what landed: deny ACE present = matcher bug; absent = write bug.
  • Structural test layout bug: seal_ace_is_recognized_and_rejected_structurally hard-coded mask/SID offsets at [8..12]/[12..], assuming an 8-byte ACE_HEADER. The real header is four bytes (type, flags, u16 size), so the 20-byte buffer's ace[12..] had only 8 bytes for the 12-byte World SID and panicked before a single matcher assertion ran. Every offset now derives from size_of::<ACE_HEADER>(), exactly as the matcher does.

Acceptance / RED → GREEN

  • RED: full CI (37386794123) on the release SHA — Windows x86+arm failed with the read-back error and the copy_from_slice panic above.
  • GREEN: re-dispatch of the same exact-SHA full CI after this merge must pass both Test (x86_64-pc-windows-msvc) and Test (aarch64-pc-windows-msvc) — and if the read-back still fails, its error now carries the observed SDDL for the follow-up fix.

Validation

  • soldr cargo check --all-features on Linux and --target x86_64-pc-windows-msvc.
  • soldr cargo test --features fs --test fs write_seal — 7/7 green on Linux.
  • soldr cargo fmt --all.
  • Local gate (linux-minimal + dylint-minimal): passed, stamped Local-Gate tree=df7949aa6ecc.

…the test ACE out from size_of

Full CI on Windows surfaced two defects in the write-seal work (#423):

- Every facade seal failed its read-back with "the filesystem did not
  retain the in-place write seal" while SetNamedSecurityInfoW reported
  success — a silent write/read divergence that was undiagnosable from
  the CI log. The read-back error now embeds the DACL observed after the
  write, rendered as SDDL, so the next Windows run shows exactly what
  landed (deny ACE present = matcher bug; absent = write bug).
- `seal_ace_is_recognized_and_rejected_structurally` hard-coded mask/SID
  offsets at [8..12]/[12..] — an 8-byte ACE_HEADER assumption. The real
  header is four bytes (type, flags, u16 size), so the 20-byte buffer's
  `ace[12..]` had only 8 bytes for the 12-byte SID and panicked before
  reaching a single matcher assertion. The test now derives every offset
  from `size_of::<ACE_HEADER>()`, exactly as the matcher does.

Local-Gate: v1 tree=df7949aa6ecc4a1f927ea04c3a7f77c3c153780d secs=742 lanes=linux-minimal:run,dylint-minimal:run
Ci-Attestation: {"at":1791246310,"gate":"general/all/ci-guards","host":"linux-x86_64","key":"85b6436ef9795f1fac55a0747e1b1693b2cf922fe53453bb43964db0a743797e","lane":"linux-minimal","parents":["8628bbdd2f38c8fd0bbc8582bfd33191d7e8dbfd"],"secs":254,"stamp":"954dc8138a1a33d075cd37c7953efcb8","tree":"df7949aa6ecc4a1f927ea04c3a7f77c3c153780d","v":1,"via":"run"}
Ci-Attestation: {"at":1791246310,"gate":"rust/x86_64-unknown-linux-gnu/default-facade-clippy","host":"linux-x86_64","key":"85b6436ef9795f1fac55a0747e1b1693b2cf922fe53453bb43964db0a743797e","lane":"linux-minimal","parents":["8628bbdd2f38c8fd0bbc8582bfd33191d7e8dbfd"],"secs":254,"stamp":"4e9fd0842c347596e380e09bf13a190f","tree":"df7949aa6ecc4a1f927ea04c3a7f77c3c153780d","v":1,"via":"run"}
Ci-Attestation: {"at":1791246310,"gate":"rust/x86_64-unknown-linux-gnu/default-facade-test","host":"linux-x86_64","key":"85b6436ef9795f1fac55a0747e1b1693b2cf922fe53453bb43964db0a743797e","lane":"linux-minimal","parents":["8628bbdd2f38c8fd0bbc8582bfd33191d7e8dbfd"],"secs":254,"stamp":"b32f87003387495d1ca18adb5b8be4c2","tree":"df7949aa6ecc4a1f927ea04c3a7f77c3c153780d","v":1,"via":"run"}
Ci-Attestation: {"at":1791246310,"gate":"rust/x86_64-unknown-linux-gnu/desktop-status-test","host":"linux-x86_64","key":"85b6436ef9795f1fac55a0747e1b1693b2cf922fe53453bb43964db0a743797e","lane":"linux-minimal","parents":["8628bbdd2f38c8fd0bbc8582bfd33191d7e8dbfd"],"secs":254,"stamp":"78d30661d2242300f610cf670141c93c","tree":"df7949aa6ecc4a1f927ea04c3a7f77c3c153780d","v":1,"via":"run"}
Ci-Attestation: {"at":1791246310,"gate":"rust/x86_64-unknown-linux-gnu/dylint-all-features-all-targets","host":"linux-x86_64","key":"72edde7411fc3030b3f160248b1d15c6d157f92804d3e5b5dbf0122aa05180e2","lane":"dylint-minimal","parents":["8628bbdd2f38c8fd0bbc8582bfd33191d7e8dbfd"],"secs":488,"stamp":"9622410dccb3da09202000e48d3e71e1","tree":"df7949aa6ecc4a1f927ea04c3a7f77c3c153780d","v":1,"via":"run"}
@zackees
zackees merged commit 4dfa9bc into main Oct 6, 2026
7 checks passed
@zackees
zackees deleted the fix/write-seal-dacl-diagnostics branch October 6, 2026 00:29
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.

1 participant