Skip to content

Test the workflow-audit classifiers against the shipped path window, not a stale copy - #1122

Merged
nedtwigg merged 1 commit into
mainfrom
fix/workflow-audit-test-window
Oct 16, 2026
Merged

nedtwigg merged 1 commit into
mainfrom
fix/workflow-audit-test-window

Conversation

@dormouse-bot

Copy link
Copy Markdown
Collaborator

scripts/workflow-audit.test.mjs ran the shipped classifiers against its own typed-out WINDOW list, which had four paths. The workflow's list in .github/workflows/workflow-audit.yaml has eight, since .gitattributes, scripts/setup-git.mjs, scripts/md-merge.mjs and scripts/md-unwrap.mjs joined it. So is_tend_regen and is_clean_merge were tested against a narrower window than CI runs. That's the same drift the workflow's own comment warns about when it derives WINDOW_NON_WORKFLOW instead of typing out a second list.

The test now reads both WINDOW lines from the run block, the same way it already reads the classifier, and fails if either line is missing. A new case checks that a regeneration which also edits scripts/md-unwrap.mjs is refused. Run against the old four-path list, that case fails. node --test scripts/workflow-audit.test.mjs passes 29/29.

This is a test-only change. The workflow itself is unchanged.

… a stale copy

The test typed out WINDOW with four paths; the shipped step has eight since
.gitattributes and the markdown merge scripts joined the window, so the
classifiers were exercised against a narrower window than CI runs. Extract
both WINDOW lines from the run block, as the classifier already is, and pin
that a regeneration also editing scripts/md-unwrap.mjs is refused.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: b2f0603
Status: ✅  Deploy successful!
Preview URL: https://9fdf5c63.mouseterm.pages.dev
Branch Preview URL: https://fix-workflow-audit-test-wind.mouseterm.pages.dev

View logs

@nedtwigg
nedtwigg merged commit 8ebde7f into main Oct 16, 2026
12 checks passed
@nedtwigg
nedtwigg deleted the fix/workflow-audit-test-window branch October 16, 2026 15:58

This branch is waiting to be deployed

1 waiting deployment
hosted-preview — b2f06030 Waiting Oct 16, 2026 by nedtwigg via cleanup #1365
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.

2 participants