From 45698736e3e9c30eb8af3caa04f062f73d62f3b4 Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> Date: Sun, 19 Jul 2026 09:38:57 -0300 Subject: [PATCH] fix(docs): heal release-green docs drift + eslint any-suppression drift (#7253) (#7755) - docs/routing/REASONING_ROUTING.md: migration renumbered 125->126 - docs/INCIDENT_RESPONSE.md, docs/PERF_BUDGETS.md: /api/version renamed to /api/system/version - config/quality/eslint-suppressions.json: rebaseline no-explicit-any counts for tests/unit/combo-routing-engine.test.ts (261->269) and tests/unit/base-executor-sanitize-effort.test.ts (45->48), drifted by the prior base-red full-suite realignment commits (dbc9f6081, 764a4aee0) whose sibling test-file-size ratchet was already rebaselined in 00b853969 but this gate was missed - tests/unit/call-log-provider-display.test.ts, tests/unit/m365-web-token-extraction-7078.test.ts: removed the never-baselined explicit any usages (typed via inference instead) --- changelog.d/fixes/7253-release-green-drift.md | 1 + config/quality/eslint-suppressions.json | 4 +- docs/INCIDENT_RESPONSE.md | 2 +- docs/PERF_BUDGETS.md | 2 +- docs/routing/REASONING_ROUTING.md | 2 +- tests/unit/call-log-provider-display.test.ts | 4 +- .../m365-web-token-extraction-7078.test.ts | 3 +- .../release-green-docs-drift-7253.test.ts | 39 +++++++++++++++++++ 8 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 changelog.d/fixes/7253-release-green-drift.md create mode 100644 tests/unit/release-green-docs-drift-7253.test.ts diff --git a/changelog.d/fixes/7253-release-green-drift.md b/changelog.d/fixes/7253-release-green-drift.md new file mode 100644 index 0000000000..3ab36730a8 --- /dev/null +++ b/changelog.d/fixes/7253-release-green-drift.md @@ -0,0 +1 @@ +- fix(docs): correct stale `/api/version` and migration-125 references + realign `no-explicit-any` suppression counts drifted by base-red realignment commits (#7253) diff --git a/config/quality/eslint-suppressions.json b/config/quality/eslint-suppressions.json index 73daf5a475..af68f5c97a 100644 --- a/config/quality/eslint-suppressions.json +++ b/config/quality/eslint-suppressions.json @@ -599,7 +599,7 @@ }, "tests/unit/base-executor-sanitize-effort.test.ts": { "@typescript-eslint/no-explicit-any": { - "count": 45 + "count": 48 } }, "tests/unit/batch_api.test.ts": { @@ -1024,7 +1024,7 @@ }, "tests/unit/combo-routing-engine.test.ts": { "@typescript-eslint/no-explicit-any": { - "count": 261 + "count": 269 } }, "tests/unit/combo-same-provider-cascade.test.ts": { diff --git a/docs/INCIDENT_RESPONSE.md b/docs/INCIDENT_RESPONSE.md index 95cada8e84..e7990516c7 100644 --- a/docs/INCIDENT_RESPONSE.md +++ b/docs/INCIDENT_RESPONSE.md @@ -99,7 +99,7 @@ not** skip steps; each is timed. ### 4.2 Cluster-wide latency regression -1. Check the most recent deploy (`/api/version` returns the SHA). +1. Check the most recent deploy (`/api/system/version` returns the SHA). 2. If p95 doubled vs the 7-day baseline, **roll back** to the prior SHA via `bin/rollback.sh`. 3. If the regression is provider-side, see § 4.1. diff --git a/docs/PERF_BUDGETS.md b/docs/PERF_BUDGETS.md index ca7af81f12..64c04623fb 100644 --- a/docs/PERF_BUDGETS.md +++ b/docs/PERF_BUDGETS.md @@ -125,7 +125,7 @@ flag in the weekly perf review. | Endpoint | Method | p50 | p95 | p99 | |---|---|---|---|---| | `/api/health/ping` | GET | 5 ms | 20 ms | 50 ms | -| `/api/version` | GET | 5 ms | 20 ms | 50 ms | +| `/api/system/version` | GET | 5 ms | 20 ms | 50 ms | | `/api/docs` | GET | 20 ms | 80 ms | 200 ms (HTML shell, no provider call) | --- diff --git a/docs/routing/REASONING_ROUTING.md b/docs/routing/REASONING_ROUTING.md index c8ffaed693..c81d69e3ac 100644 --- a/docs/routing/REASONING_ROUTING.md +++ b/docs/routing/REASONING_ROUTING.md @@ -64,7 +64,7 @@ executed there. The rule decision is stored in the existing route trace without ## Persistence -The migration `src/lib/db/migrations/125_reasoning_routing_rules.sql` creates the +The migration `src/lib/db/migrations/126_reasoning_routing_rules.sql` creates the `reasoning_routing_rules` table. Rules reference stored API keys, combos, and provider connections. Deletes clean up related rules. The database access layer in `src/lib/db/reasoningRoutingRules.ts` maintains an invalidatable cache for the request path. diff --git a/tests/unit/call-log-provider-display.test.ts b/tests/unit/call-log-provider-display.test.ts index 4688343051..4b1e9ee4ce 100644 --- a/tests/unit/call-log-provider-display.test.ts +++ b/tests/unit/call-log-provider-display.test.ts @@ -107,8 +107,8 @@ test("buildCallLogListRows adds providerDisplay to active and completed in-memor ], }); - const pending = rows.find((row: any) => row.id === "pending-1"); - const completed = rows.find((row: any) => row.id === "completed-1"); + const pending = rows.find((row) => row.id === "pending-1"); + const completed = rows.find((row) => row.id === "completed-1"); assert.equal(pending?.providerDisplay, "Bynara"); assert.equal(completed?.providerDisplay, "Bynara"); diff --git a/tests/unit/m365-web-token-extraction-7078.test.ts b/tests/unit/m365-web-token-extraction-7078.test.ts index 68ed08b7fc..eb76703877 100644 --- a/tests/unit/m365-web-token-extraction-7078.test.ts +++ b/tests/unit/m365-web-token-extraction-7078.test.ts @@ -5,8 +5,7 @@ import test from "node:test"; import assert from "node:assert/strict"; const B = await import("../../src/lib/providers/validation/webProvidersB.ts"); -const extract = (raw: string) => - (B as Record).extractM365CredentialParts(raw, {}); +const extract = (raw: string) => B.extractM365CredentialParts(raw, {}); test("#7078 m365.cloud.microsoft wss URL extracts access_token + chathubPath", () => { const raw = diff --git a/tests/unit/release-green-docs-drift-7253.test.ts b/tests/unit/release-green-docs-drift-7253.test.ts new file mode 100644 index 0000000000..edbc3f6620 --- /dev/null +++ b/tests/unit/release-green-docs-drift-7253.test.ts @@ -0,0 +1,39 @@ +// Issue #7253 — the "release branch not green" bot tracker for release/v3.8.49 +// found the branch genuinely red for `check:fabricated-docs --strict`: two doc +// files referenced a migration file / API route that no longer exist under +// those names (docs went stale after src/ moved on): +// - docs/routing/REASONING_ROUTING.md:67 -> migration renumbered 125 -> 126 +// - docs/INCIDENT_RESPONSE.md / docs/PERF_BUDGETS.md -> `/api/version` route +// was renamed to `/api/system/version` +// +// This runs the real doc-accuracy checker against the live repo tree (no +// fixture root override) so it keeps guarding against future doc drift, not +// just the two specific lines fixed here. +import test from "node:test"; +import assert from "node:assert/strict"; + +import { runFabricatedDocsCheck, formatHumanReport } from "../../scripts/check/check-fabricated-docs.mjs"; + +test("#7253 release-green: docs contain zero fabricated API/file-ref drift", () => { + const result = runFabricatedDocsCheck(); + if (result.totalFindings > 0) { + assert.fail(`fabricated-docs drift found:\n${formatHumanReport(result)}`); + } + assert.equal(result.totalFindings, 0); +}); + +test("#7253: REASONING_ROUTING.md references the current migration filename (126, not 125)", () => { + const result = runFabricatedDocsCheck(); + const hit = result.files + .flatMap((f) => f.findings.map((finding) => ({ file: f.rel, ...finding }))) + .find((f) => f.value === "src/lib/db/migrations/125_reasoning_routing_rules.sql"); + assert.equal(hit, undefined, "stale migration-125 reference must not resurface"); +}); + +test("#7253: INCIDENT_RESPONSE.md / PERF_BUDGETS.md reference /api/system/version, not the removed /api/version", () => { + const result = runFabricatedDocsCheck(); + const hit = result.files + .flatMap((f) => f.findings.map((finding) => ({ file: f.rel, ...finding }))) + .find((f) => f.value === "/api/version"); + assert.equal(hit, undefined, "stale /api/version reference must not resurface"); +});