Implement generic Xorg active-window metadata #66
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!66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/issue-14-generic-xorg-metadata"
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?
Summary
GenericXorgMetadataSourcebehind the existingMetadataSourceport with source IDxorg-genericWM_CLASS, optional title, workspace, and optional geometry collectionAdapter choice and bounded execution
The adapter uses fixed
xpropand optionalxwininfoexecutable identities rather than adding a Python X11 dependency whose Python 3.14 packaging would widen the dependency surface. Executables are resolved once and invoked only with argument vectors throughcreate_subprocess_exec; there is no shell or captured-value interpolation.Each invocation has a 0.5-second timeout and a 64-KiB bound on each output stream. Limit or timeout violations kill the child process. Window identifiers must be nonzero 32-bit integers and are reformatted by the adapter before use.
xpropis required;xwininfoadds geometry when available without blocking application/title/workspace collection on minimal installations.Collection and race policy
The source reads
_NET_ACTIVE_WINDOW, collects only reviewed properties for that validated window, and reads_NET_ACTIVE_WINDOWagain. A focus change discards the entire attempt. One fixed retry is allowed by default; repeated churn returnsfocus-changed. Destroyed windows returnwindow-unavailableafter the same bounded retry policy. Missing active windows, malformed properties, wrong-window responses, oversized output, timeouts, and missing executables use fixed sanitized reason codes.Output fields are lexically ordered:
application,window.height,window.id, optionalwindow.title,window.width,window.x,window.y, andworkspace. Every field carriesxorg-genericprovenance, adapter revisionewmh-xprop-v1, one timezone-aware observation timestamp, and documented confidence. Application values normalize from the secondWM_CLASScomponent with first-component fallback.Privacy and security
metadata.window_titles_enableddefaults tofalse. When disabled or unrequested, title properties are omitted from the reviewedxpropquery andwindow.titlecannot be emitted. Status/probe paths only check executable availability and never read active-window properties.Command output, exception text, executable paths, display values, and captured metadata are absent from public failures and status. Raw metadata remains in-memory and source adapters have no persistence capability. The integration test carries synthetic source-collected application/title metadata through the existing deterministic redaction stage and verifies sensitive fields are dropped before the encryption processor or persistence sink.
Validation
./scripts/run-pytest tests/unit/metadata/test_xorg.py tests/unit/config/test_models.py tests/unit/config/test_loader.py tests/unit/session tests/unit/test_package.py tests/unit/redaction tests/integration/pipeline/test_redaction_pipeline.py— 111 passed./scripts/check— 297 passed; 8 failure modes verified; formatting, Ruff, Pyright, and repository policy checks passedxorg-generic, titles disabled; emitted field names/count onlyCloses #14