Skip to content

Commit 724083b

Browse files
committed
chore: finalize docs sync, repo-wide refactor, and bump version to 0.1.4
1 parent f84cf8b commit 724083b

54 files changed

Lines changed: 636 additions & 345 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Use this file to keep AI-assisted changes small, scoped, and consistent with the
2727

2828
## Project Status & Roadmap
2929

30-
### Current Focus: JES Operator Interface — Post-Unification Stabilization and Pi Zero 2 W Validation Planning
30+
### Current Focus: Unified JES Operator Surface Hardening and Documentation Consistency
3131

32-
The JES Operator Interface unification work is now merged into **`main`**. The current focus is stabilizing the unified operator experience, preserving WebUI/TUI terminology parity, continuing follow-on work without reintroducing branch-specific assumptions, and preparing the Raspberry Pi Zero 2 W target-hardware validation track. Design concept: *政府機関・軍 × DEFCONハッカー* — institutional structure with terminal-hacker aesthetic.
32+
The JES Operator Interface unification work is merged into **`main`** and the Raspberry Pi Zero 2 W validation issue track (`#89` through `#94`) is completed. The current focus is stability maintenance of the unified operator experience, preserving WebUI/TUI terminology parity, and keeping implementation and documentation synchronized without reintroducing branch-specific assumptions. Design concept: *政府機関・軍 × DEFCONハッカー* — institutional structure with terminal-hacker aesthetic.
3333

3434
### Active Branch
3535

@@ -39,18 +39,12 @@ The JES Operator Interface unification work is now merged into **`main`**. The c
3939

4040
Target: maintain and harden the unified JES operator surface on `main`.
4141

42-
### Other Open Priority Issues
42+
### Priority Tracking Status
4343

44-
- `#89`: Tracking issue for the Raspberry Pi Zero 2 W remote field-test harness and validation workflow.
45-
- `#90`: Phase 1 — remote harness skeleton and safe execution contract.
46-
- `#91`: Phase 2 — repository synchronization and remote Python environment preparation.
47-
- `#92`: Phase 3 — system inventory, import baseline, and CLI baseline measurements.
48-
- `#93`: Phase 4 — vault, KDF, object-cue, WebUI, and TUI viability probes.
49-
- `#94`: Phase 5 — structured result artifacts and operator documentation.
44+
- Pi Zero 2 W remote field-test harness and validation workflow issues (`#89` through `#94`) are completed and retained as traceability references.
45+
- New implementation priorities should be tracked as separate issues and reflected here only while actively in progress.
5046

51-
These issues define the current target-hardware validation implementation track. They do not mean Raspberry Pi Zero 2 W validation has already been completed.
52-
53-
Historical roadmap detail, completed milestone history, and the WebUI redesign sequence are maintained in `docs/ROADMAP_HISTORY.md`. Keep this file focused on active context, not long-form project history.
47+
Historical roadmap detail, completed milestone history, and the WebUI redesign sequence are maintained in `docs/ROADMAP_HISTORY.md`. Keep this file focused on active context and operating constraints, not long-form project history.
5448

5549
---
5650

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ and this project follows SemVer-style release intent for documented interfaces.
99

1010
No unreleased entries.
1111

12+
## [0.1.4] - 2026-05-10
13+
14+
### Changed
15+
16+
- Project guidance documents synchronized after issue-track completion, including AGENTS status updates and readiness-plan consistency fixes.
17+
- Repository-wide Python formatting refactor applied across `src/`, `tests/`, and `scripts/` using Ruff formatter.
18+
- README and Pi Zero 2 W workflow documentation cleaned up for duplicate or stale status wording.
19+
20+
### Security
21+
22+
- Existing local-only boundary, restricted-action constraints, and neutral capture-visible language policies were preserved during refactor and documentation consolidation.
23+
1224
## [0.1.3] - 2026-05-10
1325

1426
### Added

README.md

Lines changed: 59 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,55 @@
22

33
![Phasmid logo](images/Phasmid_banner.jpg)
44

5-
Phasmid is a field-evaluation prototype for local-only coercion-aware storage.
6-
7-
It is the reference implementation of the Janus Eidolon System, a two-slot local storage architecture designed to separate visible disclosure from protected local state under practical risks such as device seizure, compelled access, and over-disclosure.
5+
[![CI](https://github.com/01rabbit/Phasmid/actions/workflows/ci.yml/badge.svg)](https://github.com/01rabbit/Phasmid/actions/workflows/ci.yml)
6+
[![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)
7+
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
8+
[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
9+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
10+
[![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
11+
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
12+
[![status: research prototype](https://img.shields.io/badge/status-research%20prototype-orange)](docs/CLAIMS.md)
13+
[![local-only](https://img.shields.io/badge/operation-local--only-lightgrey)](docs/THREAT_MODEL.md)
14+
[![Security Policy](https://img.shields.io/badge/security-policy-informational)](SECURITY.md)
15+
16+
Phasmid is a field-evaluation prototype for local-only coercion-aware storage. It is the reference implementation of the Janus Eidolon System, a two-slot local storage architecture designed to separate visible disclosure from protected local state under practical risks such as device seizure, compelled access, and over-disclosure.
817

918
Phasmid is research software. It is not a replacement for full-disk encryption, hardware-backed key storage, an audited classified-data handling system, or a complete solution to compelled disclosure.
1019

20+
**Who this is for:** security researchers, field-risk evaluators, and operators running local controlled-disclosure experiments. It is not a general-purpose file encryption tool.
21+
22+
## Architecture Overview
23+
24+
![Phasmid Architecture Overview](images/architecture_v1.png)
25+
26+
Access flow, two-slot storage, coercion defense, and local-only boundary.
27+
See [`docs/PHASMID_ARCHITECTURE.md`](docs/PHASMID_ARCHITECTURE.md) for detail.
28+
29+
## Quick Start
30+
31+
```bash
32+
git clone https://github.com/01rabbit/Phasmid.git
33+
cd Phasmid
34+
./phasmid # creates .venv, installs deps, opens TUI
35+
```
36+
37+
On first run, `./phasmid` sets up the virtual environment automatically. You should see the TUI Operator Console (the ASCII panel shown in the TUI section below). From there, press `c` to create a Vessel and `g` for a guided walkthrough.
38+
39+
If the TUI does not open, run `phasmid doctor` to diagnose environment issues.
40+
41+
## Requirements
42+
43+
| Requirement | Detail |
44+
|---|---|
45+
| Python | 3.10 or later |
46+
| OS | Linux, macOS (development); Raspberry Pi OS Bookworm/Bullseye (deployment) |
47+
| Hardware | x86-64 laptop/desktop for development; Raspberry Pi Zero 2 W for field deployment |
48+
| Camera (optional) | Picamera2 / libcamera — required only for object-cue matching on Pi |
49+
| WebUI (optional) | Any modern browser; intended for localhost or USB gadget Ethernet access only |
50+
| LUKS (optional) | Linux kernel with dm-crypt — required for the optional LUKS2 storage layer |
51+
52+
For Raspberry Pi deployment, `python3-picamera2` and `python3-libcamera` must be installed via apt before running the bootstrap script.
53+
1154
## What It Does
1255

1356
- Creates an encrypted `vault.bin` container.
@@ -83,8 +126,6 @@ The path from field-evaluation prototype to operational solution is:
83126
6. record validation results for each release;
84127
7. publish only claims that are covered by tests or documented limits.
85128

86-
Run the WebUI in Field Mode by setting `PHASMID_FIELD_MODE=1`. Field Mode reduces normal exposure in capture-visible workflows, but Field Mode is not a security boundary.
87-
88129
Until those validation gates are completed on target hardware, Phasmid should be described as a field-evaluation prototype. After those gates are completed and recorded, it can be described as a local coercion-aware storage appliance for the validated deployment conditions.
89130

90131
The Raspberry Pi Zero 2 W remote SSH field-test harness implementation is tracked in GitHub issues `#89` through `#94`, and runnable scripts are available under `scripts/pi_zero2w/`. Harness availability alone is not evidence of validation; validation status is established by recorded results in `docs/REVIEW_VALIDATION_RECORD.md`.
@@ -173,7 +214,7 @@ Threat model and security review documents:
173214

174215
- [`docs/THREAT_MODEL.md`](docs/THREAT_MODEL.md) — authoritative threat model (adversaries, assets, attack surfaces, threat scenarios, non-goals)
175216
- [`docs/COERCION_SAFE_DELAYING.md`](docs/COERCION_SAFE_DELAYING.md) — coercion-safe delaying architecture (standby and disclosure-support workflow)
176-
- `docs/THREAT_ANALYSIS_STRIDE.md` — full STRIDE analysis cross-referencing the threat model
217+
- [`docs/THREAT_ANALYSIS_STRIDE.md`](docs/THREAT_ANALYSIS_STRIDE.md) — full STRIDE analysis cross-referencing the threat model
177218
- [`docs/CLAIMS.md`](docs/CLAIMS.md) — inventory of project claims with verification status
178219
- [`docs/NON_CLAIMS.md`](docs/NON_CLAIMS.md) — explicit non-claims and rationale
179220
- [`docs/KEY_LIFECYCLE.md`](docs/KEY_LIFECYCLE.md) — key-material lifecycle audit summary and persistence boundaries
@@ -188,18 +229,16 @@ Threat model and security review documents:
188229

189230
Operational review and deployment guidance can be found in:
190231

191-
- `docs/SOURCE_SAFE_WORKFLOW.md`
192-
- `docs/SEIZURE_REVIEW_CHECKLIST.md`
193-
- `docs/FIELD_TEST_PROCEDURE.md`
194-
- `docs/REVIEW_VALIDATION_RECORD.md`
195-
- `docs/SOLUTION_READINESS_PLAN.md`
196-
- `docs/JANUS_EIDOLON_SYSTEM.md`
197-
- `docs/PHASMID_ARCHITECTURE.md`
198-
- `docs/OPERATIONS.md`
199-
- `docs/RESTRICTED_ACTIONS.md`
200-
- `docs/STATE_RECOVERY.md`
201-
202-
Target-hardware validation workflow implementation for Raspberry Pi Zero 2 W is tracked in GitHub issues `#89` through `#94`. Recorded validation results for the documented Pi Zero 2 W deployment conditions are available in `docs/REVIEW_VALIDATION_RECORD.md`.
232+
- [`docs/SOURCE_SAFE_WORKFLOW.md`](docs/SOURCE_SAFE_WORKFLOW.md)
233+
- [`docs/SEIZURE_REVIEW_CHECKLIST.md`](docs/SEIZURE_REVIEW_CHECKLIST.md)
234+
- [`docs/FIELD_TEST_PROCEDURE.md`](docs/FIELD_TEST_PROCEDURE.md)
235+
- [`docs/REVIEW_VALIDATION_RECORD.md`](docs/REVIEW_VALIDATION_RECORD.md)
236+
- [`docs/SOLUTION_READINESS_PLAN.md`](docs/SOLUTION_READINESS_PLAN.md)
237+
- [`docs/JANUS_EIDOLON_SYSTEM.md`](docs/JANUS_EIDOLON_SYSTEM.md)
238+
- [`docs/PHASMID_ARCHITECTURE.md`](docs/PHASMID_ARCHITECTURE.md)
239+
- [`docs/OPERATIONS.md`](docs/OPERATIONS.md)
240+
- [`docs/RESTRICTED_ACTIONS.md`](docs/RESTRICTED_ACTIONS.md)
241+
- [`docs/STATE_RECOVERY.md`](docs/STATE_RECOVERY.md)
203242

204243
This README is part of the authoritative appliance deployment guide and review workflow. Release Review Artifacts are generated by the CI pipeline to support review. This is not a validated cryptographic-module certification.
205244

@@ -222,10 +261,6 @@ python3 scripts/generate_release_artifacts.py \
222261

223262
This writes `MANIFEST.sha256`, `sbom.cyclonedx.json`, `release-summary.json`, and `MANIFEST.sha256.sig` when signing is enabled.
224263

225-
Phasmid non-claims are maintained in:
226-
227-
- [`docs/NON_CLAIMS.md`](docs/NON_CLAIMS.md)
228-
229264
## Repository Layout
230265

231266
```text
@@ -473,6 +508,8 @@ python -m uvicorn phasmid.web_server:app --host 0.0.0.0 --port 8000
473508

474509
When using USB gadget Ethernet, open `http://<pi-usb-ip>:8000/` from the laptop.
475510

511+
Run the WebUI in Field Mode by setting `PHASMID_FIELD_MODE=1` to reduce exposure in capture-visible workflows. Field Mode is not a security boundary.
512+
476513
WebUI v2 uses neutral entry-based terminology. Normal screens do not show internal storage labels, retrieval order, or restricted local-state behavior.
477514

478515
Common WebUI/API wording is centralized where practical so terminology checks can audit capture-visible messages consistently.
@@ -481,8 +518,6 @@ Common WebUI/API wording is centralized where practical so terminology checks ca
481518

482519
```bash
483520
python3 -m unittest discover -s tests
484-
python3 -m black --check src tests scripts
485-
python3 -m bandit -r src
486521
```
487522

488523
Static check commands:
@@ -499,13 +534,6 @@ python3 -m coverage run --source=src -m unittest discover -s tests
499534
python3 -m coverage report -m
500535
```
501536

502-
Alternative short coverage command:
503-
504-
```bash
505-
coverage run -m unittest discover -s tests
506-
coverage report
507-
```
508-
509537
Release Review Artifacts are generated by the CI pipeline and support review of the current branch.
510538

511539
Passing automated tests do not prove field safety. They verify expected local behavior and regression boundaries only.

docs/PI_ZERO2W_REMOTE_FIELD_TEST_ISSUE_DRAFT.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Add Raspberry Pi Zero 2 W Remote Field Test Harness
44

55
> **Tracking**: This issue is the parent specification for the implementation track
66
> documented in `AGENTS.md` as issues #89#94. The phased implementation issues
7-
> (`#90` through `#94`) each correspond to one Phase defined in this document.
7+
> (`#90` through `#94`) correspond to the five implementation phases defined in
8+
> this document.
89
910
## Background
1011

@@ -171,7 +172,7 @@ The harness must:
171172
- document that this variable must remain unset during field test runs unless the operator has provisioned the tmpfs mount;
172173
- include a pre-flight check that warns if `PHASMID_TMPFS_STATE` is set and the path does not exist on the Pi before any test starts.
173174

174-
### Blocker 4: `phasmid doctor` behavior in non-interactive SSH sessions
175+
### Blocker 6: `phasmid doctor` behavior in non-interactive SSH sessions
175176

176177
The `doctor` command routes to non-TUI mode automatically when `sys.stdout.isatty()` returns `False`. This is correct behavior in SSH contexts and means `phasmid doctor` should print to stdout without a TUI when called non-interactively. However, to guarantee non-TUI output regardless of how the session is set up, use the explicit flag:
177178

@@ -250,9 +251,11 @@ Required outcomes:
250251
- WebUI startup and shutdown are probed locally on the Pi;
251252
- TUI viability is checked conservatively without requiring full automation.
252253

253-
### Phase 5: Field Workflow Smoke Tests, Observable Surface Review, and Monitoring
254+
### Phase 5: Field Workflow Smoke Tests, Observable Surface Review, Monitoring, and Reporting
254255

255-
Deliver bounded workflow testing, observable information surface checks, and thermal/resource capture around major phases.
256+
Deliver bounded workflow testing, observable information surface checks,
257+
thermal/resource capture around major phases, and final structured reporting
258+
outputs.
256259

257260
Required outcomes:
258261

@@ -261,13 +264,6 @@ Required outcomes:
261264
- temperature, memory, disk, and load measurements are captured before and after major phases;
262265
- orphan process detection is included for WebUI-related phases;
263266
- swap and storage configuration state is recorded.
264-
265-
### Phase 6: Reports, Documentation, and Reviewability
266-
267-
Deliver final structured artifacts and operator documentation.
268-
269-
Required outcomes:
270-
271267
- `perf-results.json` is written with complete schema coverage where possible;
272268
- `perf-report.md` summarizes viability, bottlenecks, warnings, and next actions;
273269
- timing-delta acceptance gate outcome is prominently reported;

docs/SOLUTION_READINESS_PLAN.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,11 @@ Remote management platform.
105105

106106
Current status is defined by `docs/REVIEW_VALIDATION_RECORD.md`.
107107

108-
At the time this plan was added, automated tests had passed on a development machine, and target-hardware validation had not yet been recorded.
109-
110-
As of 2026-05-09, harness scripts exist in `scripts/pi_zero2w/` and are tracked
111-
by GitHub issues `#89` through `#94`, but target-hardware validation is still not
112-
recorded.
108+
At the time this plan was added, automated tests had passed on a development
109+
machine, and target-hardware validation had not yet been recorded.
110+
111+
As of 2026-05-10, target-hardware validation is recorded in
112+
`docs/REVIEW_VALIDATION_RECORD.md` for the documented Raspberry Pi Zero 2 W
113+
deployment conditions. Harness implementation and issue closure (`#89` through
114+
`#94`) are traceability inputs; release readiness still depends on satisfying
115+
all gates above for each release candidate.

images/architecture_v1.png

1.85 MB
Loading

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "phasmid"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
description = "Phasmid local-only coercion-aware storage prototype"
55
requires-python = ">=3.10"
66
dependencies = [

scripts/bench_object_gate.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ def main() -> None:
8383
stable_frames = sum(1 for item in results if item.state == "accepted")
8484
result_state = results[-1].state if results else "no_signal"
8585
avg_frame_ms = elapsed_ms / max(len(results), 1)
86-
notes = "model backend unavailable by default" if args.method == "model" else "combined gate path"
86+
notes = (
87+
"model backend unavailable by default"
88+
if args.method == "model"
89+
else "combined gate path"
90+
)
8791

8892
cpu_elapsed = time.process_time() - started_cpu
8993
_current, peak = tracemalloc.get_traced_memory()

0 commit comments

Comments
 (0)