Skip to content

feat: CI gate: run the existing test suite and typecheck on every PR in - #24

Closed
andrei-hasna wants to merge 1 commit into
mainfrom
factory/e4c548b0-391a-406d-a8c8-b8c2617a-eca10da4
Closed

feat: CI gate: run the existing test suite and typecheck on every PR in#24
andrei-hasna wants to merge 1 commit into
mainfrom
factory/e4c548b0-391a-406d-a8c8-b8c2617a-eca10da4

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Objective

CI gate: run the existing test suite and typecheck on every PR in dispatch — the repo has tests but no CI workflow at all [loop-infinity-300pr]

REPO: https://github.com/hasna/dispatch

WHAT TO CHANGE
This repo has a real test suite 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 typecheck (only if the repo defines that script), bun test.
  • Pin the actions to a major version tag (for example actions/checkout@v4, oven-sh/setup-bun@v2) rather than @master.
  • 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: the .github/workflows contents were fetched through the GitHub API and grepped for test and typecheck invocations. Observed state: no .github/workflows directory exists at HEAD (GitHub API returned 404). If CI has since been added or extended 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.

Verification

  • policy source: base 2a7e32b (immutable commit — agent-proof)
  • ⚠️ GATE-INTEGRITY: agent touched verify-bearing config — REVIEW (.github/workflows/ci.yml)
  • containment: env — allowlist env, non-login shell, run-scoped HOME (registry auth seeded for install)
  • install: pass
  • typecheck: pass
  • build: pass
  • test: pass
  • doctor (ci): ok — 11 checks passed (1 advisory)

Run run_4f16cff48bd1 · backend codewith · task e4c548b0-391a-406d-a8c8-b8c2617a666f
🏭 Generated by @hasnaxyz/factory


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

CI gate: run the existing test suite and typecheck on every PR in dispatch — the repo has tests but no CI workflow at all [loop-infinity-300pr]

REPO: https://github.com/hasna/dispatch

WHAT TO CHANGE
This repo has a real test suite 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 typecheck` (only if the repo defines that script), `bun test`.
- Pin the actions to a major version tag (for example actions/checkout@v4, oven-sh/setup-bun@v2) rather than @master.
- 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: the .github/workflows contents were fetched through the GitHub API and grepped for test and typecheck invocations. Observed state: no .github/workflows directory exists at HEAD (GitHub API returned 404). If CI has since been added or extended 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_4f16cff48bd1
X-Factory-Task: e4c548b0-391a-406d-a8c8-b8c2617a666f
@andrei-hasna

Copy link
Copy Markdown
Contributor Author

Closing in favour of #19, which merged.

Both PRs add a byte-for-byte equivalent CI workflow (checkout, setup-bun, bun install --frozen-lockfile, bun run typecheck, bun test, on pull_request + push to main). They were produced by two separate drain waves ~35 minutes apart and neither knew about the other.

The difference that decided it: this PR's CI is RED and #19's is GREEN, and the cause is the one thing #19 also fixed. src/confirm-regression.integration.test.ts asserted expect(pane).toContain("open-dispatch") — the literal name of a local checkout directory. On a GitHub runner the working directory is /home/runner/work/dispatch/dispatch, so that assertion can never pass in CI. Run 30460202635 fails on exactly those two assertions.

#19 replaces the hardcoded folder name with process.cwd(), which is both portable and still a real assertion. Merging this PR instead would have installed a permanently-failing gate on main.

No work is lost — #19 carries the same workflow plus the fix that makes it pass.

@andrei-hasna
andrei-hasna deleted the factory/e4c548b0-391a-406d-a8c8-b8c2617a-eca10da4 branch July 30, 2026 13:02
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