Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

refactor(hyprland-plugin): separate proof harnesses from their tests (#4127)

Francesco Bonaccief13ca7b9235
diff --git a/.github/workflows/ci-hyprland-plugin.yml b/.github/workflows/ci-hyprland-plugin.yml
index dd9890aaa9..222e1c0c0e 100644
--- a/.github/workflows/ci-hyprland-plugin.yml
+++ b/.github/workflows/ci-hyprland-plugin.yml
@@ -40,7 +40,7 @@ jobs:
echo "$RUNNER_TEMP/hyprland-plugin-tools/bin" >> "$GITHUB_PATH"
- name: Check helper syntax
run: |
- python3 -c 'import ast; from pathlib import Path; [ast.parse(p.read_text()) for p in Path("tests").glob("*.py")]'
+ python3 -c 'import ast; from pathlib import Path; [ast.parse(p.read_text()) for d in ("proofs", "tests") for p in Path(d).glob("*.py")]'
bash -n packaging/arch/PKGBUILD
bash -n packaging/release/PKGBUILD.in
- name: Check lifecycle runner cleanup
diff --git a/libs/cua-driver/docs/test-harnesses-guide.md b/libs/cua-driver/docs/test-harnesses-guide.md
index 9ad2761d6f..f7dfa42bdf 100644
--- a/libs/cua-driver/docs/test-harnesses-guide.md
+++ b/libs/cua-driver/docs/test-harnesses-guide.md
@@ -121,10 +121,10 @@ background qualification remains native Calc from `libreoffice-fresh 26.2.5-3`,
Inkscape `1.4.4-6`, the plain compiled `evdev`/`pc105`/`us` keymap, and two
seats. Chromium, Electron, and XWayland raw background input remain unqualified;
semantic AT-SPI actions are separate.
-See [production proof preparation](../hyprland-plugin/tests/production-proof.md)
+See [production proof preparation](../hyprland-plugin/docs/production-proof.md)
for the bounded plans and their limits.
-The explicit [Inkscape-only qualification profile](../hyprland-plugin/tests/production-inkscape-profile.md)
+The explicit [Inkscape-only qualification profile](../hyprland-plugin/docs/production-inkscape-profile.md)
supports a bounded packaging candidate using exact Inkscape `1.4.4-6`, with
independent native clients, two app lanes, separate SVG oracles, and third-owner
capacity refusal. It preserves the default Calc/Inkscape profile and the native
diff --git a/libs/cua-driver/hyprland-plugin/README.md b/libs/cua-driver/hyprland-plugin/README.md
index 21cb2b3133..4a40f8b921 100644
--- a/libs/cua-driver/hyprland-plugin/README.md
+++ b/libs/cua-driver/hyprland-plugin/README.md
@@ -29,7 +29,7 @@ The candidate remains experimental and unreleased. A source version of
validation results. Acceptance requires the unchanged complete Linux canonical
runner on native Hyprland and separate bounded qualified-app proof. See the
[shared admission boundary](protocol/host-authority-boundary.md) and
-[production proof preparation](tests/production-proof.md) for the native
+[production proof preparation](docs/production-proof.md) for the native
testing, packaging, and release requirements.
Bounded instrumented app proof and an uninstrumented smoke are retained from
@@ -51,16 +51,16 @@ This branch also contains a separate, opt-in
[isolated-input compatibility experiment](protocol/input-experiment.md).
It is not enabled by the normal build or package. Its test-only operator
boundary and resident-module unload workaround are not a production contract.
-See the [input experiment validation](tests/input-validation.md) for the exact
+See the [input experiment validation](docs/input-validation.md) for the exact
single-seat artifacts and the [concurrent real-app
-validation](tests/realapp-validation.md) for two-lane Calc/Inkscape evidence,
+validation](docs/realapp-validation.md) for two-lane Calc/Inkscape evidence,
event-level primary-cursor measurement, and Cancel/Stop results. Those
historical candidates needed app restarts after plugin reload. The candidate
keeps seats across config toggles and requires a desktop restart for plugin
replacement; that lifecycle requires native acceptance evidence. This experiment
does not establish production hot-reload support.
-The [desktop-state safety record](tests/desktop-state-validation.md) covers
+The [desktop-state safety record](docs/desktop-state-validation.md) covers
matched fault-only controls and background drags during target movement,
resizing, destruction, real session lock, and display-off. It documents the
tested artifacts and remaining gates, not production certification.
diff --git a/libs/cua-driver/hyprland-plugin/tests/desktop-state-validation.md b/libs/cua-driver/hyprland-plugin/docs/desktop-state-validation.md
similarity index 98%
rename from libs/cua-driver/hyprland-plugin/tests/desktop-state-validation.md
rename to libs/cua-driver/hyprland-plugin/docs/desktop-state-validation.md
index 7a18104103..cb17f3fcc3 100644
--- a/libs/cua-driver/hyprland-plugin/tests/desktop-state-validation.md
+++ b/libs/cua-driver/hyprland-plugin/docs/desktop-state-validation.md
@@ -65,7 +65,7 @@ with `NDEBUG` defined.
## Method and foreground comparison
-[`desktop_state_live.py`](desktop_state_live.py) drives native GTK raw-event
+[`desktop_state_live.py`](../tests/desktop_state_live.py) drives native GTK raw-event
fixtures through real Driver MCP `drag` and `press_key` calls. The Fleet SDK
provides VM transport and setup, not the background input path. An independent
virtual primary pointer holds a real Wayland grab in the foreground fixture.
@@ -101,7 +101,7 @@ Every action refuses the old grant, refuses unapproved recovery input, requires
a distinct fresh grant, and then delivers exactly one Escape press/release pair.
The recovery checks also require unchanged foreground application and compositor
state and no foreground wire-input leakage. See the
-[runner instructions](README.md#desktop-state-fault-controls) for setup and
+[runner instructions](../tests/README.md#desktop-state-fault-controls) for setup and
watchdog requirements.
## Recorded results
diff --git a/libs/cua-driver/hyprland-plugin/tests/input-validation.md b/libs/cua-driver/hyprland-plugin/docs/input-validation.md
similarity index 96%
rename from libs/cua-driver/hyprland-plugin/tests/input-validation.md
rename to libs/cua-driver/hyprland-plugin/docs/input-validation.md
index 93f25cf744..705cf2c2d4 100644
--- a/libs/cua-driver/hyprland-plugin/tests/input-validation.md
+++ b/libs/cua-driver/hyprland-plugin/docs/input-validation.md
@@ -56,7 +56,7 @@ notes and the supplemental lease probe do not change either executable.
## Application and isolation evidence
-[`driver_input_live.py`](driver_input_live.py) connected through a real Driver
+[`driver_input_live.py`](../tests/driver_input_live.py) connected through a real Driver
MCP process to an unrestricted test service. Both
[GTK3 drawing-area fixtures](../../tests/fixtures/apps/linux/isolated-input/main.py)
had empty actionable accessibility trees; AT-SPI actions could not substitute
@@ -65,7 +65,7 @@ fixtures.
Each action had a fresh Cua window snapshot before and after. Independent
application event journals and Wayland wire logs supplied the behavior oracle.
-The primary-seat adversary was [`primary_grab.c`](primary_grab.c), which held
+The primary-seat adversary was [`primary_grab.c`](../tests/primary_grab.c), which held
the foreground left button through a virtual pointer. It was not a physical
mouse test. Background delivery used only the Driver MCP input route.
@@ -95,11 +95,11 @@ test grant, and only the public grant entered the guest.
`primary_seat`, and 23 shared `action_record` tests.
- All 24 Python operator, transport, and nested-lifecycle helper tests passed
on the host with the optional cryptography dependency available.
-- [`input_transport_test.py`](input_transport_test.py) passed against the final
+- [`input_transport_test.py`](../tests/input_transport_test.py) passed against the final
module: missing, malformed, and forged grants; replayed grants before and
after Stop; replayed action sequences; NaN, infinity, negative, and
out-of-bounds coordinates. Exactly one valid fixture click was dispatched.
-- [`input_lease_live.py`](input_lease_live.py) separately proved that expiry
+- [`input_lease_live.py`](../tests/input_lease_live.py) separately proved that expiry
refused further input and reconnect produced a fresh challenge, rejected
the old connection's grant, and required fresh approval. These probes did
not exercise cancellation while input was held.
diff --git a/libs/cua-driver/hyprland-plugin/tests/lifecycle-validation.md b/libs/cua-driver/hyprland-plugin/docs/lifecycle-validation.md
similarity index 98%
rename from libs/cua-driver/hyprland-plugin/tests/lifecycle-validation.md
rename to libs/cua-driver/hyprland-plugin/docs/lifecycle-validation.md
index 0c7f5fa053..c9c038f895 100644
--- a/libs/cua-driver/hyprland-plugin/tests/lifecycle-validation.md
+++ b/libs/cua-driver/hyprland-plugin/docs/lifecycle-validation.md
@@ -60,7 +60,7 @@ The plugin's timer-expiry refusal now reports `lease_expired` explicitly.
## Test method
-[`input_lifecycle_live.py`](input_lifecycle_live.py) drives two native GTK
+[`input_lifecycle_live.py`](../tests/input_lifecycle_live.py) drives two native GTK
DrawingArea fixtures through independent agent and observer MCP connections.
Every background action uses a reviewed target and fresh Driver snapshots.
The host operator signs a short-lived connection/target/epoch-bound grant;
@@ -83,7 +83,7 @@ past the grant deadline. A separate PID-fd watchdog resumes the exact process
if the caller fails. The measured release interval starts immediately before
SIGCONT, and the action must refuse with `lease_expired`. This proves expiry
cleanup after resume, not continued desktop responsiveness during the stall.
-See the [runner instructions](README.md#held-input-lifecycle-faults).
+See the [runner instructions](../tests/README.md#held-input-lifecycle-faults).
## Recorded results
diff --git a/libs/cua-driver/hyprland-plugin/tests/production-cancel-proof.md b/libs/cua-driver/hyprland-plugin/docs/production-cancel-proof.md
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production-cancel-proof.md
rename to libs/cua-driver/hyprland-plugin/docs/production-cancel-proof.md
index 7b31d28af4..93026d60ba 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production-cancel-proof.md
+++ b/libs/cua-driver/hyprland-plugin/docs/production-cancel-proof.md
@@ -93,7 +93,7 @@ Run only after the native environment and plan are authorized and prepared.
Substitute the reviewed paths and exact candidate SHA:
```text
-python3 libs/cua-driver/hyprland-plugin/tests/production_cancel_proof.py \
+python3 libs/cua-driver/hyprland-plugin/proofs/production_cancel_proof.py \
--source <checkout> --source-sha <candidate-sha> \
--driver <driver> --plugin <loaded-trace-plugin-file> \
--primary-grab <primary-grab> --foreground-journal <fixture-journal> \
diff --git a/libs/cua-driver/hyprland-plugin/tests/production-inkscape-profile.md b/libs/cua-driver/hyprland-plugin/docs/production-inkscape-profile.md
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production-inkscape-profile.md
rename to libs/cua-driver/hyprland-plugin/docs/production-inkscape-profile.md
index d735b3965d..201b921dc0 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production-inkscape-profile.md
+++ b/libs/cua-driver/hyprland-plugin/docs/production-inkscape-profile.md
@@ -102,7 +102,7 @@ from the clean harness checkout in the disposable native Wayland session,
using fresh paths (the journal, wire file, and control socket must not exist):
```sh
-cd libs/cua-driver/hyprland-plugin/tests
+cd libs/cua-driver/hyprland-plugin/proofs
observer_dir=$(mktemp -d)
python3 "$(pwd)/primary_observer_fixture.py" \
--journal "$observer_dir/foreground.jsonl" \
diff --git a/libs/cua-driver/hyprland-plugin/tests/production-proof.md b/libs/cua-driver/hyprland-plugin/docs/production-proof.md
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production-proof.md
rename to libs/cua-driver/hyprland-plugin/docs/production-proof.md
index 7ceb4ac827..1a83b93eaa 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production-proof.md
+++ b/libs/cua-driver/hyprland-plugin/docs/production-proof.md
@@ -219,7 +219,7 @@ Invoke from the exact source checkout, substituting the already reviewed paths
and candidate SHA:
```text
-python3 libs/cua-driver/hyprland-plugin/tests/production_realapp_proof.py \
+python3 libs/cua-driver/hyprland-plugin/proofs/production_realapp_proof.py \
--source <checkout> --source-sha <candidate-sha> \
--driver <driver> --plugin <loaded-plugin-file> \
--primary-grab <primary-grab> --foreground-journal <fixture-journal> \
diff --git a/libs/cua-driver/hyprland-plugin/tests/realapp-validation.md b/libs/cua-driver/hyprland-plugin/docs/realapp-validation.md
similarity index 96%
rename from libs/cua-driver/hyprland-plugin/tests/realapp-validation.md
rename to libs/cua-driver/hyprland-plugin/docs/realapp-validation.md
index f5dad23340..d9c8f7beb4 100644
--- a/libs/cua-driver/hyprland-plugin/tests/realapp-validation.md
+++ b/libs/cua-driver/hyprland-plugin/docs/realapp-validation.md
@@ -48,7 +48,7 @@ no host installation, Fleet image publication, merge, or release occurred.
## What the tests measure
-[`realapp_proof.py`](realapp_proof.py) runs reviewed, deterministic plans through
+[`realapp_proof.py`](../tests/realapp_proof.py) runs reviewed, deterministic plans through
two separate MCP processes. Each owns a private lifecycle, an independently
leased synthetic seat, and a visible agent cursor. Public session labels are
not credentials. An external operator signs short-lived grants bound to the
@@ -67,12 +67,12 @@ numeric value of Calc cell B3 and a predeclared translation range for Inkscape's
`agent-shape` rectangle, with unchanged width and height. Before/after files are
retained. A successful transport response or cursor animation is not task proof.
-[`primary_grab.c`](primary_grab.c) supplies an independent virtual primary
+[`primary_grab.c`](../tests/primary_grab.c) supplies an independent virtual primary
pointer, holding the foreground button throughout the measurement. The moving
case commands a loop inside that window. This is not a physical mouse or a
human gameplay test.
-[`primary_trace.py`](primary_trace.py) analyzes event-level compositor
+[`primary_trace.py`](../tests/primary_trace.py) analyzes event-level compositor
instrumentation, not periodic screenshots alone. It requires a complete,
ordered trace with working hooks, start/stop markers, and no overflow or
timeout. Incomplete telemetry is inconclusive. The checks cover:
@@ -142,7 +142,7 @@ ffmpeg -v error -i recording.mp4 -fps_mode passthrough -enc_time_base demux -f n
- Native Rust tests passed: 43 common runtime-isolation, four window-target,
seven `hyprland_input`, three `experimental_`, and two `primary_seat` tests.
- All 36 Python helper tests passed with the cryptography dependency available.
-- The final module passed [`nested_lifecycle.py`](nested_lifecycle.py): two
+- The final module passed [`nested_lifecycle.py`](../tests/nested_lifecycle.py): two
owned nested compositors, six discovery mutation refusals per start, clean
restart, old socket/connection closure, fresh socket/epoch, sibling liveness,
and clean shutdown. The parent module was not reloaded by this test.
diff --git a/libs/cua-driver/hyprland-plugin/tests/validation.md b/libs/cua-driver/hyprland-plugin/docs/validation.md
similarity index 98%
rename from libs/cua-driver/hyprland-plugin/tests/validation.md
rename to libs/cua-driver/hyprland-plugin/docs/validation.md
index 0b6f164631..718abf25f8 100644
--- a/libs/cua-driver/hyprland-plugin/tests/validation.md
+++ b/libs/cua-driver/hyprland-plugin/docs/validation.md
@@ -2,7 +2,7 @@
The discovery-only plugin passed a native build and lifecycle checks on Cua
Cloud Fleet on September 4, 2026. These results support review of the foundation;
-the full promotion gates in [the test plan](README.md) remain open.
+the full promotion gates in [the test plan](../tests/README.md) remain open.
The [September 5 merge-readiness pass](#merge-readiness-revalidation-september-5-2026)
records a fresh candidate build and the remaining system-installation gate.
@@ -64,7 +64,7 @@ for installed Hyprland and header versions still ran.
- macOS review-host suites: six of six tests passed in normal, ASan/UBSan, and
TSan configurations. macOS uses a transport shim and mocked compositor APIs.
-The reusable live check is [live_discovery.py](live_discovery.py). It measures
+The reusable live check is [live_discovery.py](../tests/live_discovery.py). It measures
active-window identity, workspace, cursor coordinates, window geometry/mapping,
and focus history. It does not prove application delivery, complete stacking
order, physical input isolation, or behavior during an active foreground grab.
@@ -143,7 +143,7 @@ treated as proof of deletion.
## Reproducible lifecycle follow-up at `0a67bf5c8`
-The checked-in [nested lifecycle runner](nested_lifecycle.py) passed on Cua
+The checked-in [nested lifecycle runner](../tests/nested_lifecycle.py) passed on Cua
Cloud Fleet at `0a67bf5c844f5b358651737fb3545aaed5522007` on September 5, 2026
(UTC), through the Cua Sandbox SDK. The committed plugin, workflow, and license
archive had SHA-256
diff --git a/libs/cua-driver/hyprland-plugin/proofs/harness_paths.py b/libs/cua-driver/hyprland-plugin/proofs/harness_paths.py
new file mode 100644
index 0000000000..3cc93fd7bc
--- /dev/null
+++ b/libs/cua-driver/hyprland-plugin/proofs/harness_paths.py
@@ -0,0 +1,23 @@
+"""Locations of the proof harnesses, their tests, and the live helpers they reuse.
+
+The production proofs live here. Their portable tests, compiled fixtures, and
+the live-runner helpers the proofs share with ``tests/*_live.py``
+(``driver_input_live``, ``primary_trace``, ``realapp_proof``,
+``input_config_toggle`` and ``desktop_faults``) stay in the sibling ``tests``
+directory. Import this module before those helpers.
+"""
+from pathlib import Path
+import sys
+
+PROOFS = Path(__file__).resolve().parent
+TESTS = PROOFS.parent / 'tests'
+
+if str(TESTS) not in sys.path:
+ sys.path.append(str(TESTS))
+
+
+def harness_file(name):
+ """Resolve a file hashed into provenance by its name in proofs/ or tests/."""
+ matches = [path for path in (PROOFS / name, TESTS / name) if path.is_file()]
+ assert len(matches) == 1, f'harness file {name!r} must exist in exactly one of proofs/ or tests/'
+ return matches[0]
diff --git a/libs/cua-driver/hyprland-plugin/tests/primary_observer.py b/libs/cua-driver/hyprland-plugin/proofs/primary_observer.py
similarity index 100%
rename from libs/cua-driver/hyprland-plugin/tests/primary_observer.py
rename to libs/cua-driver/hyprland-plugin/proofs/primary_observer.py
diff --git a/libs/cua-driver/hyprland-plugin/tests/primary_observer_fixture.py b/libs/cua-driver/hyprland-plugin/proofs/primary_observer_fixture.py
similarity index 100%
rename from libs/cua-driver/hyprland-plugin/tests/primary_observer_fixture.py
rename to libs/cua-driver/hyprland-plugin/proofs/primary_observer_fixture.py
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_active_lock_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_active_lock_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_active_lock_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_active_lock_proof.py
index 07da0b8654..e6de976f35 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_active_lock_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_active_lock_proof.py
@@ -17,6 +17,7 @@ No native setup, authentication, product changes, or full-matrix certification.
Portable tests exercise orchestration and failure oracles, not native behavior.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
from concurrent.futures import ThreadPoolExecutor
import hashlib
@@ -298,7 +299,7 @@ def run(args):
'production_lock_refusal_proof.py', 'production_lock_refusal_proof_test.py', 'proof_fixtures.py',
'session_lock_fixture.c', 'production_session_fault_proof.py',
'production_desktop_fault_proof.py', 'production_cancel_proof.py', 'desktop_faults.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}
origin['lock_fixture'] = plan['lock_fixture']
save('provenance.json', origin)
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_active_primary_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_active_primary_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_active_primary_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_active_primary_proof.py
index b55f143ed9..406bf8cb99 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_active_primary_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_active_primary_proof.py
@@ -25,6 +25,7 @@ destination. This exercises native follow-mouse after idle without changing
its threshold, sending a click, or weakening the exact focused-client gate.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
from concurrent.futures import ThreadPoolExecutor
import hashlib
@@ -421,7 +422,7 @@ def run(args):
'primary_hover_fixture.c', 'primary_hover_fixture_test.py', 'proof_fixtures.py',
'production_active_lock_proof.py', 'production_primary_conflict_proof.py',
'production_desktop_fault_proof.py', 'production_session_fault_proof.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}
origin['hover_fixture'] = plan['hover_fixture']
origin['ownership'] = {key: plan[key] for key in ('vm', 'compositor', 'processes')}
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_agent_conflict_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_agent_conflict_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_agent_conflict_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_agent_conflict_proof.py
index e3b3552c6f..f8f7ee80c2 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_agent_conflict_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_agent_conflict_proof.py
@@ -27,6 +27,7 @@ same-process sibling-window claims and other-lane recovery are UNPROVEN here.
Portable tests are preparation only; native execution is a separate gate.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
import hashlib
import json
@@ -260,7 +261,7 @@ def run(args):
for name in (Path(__file__).name, 'production_agent_conflict_proof_test.py', 'proof_fixtures.py',
'production_primary_conflict_proof.py', 'desktop_faults.py', 'production_cancel_proof.py',
'production_desktop_fault_proof.py', 'production_geometry_fault_proof.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}
origin['ownership'] = {'vm': plan['vm'], 'compositor': plan['compositor'], 'processes': plan['processes']}
save('provenance.json', origin)
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_app_smoke.py b/libs/cua-driver/hyprland-plugin/proofs/production_app_smoke.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_app_smoke.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_app_smoke.py
index 9c812d3570..af103fe1c8 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_app_smoke.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_app_smoke.py
@@ -21,6 +21,7 @@ import time
import xml.etree.ElementTree as ET
import zipfile
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_mcp import DirectMCP
@@ -226,7 +227,7 @@ def provenance(args, app_profile=None):
save_json(args.evidence, 'plugin-enabled-option.json', enabled)
require_enabled_plugin(enabled)
files = {'driver': args.driver, 'plugin': plugin,
- **{name: Path(__file__).with_name(name) for name in
+ **{name: harness_file(name) for name in
('production_app_smoke.py', 'production_mcp.py', 'driver_input_live.py')}}
return {**product, 'harness': harness, 'artifact': artifact,
'source_versions': {
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_cancel_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_cancel_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_cancel_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_cancel_proof.py
index 4aff96f04a..729b8f25b0 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_cancel_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_cancel_proof.py
@@ -5,6 +5,7 @@ apart from TRACE_START/TRACE_STOP. Kill one exact owned runtime only after fresh
telemetry proves two active drags; preserve unknown delivery without replay.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
from concurrent.futures import ThreadPoolExecutor
import hashlib
@@ -493,7 +494,7 @@ def run(args):
'cancellation requires continuous v3 trace'
origin = provenance(args, plan)
for name in ('production_cancel_proof.py', 'production_cancel_proof_test.py', 'proof_fixtures.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}
save('provenance.json', origin)
def launch(name):
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_desktop_fault_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_desktop_fault_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_desktop_fault_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_desktop_fault_proof.py
index 64e85f40d6..a0ed576e8f 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_desktop_fault_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_desktop_fault_proof.py
@@ -31,6 +31,7 @@ DPMS and lock are deliberately unsupported here. Portable tests prepare
this proof; only execution on the exact native candidate can certify a row.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
from concurrent.futures import ThreadPoolExecutor
from contextlib import contextmanager
@@ -666,7 +667,7 @@ def run(args):
for name in ('production_desktop_fault_proof.py', 'production_desktop_fault_proof_test.py', 'proof_fixtures.py',
'production_geometry_fault_proof.py', 'production_cancel_proof.py',
'input_config_toggle.py', 'desktop_faults.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': digest(path.read_bytes())}
save('provenance.json', origin)
fault = ConfigFault(plan, args.evidence)
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_geometry_fault_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_geometry_fault_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_geometry_fault_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_geometry_fault_proof.py
index 53e8818849..258b5ded1e 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_geometry_fault_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_geometry_fault_proof.py
@@ -18,6 +18,7 @@ isolation, and a freshly grounded new-runtime recovery. Portable tests are
synthetic orchestration evidence, not native or physical-hardware proof.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
from concurrent.futures import ThreadPoolExecutor
import hashlib
@@ -320,7 +321,7 @@ def run(args):
origin = provenance(args, plan)
for name in ('production_geometry_fault_proof.py', 'production_geometry_fault_proof_test.py', 'proof_fixtures.py',
'production_cancel_proof.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}
save('provenance.json', origin)
def launch(name):
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_handshake_probe.py b/libs/cua-driver/hyprland-plugin/proofs/production_handshake_probe.py
similarity index 100%
rename from libs/cua-driver/hyprland-plugin/tests/production_handshake_probe.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_handshake_probe.py
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_idle_reconnect_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_idle_reconnect_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_idle_reconnect_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_idle_reconnect_proof.py
index 19bd80511b..fac45eeefa 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_idle_reconnect_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_idle_reconnect_proof.py
@@ -8,6 +8,7 @@ Neither a primary grab nor a trace spans the real 60-second input-peer expiry.
No transport reset, test input packet, timeout override, or action retry is used.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
import hashlib
import json
@@ -290,7 +291,7 @@ def run(args):
origin = provenance(args, plan)
for name in ('production_idle_reconnect_proof.py', 'production_idle_reconnect_proof_test.py', 'proof_fixtures.py',
'production_cancel_proof.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}
save('provenance.json', origin)
spec = plan['agents'][0]
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_lock_refusal_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_lock_refusal_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_lock_refusal_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_lock_refusal_proof.py
index 67d0156810..d190ae936e 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_lock_refusal_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_lock_refusal_proof.py
@@ -18,6 +18,7 @@ No product wake/unlock policy, replay, source fixture edit, or native setup.
Portable tests are orchestration checks, never native certification.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
import hashlib
import json
@@ -380,7 +381,7 @@ def run(args):
'session_lock_fixture.c',
'production_session_fault_proof.py', 'production_desktop_fault_proof.py',
'desktop_faults.py', 'production_cancel_proof.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}
origin['lock_fixture'] = plan['lock_fixture']
save('provenance.json', origin)
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_mcp.py b/libs/cua-driver/hyprland-plugin/proofs/production_mcp.py
similarity index 98%
rename from libs/cua-driver/hyprland-plugin/tests/production_mcp.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_mcp.py
index 2c0ee18150..e547567b1c 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_mcp.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_mcp.py
@@ -3,6 +3,7 @@ import os
from pathlib import Path
import subprocess
+import harness_paths # noqa: F401 Puts tests/ helpers on sys.path.
from driver_input_live import MCP
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_pointer_grounding.py b/libs/cua-driver/hyprland-plugin/proofs/production_pointer_grounding.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_pointer_grounding.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_pointer_grounding.py
index 39a05b4398..207a693bd1 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_pointer_grounding.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_pointer_grounding.py
@@ -7,6 +7,7 @@ These helpers inspect synthetic documents, not arbitrary application content.
import math
import re
+import harness_paths # noqa: F401 Puts tests/ helpers on sys.path.
from production_app_smoke import GroundingUnavailable, calc_formula_selection, rows
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_policy_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_policy_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_policy_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_policy_proof.py
index 65334295ce..6c2aabd781 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_policy_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_policy_proof.py
@@ -28,6 +28,7 @@ boundary, not cached authorization, concurrency, hostile same-user isolation,
managed deployment/immutability, or the complete desktop certification matrix.
"""
import argparse
+import harness_paths # noqa: F401 Puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
import base64
import hashlib
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_primary_conflict_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_primary_conflict_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_primary_conflict_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_primary_conflict_proof.py
index 39d6432e61..7908ad1fbd 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_primary_conflict_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_primary_conflict_proof.py
@@ -26,6 +26,7 @@ continuous isolation across setup are explicitly UNPROVEN by this narrow cell.
Portable tests are preparation only; native execution is a separate gate.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
import hashlib
import json
@@ -292,7 +293,7 @@ def run(args):
for name in (Path(__file__).name, 'production_primary_conflict_proof_test.py', 'proof_fixtures.py',
'desktop_faults.py', 'production_cancel_proof.py',
'production_desktop_fault_proof.py', 'production_geometry_fault_proof.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}
origin['ownership'] = {'vm': plan['vm'], 'compositor': plan['compositor'], 'processes': plan['processes']}
save('provenance.json', origin)
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_realapp_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_realapp_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_realapp_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_realapp_proof.py
index 2ae82a2aed..546c419676 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_realapp_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_realapp_proof.py
@@ -19,6 +19,7 @@ import time
import xml.etree.ElementTree as ET
import zipfile
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from driver_input_live import state, wait_for, wm
from primary_trace import Trace, analyze
from primary_observer import PrimaryObserver, verify_negative_control as verify_primary_control
@@ -553,7 +554,7 @@ def provenance(args, plan):
files = {'primary-grab': args.primary_grab}
for name in ('production_realapp_proof.py', 'production_mcp.py', 'driver_input_live.py',
'realapp_proof.py', 'primary_trace.py', 'production_pointer_grounding.py'):
- files[name] = Path(__file__).with_name(name)
+ files[name] = harness_file(name)
windows = json.loads(subprocess.check_output(
['hyprctl', '-j', 'clients'], text=True, timeout=10))
identities = {}
@@ -571,7 +572,7 @@ def provenance(args, plan):
origin['app_processes'] = identities
if getattr(args, 'primary_observer', None):
for name in ('primary_observer.py', 'primary_observer_fixture.py'):
- origin['files'][name] = digest(Path(__file__).with_name(name))
+ origin['files'][name] = digest(harness_file(name))
return origin
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_session_fault_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_session_fault_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_session_fault_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_session_fault_proof.py
index d130f57cf7..3cf6f88687 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_session_fault_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_session_fault_proof.py
@@ -24,6 +24,7 @@ need a separately qualified oracle. A lock request fails preflight, never
becomes a skipped/passing row. Portable tests are not native certification.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
from concurrent.futures import ThreadPoolExecutor
from contextlib import contextmanager
@@ -579,7 +580,7 @@ def run(args):
for name in ('production_session_fault_proof.py', 'production_session_fault_proof_test.py', 'proof_fixtures.py',
'production_desktop_fault_proof.py', 'production_geometry_fault_proof.py',
'production_cancel_proof.py', 'desktop_faults.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}
save('provenance.json', origin)
spec = plan['agents'][0]
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_target_lifetime_proof.py b/libs/cua-driver/hyprland-plugin/proofs/production_target_lifetime_proof.py
similarity index 99%
rename from libs/cua-driver/hyprland-plugin/tests/production_target_lifetime_proof.py
rename to libs/cua-driver/hyprland-plugin/proofs/production_target_lifetime_proof.py
index a905138312..c65fcdc5a2 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_target_lifetime_proof.py
+++ b/libs/cua-driver/hyprland-plugin/proofs/production_target_lifetime_proof.py
@@ -33,6 +33,7 @@ gate requires all reservations released before recovery; input authority and
held input must be gone in every cleanup sample.
"""
import argparse
+from harness_paths import harness_file # Also puts tests/ helpers on sys.path.
from production_app_smoke import add_provenance_arguments
from concurrent.futures import ThreadPoolExecutor
import hashlib
@@ -475,7 +476,7 @@ def run(args):
origin['ownership'] = {key: plan[key] for key in ('vm', 'compositor', 'processes', 'recovery')}
for name in ('production_target_lifetime_proof.py', 'production_target_lifetime_proof_test.py',
'proof_fixtures.py'):
- path = Path(__file__).with_name(name)
+ path = harness_file(name)
origin['files'][name] = {'path': str(path.resolve()), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}
save('provenance.json', origin)
for name, spec in (('target', fault.spec), ('replacement', fault.fresh)):
diff --git a/libs/cua-driver/hyprland-plugin/protocol/host-authority-boundary.md b/libs/cua-driver/hyprland-plugin/protocol/host-authority-boundary.md
index ba28879a49..56d8cbded9 100644
--- a/libs/cua-driver/hyprland-plugin/protocol/host-authority-boundary.md
+++ b/libs/cua-driver/hyprland-plugin/protocol/host-authority-boundary.md
@@ -86,7 +86,7 @@ continuous foreground-isolation evidence. The adapter tests additionally
cover distinct protocol negotiation, exact operation binding, compositor lane
allocation, and owned-session cleanup.
-The [production proof harness](../tests/production-proof.md) uses two direct
+The [production proof harness](../docs/production-proof.md) uses two direct
Driver MCP processes with no signer. Native acceptance still requires saved
application outputs, continuous primary-input and held-state oracles, a
warp-and-return negative control, cancellation/fault coverage, and exact-source
diff --git a/libs/cua-driver/hyprland-plugin/tests/README.md b/libs/cua-driver/hyprland-plugin/tests/README.md
index 5891ce430a..1910bd08ba 100644
--- a/libs/cua-driver/hyprland-plugin/tests/README.md
+++ b/libs/cua-driver/hyprland-plugin/tests/README.md
@@ -5,8 +5,8 @@ Tests of that build must fail closed; they must not enable mutation merely to
exercise a path. The separately selected, nonshipping
[input experiment](../protocol/input-experiment.md) has an explicit build flag
and external test-operator grant. Its
-[VM validation record](input-validation.md) is not production acceptance.
-The [concurrent real-app follow-up](realapp-validation.md) records two-lane
+[VM validation record](../docs/input-validation.md) is not production acceptance.
+The [concurrent real-app follow-up](../docs/realapp-validation.md) records two-lane
Calc/Inkscape tasks, moving-primary measurement, a warp-and-return negative
control, per-lane Cancel, and global Stop on its exact tested candidate.
@@ -128,7 +128,7 @@ recovery, restart-required lifetime markers, and inode-aware socket cleanup.
These mock/unit checks do not establish native seat delivery, keymap refresh,
brief desktop-transition revocation, or real multi-process lane behavior.
-The [native reliability record](lifecycle-validation.md) identifies the tested
+The [native reliability record](../docs/lifecycle-validation.md) identifies the tested
source, measured results, recordings, setup failures, and remaining limits.
Run `input_lifecycle_live.py` only in a disposable Fleet guest with the
@@ -262,7 +262,7 @@ with synthetic data; it is not native retirement evidence.
## Desktop-state fault controls
-The [native desktop-state validation record](desktop-state-validation.md)
+The [native desktop-state validation record](../docs/desktop-state-validation.md)
contains five matched fault/control pairs, artifact identities, measured
cancellation and cleanup times, retained failures, and limits.
@@ -411,14 +411,22 @@ must not appear in the plugin capability result.
## Portable harness test ownership
+The production proof harnesses live in [`../proofs`](../proofs), and their
+reviewed procedures and validation records in [`../docs`](../docs). This
+directory keeps their `*_test.py` suites, the live runners, the helpers both
+share, and the compiled fixtures. A test imports `proofs_path` before any
+proof; a proof imports `harness_paths` before any helper in this directory.
+
The `*_test.py` suites run in hosted CI with every native boundary mocked. Keep
them cheap to trust:
- Put shared plans, trace pages, status builders, and UI snapshots in
`proof_fixtures.py`. Never import one `*_test.py` from another or borrow a
`TestCase` as a helper. Proofs that hash their own tests into
- `provenance.json` also hash `proof_fixtures.py`; update those lists when a
- test file is added, renamed, or removed.
+ `provenance.json` also hash `proof_fixtures.py`. They resolve each hashed
+ name through `harness_paths.harness_file`, which requires the name to exist
+ in exactly one of the two directories. Update those lists when a file is
+ added, renamed, moved, or removed.
- Test a shared helper once, at its owner: `trace_interval` in
`production_realapp_proof_test.py`, `primary_trace.analyze` in
`primary_trace_test.py`, `validate_app_profile` and
diff --git a/libs/cua-driver/hyprland-plugin/tests/primary_hover_fixture_test.py b/libs/cua-driver/hyprland-plugin/tests/primary_hover_fixture_test.py
index 7370cd2fe3..f730b7b9c6 100644
--- a/libs/cua-driver/hyprland-plugin/tests/primary_hover_fixture_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/primary_hover_fixture_test.py
@@ -7,6 +7,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_active_primary_proof as proof
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_active_lock_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_active_lock_proof_test.py
index 0fbac940f5..1dfb32a7f6 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_active_lock_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_active_lock_proof_test.py
@@ -10,6 +10,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_active_lock_proof as proof
import production_lock_refusal_proof as settled
from proof_fixtures import ACTIVE, CANCEL, PARTIAL, ink, inkscape_profile, lock_plan, motion_gate, retained_status, status, trace
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_active_primary_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_active_primary_proof_test.py
index 4db568c186..ac15058f8f 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_active_primary_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_active_primary_proof_test.py
@@ -8,6 +8,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_active_primary_proof as proof
from proof_fixtures import ACTIVE, CANCEL, PARTIAL, inkscape_profile, primary_conflict_plan as settled_plan, status, trace
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_agent_conflict_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_agent_conflict_proof_test.py
index 9570fcae8e..36c1914819 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_agent_conflict_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_agent_conflict_proof_test.py
@@ -8,6 +8,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_agent_conflict_proof as proof
from proof_fixtures import BOUNDS, DELIVERED, VM, client, conflict_trace as trace, identity, status
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_app_profile_test.py b/libs/cua-driver/hyprland-plugin/tests/production_app_profile_test.py
index 5da5c4eeb5..d4dd832c08 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_app_profile_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_app_profile_test.py
@@ -7,6 +7,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
from production_app_smoke import (PACKAGES, artifact_identity, create_documents,
digest, package_owner, profile_packages, source_identities)
from production_realapp_proof import (capacity_reservations, inkscape_client_identity,
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_app_smoke_test.py b/libs/cua-driver/hyprland-plugin/tests/production_app_smoke_test.py
index 768411084b..50ee12da2a 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_app_smoke_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_app_smoke_test.py
@@ -7,6 +7,7 @@ import unittest
from unittest.mock import Mock, patch
import zipfile
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
from production_app_smoke import (
GroundingUnavailable, check_delivery, create_documents, ground, input_step,
kernel_file_identity, launch_arguments, mapped_plugin, package_owner,
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_cancel_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_cancel_proof_test.py
index a9ece4df91..13531a41ee 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_cancel_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_cancel_proof_test.py
@@ -12,6 +12,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
from production_cancel_proof import (
GROUNDING_DISPATCH_RESERVE_NS, MAX_GROUNDING_AGE_NS, POINTER_SNAPSHOT_LIMITS, PROFILE,
active_drags, call_drag, close_owned, grounded_snapshot,
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_desktop_fault_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_desktop_fault_proof_test.py
index ea7f7ee052..393f157a46 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_desktop_fault_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_desktop_fault_proof_test.py
@@ -11,6 +11,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_desktop_fault_proof as proof
from proof_fixtures import ACTIVE, BOUNDS, CANCEL, action, client, geometry_plan, inkscape_profile, trace
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_geometry_fault_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_geometry_fault_proof_test.py
index df43242e83..9e40762222 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_geometry_fault_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_geometry_fault_proof_test.py
@@ -8,6 +8,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_geometry_fault_proof as proof
from proof_fixtures import (ACTIVE, BOUNDS, CANCEL, DELIVERED, PARTIAL, action, client, geometry_plan as plan,
inkscape_profile, trace)
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_handshake_probe_test.py b/libs/cua-driver/hyprland-plugin/tests/production_handshake_probe_test.py
index 8f81251569..62c1b00471 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_handshake_probe_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_handshake_probe_test.py
@@ -11,6 +11,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
from production_handshake_probe import (
CAPACITY, CLOSED, ENDPOINTS, NativeRuntime, ProbeFailure, preflight,
probe_endpoint, run, validate_path, validate_reply,
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_idle_reconnect_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_idle_reconnect_proof_test.py
index 0d097d6864..83cb13ce11 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_idle_reconnect_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_idle_reconnect_proof_test.py
@@ -8,6 +8,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_idle_reconnect_proof as proof
from proof_fixtures import inkscape_profile
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_lock_refusal_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_lock_refusal_proof_test.py
index 35c37ee4ef..88d3b778d8 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_lock_refusal_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_lock_refusal_proof_test.py
@@ -11,6 +11,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_lock_refusal_proof as proof
from proof_fixtures import REFUSED, inkscape_profile, lock_plan as plan, retained_status, status, trace
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_mcp_test.py b/libs/cua-driver/hyprland-plugin/tests/production_mcp_test.py
new file mode 100644
index 0000000000..0bc46bb9eb
--- /dev/null
+++ b/libs/cua-driver/hyprland-plugin/tests/production_mcp_test.py
@@ -0,0 +1,94 @@
+"""Direct Driver MCP runtime contracts shared by every production proof."""
+from pathlib import Path
+import subprocess
+import tempfile
+from types import SimpleNamespace
+import unittest
+from unittest.mock import Mock, patch
+
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
+from production_mcp import DirectMCP, assert_distinct_runtimes, profile_environment, stop_process
+
+
+class RuntimeTests(unittest.TestCase):
+ def test_profiles_keep_managed_policy_and_remove_inherited_approval(self):
+ inherited = {'CUA_DRIVER_PERMISSION_MODE': 'unrestricted',
+ 'CUA_DRIVER_DANGEROUSLY_BYPASS_APPROVALS': '1',
+ 'CUA_DRIVER_SESSION_POLICY_FILE': 'old-manifest',
+ 'CUA_DRIVER_CAPABILITY_MANIFEST_APPROVED': '1',
+ 'CUA_DRIVER_MANAGED_POLICY_FILE': 'managed.yaml'}
+ env = profile_environment({'mode': 'standard'}, inherited)
+ self.assertEqual(env, {'CUA_DRIVER_PERMISSION_MODE': 'standard',
+ 'CUA_DRIVER_MANAGED_POLICY_FILE': 'managed.yaml'})
+
+ def test_profile_matrix_uses_normal_environment_contract(self):
+ with tempfile.NamedTemporaryFile() as manifest:
+ for mode in ('standard', 'bounded', 'unrestricted'):
+ profile = {'mode': mode, 'manifest': manifest.name, 'approve_manifest': True,
+ 'acknowledge_unrestricted': True}
+ env = profile_environment(profile, {})
+ self.assertEqual(env['CUA_DRIVER_PERMISSION_MODE'], mode)
+ self.assertEqual(env['CUA_DRIVER_CAPABILITY_MANIFEST_APPROVED'], '1')
+ for mode in ('standard', 'unrestricted'):
+ profile_environment({'mode': mode, 'acknowledge_unrestricted': True}, {})
+ for profile in ({'mode': 'bounded'}, {'mode': 'unrestricted'},
+ {'mode': 'standard', 'manifest': 'unreviewed.yaml'}):
+ with self.assertRaises(AssertionError):
+ profile_environment(profile, {})
+
+ def test_distinct_labels_are_not_process_ownership(self):
+ def client(pid):
+ return SimpleNamespace(process=Mock(pid=pid, poll=Mock(return_value=None)))
+ self.assertEqual(assert_distinct_runtimes([client(1), client(2)]), [1, 2])
+ with self.assertRaises(AssertionError):
+ assert_distinct_runtimes([client(1), client(1)])
+
+ def test_owned_process_is_reaped_after_terminate_timeout(self):
+ process = Mock()
+ process.poll.return_value = None
+ process.wait.side_effect = [subprocess.TimeoutExpired('child', 5),
+ subprocess.TimeoutExpired('child', 5), 0]
+ stop_process(process)
+ process.stdin.close.assert_called_once()
+ process.terminate.assert_called_once()
+ process.kill.assert_called_once()
+ self.assertEqual(process.wait.call_count, 3)
+
+ def test_initialization_failure_closes_owned_process(self):
+ process = Mock()
+ process.poll.return_value = 0
+ with tempfile.TemporaryDirectory() as directory, \
+ patch('production_mcp.subprocess.Popen', return_value=process) as spawn, \
+ patch('driver_input_live.MCP.rpc', side_effect=TimeoutError('unknown')):
+ with self.assertRaises(TimeoutError):
+ DirectMCP(Path('/synthetic/driver'), Path(directory), {'mode': 'standard'})
+ self.assertEqual(spawn.call_args.args[0], ['/synthetic/driver', 'mcp', '--direct'])
+ process.wait.assert_called_once()
+
+ def test_timeout_poison_prevents_replay(self):
+ mcp = DirectMCP.__new__(DirectMCP)
+ mcp.failed = mcp.closed = False
+ with patch('driver_input_live.MCP.rpc', side_effect=TimeoutError('unknown')) as rpc:
+ with self.assertRaises(TimeoutError):
+ mcp.rpc('tools/call', {})
+ with self.assertRaisesRegex(RuntimeError, 'do not replay'):
+ mcp.rpc('tools/call', {})
+ rpc.assert_called_once()
+
+ def test_unrestricted_direct_launch_uses_environment_not_serve_only_flags(self):
+ process = Mock()
+ process.poll.return_value = 0
+ with tempfile.TemporaryDirectory() as directory, \
+ patch('production_mcp.subprocess.Popen', return_value=process) as spawn, \
+ patch('driver_input_live.MCP.rpc', return_value={}):
+ mcp = DirectMCP(Path('/synthetic/driver'), Path(directory),
+ {'mode': 'unrestricted', 'acknowledge_unrestricted': True})
+ mcp.close()
+ self.assertEqual(spawn.call_args.args[0], [
+ '/synthetic/driver', 'mcp', '--direct'])
+ self.assertEqual(spawn.call_args.kwargs['env']['CUA_DRIVER_PERMISSION_MODE'], 'unrestricted')
+ self.assertEqual(spawn.call_args.kwargs['env']['CUA_DRIVER_DANGEROUSLY_BYPASS_APPROVALS'], '1')
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_pointer_grounding_test.py b/libs/cua-driver/hyprland-plugin/tests/production_pointer_grounding_test.py
index ba8fe567a3..05c13cadd3 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_pointer_grounding_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_pointer_grounding_test.py
@@ -2,6 +2,7 @@
import copy
import unittest
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_pointer_grounding as pointer
from proof_fixtures import START, STOP, Image, app_snapshot as snapshot, ink, primary_trace as trace
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_policy_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_policy_proof_test.py
index 13386c4553..17b3316932 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_policy_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_policy_proof_test.py
@@ -9,6 +9,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
from production_app_smoke import GroundingUnavailable, create_documents
from proof_fixtures import CALC, INKSCAPE, INKSCAPE_SELECTED, changed_ods
from production_policy_proof import (
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_primary_conflict_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_primary_conflict_proof_test.py
index a7152b576b..fc2bf007d9 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_primary_conflict_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_primary_conflict_proof_test.py
@@ -8,6 +8,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_primary_conflict_proof as proof
from proof_fixtures import (BOUNDS, DELIVERED, client, conflict_trace as trace, identity, inkscape_profile,
primary_conflict_plan as plan, status)
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_primary_observer_test.py b/libs/cua-driver/hyprland-plugin/tests/production_primary_observer_test.py
index 36713464f7..630807db52 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_primary_observer_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_primary_observer_test.py
@@ -15,6 +15,7 @@ import unittest
from unittest.mock import Mock, patch
from types import SimpleNamespace
+import proofs_path
from primary_observer import (MAX_BYTES, MAX_INTERVAL_NS, PrimaryObserver, analyze, journal_rows,
primary_wire_state, sync_barrier, verify_negative_control, wire_rows)
from production_realapp_proof import run
@@ -263,7 +264,7 @@ class ObserverAnalysisTests(unittest.TestCase):
class ObserverFileTests(unittest.TestCase):
def test_optimized_fixture_execution_is_refused(self):
- fixture = Path(__file__).with_name('primary_observer_fixture.py')
+ fixture = proofs_path.PROOFS / 'primary_observer_fixture.py'
optimized = subprocess.run([sys.executable, '-O', str(fixture), '--help'], text=True,
capture_output=True, timeout=5)
self.assertNotEqual(optimized.returncode, 0)
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_realapp_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_realapp_proof_test.py
index eccb3a1802..9bc9f37678 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_realapp_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_realapp_proof_test.py
@@ -3,7 +3,6 @@ from contextlib import ExitStack
import io
import json
from pathlib import Path
-import subprocess
import tempfile
import threading
import time
@@ -12,7 +11,7 @@ import unittest
from unittest.mock import Mock, patch
import zipfile
-from production_mcp import DirectMCP, assert_distinct_runtimes, profile_environment, stop_process
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
from production_realapp_proof import (SMOKE_STEPS, app_process_identity, provenance,
assert_no_dispatch, assert_primary_state, check_response,
capacity_lane, verify_capacity, check_manifest_refusal,
@@ -1230,85 +1229,7 @@ class MovingPrimaryTests(unittest.TestCase):
self.assertFalse(workers[0].is_alive())
-class RuntimeTests(unittest.TestCase):
- def test_profiles_keep_managed_policy_and_remove_inherited_approval(self):
- inherited = {'CUA_DRIVER_PERMISSION_MODE': 'unrestricted',
- 'CUA_DRIVER_DANGEROUSLY_BYPASS_APPROVALS': '1',
- 'CUA_DRIVER_SESSION_POLICY_FILE': 'old-manifest',
- 'CUA_DRIVER_CAPABILITY_MANIFEST_APPROVED': '1',
- 'CUA_DRIVER_MANAGED_POLICY_FILE': 'managed.yaml'}
- env = profile_environment({'mode': 'standard'}, inherited)
- self.assertEqual(env, {'CUA_DRIVER_PERMISSION_MODE': 'standard',
- 'CUA_DRIVER_MANAGED_POLICY_FILE': 'managed.yaml'})
-
- def test_profile_matrix_uses_normal_environment_contract(self):
- with tempfile.NamedTemporaryFile() as manifest:
- for mode in ('standard', 'bounded', 'unrestricted'):
- profile = {'mode': mode, 'manifest': manifest.name, 'approve_manifest': True,
- 'acknowledge_unrestricted': True}
- env = profile_environment(profile, {})
- self.assertEqual(env['CUA_DRIVER_PERMISSION_MODE'], mode)
- self.assertEqual(env['CUA_DRIVER_CAPABILITY_MANIFEST_APPROVED'], '1')
- for mode in ('standard', 'unrestricted'):
- profile_environment({'mode': mode, 'acknowledge_unrestricted': True}, {})
- for profile in ({'mode': 'bounded'}, {'mode': 'unrestricted'},
- {'mode': 'standard', 'manifest': 'unreviewed.yaml'}):
- with self.assertRaises(AssertionError):
- profile_environment(profile, {})
-
- def test_distinct_labels_are_not_process_ownership(self):
- def client(pid):
- return SimpleNamespace(process=Mock(pid=pid, poll=Mock(return_value=None)))
- self.assertEqual(assert_distinct_runtimes([client(1), client(2)]), [1, 2])
- with self.assertRaises(AssertionError):
- assert_distinct_runtimes([client(1), client(1)])
-
- def test_owned_process_is_reaped_after_terminate_timeout(self):
- process = Mock()
- process.poll.return_value = None
- process.wait.side_effect = [subprocess.TimeoutExpired('child', 5),
- subprocess.TimeoutExpired('child', 5), 0]
- stop_process(process)
- process.stdin.close.assert_called_once()
- process.terminate.assert_called_once()
- process.kill.assert_called_once()
- self.assertEqual(process.wait.call_count, 3)
-
- def test_initialization_failure_closes_owned_process(self):
- process = Mock()
- process.poll.return_value = 0
- with tempfile.TemporaryDirectory() as directory, \
- patch('production_mcp.subprocess.Popen', return_value=process) as spawn, \
- patch('driver_input_live.MCP.rpc', side_effect=TimeoutError('unknown')):
- with self.assertRaises(TimeoutError):
- DirectMCP(Path('/synthetic/driver'), Path(directory), {'mode': 'standard'})
- self.assertEqual(spawn.call_args.args[0], ['/synthetic/driver', 'mcp', '--direct'])
- process.wait.assert_called_once()
-
- def test_timeout_poison_prevents_replay(self):
- mcp = DirectMCP.__new__(DirectMCP)
- mcp.failed = mcp.closed = False
- with patch('driver_input_live.MCP.rpc', side_effect=TimeoutError('unknown')) as rpc:
- with self.assertRaises(TimeoutError):
- mcp.rpc('tools/call', {})
- with self.assertRaisesRegex(RuntimeError, 'do not replay'):
- mcp.rpc('tools/call', {})
- rpc.assert_called_once()
-
- def test_unrestricted_direct_launch_uses_environment_not_serve_only_flags(self):
- process = Mock()
- process.poll.return_value = 0
- with tempfile.TemporaryDirectory() as directory, \
- patch('production_mcp.subprocess.Popen', return_value=process) as spawn, \
- patch('driver_input_live.MCP.rpc', return_value={}):
- mcp = DirectMCP(Path('/synthetic/driver'), Path(directory),
- {'mode': 'unrestricted', 'acknowledge_unrestricted': True})
- mcp.close()
- self.assertEqual(spawn.call_args.args[0], [
- '/synthetic/driver', 'mcp', '--direct'])
- self.assertEqual(spawn.call_args.kwargs['env']['CUA_DRIVER_PERMISSION_MODE'], 'unrestricted')
- self.assertEqual(spawn.call_args.kwargs['env']['CUA_DRIVER_DANGEROUSLY_BYPASS_APPROVALS'], '1')
-
+class RunnerGateTests(unittest.TestCase):
def test_unprovable_plans_fail_before_provenance_or_any_process(self):
cases = (
('policy_cache requires continuous trace', policy_cache_plan(), {}, {'policy_cache': {'result': 'unproven'}}),
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_session_fault_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_session_fault_proof_test.py
index 4fe15f647c..e94d43bf33 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_session_fault_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_session_fault_proof_test.py
@@ -10,6 +10,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_session_fault_proof as proof
from proof_fixtures import (ACTIVE, CANCEL, MONITOR, PARTIAL, REFUSED, identity, ink, inkscape_profile, motion_gate,
retained_status, session_plan as plan, status, trace)
diff --git a/libs/cua-driver/hyprland-plugin/tests/production_target_lifetime_proof_test.py b/libs/cua-driver/hyprland-plugin/tests/production_target_lifetime_proof_test.py
index 27ce2ecd07..4bbf9e1709 100644
--- a/libs/cua-driver/hyprland-plugin/tests/production_target_lifetime_proof_test.py
+++ b/libs/cua-driver/hyprland-plugin/tests/production_target_lifetime_proof_test.py
@@ -11,6 +11,7 @@ from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
+import proofs_path # noqa: F401 Puts ../proofs on sys.path.
import production_target_lifetime_proof as proof
from proof_fixtures import (ACTIVE, DELIVERED, PARTIAL, assert_rejects, identity, inkscape_profile,
primary_conflict_plan as base_plan, status, trace)
diff --git a/libs/cua-driver/hyprland-plugin/tests/proofs_path.py b/libs/cua-driver/hyprland-plugin/tests/proofs_path.py
new file mode 100644
index 0000000000..e3e523d26d
--- /dev/null
+++ b/libs/cua-driver/hyprland-plugin/tests/proofs_path.py
@@ -0,0 +1,11 @@
+"""Put the sibling ``proofs`` directory on ``sys.path`` for the portable tests.
+
+Import this before any proof harness module. It is not a test module.
+"""
+from pathlib import Path
+import sys
+
+PROOFS = Path(__file__).resolve().parents[1] / 'proofs'
+
+if str(PROOFS) not in sys.path:
+ sys.path.insert(0, str(PROOFS))
diff --git a/rfcs/3550-hyprland-isolated-input.md b/rfcs/3550-hyprland-isolated-input.md
index abf38ddfb9..aa9766482b 100644
--- a/rfcs/3550-hyprland-isolated-input.md
+++ b/rfcs/3550-hyprland-isolated-input.md
@@ -591,7 +591,7 @@ cleanup. Retain focused proof of the supported operations and two-lane behavior
being promoted. An uninstrumented smoke without plugin transport attribution
cannot prove continuous isolation, and an all-refusal canonical result cannot
replace positive delivery evidence. The
-[production proof guide](../libs/cua-driver/hyprland-plugin/tests/production-proof.md)
+[production proof guide](../libs/cua-driver/hyprland-plugin/docs/production-proof.md)
documents the bounded plans and their limits.
Three whole repetitions of the long Python Calc/Inkscape plan, including 34