Skip to content

test: cover Windows local access and stabilize clipboard progress checks - #852

Merged
penso merged 4 commits into
mainfrom
fix/issue-357
Oct 28, 2026
Merged

penso merged 4 commits into
mainfrom
fix/issue-357

Conversation

@penso

@penso penso commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add isolated Windows named-pipe tests for generic read/write grants, the daemon's System/Owner Rights descriptor, and preservation of access-denied errors.
  • Cover config maintenance-lock contention and Windows read-only lock failures, including native error context and preservation of the existing configuration.
  • Document the actual Windows open flags, source comparisons, and evidence needed from the affected installation.
  • Fix an existing clipboard-test timing assertion that counted serialization and payload verification against the worker's partial-frame receive deadline. Keep the actual worker deadline, bounded receive wait, full payload checks, and cancellation assertions.

Related to #357. The reported access denial remains unresolved; these tests and investigation notes do not establish a fix.

QA

  • just format and git diff --cached --check passed.
  • (umask 022; cargo test --locked -p herdr-gpui --bin herdr-gpui herdr_settings::tests) passed: 45 tests. The initial just ci run failed 25 existing settings tests because the inherited umask 002 created group-writable fixtures.
  • (umask 022; RUST_TEST_THREADS=2 cargo test --locked -p herdr-client --lib tests::clipboard_tests::session::uploads) passed: 8 tests after correcting the timing assertion. Earlier full runs exposed the assertion failure under CPU contention.
  • (umask 022; RUST_TEST_THREADS=2 just ci) passed on final commit 820fc4be35e4d5286c3625d0c2937442efc5c6e3 after merging origin/main (Linux x86_64): formatting, file-size/sorting gates, workspace Clippy, default/all-feature tests, doctests, and Python checks.
  • just check-commits and git diff origin/main...HEAD --check passed.
  • just lint-linux: attempted, blocked because Docker is unavailable. The native Linux Clippy checks are included in just ci.
  • PATH="/tmp/opencode/issue-357-mingw/root/usr/bin:$PATH" just lint-windows passed with a user-local MinGW C/C++ toolchain: all targets with all features and without default features. Corrected the Windows-only listener path type and config-test unwrap_err lint found by CI.
  • GitHub CI run 40589412773 passed: native Windows x64 and ARM64 workspace tests with default/all features (including the access and lock-access tests), Windows native GUI checks, and Linux/macOS checks.
  • On the affected installation, reproduce discovery and explicit-socket connections, collect operation-specific errors, and compare the pipe opens and config-lock security state as described in docs/windows-local-access.md.

Native Windows and live GUI checks passed in GitHub CI; they were not run locally.

penso added 2 commits October 26, 2026 21:56
Add isolated named-pipe ACL and config-lock tests for the access-denied investigation in #357. Document the current open flags and the native evidence still needed to establish the cause on the reporting installation.
The regression test timed allocation, serialization, decoding, and payload validation against the partial-frame receive deadline. Under CPU contention this failed even after both frames were delivered successfully.

Rely on the worker's unchanged deadline and the bounded receive wait. Retain complete payload verification, the backpressured-upload assertion, and cancellation checks.
@penso

penso commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner Author

Local CI verification: just ci ran locally and passed on commit 820fc4be35e4d5286c3625d0c2937442efc5c6e3, Linux x86_64, after merging origin/main, using (umask 022; RUST_TEST_THREADS=2 just ci). Also passed: just lint-windows with a user-local MinGW C/C++ toolchain (all targets/all features and no-default-features), just check-commits, and git diff origin/main...HEAD --check. just lint-linux remains blocked by missing Docker; native Linux Clippy passed in just ci.

GitHub CI run https://github.com/penso/herdr-gpui/actions/runs/40589412773 is now green, including all four Windows check jobs (x64/ARM64, default/all features), both Windows native GUI jobs, and Linux/macOS checks. Both Windows failures are resolved. Remaining affected-installation QA is listed in the PR description.

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge; no actionable issue was found.

Summary

Adds isolated tests and investigation notes for Windows access failures. It does not change production access checks or claim to fix the reported denial.

  • Windows pipe tests check allowed rights and denied writes.
  • Config lock tests cover contention and Windows read-only files.
  • Clipboard progress checks no longer time payload verification.

Reviews (1) · Last reviewed commit: "test: measure clipboard progress through..." · Reviewed by Greptile

penso added 2 commits October 27, 2026 14:30
Pass a borrowed Path to the named-pipe listener's ToWtf16 API and use the config test's anyhow context instead of unwrap_err. These Windows-only compilation and Clippy failures blocked both native CI architectures.
@penso
penso merged commit 13a17bf into main Oct 28, 2026
23 checks passed
@penso
penso deleted the fix/issue-357 branch October 28, 2026 07:26
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