chore(ci): adopt ratchet-based quality gate#48
Closed
AlexandreCamillo wants to merge 1 commit into
Closed
Conversation
Adopt the alkg-cloud/quality-gate engine: a strict ratchet comparing per-PR coverage/duplication/lint/file_size/security against a baseline on the orphan quality-metrics branch, refreshed on every push to main. Additive to test.yml. - quality-gate.config.json: strict ratchet, MAX_FILE_LINES 300, blocks critical and warns high security advisories. - .quality-gate/adapter.sh: vitest (v8 coverage), biome lint, jscpd (src), pnpm audit. Self-bootstraps deps + prisma client + fixtures because the gate workflows check out Node only. - quality-gate-pr / quality-gate-main workflows; Node pinned to 22 to match engines.node. - docs/ci.md: document the gate.
Collaborator
Author
|
Closing as a duplicate: the quality gate is already implemented and merged on main via #47. This branch was built from a stale local main before fetching, so it's redundant and out of date. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopts the
alkg-cloud/quality-gateengine — a strict, ratchet-based quality gate that runs on every PR and fails it on regression. It is additive totest.yml(does not replace lint/typecheck/test/build). Per-PR metrics are compared against a baseline stored on the orphanquality-metricsbranch, refreshed on every push tomain.This is the bootstrap PR: it runs in bootstrap mode (no baseline yet) and passes. Merging it creates the orphan branch and the first baseline.
Files
quality-gate.config.json— strict ratchet (epsilon 0),MAX_FILE_LINES300,MIN_NEW_FILE_COVERAGE60, blockscritical/ warnshighsecurity advisories; adapter namenode..quality-gate/adapter.sh— emits the six canonical metric files using this repo's own tooling:json-summary), full unit + integration suitebiome check .(errors + warnings per file)jscpdoversrc/git ls-files) ≥MAX_FILE_LINESpnpm auditseverity countsThe adapter self-bootstraps its environment (corepack →
pnpm install→prisma generate→ fixtures) because the gate workflows check out Node only..github/workflows/quality-gate-pr.yml/quality-gate-main.yml— copied from the engine templates; Node pinned to 22 to matchengines.node.docs/ci.md— new "Quality gate" section.Baseline this PR's merge will capture
Local verification
qg-core collect— all six files schema-valid ✅qg-core compare --baseline NONE—gate_passed: true(bootstrap) ✅Notes for the reviewer (require admin / a decision)
quality-gate / quality-gate(this cannot be set from the PR).Heads-up / tunables
pnpm installon every PR and every push tomain, roughly doubling CI time vstest.yml. Coverage can be scoped to unit-only later if that's too heavy.anywarning trips the ratchet — tunable to errors-only.QG_REFismain(mutable); pin to a tag/SHA in the workflows' install step for reproducible CI.Test plan
quality-gatecheck runs green on this PR (bootstrap mode)quality-gate-baselinerun creates thequality-metricsorphan branch