[ci] Define a typed CI coverage policy - #3575
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## G2no4jjfqasubxit6mn7xvdcyd3ko5ji3 #3575 +/- ##
==================================================================
Coverage 91.85% 91.85%
==================================================================
Files 20 20
Lines 6093 6093
==================================================================
Hits 5597 5597
Misses 496 496 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4aa8517069
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b782d7c to
146dbe6
Compare
4aa8517 to
0c5a889
Compare
|
Authored by an agent, posting via joshlf's account @codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
146dbe6 to
f3da816
Compare
0c5a889 to
057e851
Compare
|
Authored by an agent, posting via joshlf's account @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 057e851aee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f3da816 to
f25c5da
Compare
057e851 to
0be1058
Compare
|
Authored by an agent, posting via joshlf's account @codex review Please review the current head. Treat earlier reviews of older commits as stale. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0be1058023
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Describe ordinary build, Miri, and semver coverage in a versioned TOML file which the repository-owned zc tool parses into typed data. Keep workflow permissions, secrets, runners, action references, and publication in the hand-written workflows so generated data cannot grant privileges. Reject unknown fields, unsafe paths, duplicate or dangling identifiers, overlapping work, incomplete target coverage, stale waivers, and matrix limits above GitHub's bounds. Require semver checks to use the semantic stable-aggregate profile and the pinned-stable toolchain source; policy names may change without weakening either constraint. Report independent semantic errors together and preserve deterministic ordering throughout the validated model. Preflight selected Cartesian products with saturating arithmetic before allocating their cells. Count the complete required Miri universe without materializing it. Validated selected cells are a distinct subset of that universe, so equal cardinality proves complete coverage. A malformed policy with a large missing product receives one bounded summary instead of one allocation and diagnostic per missing cell. This commit only establishes and tests the policy boundary. Existing workflows remain authoritative until later commits add inventory, planning, baseline comparison, and shadow-mode integration. Tests: CARGO_NET_OFFLINE=true ./ci/check_tools.sh Tests: ./ci/check_fmt.sh *Authored by an agent, posting via joshlf's account* gherrit-pr-id: Gqofuqcjxqt64bw7di2snqyunualoi3ht
0be1058 to
dabba7d
Compare
f25c5da to
540594a
Compare
|
Authored by an agent, posting via joshlf's account @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dabba7debd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| || miri_logical_cell_count > materialization_limit | ||
| || reduced_event_cell_count > materialization_limit | ||
| || full_event_cell_count > materialization_limit | ||
| { | ||
| return; |
There was a problem hiding this comment.
Continue non-materializing validation before returning
When either event exceeds max_plan_cells, this returns from all remaining validation, not just the unsafe Cartesian expansion. As a result, the same policy can also contain an unknown Miri toolchain, invalid semver references, or unused target sets without reporting those independent errors, forcing policy authors through multiple validation cycles despite the validator's aggregated-diagnostics contract. Keep the cell materialization and audits behind this guard, but still run the later checks that do not construct Cartesian products.
Useful? React with 👍 / 👎.
| let mut members = match raw.selection { | ||
| RawTargetSetSelection::All => targets.keys().cloned().collect(), | ||
| RawTargetSetSelection::MiriEligible => targets | ||
| .iter() | ||
| .filter(|(_, target)| target.miri_eligible) | ||
| .map(|(id, _)| id.clone()) | ||
| .collect(), |
There was a problem hiding this comment.
Bound target-set expansion before cloning every target
When a malformed policy declares many targets and many distinct selection = "all" target sets, each set clones every target into its own BTreeSet here before any planning limit is checked. Thus an O(n)-sized policy can allocate O(n²) identifiers and exhaust CI memory even if its eventual scopes exceed max_plan_cells and are rejected by the later preflight. Apply a hard declaration/aggregate-membership bound before resolving these sets, or preserve broad selections symbolically until bounded cell expansion.
Useful? React with 👍 / 👎.
Describe ordinary build, Miri, and semver coverage in a versioned TOML
file which the repository-owned zc tool parses into typed data. Keep
workflow permissions, secrets, runners, action references, and
publication in the hand-written workflows so generated data cannot
grant privileges.
Reject unknown fields, unsafe paths, duplicate or dangling identifiers,
overlapping work, incomplete target coverage, stale waivers, and matrix
limits above GitHub's bounds. Require semver checks to use the semantic
stable-aggregate profile and the pinned-stable toolchain source; policy
names may change without weakening either constraint. Report independent
semantic errors together and preserve deterministic ordering throughout
the validated model.
Preflight selected Cartesian products with saturating arithmetic before
allocating their cells. Count the complete required Miri universe
without materializing it. Validated selected cells are a distinct subset
of that universe, so equal cardinality proves complete coverage. A
malformed policy with a large missing product receives one bounded
summary instead of one allocation and diagnostic per missing cell.
This commit only establishes and tests the policy boundary. Existing
workflows remain authoritative until later commits add inventory,
planning, baseline comparison, and shadow-mode integration.
Tests: CARGO_NET_OFFLINE=true ./ci/check_tools.sh
Tests: ./ci/check_fmt.sh
Authored by an agent, posting via joshlf's account
Latest Update: v10 — Compare vs v9
📚 Full Patch History
Links show the diff between the row version and the column version.
⬇️ Download this PR
Branch
git fetch origin refs/heads/Gqofuqcjxqt64bw7di2snqyunualoi3ht && git checkout -b pr-Gqofuqcjxqt64bw7di2snqyunualoi3ht FETCH_HEADCheckout
git fetch origin refs/heads/Gqofuqcjxqt64bw7di2snqyunualoi3ht && git checkout FETCH_HEADCherry Pick
git fetch origin refs/heads/Gqofuqcjxqt64bw7di2snqyunualoi3ht && git cherry-pick FETCH_HEADPull
Stacked PRs enabled by GHerrit.