Skip to content

fix(ci): L3 PURITY read zero files and its green branch was unreachable - #2918

Merged
gHashTag merged 1 commit into
masterfrom
w751
Aug 29, 2026
Merged

fix(ci): L3 PURITY read zero files and its green branch was unreachable#2918
gHashTag merged 1 commit into
masterfrom
w751

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

A step inside one of the four workflows that can block a merge, which has never
read a file.

fatal: ambiguous argument 'origin/..HEAD': unknown revision or path not in the working tree.
##[warning]L3 PURITY WARNING: Non-ASCII characters detected in source files.

Both lines appear, in that order, in the log of every successful run.

Two independent bugs

$BASE_BRANCH was empty. Computed at lines 47 and 119, each in its own
run: block, each with env: BASE_REF: ${{ github.base_ref }}. This step had no
env: block. Every run: is a fresh shell.

The if tested the wrong exit code. a | b | head returns head's status —
0 whether or not grep matched — and no pipefail is set. The warning branch was
unconditional; the green branch has never executed.

Verification

Reproduced in a two-commit repository, with a deterministic matcher rather than
grep -P: Apple's grep -P does not behave like GNU's, so verifying this on
macOS with grep measures the wrong thing.

input old fixed
pure ASCII WARNING green
one file with Cyrillic WARNING WARNING
BASE_REF unset WARNING (on a git fatal) WARNING (defaults to master, finds it)

The first row is the control: on clean input the old logic still warns.

Why it survived

A warning that is always on is indistinguishable from one that is never on. And
it is ::warning::, not ::error::, so it never failed a run — which is how a
fabricated verdict inside a required workflow went unnoticed.

Closes #2917

The step sits in `l1-traceability.yml`, one of the four workflows that can block
a merge. Two independent bugs, either one sufficient.

`$BASE_BRANCH` was empty. It is computed at lines 47 and 119, each inside its own
`run:` block and each with `env: BASE_REF: ${{ github.base_ref }}`. This step had
no `env:` block, and every `run:` is a fresh shell, so the command executed as
`git diff origin/..HEAD` and printed

    fatal: ambiguous argument 'origin/..HEAD': unknown revision or path not in
    the working tree.

in the log of every successful run.

The `if` tested the wrong exit code. `a | b | head` returns head's status, 0
whether or not grep matched, with no `pipefail` set -- so the warning branch was
unconditional and the green branch has never executed.

Reproduced in a two-commit repository with a deterministic matcher rather than
`grep -P`, because Apple's `grep -P` does not behave like GNU's and verifying
this on macOS with grep measures the wrong thing:

    old logic, pure ASCII      -> WARNING
    fixed, pure ASCII          -> green
    fixed, one Cyrillic file   -> WARNING
    fixed, BASE_REF unset      -> WARNING (defaults to master, finds it)

A warning that is always on is indistinguishable from one that is never on. It
is `::warning::` and not `::error::`, which is why a fabricated step inside a
required workflow went unnoticed for the workflow's whole history.

Closes #2917
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 23:26:20 UTC

Summary

Status Count
Total Open PRs 9
PRs with Failing Checks 7
PRs with All Checks Green 2
READY 0
FAILING 7
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=82e020cf95b2 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit c47d68f into master Aug 29, 2026
25 checks passed
@gHashTag
gHashTag deleted the w751 branch August 29, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

L3 PURITY reads zero files and its green branch is unreachable -- inside a required workflow

1 participant