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:
@@ -339,7 +339,7 @@ impl Served {
|
||||
.to_string()
|
||||
}
|
||||
|
||||
fn records(&self, session: &str) -> Vec<proto::LogRecord> {
|
||||
fn records(&self, session: &str) -> Vec<bxcore::LogRecord> {
|
||||
let text =
|
||||
std::fs::read_to_string(self.home.join("sessions").join(session).join("0.jsonl"))
|
||||
.unwrap();
|
||||
@@ -441,7 +441,7 @@ fn a_conversation_uses_tools_survives_a_restart_and_keeps_its_cache() {
|
||||
let tool_names: Vec<String> = records
|
||||
.iter()
|
||||
.filter_map(|r| match r {
|
||||
proto::LogRecord::Assistant { tool_calls, .. } => Some(
|
||||
bxcore::LogRecord::Assistant { tool_calls, .. } => Some(
|
||||
tool_calls
|
||||
.iter()
|
||||
.map(|c| c.name.clone())
|
||||
@@ -459,16 +459,16 @@ fn a_conversation_uses_tools_survives_a_restart_and_keeps_its_cache() {
|
||||
);
|
||||
let usages = records
|
||||
.iter()
|
||||
.filter(|r| matches!(r, proto::LogRecord::Usage { .. }))
|
||||
.filter(|r| matches!(r, bxcore::LogRecord::Usage { .. }))
|
||||
.count();
|
||||
let assistants = records
|
||||
.iter()
|
||||
.filter(|r| matches!(r, proto::LogRecord::Assistant { .. }))
|
||||
.filter(|r| matches!(r, bxcore::LogRecord::Assistant { .. }))
|
||||
.count();
|
||||
assert_eq!(usages, assistants, "one usage record per completion");
|
||||
let losses: Vec<&proto::LogRecord> = records
|
||||
let losses: Vec<&bxcore::LogRecord> = records
|
||||
.iter()
|
||||
.filter(|r| matches!(r, proto::LogRecord::CacheLoss { .. }))
|
||||
.filter(|r| matches!(r, bxcore::LogRecord::CacheLoss { .. }))
|
||||
.collect();
|
||||
assert!(
|
||||
losses.is_empty(),
|
||||
@@ -476,7 +476,7 @@ fn a_conversation_uses_tools_survives_a_restart_and_keeps_its_cache() {
|
||||
);
|
||||
let results = records
|
||||
.iter()
|
||||
.filter(|r| matches!(r, proto::LogRecord::ToolResult { .. }))
|
||||
.filter(|r| matches!(r, bxcore::LogRecord::ToolResult { .. }))
|
||||
.count();
|
||||
assert!(
|
||||
results >= 3,
|
||||
|
||||
Reference in New Issue
Block a user