Skip to content

apollo_node: forward os_input feature to committer/batcher deps#14371

Merged
matanl-starkware merged 1 commit into
mainfrom
matanl/fix-block-measurement-os-input-gating
Jun 3, 2026
Merged

apollo_node: forward os_input feature to committer/batcher deps#14371
matanl-starkware merged 1 commit into
mainfrom
matanl/fix-block-measurement-os-input-gating

Conversation

@matanl-starkware

Copy link
Copy Markdown
Collaborator

Problem

--all-features clippy builds (e.g. the code_style job) fail to compile because apollo_node exposed no os_input feature. Under --all-features, the os_input gates on shared types (apollo_committer_types, starknet_committer) get enabled, while the consumers' own os_input stays off, yielding cross-crate errors:

  • E0027 in apollo_committer::update_metrics — the os_input-gated BlockMeasurement.fetched_witnesses_count field is present in the compiled struct but omitted from the exhaustive destructure.
  • E0004 in apollo_batcher — non-exhaustive match on the os_input-gated CommitterRequestLabelValue::ReadPathsAndCommitBlock variant (added in apollo_committer: add new request handler #14003).

Reproduced on a clean main post-#14003 via cargo clippy -p apollo_node --all-targets --all-features.

Note: #14003 was expected to resolve this but does not — the E0027 still reproduces after it merged, and it additionally introduced the E0004 site.

Fix

Forward os_input from apollo_node to every direct dependency that defines it (apollo_batcher, apollo_committer, apollo_committer_types), unifying the cross-crate gate under --all-features. No #[cfg] flags removed; no source code changed.

Verification

All green against current main:

  • full PR-equivalent clippy package set with --all-features
  • cargo clippy -p apollo_node --all-targets --all-features
  • cargo clippy -p apollo_node --all-targets (no-feature path)

🤖 Generated with Claude Code

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@cursor

cursor Bot commented Jun 3, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Cargo feature wiring only; no runtime or business-logic changes.

Overview
Adds an os_input Cargo feature on apollo_node that forwards to apollo_batcher, apollo_committer, and apollo_committer_types, matching the existing cairo_native forwarding pattern.

This aligns feature gates when building with --all-features (e.g. CI clippy), so shared os_input-gated types and the batcher/committer crates compile together instead of failing with non-exhaustive matches/destructures. No Rust source or #[cfg] changes—manifest only.

Reviewed by Cursor Bugbot for commit 633c801. Bugbot is set up for automated code reviews on this repo. Configure here.

@ArielElp ArielElp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ArielElp reviewed 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on matanl-starkware).

@matanl-starkware matanl-starkware disabled auto-merge June 3, 2026 14:35
`--all-features` clippy builds enable the `os_input` gates on shared types
(`apollo_committer_types`, `starknet_committer`) while leaving the consumers'
own `os_input` feature off, because `apollo_node` exposed no `os_input` feature
to propagate it. This produced cross-crate compile errors:
- E0027 in `apollo_committer::update_metrics` (missing `os_input`-gated
  `BlockMeasurement.fetched_witnesses_count` in the destructure)
- E0004 in `apollo_batcher` (non-exhaustive match on the `os_input`-gated
  `CommitterRequestLabelValue::ReadPathsAndCommitBlock`, added in #14003)

Forward `os_input` from `apollo_node` to every direct dependency that defines
it (`apollo_batcher`, `apollo_committer`, `apollo_committer_types`) so the gate
stays unified under `--all-features`. No `#[cfg]` flags removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@matanl-starkware matanl-starkware force-pushed the matanl/fix-block-measurement-os-input-gating branch from 9e0fa10 to 633c801 Compare June 3, 2026 14:35

@matanl-starkware matanl-starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matanl-starkware reviewed 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on matanl-starkware).

@matanl-starkware matanl-starkware added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit 15da018 Jun 3, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants