Skip to content

ci: adopt the shared PR checks workflow; add missing audit scripts - #24

Merged
will-lamerton merged 3 commits into
mainfrom
ci/shared-pr-checks
Aug 30, 2026
Merged

ci: adopt the shared PR checks workflow; add missing audit scripts#24
will-lamerton merged 3 commits into
mainfrom
ci/shared-pr-checks

Conversation

@will-lamerton

Copy link
Copy Markdown
Member

Sixth repo onto the shared pr-checks workflow in Nano-Collective/.github.

nanoterm had no PR checks at all — only build.yml and update-badges.yml — so despite having a full test suite, nothing ran on a pull request.

Three things had to clear first

1. Missing audit scripts

nanoterm was the only repo in the org without test:audit and test:security, so test:all meant something different here than everywhere else. Both now match the org definitions and are wired into scripts/test.sh.

2. knip rejected the new script

Adding test:security broke knip:

Unlisted binaries (1)
semgrep  package.json

semgrep is a system binary, not a dependency, and nanoterm had no knip config at all so it ran with defaults. Added knip.json allowlisting it — the same approach sentinel and prompt-scrubber already use.

3. Coverage is below the org floor

61.5% against a standard of 80 — the largest gap in the org. The floor is pinned just under current coverage:

with:
  coverage-threshold: 61   # TEMPORARY

fail-on-drop does the real work from today: the baseline is read from the committed coverage badge on main, so coverage cannot regress while the gap closes.

Tracked in #23. nanoterm stays out of the org quality ruleset until the input can be deleted.

Verified locally

Check Result
test:lint PASS
test:format PASS
test:types PASS
test:knip PASS (after knip.json)
build PASS
test:audit PASS
test:ava:coverage PASS — 61.5%

Note

This repo has zero open PRs and zero open issues, so nothing is queued behind any of it.

nanoterm had no PR checks at all — build.yml and update-badges.yml only —
so nothing ran on a pull request despite a full test suite being present.
Sixth repo onto the shared workflow.

Three things had to change first.

test:audit and test:security were missing. nanoterm was the only repo in
the org without them, so test:all meant something different here than
everywhere else. Both now match the org definitions and are wired into
scripts/test.sh alongside the existing checks.

knip then failed on the new test:security script — semgrep is a system
binary, not a dependency, and nanoterm had no knip config at all so it ran
with defaults. Added knip.json allowlisting semgrep, the same way sentinel
and prompt-scrubber already do.

Coverage is 61.5% against an org floor of 80 — the largest gap in the org.
The floor is pinned at 61 with fail-on-drop doing the work, so coverage
cannot regress while the gap closes. Tracked in #23. nanoterm stays out of
the org quality ruleset until it clears 80.

Verified locally: lint, format, types, knip, build, audit and coverage all
pass.

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

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

will-lamerton and others added 2 commits August 30, 2026 14:53
build.yml ran `pnpm run test:all` on a bare ubuntu runner. Adding
test:security to scripts/test.sh in the previous commit broke it —
`sh: 1: semgrep: not found` — because semgrep is a system binary that
is not installed there. The shared workflow runs semgrep in the
semgrep/semgrep container for exactly this reason.

Rather than special-case test.sh, drop the workflow. It duplicated the
shared checks and did less: no coverage floor, no build verification, no
CodeQL, and a security scan that could never have run. Same reasoning as
removing prompt-scrubber's ci.yml.

The build badge is unaffected — update-badges.yml runs its own build step
and does not read this workflow's status.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014WoygKgfq3ahXinVVHqjA8
nanoterm was the only repo computing its build badge from
`pnpm run test:all`; nanotune, get-md and sentinel all use `pnpm build`.

That drift had two consequences. The badge labelled "build" actually
reported the entire test suite, so a lint or coverage problem showed up
as a build failure. And now that test:all includes test:security, this
step would have run semgrep on a bare runner and flipped the badge to
failing — the same `semgrep: not found` that took out build.yml.

Aligns with the rest of the org: the build badge reports whether the
build succeeds.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014WoygKgfq3ahXinVVHqjA8
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