| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
refactor(core): call DeviceRoute::device_route_for for_slot DeviceRoute::device_route_for(inv, slot) said route twice. for_slot reads as the question it answers: the route for this slot of this inventory. Seventeen sites across core, fixture, device, agent-core, the mock agent, the CLI and the desktop, plus the test that pins which protocol a receiver's route follows. | 4 天前 | |
refactor(cli): bound every agent call with one budget `crate::agent` gave a snapshot five seconds (`SNAPSHOT_TIMEOUT`) and the fixture recorder gave each of its four semantic reads the same five seconds under its own name (`READ_TIMEOUT`) — one decision, how long a connected agent may take to answer, written twice. `agent::call` bounds any RPC by the one `CALL_TIMEOUT` and says which way it failed (`CallFailure::{TimedOut, Disconnected}`); `snapshot` and the recorder's reads go through it and keep their own wording. The access guard now also flags an RPC issued outside `agent::call` (four findings on the parent commit, none here); test modules, which serve their own in-process agent, are exempt. | 4 天前 | |
refactor(cli): move cmd/mod.rs to cmd.rs `cmd/mod.rs` owns the `Command` enum and its dispatch, so it is a module with semantics of its own, and the house layout reserves `mod.rs` for pure namespace shells. Its siblings `cmd/diag.rs` and `cmd/fixture.rs` already follow that rule. The file is renamed with its content unchanged; `cmd` is a private module, so no path outside the crate moves. | 4 天前 | |
refactor(core): build the log filter every process installs in one place `openlogi_core::env` exported the ingredients — the variable's name and the fallback level — and five binaries each recombined them into the same `EnvFilter::try_from_env(LOG).unwrap_or_else(|_| EnvFilter::new(LOG_DEFAULT))`; four of them wrapped it in the same stderr subscriber. That is the shape the single-source rule warns about: the owner exported ingredients, so every consumer re-made the decision. `openlogi_core::logging` (feature `logging`, optional `tracing-subscriber`) exports the decision: `env_filter()` and, for a process with no log file of its own, `init_stderr()`. The CLI, the GUI, the overlay and the mock agent call the latter; the agent keeps its file layer and takes the filter. Three crates lose a direct `tracing-subscriber` dependency. The env guard now also flags `EnvFilter::try_from_env` outside core (five findings on the parent commit, none here). | 4 天前 |