Skip to content

Proposal: CI baseline (correctness + security) gate for the repo #2288

Description

@nopoz

Prerequisites

  • I searched open issues and this has not already been proposed.
  • I searched discussions and this is not already being debated there.
  • This is a concrete, actionable proposal — not a vague "it would be nice if..." request.

Area

Testing / CI

Problem or Motivation

There is no correctness or security CI on main today. The only workflows present are the description linters (issue-description-check.yml, pr-description-check.yml), so nothing automatically catches broken or low-quality submissions before review.

The open-PR backlog is large and skews big, with clear duplicates and a lot of AI-generated noise. Reviewing all of it by hand with no gate is a losing battle, and there is nothing today that lets the backlog be filtered retroactively or that blocks the next regression from landing.

This issue is a single consolidated proposal to agree on CI direction before any PRs, in line with CONTRIBUTING.md's guidance to open an issue first for larger changes. The aim is a minimal, maintainer-owned gate; nothing here would land without maintainer sign-off.

Proposed Solution

A minimal gate that runs on every PR, in two parts plus optional scaffolding:

1. Correctness checks

  • Python syntax: python -m compileall over the app sources (app.py core routes src services scripts tests) — catches syntax errors without installing dependencies.
  • JS syntax: node --check over static/app.js and static/js/** (frontend is plain JS, no build step; vendored static/lib is skipped).
  • pytest on the existing suite, informational at first. The suite has known flaky / environment-dependent failures, so it should run non-blocking and be promoted to a required check only once it is reliably green.

This is exactly what #1015 (vdmkenny) already implemented: a single ci.yml with those three jobs, pytest already marked continue-on-error. It reads clean and well-scoped; it is now closed, but it is the natural correctness base if reopened.

2. Security scanning

3. Triage scaffolding (optional, later wave)

Suggested sequencing

  1. Correctness baseline first (reopen or resubmit feat(ci): Add CI workflow (syntax + tests) #1015).
  2. Security bundle (ci: security scanning suite and governance (consolidates #305-310) #1314) rebased on top, confirmed green.
  3. Branch protection enabled with the green checks required (initially the syntax jobs plus the security scans; pytest stays informational until the suite is reliably green, then gets promoted). That admin step is what makes the gate actually hold; without it the checks run but nothing blocks a failing merge.
  4. Scaffolding (labels/templates) after, if wanted.

Open questions for the maintainer

  • A yes/no (or edits) on the scope and ordering above.
  • Whether to reopen the closed PRs or resubmit fresh.
  • Preferred merge path for workflow files (web UI merges use the maintainer account's permissions and sidestep the missing workflow token scope, so they work today with nothing to set up).
  • Confirmation that Actions is enabled under Settings > Actions > General, otherwise the workflows merge but never run.

Alternatives Considered

Writing a single all-in-one CI workflow from scratch instead of building on existing PRs — ruled out to avoid throwing away review already done on #1015 and the scanner work, and to keep each piece small and revertible. Doing nothing and reviewing by hand — ruled out as unscalable given the backlog size.

Prior Art / Related Issues

Are you willing to implement this?

Yes — I can open a PR

Metadata

Metadata

Labels

ciContinuous integration / CI workflowsenhancementNew feature or requestready for reviewDescription complete — ready for maintainer review

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions