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:
@@ -7,7 +7,7 @@ mod build;
|
||||
use brokerd::grants::GrantSet;
|
||||
use brokerd::policy::{Ask, Label, Outcome, decide, redecide};
|
||||
use build::{grant, now, private, read, secret, set};
|
||||
use proto::{DataClass, DenyReason, Mode};
|
||||
use bxcore::{DataClass, DenyReason, Mode};
|
||||
|
||||
const PATH: &str = "/home/kyle/notes/a.md";
|
||||
|
||||
@@ -49,7 +49,10 @@ fn auto_now_lets_the_call_run_under_the_grant_that_matches_now() {
|
||||
]);
|
||||
let decision = redecide(pending(), &grants, private(), now()).unwrap();
|
||||
assert_eq!(decision.grant(), "now-auto");
|
||||
assert_eq!(decision.grant_sha256(), proto::sha256(b"now-auto").unwrap());
|
||||
assert_eq!(
|
||||
decision.grant_sha256(),
|
||||
bxcore::sha256(b"now-auto").unwrap()
|
||||
);
|
||||
assert_eq!(decision.matched_path(), Some("/home/kyle"));
|
||||
assert_eq!(decision.paths(), ["/home/kyle"]);
|
||||
assert_eq!(
|
||||
@@ -103,7 +106,7 @@ fn a_deny_grant_was_added_while_the_approval_waited() {
|
||||
assert_eq!(denial.grant.as_deref(), Some("no-notes"));
|
||||
assert_eq!(
|
||||
denial.grant_sha256,
|
||||
Some(proto::sha256(b"no-notes").unwrap())
|
||||
Some(bxcore::sha256(b"no-notes").unwrap())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user