fix(ci): unblock nix flake check after clippy 0.1.95 bump (#1368)
The nixpkgs bump to clippy 0.1.95 / cargo 1.95.0 added + strengthened a large batch of lints. CI denied ALL warnings (`-D warnings`) against the `pedantic = warn` workspace lint, so the bump hard-failed `nix flake check` workspace-wide with zero code changes — and would recur on every future clippy bump. Posture fix (the durable part): CI now runs `-D warnings -A clippy::pedantic`, so the default/correctness/style lints stay a hard gate while the "extra, opinionated" pedantic group is advisory only (still `warn` for local `cargo clippy` via the workspace lints table, just non-blocking in CI). `-A` rather than `-W` so the group drop doesn't re-enable the specific pedantic lints the workspace allows (e.g. `must_use_candidate`). Also fixes the genuine DEFAULT/STYLE lints the bump surfaced across the workspace (doc_lazy_continuation, collapsible_if, ptr_arg, match_like_matches_macro, …) via `cargo clippy --fix` + manual stragglers (`too_many_arguments` #[allow] on the host-config constructors), and three tests that had rotted while the CI runner was offline (#1221): - topology::top_level_agents_in_multi_root — hardcoded unsorted expected - rebuild_queue::depends_on_evicted_dep_counts_as_resolved — needs MAX_HISTORY_PER_KIND newer terminals to evict, not one - coordinator::agent_paths doctest — illustrative pseudo-code, now `ignore` Validated: clippy + formatting + cargo-test checks all pass.
This commit is contained in:
parent
35717c7bac
commit
734fe88858
18 changed files with 129 additions and 103 deletions
|
|
@ -392,17 +392,16 @@ impl RebuildQueue {
|
|||
// tool-groups change and a capabilities change for the same
|
||||
// agent are distinct operations and must not collapse into one.
|
||||
for entry in &mut inner.entries {
|
||||
let perm_type_matches = match (&entry.perm_payload, &perm_payload) {
|
||||
(Some(PermPayload::ToolGroups { .. }), Some(PermPayload::ToolGroups { .. })) => {
|
||||
true
|
||||
}
|
||||
let perm_type_matches = matches!(
|
||||
(&entry.perm_payload, &perm_payload),
|
||||
(
|
||||
Some(PermPayload::ToolGroups { .. }),
|
||||
Some(PermPayload::ToolGroups { .. })
|
||||
) | (
|
||||
Some(PermPayload::Capabilities { .. }),
|
||||
Some(PermPayload::Capabilities { .. }),
|
||||
) => true,
|
||||
(None, None) => true,
|
||||
_ => false,
|
||||
};
|
||||
Some(PermPayload::Capabilities { .. })
|
||||
) | (None, None)
|
||||
);
|
||||
if entry.state == QueueState::Queued
|
||||
&& entry.kind == kind
|
||||
&& entry.agent == agent
|
||||
|
|
@ -1505,17 +1504,21 @@ mod tests {
|
|||
None,
|
||||
);
|
||||
q.take_next();
|
||||
// One more terminal to push `dep` out of the history window.
|
||||
q.finish(dep, QueueState::Done, None);
|
||||
let extra = q.enqueue(
|
||||
QueueKind::Rebuild,
|
||||
"extra".to_owned(),
|
||||
QueueSource::Manual,
|
||||
"extra".to_owned(),
|
||||
None,
|
||||
);
|
||||
q.take_next();
|
||||
q.finish(extra, QueueState::Done, None);
|
||||
// Push `dep` out of the per-kind history window: `trim_history`
|
||||
// keeps the newest MAX_HISTORY_PER_KIND terminals per kind, so it
|
||||
// takes that many newer terminals to evict `dep`.
|
||||
for i in 0..MAX_HISTORY_PER_KIND {
|
||||
let extra = q.enqueue(
|
||||
QueueKind::Rebuild,
|
||||
format!("extra-{i}"),
|
||||
QueueSource::Manual,
|
||||
format!("extra-{i}"),
|
||||
None,
|
||||
);
|
||||
q.take_next();
|
||||
q.finish(extra, QueueState::Done, None);
|
||||
}
|
||||
// `dep` should now be evicted.
|
||||
assert!(
|
||||
q.snapshot().iter().all(|e| e.id != dep),
|
||||
|
|
|
|||
Loading…
Reference in a new issue