docs: consolidate design documentation and standardize crate English
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# yoi E2E
|
||||
|
||||
実際の製品プロセスを隔離したfixtureで検証する。PTY操作とBackend/Runtimeプロセスの検証を担当し、通常のunit testとは分離する。
|
||||
|
||||
## 実装の入口
|
||||
|
||||
- [`PanelHarness`]: PTY経由の入力、観測イベントによる同期、失敗時のartifact保存。
|
||||
- [`FixtureWorkspace`]: TUI用WorkspaceとHOME/XDG領域の隔離。
|
||||
- [`WorkerE2eEnvironment`]: Backend/Runtime用プロセスとfixtureの管理。
|
||||
@@ -1,8 +1,4 @@
|
||||
//! Opt-in E2E helpers for driving the real `yoi panel` process through a PTY.
|
||||
//!
|
||||
//! The harness intentionally sends keyboard and mouse input only through the PTY.
|
||||
//! Structured JSONL events emitted by the TUI are used for synchronization,
|
||||
//! assertions, and failure artifacts; they are not an input or authority channel.
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
use std::fs::{self, File, OpenOptions};
|
||||
use std::io::{self, Read, Write};
|
||||
@@ -567,6 +563,10 @@ pub struct PanelArtifacts {
|
||||
pub run_json: PathBuf,
|
||||
}
|
||||
|
||||
/// 実TUIへの入力をPTYだけで送るharness。
|
||||
///
|
||||
/// JSONL観測イベントは同期、assertion、失敗時のartifactに使う。製品状態を
|
||||
/// 変更する入力には使わない。最初の描画と具体的なfixture内容の表示準備は別に検査する。
|
||||
pub struct PanelHarness {
|
||||
child: Child,
|
||||
master: File,
|
||||
|
||||
@@ -207,6 +207,10 @@ pub struct WorkerEnvironmentCleanupReport {
|
||||
pub report_path: PathBuf,
|
||||
}
|
||||
|
||||
/// 隔離したHOME/XDG領域と実Backend/Runtime subprocessを所有するfixture。
|
||||
///
|
||||
/// HTTP clientはproxyとredirectを使わず、テスト対象の接続先を明示する。
|
||||
/// 終了時に所有processと一時領域を片付け、artifactとcleanup結果を残す。
|
||||
#[derive(Debug)]
|
||||
pub struct WorkerE2eEnvironment {
|
||||
temp_root: Option<tempfile::TempDir>,
|
||||
|
||||
Reference in New Issue
Block a user