Skip to content

fix(review): gate.readiness.mode "block" is accepted and documented but the quality gate can never hard-block #2267

Description

@JSONbored

Parent: #1936

Problem

The example config documents gate.readiness.mode as tri-state off | advisory | block ("at/above this score the quality dimension passes"), and the parser accepts block as valid config with no warning. But buildQualityGateWarning in src/rules/advisory.ts only ever returns a severity: "warning" finding added to gateWarnings — never to blockers — and isConfiguredGateBlocker has no branch for the readiness/quality code at all. A repo-wide code comment confirms this is intentional ("readiness is informational only... must never fail the Gate check"), but the config surface still accepts and documents block as if it were enforced.

Unlike most gaps in this audit, this one is the opposite framing — the maintainer believes a real quality floor is enforced when none is, making the effective behavior more permissive than documented.

Failure scenario: a maintainer sets gate.readiness.minScore: 70 and gate.readiness.mode: block expecting low-quality PRs (readiness score below 70) to be hard-blocked from merging. In reality the gate silently degrades this to an advisory-only warning that never prevents an otherwise-clean, CI-green PR from auto-merging.

Requirements

  • The documented config surface must match the enforced behavior — a maintainer must not be able to configure a control they believe is a hard block when it can never actually block.

Deliverables

  • Restrict the parser/schema to only accept off | advisory for gate.readiness.mode, emitting a warning (deprecation notice) when block is supplied instead of silently accepting it.
  • Update .gittensory.yml.example and any OpenAPI/schema enums to drop block from the documented readiness options, matching the enforced advisory-only behavior.
  • Add a regression test asserting gate.readiness.mode: block produces a parser warning and does not result in a blocker-class finding.

Acceptance criteria

  • Setting gate.readiness.mode: block no longer silently passes validation — it either warns clearly or is rejected.
  • A low-readiness, CI-green PR's actual disposition (advisory-only) matches what the config surface now documents.

Expected outcome

A maintainer can no longer configure a quality floor they believe is enforced when it isn't — the documented config options match what the gate actually does.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions