Repository navigation
row 159: gate runner excuses hold a figure; grouped std imports are seen; ceiling-census refuses a missing base (audit xtask D HIGH 1-3) - #836
Merged
Conversation
… skipped floor check Hole (xtask-D finding 3, prior X2-1): ceiling_census nested if-let Ok(base_ref) / Ok(git_show) / Ok(parse_str) with no else arm, so a detached checkout with no XTASK_CEILING_BASE, a base without the ceilings file, or an unparsable base copy skipped lowered_floors, the deleted-ledger check and the moved-out accounting, and the row printed 'none below its pinned floor'. Fix: base_ceilings() returns the base and its parsed copy or the reason there is none; every Err is a census problem. RED plants (construction selftest, census_base_cases): a synthetic base whose ref resolves but carries no qa/construction.toml, and one whose copy does not parse. The old code skipped both arms and kept the row PASS. The green fixture pins a synthetic base when the checkout has none, so its question stays the rules. scripts/verify-1.6.0-done.sh runs ship-ready with no base; it now names one as CI does (caller's value, else MODERNCI_TO_SHA, else the merge-base with origin/predev).
Hole (xtask-D finding 2): the pure-kind no-I/O ban matched escaped
literals per line (rules2.rs source_denylist) and the denylist own-src
half matched substrings per line (denylist.rs own_src_hits_over).
`use std::{fs, net::TcpStream};`, laid out over lines by rustfmt,
contains neither `std::fs` nor `std::net`, so both measured 0 and the
crate's row passed.
Fix: denylist::use_tree_hits gathers each use / extern crate statement
to its ';', expands the tree (nested groups, self, as, globs) to full
paths and matches them; an import binding an ancestor under another
name (`use std::{self as s}`, `use std as s`, `use std::*`) is followed
into the file. Both scans add these hits.
RED plants: construction selftest 'every pure-kind crate opens a socket
and a file through a grouped std import' (zz_planted_grouped_io.rs in
every pure-kind crate; no line spells a pattern, so the old scan kept
every source-denylist row PASS); denylist battery
check_grouped_use_is_red (the multi-line group must name std::fs and
std::net, and std::{self as s} + s::env::var must name std::env; the
old scan named nothing).
Predev: no grouped or aliased std/tokio import of a banned module in any
pure-kind crate, so no row moves.
…never when it did not run Hole (xtask-D finding 1): only_rows_unexplained compared row ids only. A fourth pick_among( site kept one-pick-site FAIL and excused; one more plane-local duplicate added a line to the already-FAIL structure-lint:plane-dup:unledgered row and was excused. Every problem about a named id was swallowed, and the staleness check counted that same problem as still red, so deleting [rules.one-pick-site] (rule Err, row never emitted, 'one-pick-site: owed but no row was recorded — DID NOT RUN') was excused for ever and gate --all / --posture / the turnstile stayed EXCUSED. Fix: StandingReds carries figures; a named red row is excused only when the leading count of its detail is at or below its figure, the reconciler's '<id>: FAIL' line only beside an excused row, and any other problem (DID NOT RUN, CONFLICT, SKIP) never. Figures are today's measurements as the gate's own runs record them (ModernCI gates logs of predev at 00555bd and 40a4080): one-pick-site 3, structure-lint:plane-dup:unledgered 22. Which rows are excused is unchanged. RED plants (posture_tests): a_standing_row_measuring_above_its_figure_ is_not_excused (one-pick-site at figure+1 was excused by the old id match; a count-less detail likewise) and a_named_row_that_did_not_run_is_not_excused (one-pick-site DID NOT RUN was excused by the old prefix filter). The id-only fixtures now carry the held figure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What. Three gate holes from the xtask part-D reading are closed, one commit each:
xtask/src/gates/mod.rs). An excuse now holds the row's measured figure:The held figures are the ones predev measures today:
one-pick-site= 3 andstructure-lint:plane-dup:unledgered= 22, read from the ModernCI gates logs of the last predev landings.construction/rules2.rs,denylist.rs). The pure-kind no-I/O ban and the denylist own-source scan now read wholeuse/extern cratestatements. They expand groups, nesting,self,asand globs, and they follow an alias ofstd/tokio. Souse std::{fs, net::TcpStream};is seen.construction/census.rs).ceiling-censusturns red when no base resolves, when the base has noqa/construction.toml, or when the base copy does not parse.scripts/verify-1.6.0-done.shnow setsXTASK_CEILING_BASEwhen it is unset, fromMODERNCI_TO_SHAor else the merge-base with origin/predev.Why. Law 9: a gate that cannot fail is no evidence. Each hole let a tree break the rule while the gate stayed green (findings at predev 00555bd).
RED plants, each passing green on the old code:
posture_tests::a_standing_row_measuring_above_its_figure_is_not_excusedposture_tests::a_named_row_that_did_not_run_is_not_excusedzz_planted_grouped_io.rscheck_grouped_use_is_redcensus_base_cases(no ceilings file at the base; an unparseable base copy)Predev. No pure-kind crate has a grouped or aliased banned import, so no row moves. No ceiling or figure was raised.
Sequencing. #787 strikes
structure-lint:plane-dup:unledgeredfrom the standing reds. Whichever of #787 and this PR lands second must also delete that row'sSTRUCTURE_LINT_STANDING_FIGURESentry.