Skip to content

Refuse a bugfix-validation build step that failed without saying why - #115973

Merged
alexey-milovidov merged 2 commits into
ClickHouse:masterfrom
groeneai:fix-bugfix-validation-refuse-silent-edge
Sep 19, 2026
Merged

alexey-milovidov merged 2 commits into
ClickHouse:masterfrom
groeneai:fix-bugfix-validation-refuse-silent-edge

Conversation

@groeneai

@groeneai groeneai commented Aug 23, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

Related: #115969

Follow-up to #115969, which merged while this fix was in review: clickhouse-gh[bot]
correctly reported a fail-open on it.

failed_compile_edge_sources filed a failed ninja edge whose command line cannot be read
as unreadable, and unreadable withholds only the translation-unit basis. So on a log
where an overlaid test carries the only error: and a second FAILED: block is abridged,
the error-path basis still accepted the log and the job reported XFAIL. That second step
may be the linker or a fix source, so the report claimed the failure belongs to the
overlaid tests alone when the log stops describing it.

Rejecting every unreadable edge before the error-path basis is not the fix: it fails close
on the abridged single-edge log that #115747 pinned as an expected failure, whose one
FAILED: line also carries no command; I measured that rule turning it into ERROR.

What makes such an edge unaccountable is silence, not unreadability, and the job already
refuses a compile edge that raised no parsable error of its own. So an edge with no
diagnostic in its own window now joins diagnostic_free whether or not its command line
was read, and unreadable keeps only the edges that did contribute a diagnostic and
therefore cannot contradict the error path.

Verified across 14 log shapes with no mismatches: the three earlier fail-close shapes (a
readable link edge, a readable fix-source edge, two overlaid edges with the second killed)
are unchanged, and both real captured job logs resolve as before.

#115650 has since deleted ci/tests and the CI Tests job that ran it, so those tests no
longer exist in-tree. Re-measured on the merged head against origin/master as the revert
arm: the abridged single-edge log is XFAIL on both; the silent-second-FAILED:
multi-edge log is ERROR here, XFAIL on master.


Workflow [PR]
Sync PR [sync-upstream/pr/115973]

A failed ninja edge whose command line cannot be read was filed as `unreadable`,
which withholds only the translation-unit basis, so an `error:` inside an overlaid
test still satisfied the error-path basis and the log was reported XFAIL. An
abridged log can end a `FAILED:` block for the linker or a fix source that way, and
then the report claims the failure belongs to the overlaid tests alone.

Silence, not unreadability, is what makes such an edge unaccountable, and the job
already refuses a compile edge that raised no parsable error of its own. Classify
by that instead: an edge with no diagnostic in its own window joins
`diagnostic_free` whether or not its command line was read, and `unreadable` keeps
the edges that did contribute a diagnostic and so cannot contradict the error path.

Refusing every unreadable edge instead would fail close on an abridged log whose
one edge does carry the overlaid test's error, which master reports as an expected
failure.

Reported by clickhouse-gh[bot] on ClickHouse#115969.
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-review-bot PR origin: review-bot finding on a groeneai PR labels Aug 23, 2026
@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Aug 23, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [171d360]

Summary: ✅


AI Review

Summary

This follow-up fixes the previously reported fail-open: the two-edge trace from #115969 now lands in diagnostic_free/ERROR instead of the old XFAIL. The remaining issue is that the current branch state no longer has any in-tree coverage for failed_compile_edge_sources / compile_failure_attribution, so the subtle XFAIL vs ERROR boundary changed here is currently justified only by the PR description and ad hoc runs.

Findings

⚠️ Majors

  • [ci/jobs/unit_tests_bugfix_validation_job.py:546-552] This branch reclassifies silent unreadable edges into diagnostic_free, but I can't find any remaining in-tree tests for failed_compile_edge_sources or compile_failure_attribution. That means the exact multi-edge truncated-log case this PR is fixing, plus the single-edge abridged XFAIL control it must not regress, are no longer machine-checked. Suggested fix: restore focused fixture coverage around this branch, at minimum one abridged single-edge log that stays XFAIL and one multi-edge log with a silent second FAILED: block that stays ERROR.
Final Verdict

Changes requested until focused regression fixtures are restored for this parser.

Master removed the whole `ci/tests` directory in `5b3d66b1a66` ("Remove ci/tests
(attempt 2)", 51 files, no replacement location), so this branch's edits under
`ci/tests` arrive as modify/delete conflicts. Accepted the removal, and dropped
the files this branch adds there as well - keeping them would re-create a
directory master deliberately deleted.

The product change this pull request is about is unaffected; what is lost is its
CI-side unit coverage, which has nowhere to live upstream any more.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
unreadable.add(outputs)
# An unreadable edge that also said nothing is a failure with no account
# of itself, whichever step it was, so it belongs with the silent edges.
(diagnostic_free if silent else unreadable).add(outputs)

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.

This branch changes the exact XFAIL vs ERROR boundary for truncated multi-edge logs, but I can't find any remaining in-tree coverage for failed_compile_edge_sources or compile_failure_attribution now. The original two-edge fail-open is subtle, and this line also has to preserve the single-edge abridged log that should still stay XFAIL, so relying on the PR description and ad hoc runs is too weak here.

Please restore a focused fixture test around this branch: at minimum one abridged single-edge log that stays XFAIL and one multi-edge log with a silent second FAILED: block that stays ERROR. Otherwise the next edit to this parser can silently reintroduce the original fail-open.

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.

Agreed that nothing in-tree pins this boundary now, but it was not dropped by this branch. #115650 (merged 2026-08-29 22:03Z) deleted ci/tests - 49 test modules, including test_unit_tests_bugfix_validation.py, which held this job's coverage - and removed the CI Tests job that ran them (ci/jobs/ci_tests_job.py plus its ci/defs/job_configs.py entry and its ci/workflows/pull_request.py registration). That removal is merged into this branch as 171d3601, which is why the coverage disappeared mid-review.

So a fixture file restored under ci/tests/ would not be executed by anything: no CI Tests reference is left in ci/defs/ or ci/workflows/, and tests/ci/ holds library modules only. An unrun test cannot go red, so it would not catch the next edit to this parser either. I am not adding one there.

Here is the measurement instead. Both shapes you name, through compile_failure_attribution at head 171d3601, with origin/master's copy of the module as the revert arm:

log shape this head master (revert)
abridged single-edge, only error: inside the overlaid test XFAIL XFAIL
multi-edge, second FAILED: block silent ERROR XFAIL

First row: every compile error is inside the PR's changed test files (...), with the edge bucketed unreadable, which the error-path basis tolerates. Second row: failed build steps with no compiler diagnostic of their own: src/unit_tests_dbms. The pair discriminates, so it is the boundary you asked to see pinned. Unchanged in both directions: a readable link edge and a readable fix-source edge stay ERROR, both real captured job logs stay XFAIL, and refusing every unreadable edge before the error path still turns the first row into ERROR, which is why that form was declined.

If the CI harness tests get a runner again, I will add these two fixtures to it.

@clickhouse-gh clickhouse-gh Bot added the comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). label Sep 4, 2026
@alexey-milovidov alexey-milovidov self-assigned this Sep 19, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 19, 2026
Merged via the queue into ClickHouse:master with commit 3e689f8 Sep 19, 2026
175 checks passed
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). groeneai-origin-review-bot PR origin: review-bot finding on a groeneai PR manual approve Manual approve required to run CI pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants