RAGE: implement Xorg screenshot capture backend #71
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/local-recall!71
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/issue-19-xorg-capture-rage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements #19 through the repository's issue-driven RAGE process.
Immutable scope
main:e5c6ac6cb4fc70b594fb51d5dcef40baca338560rage/issue-19-xorg-capture.orgArchitecture
Adversarial research superseded the initial in-process Xlib acquisition choice. The final capture stack is:
XorgCaptureBackend -> XwdSnapshotReader -> FixedXwdNativeRunner -> BoundedNativeCommandExecutorThe fixed native commands are only
xwd -root -silentandxrandr --listmonitors, using supplied absolute executable paths, no shell, bounded stdout/stderr, a minimal X11 environment, request-deadline enforcement, and child termination on timeout, cancellation, or live output overflow.xwdoutput remains in memory. The XWD parser strictly validates supported TrueColor layouts and normalizes to RGB8. Monitor topology is read before and after capture; changes fail closed. Focused-window mode uses one authorized root capture followed by a trusted metadata-only in-memory crop rather than a second arbitrary drawable read.Privacy/security boundaries
ApprovedCaptureRequest;During end-to-end acceptance testing, the last point exposed a real existing raw-ingress race:
BoundedCapturePipeline.submit_raw()previously used whatever generation was current when a caller submitted bytes. A frame captured under generation N could therefore be submitted after lock/privacy invalidation and resume to N+1 and be relabelled N+1. This PR closes that boundary by requiringexpected_generationon every raw submission and comparing it to the current capture permit before constructing a pipeline item. Mismatch raisesStaleCaptureGenerationand scrubs the mutable raw buffers.TDD/RAGE evidence
Accepted RED/GREEN slices are recorded in the Org ledger. Important later checkpoints:
60f99eb757bbee36c2ed05f140002e038e7a9518, Actions32562735169;de797180953aab4a152072639593c21c795f5431, Actions32562854491, strict typing failed only because the composition factory was absent;5f9b014a4d25ae07468ff85a7d879932b66ceb74, Actions32562906564;931a83b8389c2b8a9554df3b1adba91731dd9fb6, Actions32563123294, formatting/lint/shell passed and strict typing failed specifically becausesubmit_raw(expected_generation=...)did not exist;95ea7aeb11a74d5cfa303123957d563c54805ffc, Actions32563301554, complete success including canonical./scripts/checkwith 561 collected tests.Invalid RED/GREEN candidates that failed formatting or contained fixture-only mistakes are explicitly rejected in the ledger rather than counted as evidence.
Acceptance coverage
Nix packaging/runtime dependency installation is intentionally not added here: issue #40 owns reproducible NixOS packaging. #19 changes no flake/package definition, so inventing package work here would violate issue scope.
Current final gate
The latest documentation/ledger reconciliation head is
fa19b6f56e9353c9d43b039350f6feda8390d274. Its exact-head CI is the final merge gate. This PR remains draft until that head is fully green and the live issue/review/mergeability state is re-read.