Connect by JBRH Open Connect

Development and quality tools

Connect is checked by its own gates before anything merges. The static gate runs the Ruff linter, the Bandit security scanner, the documentation and knowledge-base checks and the call-quality lock. The regression runner chooses which of the 600-plus suites a change answers to. The UI gate looks at changed screens as both audiences.

Status
Reference What this means
Audience
both, developer
Last verified
Product version
6.3.2

What it is#

Ruff is a fast Python linter written in Rust by Astral. Bandit, from the PyCQA, scans Python for common security mistakes such as shell injection or weak hashing.

The rest are Connect's own tools in tools/: ci_gate.py, run_regression.py, ui_gate.py, kb.py, docs_check.py and task_record_check.py. They exist because GitHub Actions is not relied on, so every check runs the same way on a PC or in a cloud session.

Category
Development and quality tooling
Third-party tools
Ruff (MIT), Bandit (Apache-2.0), Playwright for screens
Own tools
tools/ci_gate.py, tools/run_regression.py, tools/ui_gate.py, tools/kb.py
Official sites
docs.astral.sh/ruff, bandit.readthedocs.io

Where Connect uses it#

Place in ConnectWhat it does there
ci_gate.py --fastLint, security scan, the docs and knowledge-base checks, the task-record check and the call-quality lock, in about half a minute
run_regression.py --changed <base>Selects the suites that name the files a change touched, and widens to the whole set when the change reaches everything
ui_gate.py --changedRenders the changed screens for the Owner and a customer, from 320 to 1440 px
docs_build.py, docs_check.pyBuild and check this documentation

How it connects#

  1. Change the code
  2. kb.py generate, then ci_gate.py --fast
  3. run_regression.py --changed against a _test database only
  4. ui_gate.py --changed for a screen change
  5. Merge into production-core, then release

Benefits and limits#

What it gives Connect:

  • The same gates on every machine, independent of a hosted CI service.
  • Suite selection by touched files keeps a small change's check to minutes.
  • The call-quality lock makes a change to what a caller hears a red gate, not a silent regression.

Where it stops, and what Connect does about it:

  • A linter and a scanner find patterns, not logic errors. The suites and the two-audience browser pass carry the rest.
  • The whole regression set takes over an hour on four cores, so it runs only when the runner selects it.
  • Suites write data, so they refuse any database whose name does not end in _test.

Security and privacy#

  • Bandit runs on every change in the static gate.
  • The task-record check refuses a record that calls code live without naming the deployed commit and time.
  • Test sessions are minted against _test databases. Production is never a test target.

Licence, cost and versions#

QuestionAnswer
LicencesRuff: MIT. Bandit: Apache-2.0. Connect's own tools: Connect's code
CostNone beyond compute
VersionsInstalled in the development virtualenv; not part of the production requirements
CompatibilityLinux, macOS and Windows; Python 3.12

Troubleshooting#

ci_gate fails on the knowledge base
Run python tools/kb.py generate first and commit the generated files.
The runner says WHOLE
It names the line that widened the selection. An additive shape often avoids it.
A suite refuses to run
The database URL does not end in _test. That refusal is intended.

Official references#

Questions#

Why not rely on GitHub Actions?

The gates must run identically on a PC and in a cloud session, including when a hosted CI service is unavailable. The tools in the repository are the source of truth. A hosted run is a convenience.

What is the call-quality lock?

A suite that pins everything a caller hears: the voice and model settings, turn-taking, noise filters, the greeting and the speaking rules. A change there fails the gate unless the owner approved it with a measured call.