# arcanelantern/a7iv-open-gate-test architecture

> Architecture diagram of the GitHub repository arcanelantern/a7iv-open-gate-test, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arcanelantern/a7iv-open-gate-test
- Repository: https://github.com/arcanelantern/a7iv-open-gate-test

## Overview

A7 IV Open Gate is a field kit for temporarily enabling 4K or 5.7K open-gate recording on Sony A7 IV firmware 6.02. Users choose an Android app or a Windows/macOS command, connect the camera over USB, and apply settings that remain in memory until power loss or a cold boot. The repository also includes a staged USB diagnostic workflow and safeguards for inspecting the camera. The map includes its indexed diagnostic modules; unsampled platform and Android implementations are represented only where the README documents their role.

Main entry points: [`windows/tools/camera_tests/CT6_memory_read_check/open_gate_apply.py`](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT6_memory_read_check/open_gate_apply.py) (Open-gate apply), [`windows/tools/camera_tests/CT1_usb_first_contact/ct1_stage2_service.py`](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_stage2_service.py) (Service-mode probe), [`windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py`](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py) (Memory-read check), [`android/A7IV-OpenGate.apk`](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/android/A7IV-OpenGate.apk) (Android app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User entry points"]
  node_android["Android app<br/>[A7IV-OpenGate.apk]"]
  node_windows4k["Windows 4K command<br/>[open_gate_4k.cmd]"]
  node_windows57["Windows 5.7K command<br/>[open_gate_5.7k.cmd]"]
  node_mac4k["macOS 4K command"]
  node_mac57["macOS 5.7K command"]
end

subgraph group_apply["Camera configuration"]
  node_applyflow["Open-gate apply<br/>[open_gate_apply.py]"]
  node_levelrunner["Service-level runner<br/>[ct6_level1_run.py]"]
end

subgraph group_diagnostics["USB diagnostics"]
  node_stage2["Service-mode probe"]
  node_compare["Evidence comparison<br/>[ct1_compare.py]"]
  node_predict["Expected predictions<br/>[ct1_predict.py]"]
  node_sim["Camera simulator<br/>[ct1_sim.py]"]
  node_stage1["Memory-read check<br/>[ct6_level1_run.py]"]
end

subgraph group_safety["Protocol safeguards"]
  node_common["Session and guards<br/>[ct1_common.py]"]
end

node_user(("Camera operator"))
node_camera["Sony A7 IV"]

node_user -->|"selects and applies"| node_android
node_user -->|"runs"| node_windows4k
node_user -->|"runs"| node_windows57
node_user -->|"runs"| node_mac4k
node_user -->|"runs"| node_mac57
node_android -->|"configures over USB"| node_camera
node_windows4k -->|"runs"| node_applyflow
node_windows57 -->|"runs"| node_applyflow
node_mac4k -->|"runs"| node_applyflow
node_mac57 -->|"runs"| node_applyflow
node_applyflow -->|"launches steps"| node_levelrunner
node_levelrunner -->|"sends service packets"| node_camera
node_stage2 -->|"probes USB service"| node_camera
node_stage2 -->|"uses safeguards"| node_common
node_stage2 -->|"evaluates backup"| node_compare
node_compare -->|"loads predictions"| node_predict
node_stage2 -->|"uses in dry run"| node_sim
node_stage1 -->|"uses safeguards"| node_common
node_stage1 -->|"simulates device"| node_sim

click node_android "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/android/A7IV-OpenGate.apk"
click node_windows4k "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/open_gate_4k.cmd"
click node_windows57 "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/open_gate_5.7k.cmd"
click node_mac4k "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/macos/open_gate_4k.command"
click node_mac57 "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/macos/open_gate_5.7k.command"
click node_applyflow "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT6_memory_read_check/open_gate_apply.py"
click node_levelrunner "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py"
click node_stage2 "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_stage2_service.py"
click node_common "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_common.py"
click node_compare "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_compare.py"
click node_predict "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_predict.py"
click node_sim "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_sim.py"
click node_stage1 "https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_android,node_windows4k,node_windows57,node_mac4k,node_mac57 toneBlue
class node_applyflow,node_levelrunner toneAmber
class node_stage2,node_compare,node_predict,node_sim,node_stage1 toneMint
class node_common toneRose
class node_user,node_camera toneIndigo
```

## Components

### User entry points

- [Android app](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/android/A7IV-OpenGate.apk): `android/A7IV-OpenGate.apk`
- [Windows 4K command](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/open_gate_4k.cmd): `windows/open_gate_4k.cmd`
- [Windows 5.7K command](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/open_gate_5.7k.cmd): `windows/open_gate_5.7k.cmd`
- [macOS 4K command](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/macos/open_gate_4k.command): `macos/open_gate_4k.command`
- [macOS 5.7K command](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/macos/open_gate_5.7k.command): `macos/open_gate_5.7k.command`

### Camera configuration

- [Open-gate apply](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT6_memory_read_check/open_gate_apply.py): `windows/tools/camera_tests/CT6_memory_read_check/open_gate_apply.py`
- [Service-level runner](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py): `windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py`

### USB diagnostics

- [Service-mode probe](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_stage2_service.py): `windows/tools/camera_tests/CT1_usb_first_contact/ct1_stage2_service.py`
- [Evidence comparison](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_compare.py): `windows/tools/camera_tests/CT1_usb_first_contact/ct1_compare.py`
- [Expected predictions](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_predict.py): `windows/tools/camera_tests/CT1_usb_first_contact/ct1_predict.py`
- [Camera simulator](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_sim.py): `windows/tools/camera_tests/CT1_usb_first_contact/ct1_sim.py`
- [Memory-read check](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py): `windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py`

### Protocol safeguards

- [Session and guards](https://github.com/arcanelantern/a7iv-open-gate-test/blob/main/windows/tools/camera_tests/CT1_usb_first_contact/ct1_common.py): `windows/tools/camera_tests/CT1_usb_first_contact/ct1_common.py`

### Other components

- **Camera operator**
- **Sony A7 IV**

## Connections

- Camera operator → Android app: selects and applies (evidence: `README.md`)
- Camera operator → Windows 4K command: runs (evidence: `README.md`)
- Camera operator → Windows 5.7K command: runs (evidence: `README.md`)
- Camera operator → macOS 4K command: runs (evidence: `README.md`)
- Camera operator → macOS 5.7K command: runs (evidence: `README.md`)
- Android app → Sony A7 IV: configures over USB (evidence: `README.md`)
- Windows 4K command → Open-gate apply: runs (evidence: `windows/tools/camera_tests/CT6_memory_read_check/open_gate_apply.py`)
- Windows 5.7K command → Open-gate apply: runs (evidence: `windows/tools/camera_tests/CT6_memory_read_check/open_gate_apply.py`)
- macOS 4K command → Open-gate apply: runs (evidence: `windows/tools/camera_tests/CT6_memory_read_check/open_gate_apply.py`)
- macOS 5.7K command → Open-gate apply: runs (evidence: `windows/tools/camera_tests/CT6_memory_read_check/open_gate_apply.py`)
- Open-gate apply → Service-level runner: launches steps (evidence: `windows/tools/camera_tests/CT6_memory_read_check/open_gate_apply.py`)
- Service-level runner → Sony A7 IV: sends service packets (evidence: `windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py`)
- Service-mode probe → Sony A7 IV: probes USB service (evidence: `windows/tools/camera_tests/CT1_usb_first_contact/ct1_stage2_service.py`)
- Service-mode probe → Session and guards: uses safeguards (evidence: `windows/tools/camera_tests/CT1_usb_first_contact/ct1_stage2_service.py`)
- Service-mode probe → Evidence comparison: evaluates backup (evidence: `windows/tools/camera_tests/CT1_usb_first_contact/ct1_stage2_service.py`)
- Evidence comparison → Expected predictions: loads predictions (evidence: `windows/tools/camera_tests/CT1_usb_first_contact/ct1_compare.py`)
- Service-mode probe → Camera simulator: uses in dry run (evidence: `windows/tools/camera_tests/CT1_usb_first_contact/ct1_stage2_service.py`)
- Memory-read check → Session and guards: uses safeguards (evidence: `windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py`)
- Memory-read check → Camera simulator: simulates device (evidence: `windows/tools/camera_tests/CT6_memory_read_check/ct6_level1_run.py`)
