trace: add execution route visibility + debug passthrough; phase2170 canaries; docs
- Add HAKO_TRACE_EXECUTION to trace executor route - Rust hv1_inline: stderr [trace] executor: hv1_inline (rust) - Hakovm dispatcher: stdout [trace] executor: hakovm (hako) - test_runner: trace lines for hv1_inline/core/hakovm routes - Add HAKO_VERIFY_SHOW_LOGS and HAKO_DEBUG=1 (enables both) - verify_v1_inline_file() log passthrough with numeric rc extraction - test_runner exports via HAKO_DEBUG - Canary expansion under phase2170 (state spec) - Array: push×5/10 → size, len/length alias, per‑recv/global, flow across blocks - Map: set dup-key non-increment, value_state get/has - run_all.sh: unify, remove SKIPs; all PASS - Docs - ENV_VARS.md: add Debug/Tracing toggles and examples - PLAN.md/CURRENT_TASK.md: mark 21.7 green, add Quickstart lines All changes gated by env vars; default behavior unchanged.
This commit is contained in:
@ -84,8 +84,17 @@ impl FileBox {
|
||||
}
|
||||
|
||||
pub fn write_all(&self, _buf: &[u8]) -> Result<(), String> {
|
||||
// CoreRo does not support write - Fail-Fast
|
||||
Err("Write operation not supported in read-only mode".to_string())
|
||||
// Fail-Fast by capability: consult provider caps
|
||||
let caps = self.provider
|
||||
.as_ref()
|
||||
.map(|p| p.caps())
|
||||
.or_else(|| provider_lock::get_filebox_caps())
|
||||
.unwrap_or_else(|| provider::FileCaps::read_only());
|
||||
if !caps.write {
|
||||
return Err("Write unsupported by current FileBox provider (read-only)".to_string());
|
||||
}
|
||||
// Write-capable provider not wired yet
|
||||
Err("Write supported by provider but not implemented in this build".to_string())
|
||||
}
|
||||
|
||||
/// ファイルの内容を読み取る
|
||||
@ -98,8 +107,15 @@ impl FileBox {
|
||||
|
||||
/// ファイルに内容を書き込む
|
||||
pub fn write(&self, _content: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
||||
// Fail-Fast: CoreRo does not support write
|
||||
Box::new(StringBox::new("Error: Write operation not supported in read-only mode"))
|
||||
let caps = self.provider
|
||||
.as_ref()
|
||||
.map(|p| p.caps())
|
||||
.or_else(|| provider_lock::get_filebox_caps())
|
||||
.unwrap_or_else(|| provider::FileCaps::read_only());
|
||||
if !caps.write {
|
||||
return Box::new(StringBox::new("Error: write unsupported by provider (read-only)"));
|
||||
}
|
||||
Box::new(StringBox::new("Error: write supported but not implemented in this build"))
|
||||
}
|
||||
|
||||
/// ファイルが存在するかチェック
|
||||
@ -110,14 +126,28 @@ impl FileBox {
|
||||
|
||||
/// ファイルを削除
|
||||
pub fn delete(&self) -> Box<dyn NyashBox> {
|
||||
// Fail-Fast: CoreRo does not support delete
|
||||
Box::new(StringBox::new("Error: Delete operation not supported in read-only mode"))
|
||||
let caps = self.provider
|
||||
.as_ref()
|
||||
.map(|p| p.caps())
|
||||
.or_else(|| provider_lock::get_filebox_caps())
|
||||
.unwrap_or_else(|| provider::FileCaps::read_only());
|
||||
if !caps.write {
|
||||
return Box::new(StringBox::new("Error: delete unsupported by provider (read-only)"));
|
||||
}
|
||||
Box::new(StringBox::new("Error: delete supported but not implemented in this build"))
|
||||
}
|
||||
|
||||
/// ファイルをコピー
|
||||
pub fn copy(&self, _dest: &str) -> Box<dyn NyashBox> {
|
||||
// Fail-Fast: CoreRo does not support copy
|
||||
Box::new(StringBox::new("Error: Copy operation not supported in read-only mode"))
|
||||
let caps = self.provider
|
||||
.as_ref()
|
||||
.map(|p| p.caps())
|
||||
.or_else(|| provider_lock::get_filebox_caps())
|
||||
.unwrap_or_else(|| provider::FileCaps::read_only());
|
||||
if !caps.write {
|
||||
return Box::new(StringBox::new("Error: copy unsupported by provider (read-only)"));
|
||||
}
|
||||
Box::new(StringBox::new("Error: copy supported but not implemented in this build"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user