Repository navigation
perf: replace capture PowerShell with native helper - #8
Merged
Merged
Conversation
Owner
Author
|
Reviewed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the PowerShell capture/displays process with a command-scoped native C++ executable, including capture after action checkpoints. The Node validation and archive path remains the same; input execution still uses Windows PowerShell 5.1.
Interleaved complete-CLI measurements against the optimized PowerShell 5.1 baseline reduced median observe latency from 965 to 486 ms for 400×300 captures with empty archives, and from 1,181 to 685 ms for 1280×720 captures with growing histories. Native capture won all 32 final pairs; all 64 images passed independent pixel verification. Reproduction tools and raw samples are included.
Also update the cu automation skill to combine observation/checkpoint execution and optional image delivery in one Pi codemode call, and document the runtime comparisons and product-boundary research.
Contract And Safety Impact
Public command syntax and receipt formats remain unchanged. Preserve desktop/session admission, pre/post environment comparison, display binding, strict private JSON, create-new output, flush/readback, independent PNG validation and transactional publication. Native failure has no fallback replay. Source builds now require a matching Windows C++ toolchain; packages contain the executable and dependency license.
No captured images, typed user content or
.custate are included. Research documents contain local reproduction paths and helper paths appear where required by implementation and documentation.Verification
npm run typecheck: passed after integration with current main.npm run test:ci: build and 105 tests passed after integration.npm run smoke:ci: passed after integration.npm test: 513 existing tests passed, one symlink-permission skip; four native behavior tests and native core checks passed before integration. Integration changed documentation and license whitespace only.npm run test:observe-region:e2eandnpm run test:act-controlled:e2e: independently installed package tests passed, including actual pixels, checkpoint capture and unresolved-input no-replay behavior.git diff --check origin/main..HEAD: passed.Effects Performed
Captured only repository-owned fixture windows, emitted controlled fixture input for package E2E, and cleaned test-owned temporary directories. Benchmarks left the user's background/game load running.
Documentation
Updated changelog, README, contributing/build requirements and the command-scoped-helper design decision. Retain the current main README artwork and incorporate its TTL/full-screen guidance into the revised skill.
Residual Risk
Only Windows x64 was exercised. No new isolated full-desktop, locked-desktop, remote-session or display-hotplug acceptance was performed; existing release limitations remain. Measurements use compressible fixture images and do not establish fixed latency for arbitrary images or long archives. Native input still depends on PowerShell 5.1.