Skip to content

TEST — negative test for the base-branch guard (#164). MUST BE RED. Do not merge. - #165

Closed
heydryft wants to merge 1 commit into
ci/base-must-be-masterfrom
ci/base-guard-proof
Closed

heydryft wants to merge 1 commit into
ci/base-must-be-masterfrom
ci/base-guard-proof

Conversation

@heydryft

Copy link
Copy Markdown
Contributor

Do not merge. This PR is an instrument, not a change.

This is the negative test for the base-branch lane added in #164.

A guard that has never been observed failing is the exact fault it exists to catch — three guards did that today. So before #164 is relied on, the guard is pointed at exactly the state it is meant to refuse.

Base of this PR: ci/base-must-be-master. Not master.

Expected result

check expected
Base branch FAILURE — ::error::This PR targets 'ci/base-must-be-master', not 'master'.
CI complete FAILURE — it needs: base-branch, and treats any non-success as a refusal to report green

The other lanes are expected to pass; they are not what is being tested. What is being tested is that a non-master base is now red rather than blank.

The workflow file used for a pull_request event comes from the merge ref (head merged into base). Both refs here contain the guard, so it does run — that is itself part of what this confirms.

Contrast

#164 is the same lane with base = master, where Base branch must be green. Failing-then-passing evidence from both is quoted in the merge report.

Cleanup

Closed and the branch deleted as soon as the red is recorded. It carries one throwaway file, .github/BASE_GUARD_PROOF.md, which exists only so the branch has a commit.

… branch, not master

A guard that cannot be shown failing is the exact fault it exists to catch.
This branch's PR is deliberately based on ci/base-must-be-master, so the
base-branch lane must go RED and take CI complete with it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SpVNMpb13HkUXqSqbN1o9H
@github-actions

Copy link
Copy Markdown
Code Metrics Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Language              Files        Lines         Code     Comments       Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 C Header                  5          305          210           52           43
 CSS                       2         1181         1036           34          111
 CUDA                     73        25129        18043         4319         2767
 Dockerfile                1           39           22            8            9
 JavaScript               16         3546         2676          482          388
 Jinja2                    7          694          656            5           33
 JSON                     74         4600         4597            0            3
 Makefile                  1            6            5            0            1
 Metal Shading Lan|       33        12224         9431         1142         1651
 PowerShell                1          300          227           30           43
 Python                  145        15139        12482          811         1846
 Shell                    37         8630         5732         2323          575
 Plain Text                4         3801            0         2479         1322
 TOML                     33         1498         1294           54          150
 YAML                      3           25           23            2            0
─────────────────────────────────────────────────────────────────────────────────
 HTML                      4         2687         2604           43           40
 |- CSS                    2          543          479           37           27
 |- JavaScript             1         1233         1215           12            6
 (Total)                             4463         4298           92           73
─────────────────────────────────────────────────────────────────────────────────
 Jupyter Notebooks         4          122           83           23           16
 |- Markdown               1           60           30           22            8
 |- Python                 1          122          113            1            8
 (Total)                              304          226           46           32
─────────────────────────────────────────────────────────────────────────────────
 Markdown                199        39948            0        30698         9250
 |- BASH                  72         1654         1202          331          121
 |- C                      3           17           17            0            0
 |- CUDA                   2           84           56           16           12
 |- JSON                  18          708          708            0            0
 |- PowerShell             1            1            1            0            0
 |- Python                23         1008          787          113          108
 |- Rust                  65         2048         1713           77          258
 |- TOML                   6          207          164            0           43
 |- YAML                   4           38           33            5            0
 (Total)                            45713         4681        31240         9792
─────────────────────────────────────────────────────────────────────────────────
 Rust                    671       324354       279943        15914        28497
 |- Markdown             489        27607          471        23817         3319
 (Total)                           351961       280414        39731        31816
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Total                  1313       479558       346053        82850        50655
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

@heydryft

Copy link
Copy Markdown
Contributor Author

Result recorded — the guard failed exactly as intended. Closing.

Run 32242984254, job Base branch:

head: ci/base-guard-proof
base: ci/base-must-be-master
##[error]This PR targets 'ci/base-must-be-master', not 'master'. ...
##[error]Process completed with exit code 1

Base branch = FAILURE.

The contrast case, #164 (identical lane, base = master), reports Base branch = SUCCESS.

This also confirms the delivery mechanism, which was the part worth checking rather than assuming: for pull_request events GitHub builds the workflow from refs/pull/N/merge, so a stacked PR really does execute the guard that refuses it — the lane is not skipped along with everything else.

Closing; the evidence lives in #164's thread and in the run above. The throwaway .github/BASE_GUARD_PROOF.md goes with the branch.

@heydryft heydryft closed this Aug 19, 2026
@heydryft
heydryft deleted the ci/base-guard-proof branch August 19, 2026 11:34
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.

1 participant