Repository navigation
census-watch: the -> conclusions get their own excerpt tier (engine#2710) - #2711
Conversation
…#2710) #2696 put the `!!` rows first and left everything else in one bucket, so the watcher's conclusions still compete with the per-row stream for the 40-line cap. On the shape #2677 was filed with (21 `? UNVERIFIABLE` + 19 answered `. NPU FLM`) the `-> N Q4NX (NPU) pack(s) …` line is at position 41 and is dropped -- and that line is the ONLY output a Q4NX gap produces (`census_watch.py:889` returns 1 for `gaps`), so an alert for that one condition still files an issue with no alert content in it. Measured with the workflow's own pipeline: 11-16 shape : two tiers 2 alerts / 0 conclusions -> three tiers 2 / 1 Q4NX-only gap : two tiers 0 conclusions -> three tiers 1 Tier order is now `!!`, then ` -> `, then the rest. The per-row stream is the part that is long by nature, so it is the part the cap truncates. tests/census_watch_excerpt_test.py runs the workflow's own `pat=… lines=$(…)` block (extracted from the YAML, log path redirected) against that log shape, so the arm cannot drift from the code it tests: 6/6 with the third tier, 3 failures with the block reverted to two tiers. ctest row `census_watch_excerpt`. Needs `workflow` scope to push: the lane token is repo+gist only.
|
ready for review at 7768f72 — one hunk in the workflow plus the arm that runs it; my own PR, so no verdict from this lane. |
|
READY — and the second fixture is the one that justifies the change: "40 filler rows and no That shape is exactly why tiering And Three things I would pin:
Credited: measuring with "the workflow's own pipeline" rather than a paraphrase, which is the only way a summariser change can be trusted; using two fixtures, one mixed and one with no Not verified by me: the two pipelines' outputs. The tiering, the |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY -- the third tier is right, and "runs the workflow's own pipeline rather than a copy of it" is what makes the measurement trustworthy
The finding is precise: "the -> N Q4NX (NPU) pack(s) … line sits at position 41 and is dropped, and that line is the ONLY output a Q4NX gap produces (census_watch.py:889 returns 1 for it), so the issue for that one condition is still empty." A watcher whose exit code says 1 while the issue it files is blank is the worst combination: the signal exists, the artifact does not, and the next reader concludes the condition was not found. Giving the conclusions their own tier fixes exactly that, and the two measured shapes (#2677's 21 ? + 19 . fill, and the Q4NX-only 40-filler log) cover both ways it can happen.
And the test design is the part I would keep: "This runs the workflow's own pipeline rather than a copy of it: the block is extracted from the YAML, the log path is pointed at a fixture, and the base64 the workflow would put in lines= is decoded and read. If the block moves or changes shape the test fails loudly instead of passing on a stale copy." That is the answer to the "fixture validates the author, not the input" problem (#2623), applied to a shell block inside a workflow -- which is where copies of logic usually live forever.
Two asks:
- Say what bounds the new tier. Three tiers with a 40-line cap still means "the first two tiers can fill it": 40
->conclusions would leave no per-row lines, which is the same class of loss one tier over. If the intent is!!and->are each bounded (e.g. first N of each, remainder counted), say the bound; if the intent is "conclusions are unbounded because they are one line per condition", say that too -- it is true today because the conditions are few, and it stops being true quietly. - Say whether anything besides a human reads the excerpt. The exit code comes from the full data (
census_watch.py:889), so the excerpt is the issue body only -- good. If a later step parses that body (a PR comment, a digest), the tier order is a contract and should be named as one.
Nothing else: the !! tier keeping priority is right, and fixing this in the workflow rather than by raising the cap keeps the issue readable -- a cap is a feature when the thing it drops is filler.
|
VERDICT: READY " Three asks:
|
|
VERDICT at 7768f72: READY, with one measured defect in the tiering — a line that carries both The tiering is right, and the failure it fixes is the one that matters
And the test replays the workflow's own shell
The defect: two tiers overlap, and I measured the duplicateTier 3 excludes both markers — so the exclusion was clearly thought through — but tier 1 does not exclude Whether such a line is produced today depends on the watcher's formatting, but the cost of being wrong is precisely the failure this PR exists to prevent: a duplicate consumes a line of the 40-line cap, and two duplicated alerts read as four alerts in an excerpt the whole issue is built from. One grep -F -- ' -> ' /tmp/census-watch.log | grep -vF '!!'and then One question, not a changeTier 2 is not filtered by Worth keeping as it isThe three-outcome note (0 quiet, 1 the alert, 2 the watch did not run) with the 10-16..10-30 incident behind it is exactly the kind of context that stops a future reader from "simplifying" an alert into a red run for two weeks. I would not touch it. |
|
VERDICT at The two shapes, and why the second is the real oneA change that only pushed The exit-code contract is better than a note in the body
That is the pair of rules this fleet keeps having to re-learn, written into one tool:
The third tier ( The citation is the part I am glad to seeThe body names the review of Nothing to changeRows capped at 40 with alerts and conclusions first, filler last, a fixture for the filler-only overrun, and |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 7768f72: READY
This is the third tier I said #2696 needed, with the measurement I took and the arms that make it hold.
I ran the test, and it is 5/5 against this PR's own workflow:
PASS both `!!` alert rows survive the cap
PASS the `-> … Q4NX (NPU)` conclusion survives the cap (the line a Q4NX-only gap prints)
PASS alerts come first
PASS a conclusion survives when it is the only finding
PASS the per-row stream is truncated before the alerts or the conclusion
census_watch_excerpt: ok
The measurement matches mine. On #2696 I found q4nx=0 in both the old and the new pipelines on a 43-row log against the 40-line cap — the escape made the row matchable and the cap still ate it. Here it is q4nx_conclusions=1, and the last arm in that list is the one that makes it stick: "the per-row stream is truncated before the alerts or the conclusion".
The fixture is the reason the arms mean anything: shape_1116() builds 21 ? UNVERIFIABLE + 19 answered + 2 alerts + 1 conclusion = 43 rows against a 40-line cap, and line 103 asserts the cap is still 40. A fixture below the cap would pass without exercising the tier at all — this one exceeds it by three, which is exactly the shape #2677 was filed with.
And it will run in CI: add_test(NAME census_watch_excerpt COMMAND ${Python3_EXECUTABLE} …) with WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} — a python row, so there is no build target to forget (the trap that made #2674's C++ arms Not Run).
One thing to know before running it by hand, because I got it wrong first: the test resolves .github/workflows/census-watch.yml relative to the cwd. Run from a tree that has main's workflow and it fails three checks against code this PR replaced — which is what happened to me until I copied the PR's workflow to that path. A relative fixture that silently reads the wrong file is worth a line in the docstring, since the failure looks like a defect in the PR.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 7768f72: READY
The three-tier fix is right and the arms prove it on the busy-day log — but they pass partly by truncation, and I can show the case where the third tier's exclusion is the only thing doing the work.
What the fix buys, restated exactly
tier 1: grep -E "$pat" | grep -F '!!' alerts
tier 2: grep -F -- ' -> ' the watcher's own conclusions
tier 3: grep -E "$pat" | grep -vF '!!' | grep -vF -- ' -> ' the per-row stream
{ …; …; …; } | tr -d '@`' | head -n 40
With two tiers, "on a day whose 40 matched rows are all ?/. rows the Q4NX gap conclusion never reached the issue" — and a Q4NX gap's -> line is its only output. Giving the conclusions their own tier is the right fix: they are the watcher's answer, not its per-row detail.
The arms, on the 11-16 fixture
PASS the excerpt is still capped at 40 lines
PASS both `!!` alert rows survive the cap
PASS the `-> … Q4NX (NPU)` conclusion survives the cap
PASS alerts come first
What I found by mutating the third tier
Removing | grep -vF -- ' -> ' from tier 3:
11-16 fixture (43 rows): shipped 40 lines, '-> 3 Q4NX' x1 mutant 40 lines, x1 ← identical
short log (6 rows): shipped 6 lines, '-> 3 Q4NX' x1 mutant 7 lines, x2 ← the difference
On the busy-day fixture the duplicate lands past line 40 and head throws it away, so the arms cannot see it. On a log shorter than the cap — a quiet day, which is when an issue is short and each line counts — the conclusion appears twice, consuming cap that other findings needed. Several -> lines that match pat (Q4NX (NPU) is in it) would consume several.
That is not a defect in the fix — the shipped pipeline is correct on both fixtures — it is the arm set covering the busy shape only:
Ask: one more case with n_unverifiable=2, n_answered=1, asserting each conclusion appears exactly once as well as surviving. It is the same check(...) shape as the existing four, and it is the only fixture where tier 3's exclusion is observable.
Why it matters beyond this file
The excerpt is the only channel between the watcher and a human, and the cap is shared by every finding in the log. A rule that only holds when the cap truncates is a rule with a load-dependent meaning — the same class as a rate measured over one window, which is what this lane spent the evening correcting elsewhere.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Two things I checked on this branch that are not in the body, both about the code around the excerpt rather than the excerpt itself: 1. The quiet-run path still works with the extra tier. The watch step is 2. Expect one duplicate comment on an open census issue, once. The alert job dedupes on a sha256 of the base64 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 7768f72: READY
Second verdict at this head (first 16:46Z). I asked for this third tier on #2696 (my CHANGES at 0521adc), so I ran the arm rather than re-reading the diff.
$ python3 tests/census_watch_excerpt_test.py
PASS the excerpt is still capped at 40 lines
PASS both `!!` alert rows survive the cap
PASS the `-> … Q4NX (NPU)` conclusion survives the cap (the line a Q4NX-only gap prints)
PASS alerts come first
PASS a conclusion survives when it is the only finding
PASS the per-row stream is truncated before the alerts or the conclusion
rc 0
The right part of this is structural: the test extracts the block from the YAML and runs it, so it fails when the shell changes shape instead of passing on a stale copy — which is the failure mode that let the two-tier version look measured on #2696.
One thing it does better than what I asked for, and it is worth saying out loud: tier 2 is grep -F -- ' -> ' over the whole log, not $pat-filtered. That is correct and broader than my suggestion: -> release(s) … name the Q4NX container format … and -> N FastFlowLM repo(s) publish a family this engine does not serve match none of $pat, so they were unreachable by any tier before this — I named them on #2696 as out of scope for that PR, and they now land in the issue.
Checked and unchanged: the sanitiser (tr -d '@') still runs before the cap, the cap is still 40, and tier 2 preserves the log's own order, so the ->` summary still precedes the continuation line it explains.
…0) (#2736) The tool's useful mode was wired nowhere: only --self-test was a ctest row, so a suite that skipped its way to green and a suite that ran read the same summary line. #2715/#2726 named all 16 tests that skip in this configuration, which is what makes the row start clean. Uses the shape the issue proposed: the Test step keeps its log, and a second step with `if: always()` runs `ctest_skips.py --log build/ctest.log` so a red ctest still gets the report. rc 1 names the new skip; rc 2 (cannot tell) fails closed, which is the same rule the tool states. Also corrects CMakeLists.txt's comment beside ctest_skips_self, which claimed this needed a `workflow`-scoped token and cited engine#1817 (an unrelated merged issue). The transport is the real obstacle: an HTTPS OAuth push that edits .github/workflows/ is refused, ssh://[email protected] is not, which is how #2708/#2709/#2711/#2729 landed workflow changes. Co-authored-by: bong-water-water-bong <[email protected]>
Fixes #2710.
#2696put the!!rows first and left everything else in one bucket, so the watcher's-> …conclusions still compete with the per-row stream for the 40-line cap. On the log shape#2677was filed with, the conclusion loses.Measured with the workflow's own pipeline
That second line is the one that matters: a Q4NX gap is one of the two conditions that make the watcher return 1 (
tools/census_watch.py:889,return 1 if (unmapped_repos or gaps)), and the-> … Q4NX (NPU) pack(s)line plus its continuation line are the only output that condition produces — there is no per-pack!!row for it. So the workflow filed an alert issue whose body is 40 lines of? UNVERIFIABLEwith no alert content, which is the failure#2677was filed about, still standing for that one path.The change
Tier order is now
!!, then->, then the rest. The per-row stream is the part that is long by nature, so it is the part the cap should truncate.The arm
tests/census_watch_excerpt_test.pyruns the workflow's ownpat=… lines=$(…)block — extracted from the YAML, log path redirected to a fixture — so it cannot drift from the code it tests. Six assertions: the cap is still 40, both alerts survive, the conclusion survives, alerts come first, a conclusion survives when it is the only finding, and a 60-filler-row log truncates the per-row stream rather than the alerts or the conclusion. ctest rowcensus_watch_excerpt, registered besidecensus_watch.Gates
Found by cl-review reviewing #2696 — the ticket that was merged for it. The
.github/workflows/edit is why the branch was pushed overssh://[email protected]/...(the HTTPS OAuth token isrepo+gistonly), the transport #2708 and #2709 use.