Sussex Stable Session Workflow
This page freezes the current best-known Sussex operator path after the March 2026 Quest, task-pinning, and GUI verification passes. The goal is to reduce run-to-run variability by turning the verified findings into one fixed operator workflow with explicit hazards and a concrete implementation backlog.
Stable Operator Rules
- Use ADB and
hzdbfor connectivity, install, device-profile setup, screenshot capture, and verified study commands. - Do not use GUI-driven or shell-injected sleep and wake as the normal participant handoff path. Use the physical headset power button for between-operator and between-participant sleep and wake transitions.
- Use the direct
prox_closekeep-awake override through Sussex launch and the pre-session guide on this build. Restore normal wear-sensor behavior withautomation_disablewhen the live session is done. - Treat the raw Quest readback literally:
Virtual proximity state: CLOSEmeans the keep-awake override is active.Virtual proximity state: DISABLEDmeans normal wear-sensor behavior is active again.
- Wake the headset before launch. Do not launch Sussex while the headset reports asleep; on the current April 2026 Meta OS build that can leave the runtime running in a black or limbo scene that may require a headset restart.
- Do not use remote GUI wake/sleep controls for Sussex. Manual headset wake/sleep is the only supported operator path for now.
- Do not launch until the right controller is awake and tracked.
- Do not treat the launch path as a reliable right-controller Meta / menu button lockout on the current April 2026 Meta OS build. Treat it as best-effort task pinning plus screenshot-confirmed foreground only.
- Do not allow an experimenter's bench calibration to survive into the
participant run. Calibration intentionally performed in the
Experiment Sessionwindow beforeStart Recordingis participant calibration and must survive the recording start command. - Keep the Sussex APK running across participants unless a real failure requires a runtime stop or restart.
Fixed Session Workflow
1. Pre-session readiness with USB attached
- Connect the headset by USB to establish a trusted ADB path.
- Probe USB, enable Wi-Fi ADB, and switch the shell onto a working Wi-Fi ADB endpoint.
- Apply the pinned Sussex device profile.
- When implemented and verified, apply the pinned Sussex brightness and volume values.
- Verify that the staged Sussex APK matches the pinned hash.
- Verify that the installed headset APK matches the pinned hash. Install or update it if it does not.
- Verify that the headset software version, build id, and display id still match the recorded verified Sussex baseline.
- Verify that headset battery and right-controller battery both meet the study threshold.
- Verify that the right controller is connected and active.
- Show a single study-ready state only after all checks pass.
Important: USB can stay attached for setup, but the readiness state should explicitly prefer a live Wi-Fi ADB transport before continuing.
2. Boundary plus runtime launch by the experimenter
- Disconnect USB.
- The experimenter puts on the headset in the subject position.
- Create or confirm the Guardian boundary.
- Wake the headset if needed. The launcher should read
Wake the headset to enable launchinguntil the headset is awake. - Disable proximity before launch. The current launch path also auto-arms the
keep-awake override, but the guide should still show its state explicitly.
Expect
CLOSEwhile the override is active andDISABLEDafter you restore normal proximity. - Wake the right controller if needed and verify it is active before launch.
- Launch Sussex from the GUI.
- If Guardian or another Meta visual blocker is still visible, clear it before launching.
- Do not use controller Meta / menu-button behavior as the launch-success signal on this build.
- Confirm the visible scene on-headset. If shell focus and the visible scene disagree, use one Quest screenshot as the source of truth.
3. Bench verification before subject handoff
- Verify the Unity command path by sending
Particles Off,Particles On, andRecenter. - Verify that the study LSL inlet is connected and visible in the GUI.
- Keep the headset on-face or leave the keep-awake proximity override active while probing. Otherwise the return path can go stale between steps.
- Start controller breath-volume calibration from the GUI.
- Finish calibration and visually confirm that the runtime behaved as expected.
- Send a dedicated
Reset CalibrationGUI command so the experimenter's calibration cannot leak into the participant run. - Send
Particles Off. - Place the headset in the exact starting position for the participant.
- Put the headset to sleep with the physical power button.
4. Participant start
- When the participant is ready, wake the headset with the physical power button.
- Open the dedicated
Experiment Sessionwindow if it is not already open. - Send
Particles On. - Send
Recenter. - Ask the participant to confirm the view.
- Capture one Quest screenshot as an operator-side confirmation.
- Enter the participant number in the
Experiment Sessionwindow. - If the participant number already exists on this Windows machine, show a warning but do not block the run.
- If the run uses controller breathing, start dynamic-axis or fixed-axis
controller calibration from the
Experiment Sessionwindow and wait for the runtime to accept it. - Press
Start Recording. Start Recordingshould:
- stamp participant and session metadata
- reset stale recorder state only, not controller calibration
- preserve the current participant controller calibration
- trigger the headset-side experiment start path
- start companion-side data capture immediately
- Keep the
Experiment Sessionwindow open for the running session.
5. Participant end
- Press
Stop Recordingin theExperiment Sessionwindow. Stop Recordingshould:- stop companion-side data capture
- send the headset-side stop and end command
- pull the Quest-side backup into
device-session-pull - report Quest backup pullback timeout/cancel as a pullback warning while preserving the Windows session folder and stopped recorder metadata
- send
Reset Calibration - send
Particles Off - write final session metadata to disk
- generate
session_review_report.pdf
- The experimenter removes the headset from the participant.
- Put the headset to sleep with the physical power button.
- Return to the participant-number entry state without forcing a runtime stop, so the next participant can reuse the same prepared runtime.
6. Exception path
- If launch or stop reaches only shell-level confirmation, require a Quest screenshot review before proceeding.
- If Guardian, SensorLock, or FocusPlaceholder blockers appear, use the recovery notes and physical power-button path instead of trying to automate around them inside the normal session workflow.
- If the study runtime contract needs new telemetry keys or new calibration, start, or stop commands, implement that in the participant-facing runtime first and then refresh the mirrored Sussex APK here.
Missing Features To Build
Repo-side features in this repo
Fixed workflow state machine in the Sussex shell
- Add explicit phases such as
Setup,Boundary,BenchCheck,ParticipantReady,Running, andWrapUp. - Gate buttons so only the next safe actions are prominent.
- Replace the current loose checklist feel with a derived readiness panel and a current-step banner.
- Add explicit phases such as
Readiness gate and greenlight model
- Compute a single
Ready For RuntimeandReady For Participantstate from:- Wi-Fi ADB connected
- pinned APK hash verified
- pinned device profile active
- verified OS, build, and display baseline match
- headset battery above threshold
- controller battery above threshold
- right controller connected and active
- Keep duplicate detail visible in
Inspect, but keep the main Sussex shell binary: blocked or ready.
- Compute a single
Participant and session controls
- Add a participant-number field in the Sussex shell.
- Warn on duplicate participant numbers found under the local study-data root.
- Add
Start Experiment,End Experiment,Start Calibration, andReset Calibrationcommands and actions to the study shell. - Keep
Particles On,Particles Off,Recenter, andCapture Quest Screenshotvisible as secondary tools, not the main workflow driver.
Brightness and volume device controls
- Extend
IQuestControlServiceandWindowsAdbQuestControlServicewith dedicated brightness and volume setters after device-level write and readback is verified. - Add those values to the pinned Sussex device profile or to a study policy block.
- Do not gate the stable workflow on them until they have live readback coverage and repeatable tests.
- Extend
Companion-side recording service
- Add a dedicated study recorder service instead of overloading
SessionManifestWriter. - Start and stop it from the Sussex shell commands.
- Store one folder per participant session under
the current operator-data root under
...\ViscerealityCompanion\study-data\sussex-university\<participant>\<session-start-utc>\.
- Add a dedicated study recorder service instead of overloading
Session settings snapshot
- Write one immutable settings snapshot per participant run.
- Include:
- participant number
- session start and end timestamps
- study id and app version
- APK hash, package id, and version
- headset OS, build, and display ids
- pinned device profile id and applied values
- brightness and volume values once supported
- active LSL stream name and type
- operator-facing threshold values used by the gate
- Windows machine name and current Quest selector
Recording UX and failure handling
- Show clear
Idle,Armed,Recording,Stopping, andFaultedrecorder states. - If data capture cannot start, block
Start Experiment. - If a duplicate participant id is detected, warn but allow explicit continue.
- If writing fails mid-run, surface a hard failure banner and append an operator log entry.
- Show clear
Tests and harness coverage
- Unit tests for readiness-gate logic, duplicate-id detection, session-folder naming, and data-row formatting.
- Integration tests for recorder start and stop behavior and settings snapshot generation.
- Extend the Sussex verification harness to cover new calibration, reset, start, and end commands once the runtime exposes them.
Runtime-side features in the participant-facing runtime first, then mirror the APK here
New twin commands and control ids
Start CalibrationReset CalibrationStart ExperimentEnd Experiment- Optional explicit
Finish CalibrationorAbort Calibrationif the calibration flow is not fully self-contained
New published telemetry required for recording
- headset position and rotation
- controller position and rotation
- heartbeat packet arrival and value
- coherence value routed from the LSL heartbeat packets
- breathing volume
- sphere-radius progress
- raw sphere radius
- explicit runtime and session state markers for calibration started, calibration completed, experiment started, and experiment ended
Participant and session metadata sink
- The runtime needs a way to receive the participant number and any session id that should be embedded in headset-side outputs or markers.
- If that metadata should be visible in
quest_twin_state, define the key names explicitly.
Telemetry contract stabilization
- Freeze the public key names used by the Sussex shell and recorder before rolling the data pipeline out to real participants.
- Avoid renaming keys between APK drops once recording has begun.
Recommended Data Layout
Use a per-participant folder plus row-oriented long tables, not one wide, evolving CSV. The row shape should stay stable across signals.
Folder shape
<operator-data-root>\study-data\sussex-university\
participant-0007\
20260329T141530Z\
device-session-pull\
session_snapshot.json
session_settings.json
session_events.csv
signals_long.csv
breathing_trace.csv
session_review_report.pdf
quest_screenshot_prestart.png
signals_long.csv
Write one row per fixed companion sampling tick. Do not suppress unchanged values during a run. Recommended columns:
participant_idsession_idrecorded_at_utcsource_timestamp_utclsl_timestamp_secondssourcesignal_groupsignal_namevalue_numericvalue_textunitsequencequest_selector
Minimum signals to record here:
- headset position
x,y,z - headset rotation
qx,qy,qz,qw - controller position
x,y,z - controller rotation
qx,qy,qz,qw - heartbeat packet values
- coherence values carried by those packets
recorded_at_utc should always be the companion write time. When available,
also persist the source-side timestamp separately instead of collapsing
everything into one field.
breathing_trace.csv
Keep the breathing-specific trace separate because it will likely be denser and frequently analyzed on its own.
Recommended columns:
participant_idsession_idrecorded_at_utcsource_timestamp_utcbreath_volume01sphere_radius_progress01sphere_radius_rawcontroller_calibrated
session_events.csv
Capture workflow and command markers as discrete events:
- participant number entered
- duplicate-id warning shown
- runtime launched
- particles on and off
- recenter sent
- calibration started
- calibration reset
- experiment started
- experiment ended
- recording started and stopped
- physical screenshot captured
Recommended columns:
participant_idsession_idrecorded_at_utcsource_timestamp_utcevent_nameevent_detailcommand_action_idresult
session_settings.json
This is the immutable per-run truth source for what settings were supposed to be active, even if they are identical across participants.
session_snapshot.json
This is the richer machine-readable session-condition snapshot for QC and forensic review. It should bundle:
- the full
session_settings.jsonpayload - the companion-side view of the pinned headset/app/device-profile state
- the live Sussex twin-state snapshot captured when the run starts
- the effective visual-profile state
- the effective controller-breathing profile state
The goal is that a later reviewer can open a single JSON file in the Windows session folder and reconstruct the exact session conditions without needing the headset online.
The pulled Quest session should now mirror the same idea on-device:
- Quest
session_settings.jsonremains the compact file/index for row counts, file paths, app identity, and recording metadata. - Quest
session_snapshot.jsonis the richer runtime-side snapshot and should include the active study snapshot entries, current runtime config summary, active capture/payload profile, and the resolved hotload bindings that define the APK-side experiment conditions.
Participant Locked Mode
Participant locked mode is the Sussex runtime mode used during an actual participant run after tuning is complete.
It should reduce live and Quest-side overhead by disabling the broad legacy Quest CSV matrix and the verbose twin-state diagnostics that are useful during tuning, while preserving:
- the Windows-side
signals_long.csvandbreathing_trace.csvrecorder output - the Quest-side
signals_long.csvandbreathing_trace.csv - the Quest-side
session_events.csv,session_settings.json, andsession_snapshot.json - the study snapshot keys needed for breathing, coherence, sphere radius, LSL timing/counters, session state, and headset/controller pose
That means participant locked mode is a live-telemetry reduction, not a data retention reduction.
Suggested Implementation Order
- Lock the Sussex workflow and hazard rules in the GUI copy and docs.
- Add the fixed readiness gate and participant-number flow in the WPF shell.
- Add runtime command ids and telemetry keys in the participant-facing runtime.
- Mirror the updated Sussex APK and extend
samples/study-shells/sussex-university.json. - Build the recorder and per-participant storage.
- Add brightness and volume only after live readback is proven stable.
- Extend the verification harness to cover the new fixed flow.
Current Code Touchpoints
src/ViscerealityCompanion.App/ViewModels/StudyShellViewModel.cssrc/ViscerealityCompanion.App/StudyShellView.xamlsrc/ViscerealityCompanion.Core/Models/StudyShellModels.cssrc/ViscerealityCompanion.Core/Services/StudyShellCatalogLoader.cssrc/ViscerealityCompanion.Core/Services/WindowsAdbQuestControlService.cssrc/ViscerealityCompanion.Core/Services/LslTwinModeBridge.cssamples/study-shells/sussex-university.json