Skip to content

ci: adopt the current node.js.yml and standards-check.yml - #49

Merged
windkh merged 3 commits into
mainfrom
chore/ntrip-align-workflows
Aug 20, 2026
Merged

ci: adopt the current node.js.yml and standards-check.yml#49
windkh merged 3 commits into
mainfrom
chore/ntrip-align-workflows

Conversation

@windkh

@windkh windkh commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Re-opened as new PR because the original #48's base branch was deleted when #47 merged. Same content — see #48 for full rationale.

windka and others added 3 commits August 20, 2026 11:31
The standard was pinned to a commit tarball
(codeload.../tar.gz/1726fe5, node-red-standards 0.3.0), so this repo stopped
receiving it three releases ago while `standards-check` kept reporting a clean
audit against the frozen copy. That is also why .github/workflows/node.js.yml
here still has no coverage step: the workflow that added one never arrived.
Now `github:windkh/node-red-standards`, which dependabot can move; 0.5.0 treats
any other specifier for itself as drift.

Adding the c8 block matters more than it looks. There was none, and
`c8 --check-coverage` with no block falls back to c8's own defaults -- 90% lines.
Measured here: 56.56% lines, 71.6% branches, 64% functions. So the moment the
current node.js.yml arrives with its `npm run coverage:check` step, CI would have
gone red on a threshold nobody chose. The thresholds are therefore set explicitly
at the measured floor, and the reporter now emits lcov so the workflow's coverage
artifact contains something readable instead of only c8's raw V8 dump.

Verified: lint, format:check, 20 tests, coverage:check all pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0.5.1 adds one audit check: c8.lines must be stated explicitly. c8 defaults it
to 90 rather than 0, so an omitted floor is a coverage gate nobody chose. This
repo already declares one, so the check passes as-is.

Refreshed with `npm update` rather than `npm install`, which does not re-resolve
a git dependency whose existing entry already satisfies the specifier -- the
mechanism that had kept this reference stale.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The last of the pin damage. While node-red-standards was frozen at 0.3.0 these
two workflows never received an update, and both mattered.

standards-check.yml did `npm ci` + `npx nrstd audit`, i.e. it audited against the
version in this repo's own lockfile -- 0.3.0, whose rule set had ten checks, none
of which this repo failed. So it reported a clean 10/10 for three releases while
.gitattributes, the workflows and the c8 block went unexamined, because those
rules did not exist in the frozen copy. The template form
(`npx --yes github:windkh/node-red-standards audit`) always resolves the current
standard, which is the only form that can detect drift -- a drift detector pinned
to an old rule set reports on the wrong question. It is also faster: 13s against
21s, since there is no install to do.

node.js.yml had no coverage step at all, which is why the missing c8 block here
stayed invisible. It now runs `npm run coverage:check` and uploads the readable
half of the report as a build artifact. Also drops `npm run build --if-present`,
a leftover from GitHub's starter workflow -- there is no build script.

npm-publish.yml is deliberately left alone. It is not stale, it is a different
model: triggered by a version tag and creating the GitHub release itself, where
the template is triggered by a manually created release. That is a decision to
make rather than a drift to correct, raised separately.

Verified locally on this branch: lint, format:check, 20 tests, coverage:check
exits 0, and coverage/lcov.info plus coverage/lcov-report are produced -- the
paths the artifact step uploads.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@windkh
windkh merged commit 6635c35 into main Aug 20, 2026
4 checks passed
@windkh
windkh deleted the chore/ntrip-align-workflows branch August 20, 2026 14: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.

1 participant