Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
b93045e
page_fault metric
roberto-bayardo Apr 7, 2026
efbe263
reuse context
roberto-bayardo Apr 8, 2026
35d776c
track page_evictions
roberto-bayardo Apr 10, 2026
8176b29
fix counting
patrick-ogrady Apr 13, 2026
54d11eb
[runtime] Cleanup Page Fault Metrics (#3586)
patrick-ogrady Apr 14, 2026
04d387e
Merge branch 'main' into pr/3544
patrick-ogrady Apr 14, 2026
60cb5f6
[runtime] Page Cache Cleanup (v2) (#3600)
patrick-ogrady Apr 15, 2026
d92aa60
Merge remote-tracking branch 'origin/main' into pr/3544
patrick-ogrady Apr 15, 2026
1c1f815
nits
patrick-ogrady Apr 15, 2026
943f995
fmt
patrick-ogrady Apr 15, 2026
9586ad8
align
patrick-ogrady Apr 15, 2026
4c18bfb
more labeling
patrick-ogrady Apr 15, 2026
d9443e8
nits
patrick-ogrady Apr 15, 2026
22cf5c6
nits
patrick-ogrady Apr 15, 2026
4f7657c
nits
patrick-ogrady Apr 15, 2026
2bdca32
nits
patrick-ogrady Apr 15, 2026
467b9ca
more labeling
patrick-ogrady Apr 15, 2026
bcd3ae7
use db
patrick-ogrady Apr 15, 2026
fe305e0
nits
patrick-ogrady Apr 15, 2026
c7003c1
fix remaining clone
patrick-ogrady Apr 15, 2026
da89740
fix labels
patrick-ogrady Apr 15, 2026
7623c3d
more labels
patrick-ogrady Apr 15, 2026
f85bcc2
more nits
patrick-ogrady Apr 15, 2026
e814444
fmt
patrick-ogrady Apr 15, 2026
be8237d
major diff
patrick-ogrady Apr 15, 2026
0f33210
fmt
patrick-ogrady Apr 15, 2026
27a19e3
fix dynamic labels
patrick-ogrady Apr 15, 2026
c536581
nits
patrick-ogrady Apr 15, 2026
9c30aed
fix restarts
patrick-ogrady Apr 15, 2026
79191ac
recovery
patrick-ogrady Apr 15, 2026
5de0e76
nit
patrick-ogrady Apr 15, 2026
ae2616d
nits
patrick-ogrady Apr 15, 2026
052053d
fix missing labels
patrick-ogrady Apr 15, 2026
bf166f4
journal
patrick-ogrady Apr 15, 2026
22f293a
more changes
patrick-ogrady Apr 15, 2026
6279852
fmt
patrick-ogrady Apr 15, 2026
5b3522b
fix
patrick-ogrady Apr 15, 2026
cf8fc90
nits
patrick-ogrady Apr 15, 2026
cea5925
[runtime] Refactor Context (#3614)
patrick-ogrady Apr 17, 2026
0066f21
Merge branch 'main' into pr/3544
patrick-ogrady Apr 17, 2026
e512537
nits
patrick-ogrady Apr 17, 2026
7e44f56
nits
patrick-ogrady Apr 19, 2026
c625525
Merge remote-tracking branch 'origin/main' into pr/3544
patrick-ogrady Apr 20, 2026
ed497e8
dedup
patrick-ogrady Apr 20, 2026
a1b684f
nits
patrick-ogrady Apr 20, 2026
180d065
cleanup
patrick-ogrady Apr 20, 2026
1e5366c
Merge branch 'main' into pr/3544
patrick-ogrady Apr 21, 2026
83ba05b
Merge remote-tracking branch 'origin/main' into pr/3544
patrick-ogrady Apr 21, 2026
be6cc74
add changes
patrick-ogrady Apr 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 33 additions & 13 deletions .github/scripts/check_conformance_label.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ required_labels=(
breaking-api
)

# Get changed files
diff=$(gh pr diff "$PR_NUMBER" --name-only)
# GitHub may refuse to render full PR diffs once they exceed the API's line cap.
# Use the paginated files API instead so large PRs still work.
repo="${GITHUB_REPOSITORY:-$(gh repo view --json nameWithOwner --jq '.nameWithOwner')}"
files=$(gh api --paginate --slurp "/repos/${repo}/pulls/${PR_NUMBER}/files")

# Filter for conformance.toml files
changed=$(echo "$diff" | grep 'conformance\.toml$' || true)
changed=$(jq -r '.[] | .[] | select(.filename | endswith("conformance.toml")) | .filename' <<<"$files")

if [ -z "$changed" ]; then
echo "No conformance.toml files changed"
Expand All @@ -22,21 +24,39 @@ echo "Conformance files changed:"
echo "$changed"
echo ""

# Check if any conformance.toml changes include deletions
# Check if any conformance.toml changes include deletions or other non-additive edits.
# If GitHub omits the patch for an existing file, require a label conservatively since
# we can no longer prove the change is additive.
has_deletions=false
current_file=""
while IFS= read -r line; do
# Track which file we're in
if [[ "$line" =~ ^diff\ --git\ a/(.*)\ b/ ]]; then
current_file="${BASH_REMATCH[1]}"
while IFS= read -r file; do
filename=$(jq -r '.filename' <<<"$file")
status=$(jq -r '.status' <<<"$file")
patch_present=$(jq -r 'has("patch")' <<<"$file")

if [[ "$status" == "removed" || "$status" == "renamed" ]]; then
has_deletions=true
echo "Deletion/modification found in: $filename ($status)"
break
fi
# If we're in a conformance.toml file and see a deletion line (starts with - but not ---)
if [[ "$current_file" == *conformance.toml ]] && [[ "$line" =~ ^-[^-] ]]; then

if [[ "$status" != "added" && "$patch_present" != "true" ]]; then
has_deletions=true
echo "Deletion/modification found in: $current_file"
echo "Unable to inspect patch for existing conformance file: $filename"
break
fi
done < <(gh pr diff "$PR_NUMBER")

if jq -e '
(.patch // "")
| split("\n")
| any(startswith("-") and (startswith("---") | not))
' <<<"$file" >/dev/null; then
has_deletions=true
echo "Deletion/modification found in: $filename"
break
fi
done < <(
jq -c '.[] | .[] | select(.filename | endswith("conformance.toml"))' <<<"$files"
)

if [ "$has_deletions" = "false" ]; then
echo "All conformance.toml changes are additive, no label required"
Expand Down
6 changes: 3 additions & 3 deletions broadcast/fuzz/fuzz_targets/broadcast_engine_operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use commonware_cryptography::{
Digestible, Hasher, Sha256, Signer,
};
use commonware_p2p::{simulated::Network, Recipients};
use commonware_runtime::{deterministic, Buf, BufMut, Clock, Metrics, Quota, Runner};
use commonware_runtime::{deterministic, Buf, BufMut, Clock, Quota, Runner, Supervisor};
use commonware_utils::NZUsize;
use libfuzzer_sys::fuzz_target;
use rand::{seq::SliceRandom, SeedableRng};
Expand Down Expand Up @@ -183,7 +183,7 @@ fn fuzz(input: FuzzInput) {

// Create network
let (network, oracle) = Network::<deterministic::Context, PublicKey>::new_with_peers(
context.with_label("network"),
context.child("network"),
commonware_p2p::simulated::Config {
max_size: 1024 * 1024,
disconnect_on_block: false,
Expand Down Expand Up @@ -215,7 +215,7 @@ fn fuzz(input: FuzzInput) {
};

// Create engine
let engine_context = context.with_label("peer").with_attribute("index", i);
let engine_context = context.child("peer").with_attribute("index", i);
let (engine, mailbox) =
Engine::<_, PublicKey, FuzzMessage, _>::new(engine_context, config);
mailboxes.insert(public_key.clone(), mailbox);
Expand Down
3 changes: 1 addition & 2 deletions broadcast/src/buffered/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ where
let (mailbox_sender, mailbox_receiver) = mpsc::channel(cfg.mailbox_size);
let mailbox = Mailbox::<P, M>::new(mailbox_sender);

// TODO(#1833): Metrics should use the post-start context
let metrics = metrics::Metrics::init(context.clone());
let metrics = metrics::Metrics::init(&context);

let result = Self {
context: ContextCell::new(context),
Expand Down
57 changes: 28 additions & 29 deletions broadcast/src/buffered/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ impl SequencerLabel {
}

/// Metrics for the [super::Engine]
#[derive(Default)]
pub struct Metrics {
/// Number of broadcasts received by peer
pub peer: Family<SequencerLabel, Counter>,
Expand All @@ -39,33 +38,33 @@ pub struct Metrics {

impl Metrics {
/// Create and return a new set of metrics, registered with the given context.
pub fn init<E: RuntimeMetrics>(context: E) -> Self {
let metrics = Self::default();
context.register(
"peer",
"Number of broadcasts received by peer",
metrics.peer.clone(),
);
context.register(
"receive",
"Number of received messages by status",
metrics.receive.clone(),
);
context.register(
"subscribe",
"Number of `subscribe` requests by status",
metrics.subscribe.clone(),
);
context.register(
"get",
"Number of `get` requests by status",
metrics.get.clone(),
);
context.register(
"waiters",
"Number of digests being awaited",
metrics.waiters.clone(),
);
metrics
pub fn init<E: RuntimeMetrics>(context: &E) -> Self {
Self {
peer: context.register(
"peer",
"Number of broadcasts received by peer",
Family::default(),
),
receive: context.register(
"receive",
"Number of received messages by status",
status::Counter::default(),
),
subscribe: context.register(
"subscribe",
"Number of `subscribe` requests by status",
status::Counter::default(),
),
get: context.register(
"get",
"Number of `get` requests by status",
status::Counter::default(),
),
waiters: context.register(
"waiters",
"Number of digests being awaited",
Gauge::default(),
),
}
}
}
Loading
Loading