chore: add mise toolchain, agent docs, and CI hardening - #37
Merged
Conversation
Bring the project scaffolding up to standard so both humans and agents have a single, verifiable entry point. Toolchain (.mise.toml): - Pin Node to 22.20.0 — the exact version packaging/assemble.sh bundles into the .deb, so CI now tests the runtime that actually ships to the Pi. It was testing on Node 20. - Pin zizmor and actionlint so the workflow audits are runnable locally. - 13 tasks delegating to the existing npm scripts, plus `ci` and `ci-watch`. CI: - Route the gate through `mise run ci` so local and CI cannot drift. - Add least-privilege `permissions: contents: read`, a cancel-in-progress concurrency group, `workflow_dispatch`, and `persist-credentials: false`. - Add a zizmor job auditing the workflows on every run. - release.yml: set `persist-credentials: false`; nothing there pushes with git, so the credential need not survive into the docker build step. Coverage: - Wire @vitest/coverage-v8 with per-metric floors (50/48/40/50), scoped to src/plot and src/grbl — the framework-free core. src/ui and src/transport need a DOM and a live socket, so including them would only buy a floor low enough to be meaningless. Verified the floor actually fails the build. Agent + contributor docs: - AGENTS.md as the canonical agent config, CLAUDE.md as a symlink to it. It leads with the machine-safety rules — never interrupt a running plot (there is no resume), no limit switches, inverted Z, identity axis mapping, and the open-the-port-exactly-once constraint behind the CH340 wedge. - docs/agents/issue-tracker.md, and the four missing triage labels created on the remote. Fixes found on the way: - README had an empty code block where the rollback instructions belonged. - README claimed React 18; the project is on 19. - dependabot.yml had no cooldown, so a compromised release could be proposed the day it lands. Now 7 days on both ecosystems. zizmor reports no findings and actionlint is clean, with no suppressions added. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the project scaffolding up to standard so both humans and agents have a single, verifiable entry point. No runtime behaviour changes — nothing here touches the plotting path.
Toolchain
Adds
.mise.tomlas the single source of truth:22.20.0— the exact versionpackaging/assemble.shbundles into the.deb. CI was testing on Node 20, so it was not testing the runtime that ships to the Pi.zizmorandactionlintpinned, so the workflow audits are runnable locally.ciandci-watch..mise.tomlandpackaging/assemble.sh. Bump both together.CI
mise run ci, so local and CI cannot drift.permissions: contents: read, a cancel-in-progress concurrency group,workflow_dispatch, andpersist-credentials: false.release.yml: setspersist-credentials: false. Nothing there pushes with git (the release upload authenticates with an explicitGH_TOKEN), so the credential need not survive into the docker build step.Coverage
Wires
@vitest/coverage-v8with per-metric floors — statements 50, branches 48, functions 40, lines 50 — set just under measured so they ratchet against regressions rather than blocking today's work.Scoped to
src/plotandsrc/grbl, the framework-free core.src/uiandsrc/transportneed a DOM and a live socket; folding them in would only buy a floor low enough to be meaningless. Current core coverage is 53.4% statements.Agent and contributor docs
AGENTS.mdas the canonical agent config,CLAUDE.mdas a symlink to it. It leads with the machine-safety rules: never interrupt a running plot (there is no resume), no limit switches, inverted Z, identity axis mapping, and the open-the-port-exactly-once constraint behind the CH340 wedge.docs/agents/issue-tracker.md, plus the four missing triage labels (needs-triage,needs-info,ready-for-agent,ready-for-human) created on the remote.Fixes found on the way
README.mdhad an empty code block where the rollback instructions belonged.README.mdclaimed React 18; the project is on 19.dependabot.ymlhad no cooldown, so a compromised release could be proposed the day it lands. Now 7 days on both ecosystems.SECURITY.mdhedged that private vulnerability reporting "should be enabled" — verified it is, so the text is now definite.Verification
mise run cipasses: format-check, both typechecks, 53 tests, build.zizmor --collect=all --strict-collection .reports no findings with online audits enabled;actionlintis clean. No suppressions were added.The one thing that cannot be verified before merge is this workflow itself: it now builds the
serialportnative binding under Node 22.20.0 instead of 20. Worth watching the first run on this PR.🤖 Generated with Claude Code