ci: the diagnostics publisher must not be able to fail the gate - #27
Merged
Merged
Conversation
item 8d's pr went red with a green gate. `verify` on the pull_request event
failed at `publish diagnostics` — three steps after the wasm check, the test
gate and clippy had all passed. the step ran `if: always()` and force-pushed
to a single `diagnostics` branch, so the push- and pull_request-triggered
runs of the SAME commit reached it together, one lost the ref lock ("cannot
lock ref 'refs/heads/diagnostics': is at X but expected Y"), and its
non-zero exit took the whole job with it.
two defects:
- it published on SUCCESS. the workflow header says "on any failure this
workflow publishes"; the code said always(). every green run therefore
overwrote the failure log the next reader needed — the words-vs-code gap
this project keeps rediscovering. now `if: failure()`.
- it could fail the job. the push is retried three times with backoff, then
gives up with a ::warning:: and exit 0. a lost diagnostics log costs a
reader one click into the job log printed directly above it; a red gate
over one costs a landing.
D9's shape applied to ci: a diagnostic that breaks the thing it observes is
not a diagnostic. pinned by tests/ci_gate.rs and verified in both directions
— flipping the step back to always() reds the guard.
workflow_source() now normalizes \r\n, because this checkout has
core.autocrlf=true and every multi-line shape guard would otherwise go red
locally while ci passed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Found the honest way: #26 went red with a green gate.
verifyon thepull_requestevent failed atpublish diagnostics— three steps after the wasm check, the test gate and clippy had all passed.The step ran
if: always()and force-pushed to a singlediagnosticsbranch, so the push- and pull_request-triggered runs of the same commit reached it together, one lost the ref lock, and its non-zero exit took the whole job with it.two defects
always(). Every green run therefore overwrote the failure log the next reader needed — the same words-vs-code gap build item 3 named as this project's recurring failure mode. Nowif: failure().::warning::and exit 0. A lost diagnostics log costs a reader one click into the job log printed directly above it. A red gate over one costs a landing.This is D9's shape applied to CI: an escape hatch that only works when things are fine is not an escape hatch, and a diagnostic that breaks the thing it observes is not a diagnostic.
guard
the_diagnostics_publisher_cannot_turn_a_green_gate_redintests/ci_gate.rs, verified in both directions — flipping the step back toalways()reds it:workflow_source()now normalizes\r\n. This checkout hascore.autocrlf=trueand every multi-line shape guard would otherwise go red locally while CI passed — the trapboot_reconcilefell into in #16, recurring exactly as the board predicted.note for reading a red PR here
ciruns twice per PR (push and pull_request). When one is green and the other red on the same sha, the difference is not the code — look at which step failed before assuming the gate caught something. That is written intomemory/status.md.bash ci/run_tests.sh→ unit tests + 20 suites + clippy.smoke-previewwill be red for the usual Vercel Deployment Protection reason.🤖 Generated with Claude Code