proto becomes bxcore, the one shared crate (M5b task 00)
Done the way the owner asked and the spike mapped: the crate and the manifests renamed, then what the build reported fixed. Layers: 138 "proto unresolved" errors across 169 files; cargo fmt reordering imports; six fixture paths built as strings in brokerd's and bxctl's tests, which the compiler cannot see, and comments naming crates/proto/; the crate-dependency check and its self-test. One more the spike did not reach: a `\nproto =` key inside a printf format in the self-test, which a word-boundary replacement skips because `n` and `p` are both word characters. make gate: gate: ok, 944 tests; no new entry in /tmp. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
//! Text from `brokerd` or the inference server is escaped like model text before it reaches the
|
||||
//! terminal: a `retrying` error and every error detail (M3a review finding 10).
|
||||
|
||||
use bxcore::{ErrorCode, TurnEvent, WireError};
|
||||
use bxctl::admin::AdminError;
|
||||
use bxctl::chat::{ChatError, Printer};
|
||||
use proto::{ErrorCode, TurnEvent, WireError};
|
||||
|
||||
const ESC: char = '\u{1b}';
|
||||
|
||||
@@ -61,13 +61,13 @@ fn an_error_detail_is_escaped_in_chat_and_admin_errors() {
|
||||
#[test]
|
||||
fn a_frame_error_is_escaped() {
|
||||
let bad = r#"{"v":1,"id":1,"final":true,"msg":{"kind":"\u001b[2J\u202e"}}"#;
|
||||
let error = serde_json::from_str::<proto::Envelope>(bad).unwrap_err();
|
||||
let error = serde_json::from_str::<bxcore::Envelope>(bad).unwrap_err();
|
||||
for text in [
|
||||
ChatError::Frame(proto::FrameError::Json(
|
||||
serde_json::from_str::<proto::Envelope>(bad).unwrap_err(),
|
||||
ChatError::Frame(bxcore::FrameError::Json(
|
||||
serde_json::from_str::<bxcore::Envelope>(bad).unwrap_err(),
|
||||
))
|
||||
.to_string(),
|
||||
AdminError::Frame(proto::FrameError::Json(error)).to_string(),
|
||||
AdminError::Frame(bxcore::FrameError::Json(error)).to_string(),
|
||||
] {
|
||||
clean(&text);
|
||||
assert!(text.contains("\\u001b"), "{text}");
|
||||
|
||||
Reference in New Issue
Block a user