feat: Add HTTP status tests and dynamic plugin documentation
- Add e2e_vm_http_status_404/500 tests to verify HTTP status handling - ResultBox properly returns Ok(Response) for HTTP errors, Err for connection failures - Create dynamic-plugin-flow.md documenting MIR→VM→Registry→Plugin flow - Add vm-stats test files for HTTP 404/500 status codes - Update net-plugin.md with HTTP error handling clarification - Create E2E_TESTS.md documenting all E2E test behaviors - Add mir-26-instruction-diet.md for MIR optimization plans - Add vm-stats-cookbook.md for VM statistics usage guide - Update MIR verifier to properly track self-assignment patterns 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -12,6 +12,11 @@
|
||||
- FileBoxプラグインで実証済み
|
||||
- プラグイン開発者はここから始める
|
||||
|
||||
- **[../architecture/dynamic-plugin-flow.md](../architecture/dynamic-plugin-flow.md)** - **動的プラグインシステムの全体フロー** 🆕
|
||||
- MIR→VM→Registry→プラグインの動的解決フロー
|
||||
- コンパイル時決め打ちなし、実行時動的判定の仕組み
|
||||
- nyash.tomlによる透過的な切り替え
|
||||
|
||||
- **[vm-plugin-integration.md](./vm-plugin-integration.md)** - **VM統合仕様書** 🆕
|
||||
- VMバックエンドとプラグインシステムの統合
|
||||
- BoxRef型による統一アーキテクチャ
|
||||
|
||||
@ -30,6 +30,13 @@
|
||||
- `acceptTimeout(ms)`: タイムアウト時は `void`
|
||||
- `recvTimeout(ms)`: タイムアウト時は 空 `bytes`(長さ0の文字列)
|
||||
|
||||
### HTTPエラーハンドリング(重要)
|
||||
- **接続失敗(unreachable)**: `Result.Err(ErrorBox)` を返す
|
||||
- 例: ポート8099に接続できない → `Err("connect failed for 127.0.0.1:8099/...")`
|
||||
- **HTTPステータスエラー(404/500等)**: `Result.Ok(HttpResponseBox)` を返す
|
||||
- 例: 404 Not Found → `Ok(response)` で `response.getStatus()` が 404
|
||||
- トランスポート層は成功、アプリケーション層のエラーとして扱う
|
||||
|
||||
将来の整合:
|
||||
- `ResultBox` での返却に対応する設計(`Ok(value)`/`Err(ErrorBox)`)を検討中。
|
||||
- `nyash.toml` のメソッド宣言に戻り値型(Result)を記載し、ランタイムで自動ラップする案。
|
||||
|
||||
Reference in New Issue
Block a user