chore(quality): velocity phase — loosen every numeric baseline by 20% until v4.0, monitor headroom nightly - #12125
Merged
diegosouzapw merged 1 commit intoAug 30, 2026
Conversation
… 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.
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.
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.
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):quality-baseline.jsonmetricseslintErrorsstays 0complexity-baseline.jsonduplication-baseline.jsonfile-size-baseline.jsonapi/dashboard/open-sse-typecheck-baseline.jsoncheck-openapi-coverage.mjsThe phase is declared in
quality-baseline.json→_policy {phase: velocity, until: 4.0.0, relaxPct: 20, requireTighten: false};check-quality-ratchetturns--require-tighteninto an advisory while it exists (2 new tests), and the nightlybank-ratchet-shrinksjob 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 jobbaseline-headroomposts the table to the living issue 📈 Baseline headroom (velocity phase) and toggles theheadroom-alertlabel — 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 8vistrings #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.mdquick 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 locallyquality-ratchet.test.ts20/20,baseline-headroom.test.ts6/6, the 6 aligned test files 49/49actionlintclean;npm run quality:headroom -- --only fileSize,rtlPhysicalClassessmoke OK