Skip to content

Add minimal GitHub Actions CI and safety pattern checks - #1

Merged
monitorian merged 1 commit into
mainfrom
codex/add-safe-development-infrastructure
May 9, 2026
Merged

monitorian merged 1 commit into
mainfrom
codex/add-safe-development-infrastructure

Conversation

@monitorian

Copy link
Copy Markdown
Owner

Motivation

  • Provide a minimal, non-privileged CI to catch syntactic and obvious unsafe changes before merge.
  • Prevent accidental modification of hardware or timing behavior by statically flagging dangerous code patterns.
  • Keep runtime and hardware control code untouched while enabling basic developer checks.

Description

  • Add a GitHub Actions workflow at .github/workflows/ci.yml that runs on push to main and on pull_request with read-only contents permission and no elevated privileges.
  • Add scripts/safety-checks.js, a static safety checker that scans source files and fails on while(true)/for(;;) infinite-loop patterns, setInterval calls below 1000 ms, and direct echonet-lite/hardware API usage outside approved wrapper files (and it excludes itself from scanning).
  • Update package.json scripts to include lint, typecheck, build, and safety:check so CI runs npm run lint, npm run typecheck, npm run build, npm test, and npm run safety:check.
  • CI scope: the pipeline validates syntax/lint, type/syntax gates, package build, tests, and the added dangerous-pattern detection; CI cannot validate actual hardware behavior, charging/electrical safety, or timing stability; end-to-end charging/ECHONET behavior and timing/retry/service behavior require real hardware testing.

Testing

  • Ran npm run lint, npm run typecheck, npm run build, npm test, and npm run safety:check, and all of these commands completed successfully in the CI simulation.
  • The workflow is configured to run the same steps on CI, so the added checks will execute automatically for push/pull_request events.

Codex Task

@monitorian
monitorian merged commit 4d948d2 into main May 9, 2026
1 check passed
@monitorian
monitorian deleted the codex/add-safe-development-infrastructure branch May 9, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant