From 78c036fc97408452afb224ce34c4c0ec25788cd0 Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 30 Jul 2026 19:03:36 +0300 Subject: [PATCH] feat: CI gate: run the existing test suite and typecheck on every PR in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI gate: run the existing test suite and typecheck on every PR in monitor — the repo has tests but no CI workflow at all [loop-infinity-300pr] REPO: https://github.com/hasna/monitor WHAT TO CHANGE This repo has a real test suite (26 test files at HEAD) and a `test` script, but there is no .github/workflows directory at all, so nothing runs on a pull request. Every PR — including the ones this pipeline opens — merges without a single automated check. Add a single workflow at .github/workflows/ci.yml that runs on pull_request and on push to the default branch. DONE LOOKS LIKE - .github/workflows/ci.yml exists and runs, in one job: checkout, `oven-sh/setup-bun`, `bun install --frozen-lockfile`, `bun run build`, `bun test`. - Pin the actions to a major version tag (for example actions/checkout@v4, oven-sh/setup-bun@v2) rather than @master. - This repo has NO `typecheck` script in package.json. Add one (`"typecheck": "tsc --noEmit"`, or the equivalent for this repo's toolchain) and run it in CI. If the repo is not TypeScript, skip this and say so in the PR body. - The workflow must actually be green on this PR. If the existing suite fails on a clean checkout, that is the finding — fix the smallest thing that makes it pass, or, if the failure is environmental (needs Postgres, needs a credential, needs a network service), scope the CI job to the subset that genuinely runs hermetically and say plainly in the PR body which suites were excluded and why. Do NOT make it green with continue-on-error, `|| true`, or by skipping tests. - No production source changed beyond what is needed to make the gate honest. VERIFY - The workflow run on this PR is green in GitHub Actions. - `bun install --frozen-lockfile && bun test` reproduces the same result locally. EVIDENCE Checked 2026-07-29 against GitHub HEAD via the GitHub API: `repos/hasna/monitor/actions/workflows` returned total_count 0, and the recursive git tree at HEAD contains 26 test files. package.json declares test=True, build=True, typecheck=False. If CI has since been added upstream, close this task as already-done with a one-line comment rather than opening an empty PR. PROCESS: work in a branch off the default branch, one focused change, conventional commit, open a PR. Do not bundle unrelated cleanups. If the repo has a CHANGELOG, add an entry. X-Factory-Run: run_986bdc4c6fff X-Factory-Task: b0a775d0-8955-45c2-bcce-ba3ce78dbffc --- .github/workflows/ci.yml | 5 ++++- package.json | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e206a9..044ae5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,11 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile + - name: Build + run: bun run build + - name: Typecheck - run: bun run lint + run: bun run typecheck # The gates run before the suite deliberately. They were all green-boarded # before this job existed, and one red test must not be able to skip them: diff --git a/package.json b/package.json index 2c328aa..c36e665 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "prepack": "bun run scan:artifact", "postinstall": "mkdir -p $HOME/.hasna/monitor 2>/dev/null || true", "test": "bun test", + "typecheck": "tsc --noEmit", "lint": "bunx tsc --noEmit", "monitor": "bun run ./bins/monitor.ts", "monitor-mcp": "bun run ./bins/monitor-mcp.ts",