Skip to content

chore(quality): velocity phase — loosen every numeric baseline by 20% until v4.0, monitor headroom nightly - #12125

Merged
diegosouzapw merged 1 commit into
release/v3.8.51from
chore/velocity-phase-baselines-plus20
Aug 30, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.51from
chore/velocity-phase-baselines-plus20

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Why

Owner decision (2026-08-30): until the v4.0 LTS modularization, speed matters more than holding the debt line. Today the base went red on every merge batch and each baseline red cost a sweep (#12087, #12094, #12114, #12118, #12123 in one day).

What

Relaxation — one auditable pass (scripts/quality/relax-baselines.mjs --pct 20 --note velocity_2026_08_30):

baseline before → after
quality-baseline.json metrics lower-is-better ×1.2, higher-is-better ÷1.2 — e.g. deadExports 416→500, cognitive 1197→1437, coverage 80.8→67.33 (floor 60 kept), typeCoverage 92.17→76.81, eslintWarnings 0→1050 (20% of the 5,247 frozen suppressions), eslintErrors stays 0
complexity-baseline.json count 2681 → 3218
duplication-baseline.json 5.72% → 6.86%
file-size-baseline.json cap/testCap 1000 → 1200, all 127 frozen caps ×1.2
api/dashboard/open-sse-typecheck-baseline.json per-file counts ×1.2 (289→455, 229→324, 5→9)
check-openapi-coverage.mjs THRESHOLD 36 → 30

The phase is declared in quality-baseline.json → _policy {phase: velocity, until: 4.0.0, relaxPct: 20, requireTighten: false}; check-quality-ratchet turns --require-tighten into an advisory while it exists (2 new tests), and the nightly bank-ratchet-shrinks job pauses (it would bank the measured shrink and silently undo the headroom every night). Allowlists and pass/fail gates are untouched.

Monitoring — scripts/quality/baseline-headroom.mjs (npm run quality:headroom) measures every numeric gate the way CI does and prints live / baseline / headroom (ok ≥10%, warn <10%, critical <0). New nightly job baseline-headroom posts the table to the living issue 📈 Baseline headroom (velocity phase) and toggles the headroom-alert label — the early warning that a budget is being eaten by a few PRs. 6 unit tests on the pure helpers.

Red tests on the tip aligned to merged contracts (not baselines): #11775 (FREE lease-capable connections are ordinary capacity — gate inventory 48/97/99, sse-auth-exclusive-leases, warmupScheduler), #11794 (dual-loopback readiness probe), the 8 vi strings #11775 left as __MISSING__.

Docs: QUALITY_GATES.md → "Velocity phase" (tooling + how to close the phase at 4.0 and tighten beyond the measured values), AGENTS.md quick reference. Plan + 2026 research (Sonar Clean-as-You-Code new-code period, ESLint bulk suppressions, quality ratchets) in _tasks/superpowers/plans/2026-08-30-velocity-phase-baselines-to-v4.md.

Validation

  • check:file-size, check-api-typecheck, check-openapi-coverage, check:env-doc-sync, check:docs-sync, check:doc-links, check:fabricated-docs → all green locally
  • quality-ratchet.test.ts 20/20, baseline-headroom.test.ts 6/6, the 6 aligned test files 49/49
  • actionlint clean; npm run quality:headroom -- --only fileSize,rtlPhysicalClasses smoke OK

… until v4.0, monitor headroom nightly

Owner decision (2026-08-30): shipping speed matters more than holding the debt line
until the v4.0 LTS modularization; the base was going red on every merge batch and
each red baseline cost a sweep.

Relaxation (one auditable pass, scripts/quality/relax-baselines.mjs):
- quality-baseline.json metrics: lower-is-better ×1.2, higher-is-better ÷1.2
  (coverage floor 60 kept; eslintErrors stays 0; eslintWarnings 0 → 1050 = 20% of
  the 5,247 frozen suppressions). Adds `_policy {phase: velocity, until: 4.0.0,
  relaxPct: 20, requireTighten: false}` + a `_relax_velocity_2026_08_30` note
  listing every before → after.
- complexity count 2681 → 3218; duplication 5.72 → 6.86; file-size cap/testCap
  1000 → 1200 and all 127 frozen caps ×1.2; api/dashboard/open-sse typecheck
  per-file counts ×1.2; openapi-coverage THRESHOLD 36 → 30.
- check-quality-ratchet: --require-tighten is advisory while _policy.requireTighten
  is false (2 new tests); nightly bank-ratchet-shrinks pauses during the phase (it
  would bank the measured shrink and undo the headroom every night).

Monitoring (scripts/quality/baseline-headroom.mjs, npm run quality:headroom):
measures each numeric gate the way CI does, prints live / baseline / headroom per
gate (ok ≥10%, warn <10%, critical <0); the new nightly `baseline-headroom` job
posts the table to the living issue "📈 Baseline headroom (velocity phase)" and
toggles the `headroom-alert` label. 6 unit tests on the pure helpers.

Also aligns the remaining red tests on the tip to contracts already merged:
#11775 (FREE lease-capable connections are ordinary capacity: gate inventory 48/97/99,
sse-auth selection, warmup scheduler), #11794 (dual-loopback readiness probe), and the
8 vi strings #11775 left as __MISSING__.

Docs: QUALITY_GATES.md → "Velocity phase" (what changed, tooling, how to close the
phase at 4.0), AGENTS.md quick reference.
@diegosouzapw
diegosouzapw merged commit 1f4dc83 into release/v3.8.51 Aug 30, 2026
21 checks passed
@diegosouzapw
diegosouzapw deleted the chore/velocity-phase-baselines-plus20 branch August 30, 2026 13:39
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… until v4.0, monitor headroom nightly (diegosouzapw#12125)

Owner decision (2026-08-30): shipping speed matters more than holding the debt line
until the v4.0 LTS modularization; the base was going red on every merge batch and
each red baseline cost a sweep.

Relaxation (one auditable pass, scripts/quality/relax-baselines.mjs):
- quality-baseline.json metrics: lower-is-better ×1.2, higher-is-better ÷1.2
  (coverage floor 60 kept; eslintErrors stays 0; eslintWarnings 0 → 1050 = 20% of
  the 5,247 frozen suppressions). Adds `_policy {phase: velocity, until: 4.0.0,
  relaxPct: 20, requireTighten: false}` + a `_relax_velocity_2026_08_30` note
  listing every before → after.
- complexity count 2681 → 3218; duplication 5.72 → 6.86; file-size cap/testCap
  1000 → 1200 and all 127 frozen caps ×1.2; api/dashboard/open-sse typecheck
  per-file counts ×1.2; openapi-coverage THRESHOLD 36 → 30.
- check-quality-ratchet: --require-tighten is advisory while _policy.requireTighten
  is false (2 new tests); nightly bank-ratchet-shrinks pauses during the phase (it
  would bank the measured shrink and undo the headroom every night).

Monitoring (scripts/quality/baseline-headroom.mjs, npm run quality:headroom):
measures each numeric gate the way CI does, prints live / baseline / headroom per
gate (ok ≥10%, warn <10%, critical <0); the new nightly `baseline-headroom` job
posts the table to the living issue "📈 Baseline headroom (velocity phase)" and
toggles the `headroom-alert` label. 6 unit tests on the pure helpers.

Also aligns the remaining red tests on the tip to contracts already merged:
diegosouzapw#11775 (FREE lease-capable connections are ordinary capacity: gate inventory 48/97/99,
sse-auth selection, warmup scheduler), diegosouzapw#11794 (dual-loopback readiness probe), and the
8 vi strings diegosouzapw#11775 left as __MISSING__.

Docs: QUALITY_GATES.md → "Velocity phase" (what changed, tooling, how to close the
phase at 4.0), AGENTS.md quick reference.
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